From: tomo Date: Wed, 19 Jan 2000 03:58:14 +0000 (+0000) Subject: Merge r21-2-24-utf-2000-0_13-0. X-Git-Tag: r21-2-26-utf-2000-0_13-0~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=376658ea71d16dced8acff36c3e385ac3738d868;p=chise%2Fxemacs-chise.git.1 Merge r21-2-24-utf-2000-0_13-0. --- diff --git a/.cvsignore b/.cvsignore index 42e5786..4c21e36 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,6 @@ config.status GNUmakefile Makefile.in so_locations +xemacs-packages +mule-packages +site-packages diff --git a/CHANGES-beta b/CHANGES-beta index 5f58f45..6740d26 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,4 +1,63 @@ -*- indented-text -*- +to 21.2.24 "Hecate" +-- (coding-system-list) deals properly with coding system aliases, Shenghuo ZHU +-- configure support for ESD sound rewritte, Martin Buchholz +-- directory separator fix from Mike Alexander +-- Windows process support cleanup, Adrian Aichner +-- NT now encapsulates fstat to get correct file mod time, Adrian Aichner + +to 21.2.23 "Hebe" +-- MS-Windows selection fixes from Mike Alexander +-- MS-WIndows process handling fixes from Mike Alexander +-- Subwindow GC fix from Andy Piper +-- Various minor fixes from Andy Piper +-- Rewrite module configure support, Martin Buchholz +-- Various Windows fixes, Martin Buchholz, Adrian Aichner, Andy Piper +-- HP native compiler compilation fixes, Martin Buchholz +-- Workarounds for Cygnus compiler bugs, Martin Buchholz +-- Workarounds for Cygwin broken header files, Martin Buchholz +-- itimers work again, Kyle Jones +-- random code cleanup, Martin Buchholz +-- various redisplay fixes, Andy Piper, Jan Vroonhof +-- various fixes from Hrvoje Niksic, Yoshiki Hayashi + +to 21.2.22 "Mercedes" +-- ESD Sound support from Robert Bihlmeyer +-- 10% faster redisplay from Jan Vroonhof +-- Fixes from Jeff Miller, Alexandre Oliva and Yoshiki Hayashi +-- "If you've got problems, read PROBLEMS!" from Robert Pluim +-- Lstream code now uses size_t, ssize_t consistently, Martin Buchholz +-- Fix `make install' if prefix != exec_prefix, Martin Buchholz +-- Fix compile warnings and C++ compilation, Martin Buchholz +-- Fix detection of coding: cookie in -*- first line. +-- More xim-xlib work by Kazuyuki Ienaga +-- Fix crash in abbrev.c (abbrev_location), Eric Darve + +to 21.2.20 "Yoko" +-- UTF-8 & file-coding magic cookie fix from MORIOKA Tomohiko +-- bug fixes from Adrian Aichner, Sean MacLennan, and Jeff Miller +-- glyph widget support under X/Athena from Andy Piper +-- tab widget support under X (all variants) from Andy Piper +-- many gutter, redisplay & widget fixes from Andy Piper +-- mswindows mousewheel support from Mike Woolley +-- combo box support under X/Motif from Andy Piper +-- buffer tab grouping from Andy Piper +-- layout widget support from Andy Piper +-- partial display line scrolling support from Andy Piper +-- cleanup patches from Gleb Arshinov +-- hash table FSF API sync from Martin Buchholz +-- widget cleanup from Martin Buchholz +-- process-environment fix for nt from Julian Back +-- widget to frame fix from Jan Vroonhof +-- animated glyph support from Andy Piper +-- glyph redisplay improvements from Andy Piper +-- color cells allocation fix from Lee Kindness +-- recover file fix for windows nt +-- mingw install fix from Craig Lanning +-- recognize keypad keys under MS-Windows from Jonathan Harris +-- Switch gui dialogs to native widgets from Andy Piper +-- fixes from Yoshiki Hayashi and Norbert Koch + to 21.2.19 "Shinjuku" -- various fixes from Gunnar Evermann -- XIM fixes from Kazuyuki IENAGA diff --git a/ChangeLog b/ChangeLog index 6958a77..9603cc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,215 @@ * configure.in: Add new option `--with-utf-2000'; define `UTF2000' if it is specified. +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-13 Martin Buchholz + + * configure.in: + * configure.usage: + - Autodetect NAS. Change Docs accordingly. + + * configure.in: Warn if configure --with-xpm --without-x11. + +1999-12-09 Martin Buchholz + + * configure.in: Clean up sound support. + - variable `old_nas' was used but never set. + - change `with_esd' to `with_esd_sound' for consistency. + - Don't trust the output of `esd-config --libs`; test it. + - Add `esd-config --cflags` to c_switch_site. + - Die if ESD sound requested, but not available. + - ESD is not dependent on X, therefore use LIBS, not libs_x. + +1999-12-07 Martin Buchholz + + * configure.in (--with-sound): Variable with_esd was mispelled. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-11-30 Martin Buchholz + + * configure.in: Fix module support. + --with-modules=yes was completely broken. + AC_DEFINE(HAVE_DLFCN_H) was invoked twice. + Remove linking test for _dlopen - seems totally bogus. + Die if --with-modules=yes but no module support found. + Do nothing, not even msg, if --with-modules=no. + +1999-11-17 Isaac Hollander + + * Makefile.in.in: add and use TAR macro. Sometimes tar only copies + symlinks instead of the actual files + +1999-11-30 Martin Buchholz + + * aclocal.m4: Shared library support for hpux >= version 11 + +1999-11-29 Martin Buchholz + + * Makefile.in.in (beta): `make beta' should rebuild info. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-26 Martin Buchholz + + * configure.in: + Add configure support for Unix 98 type ssize_t. + +1999-11-27 Martin Buchholz + + * Makefile.in.in: + Make sure config.values.sh is up to date. + Use $(SHELL) instead of sh or /bin/sh consistently. + Delegate `depend' target to src/Makefile.in.in. + +1999-10-27 Yoshiki Hayashi + + * INSTALL: Update configure option. + +1999-10-12 Alexandre Oliva + + * configure.in (native_sound_lib, *-sgi-*): Check for audio.h. + (LIBS): Check for libCsup. + + * etc/sample.Xdefaults: adds a reference to beNiceToColormap, + so that the user can guess what to do if xemacs' dialogs are + butt ugly. + +1999-10-24 Jan Vroonhof + + * config.h.in: define HAVE_ESD_SOUND + + * configure.in: Add support for esd sound. --with-sound + now accepts a list of options. + * configure.usage (--native-sound-lib): ditto. + +1999-11-17 Martin Buchholz + + * Makefile.in.in (install-arch-dep): + Fix `make install' if prefix != exec_prefix. + +1999-11-15 Martin Buchholz + + * configure.in: + - Accept --with-database=gdbm as an alias for + --with-database=gnudbm. + - rename with_database_gnudbm to with_database_gdbm. + + * aclocal.m4 (ld_dynamic_link_flags): Just use empty value for + ld_dynamic_link_flags on Solaris. Else CC gives us: + CC: Warning: Option -Wl,-Bdynamic passed to ld, if ld is invoked, ignored otherwise + /usr/ccs/bin/ld: illegal option -- W + + +1999-11-13 Jason R Mastaler + + * etc/FTP: Updated FTP mirrors list. Replaced GNU FTP document + with a URL. + +1999-11-13 Jason R Mastaler + + * etc/MAILINGLISTS: Updated mailing list subscription information. + Replaced GNU MAILINGLISTS document with a URL. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-09-21 Martin Buchholz + * configure.in: Autodetect Unix98 PTY + +1999-08-30 Robert Pluim + + * README.packages: Add description of package-get-provider + +1999-10-22 Vin Shelton + + * INSTALL: Added more information about README.packages, and + re-numbered some bullets. + +1999-10-24 Jan Vroonhof + + * INSTALL: Update disk requirements. Refer to README.packages + +1999-10-21 Andy Piper + + * configure.in (all_widgets): Only use xaw3d if we really have it. + +1999-10-06 Andy Piper + + * Makefile.in.in: use WINDOWSNT for mingw install. + +1999-08-01 Adrian Aichner + + * etc/DISTRIB: Update IP address of ftp.xemacs.org. + * etc/NEWS: Fix typo + +1999-09-25 Andy Piper + + * configure.in: check for Xaw3d and use in preference to Xaw + +1999-09-21 Martin Buchholz + + * Makefile.in.in: All Makefiles should #include config.h + +1999-09-19 Michael Sperber [Mr. Preprocessor] + + * configure.in (EMACS_CONFIGURATION): Use $configuration, not + $canonical, so that installation paths and dynamic path setup will + stay in synch. + +1999-09-20 Andy Piper + + * Makefile.in.in: use __CYGWIN32__ and __MINGW32__ to predicate + installation linkage. + +1999-08-29 Andreas Jaeger + + * configure.in (machine): Recognize MIPS/Linux. + +1999-08-27 Jan Vroonhof + + * modules/zlib/Makefile (distclean): + * modules/ldap/Makefile (distclean): + * modules/sample/Makefile (distclean): + * modules/base64/Makefile (distclean): new target + + * Makefile.in.in (top_distclean): Add package directories + (SUBDIR_DISTCLEAN): New variable, add module directories + +1999-09-01 Martin Buchholz + + * configure.in: Warn, but otherwise ignore, obsolete arguments. + +1999-08-20 Olivier Galibert + + * configure.in: Add --pdump option. + * configure.usage: Ditto. + +1999-08-04 Andy Piper + + * configure.in: report widget usage correctly. beef up setting. + + * Makefile.in.in: fix install-arch-dep for mingw32. + +1999-07-28 Andy Piper + + * config.h.in: add new LWLIB defines. + + * configure.in: fix definitions of widget defines with various + toolkit options. + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released @@ -1899,7 +2108,7 @@ Sun November 01 12:00:00 1997 1997-10-18 SL Baur - * XEmacs 20.3-beta91 is released. + * XEmacs 20.3-beta91 is released. 1997-10-16 Hrvoje Niksic @@ -3221,7 +3430,7 @@ Sat Mar 22 16:47:08 1997 Steven L Baur Sat Mar 22 21:27:41 1997 Tomasz J. Cholewo - * configure.in: Echo only current configuration using 'tee -a'. + * configure.in: Echo only current configuration using 'tee -a'. Fri Mar 21 21:26:01 1997 Steven L Baur diff --git a/INSTALL b/INSTALL index 82dda47..ce6d91f 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ XEmacs Installation Guide Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois -Copyright (c) 1994 Free Software Foundation, Inc. +Copyright (c) 1994-1999 Free Software Foundation, Inc. Synched up with: FSF 19.30. @@ -23,20 +23,22 @@ for instructions on building under Microsoft Windows): 1) Make sure your system has enough swapping space allocated to handle a program whose pure code is 900k bytes and whose data area is at - least 400k and can reach 8Mb or more. If the swapping space is + least 400k and can reach 8Mb or more. Note that a typical XEmacs + build is much bigger. If the swapping space is insufficient, you will get an error in the command `temacs -batch -l loadup dump', found in `./src/Makefile.in.in', or possibly when running the final dumped XEmacs. -Building XEmacs requires about 41 Mb of disk space (including the -XEmacs sources). Once installed, XEmacs occupies about 16 Mb in the -file system where it is installed; this includes the executable files, -Lisp libraries, miscellaneous data files, and on-line documentation. -The amount of storage of the Lisp directories may be reduced by -compressing the .el files. If the building and installation take place -in different directories, then the installation procedure temporarily -requires 41+16 Mb. Adjust this value upwards depending upon what -additional Lisp support is installed. + Verify that your users have a high enough stack limit. On some + systems such as OpenBSD and OSF/Tru64 the default is 2MB which is + too low. See 'PROBLEMS' for details. + +Building XEmacs requires about 100 Mb of disk space (including the +XEmacs sources). Once installed, XEmacs occupies between 20 and 100 Mb +in the file system where it is installed; this includes the executable files, +Lisp libraries, miscellaneous data files, and on-line documentation. The +exact amount depends greatly on the number of extra lisp packages that are +installed XEmacs requires an ANSI C compiler, such as GCC. If you wish to build the documentation yourself, you will need at least version 1.68 of @@ -65,20 +67,34 @@ Use the --site-includes and --site-libraries options when building XEmacs to allow configure to find the external software packages. If you link with dynamic (``.so'') external package libraries, which is not recommended, you will also need to add the library directories -to the --site-runtime-libraries option. +to the --site-runtime-libraries option. For your convenience these can +be set together by using the --with-site-prefix command. This will set +these variables as needed assuming your libraries are organised as a +typical /usr tree. +3) [N.B. Most of this section can be done during or after the +compilation of the core source code, but is present early to catch +your attention.] -3) Decide what Initial Lisp you need with XEmacs. XEmacs is -distributed separately from most of its runtime environment. This is +Decide what Initial Lisp you need with XEmacs. XEmacs is +distributed separately from most of its runtime environment. This is done to make it easier for administrators to tune an installation for -what the local users need. See the file etc/PACKAGES for an overview -of what is available and which packages need to be installed prior to -building XEmacs. At this point you only need a minimum to get started -at which point you may install what you wish without further changes -to the XEmacs binary. A sample minimum configuration for a Linux -system using Mule and Wnn6 from OMRON corporation would be the -packages `mule-base' and `egg-its'. By default, packages will be -searched for in the path +what the local users need. Note that while XEmacs will compile and +install without any packages present at least some additional lisp +packages are needed to bring XEmacs up to "normal" editor +functionality. Installation and upgrading of the packages can be done +almost automatically when from inside XEmacs when it has been compiled +and installed. + +More information and suggestions for which packages to install see the +file README.packages. + +IMPORTANT! The file README.packages contain information vital to have +a fully working XEmacs. This information was not included in this file +only because it is too large for this terse INSTALL. Please read +README.packages now! + +By default, packages will be searched for in the path ~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages @@ -294,12 +310,12 @@ inefficient. Generally, it's best to go with the default configuration for your system. You can tweak this based on how you use XEmacs, and the memory and cpu resources available on your system. -The `--use-system-malloc' option can be use to either enable or +The `--with-system-malloc' option can be use to either enable or disable use of the system malloc. Generally, it's best to go with the default configuration for your system. Note that on many systems using the system malloc disables the use of the relocating allocator. -The `--use-debug-malloc' option can be used to link a special debugging +The `--with-debug-malloc' option can be used to link a special debugging version of malloc. Debug Malloc is not included with XEmacs, is intended for use only by the developers and may be obtained from . @@ -380,7 +396,7 @@ creates a shell script `config.status' which, when run, recreates the same configuration. If `configure' exits with an error after disturbing the status quo, it removes `config.status'. -4) Look at `./lisp/paths.el'; if some of those values are not right +5) Look at `./lisp/paths.el'; if some of those values are not right for your system, set up the file `./lisp/site-init.el' with XEmacs Lisp code to override them; it is not a good idea to edit paths.el itself. YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES, @@ -403,7 +419,7 @@ configured. If you have an unusual automounter configuration that XEmacs cannot detect, you may need to change the value of `directory-abbrev-alist'. -5) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs +6) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs Lisp code you want XEmacs to load before it is dumped out. Use site-load.el for additional libraries if you arrange for their documentation strings to be in the lib-src/DOC file (see @@ -422,12 +438,12 @@ See `./PROBLEMS' for more details on which systems this affects. The `site-*.el' files are nonexistent in the distribution. You do not need to create them if you have nothing to put in them. -6) Refer to the file `./etc/TERMS' for information on fields you may +7) Refer to the file `./etc/TERMS' for information on fields you may wish to add to various termcap entries. The files `./etc/termcap.ucb' and `./etc/termcap.dat' may already contain appropriately-modified entries. -7) Run `make' in the top directory of the XEmacs distribution to finish +8) Run `make' in the top directory of the XEmacs distribution to finish building XEmacs in the standard way. The final executable file is named `src/emacs'. You can execute this file "in place" without copying it, if you wish; then it automatically uses the sibling @@ -505,18 +521,18 @@ information on this. Using GNU Make allows for simultaneous builds with and without the --srcdir option. -8) If your system uses lock files to interlock access to mailer inbox files, -then you might need to make the movemail program setuid or setgid -to enable it to write the lock files. We believe this is safe. +9) If your system uses lock files to interlock access to mailer inbox +files, then you might need to make the movemail program setuid or +setgid to enable it to write the lock files. We believe this is safe. The setuid/setgid bits need not be set on any other XEmacs-related executables. -9) You are done with the hard part! You can remove executables and +10) You are done with the hard part! You can remove executables and object files from the build directory by typing `make clean'. To also remove the files that `configure' created (so you can compile XEmacs for a different configuration), type `make distclean'. -10) You should now go to the XEmacs web page at http://www.xemacs.org/ +11) You should now go to the XEmacs web page at http://www.xemacs.org/ and decide what additional Lisp support you wish to have. MAKE VARIABLES @@ -670,13 +686,13 @@ see which operating system and architecture description files from `src/config.h', and change the two `#include' directives to include the appropriate system and architecture description files. -2) Edit `./src/config.h' to set the right options for your system. If +3) Edit `./src/config.h' to set the right options for your system. If you need to override any of the definitions in the s/*.h and m/*.h files for your system and machine, do so by editing config.h, not by changing the s/*.h and m/*.h files. Occasionally you may need to redefine parameters used in `./lib-src/movemail.c'. -3) If you're going to use the make utility to build XEmacs, you will +4) If you're going to use the make utility to build XEmacs, you will still need to run `configure' first, giving the appropriate values for the variables in the sections entitled "Things `configure' Might Edit" and "Where To Install Things." Note that you may only need to change @@ -776,6 +792,10 @@ debugging. PROBLEMS +The most likely problem is that you forgot to read and follow the +directions in README.packages. You can not have a working XEmacs +without downloading some additional packages. + See the file PROBLEMS in this directory for a list of various problems sometimes encountered, and what to do about them. diff --git a/Makefile.in.in b/Makefile.in.in index e8205ae..8a0b9f0 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -49,6 +49,9 @@ ## make extraclean ## Still more severe - delete backup and autosave files, too. +#define NOT_C_CODE +#include "src/config.h" + #ifdef USE_GNU_MAKE RECURSIVE_MAKE=$(MAKE) #else @@ -60,7 +63,9 @@ SHELL = /bin/sh LANG = C LC_ALL = C RM = rm -f +MAKEPATH=./lib-src/make-path pwd = /bin/pwd +TAR = tar ## ==================== Things `configure' Might Edit ==================== @@ -199,7 +204,7 @@ etcdir=@etcdir@ ## currently being edited. lockdir=@lockdir@ -# Where to put the DOC file. +## Where to put the DOC file. docdir=@docdir@ ## Where to put executables to be run by XEmacs rather than @@ -224,7 +229,10 @@ INSTALL_DATA = @INSTALL_DATA@ MAKE_SUBDIR = @MAKE_SUBDIR@ ## Subdirectories that can be made recursively. -SUBDIR = ${MAKE_SUBDIR} man +SUBDIR = ${MAKE_SUBDIR} man + +## Subdirectories that must be cleaned on distclean +SUBDIR_DISTCLEAN = ${SUBDIR} modules/sample modules/ldap modules/zlib modules/base64 ## The makefiles of the directories in ${MAKE_SUBDIR}. SUBDIR_MAKEFILES = @SUBDIR_MAKEFILES@ @@ -253,7 +261,7 @@ ${PROGNAME}: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP} .PHONY: ${SUBDIR} all beta all-elc all-elcs dump-elc dump-elcs autoloads finder ## Convenience target for XEmacs beta testers -beta: clean all-elc finder +beta: clean all-elc finder info ## Convenience target for XEmacs maintainers ## This would run `make-xemacsdist' if I were really confident that everything @@ -267,30 +275,31 @@ dist: all-elc info ## - src/depend from src/*.[ch] .PHONY: config configure depend config: configure depend -configure: ${srcdir}/configure -${srcdir}/configure: ${srcdir}/configure.in +configure: ${srcdir}/configure ${srcdir}/lib-src/config.values.in + +${srcdir}/configure : ${srcdir}/configure.in cd ${srcdir} && autoconf - cd ${srcdir} && /bin/sh lib-src/config.values.sh -depend ${srcdir}/src/depend: - cd ${srcdir}/src && \ - perl ./make-src-depend > depend.tmp && \ - $(RM) depend && mv depend.tmp depend +${srcdir}/lib-src/config.values.in : ${srcdir}/configure + cd ${srcdir} && $(SHELL) lib-src/config.values.sh + +depend ${srcdir}/src/depend : + cd ${srcdir}/src && $(RECURSIVE_MAKE) depend ## Build XEmacs and recompile out-of-date and missing .elc files along ## the way. all-elc all-elcs: lib-src lwlib dump-elcs src - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-elc.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-elc.sh ## Sub-target for all-elc. dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs cd ./src && $(RECURSIVE_MAKE) dump-elcs autoloads: src - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-autoloads.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-autoloads.sh custom-loads: - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-custom.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-custom.sh finder: src @echo "Building finder database ..." @@ -317,7 +326,7 @@ src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad @(echo "/* Do not edit this file!" ; \ echo " Automatically generated from ${srcdir}/etc/Emacs.ad" ; \ echo " */" ; \ - /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ + $(SHELL) ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ src/Emacs.ad.h src/sheap-adjust.h: @@ -409,10 +418,20 @@ install-arch-dep: mkdir for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ else true; fi +#ifdef WINDOWSNT + ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME} + -chmod 0755 ${bindir}/${PROGNAME} +#else ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} -chmod 0755 ${bindir}/${PROGNAME}-${version} +# ifdef __CYGWIN32__ + cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} +# else cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} +# endif /* __CYGWIN32__ */ +#endif /* WINDOWSNT */ if test "${prefix}" != "${exec_prefix}"; then \ + $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \ for dir in \ lib/${inststaticdir} \ lib/${instvardir}/etc \ @@ -442,8 +461,8 @@ install-arch-indep: mkdir info -a "`(cd $${dir} && $(pwd))`" != \ "`(cd $${dest} && $(pwd))`" \ && (echo "Copying $${dir}..." ; \ - (cd $${dir} && tar -cf - . ) | \ - (cd $${dest} && umask 022 && tar -xf - );\ + (cd $${dir} && $(TAR) -cf - . ) | \ + (cd $${dest} && umask 022 && $(TAR) -xf - );\ chmod 0755 $${dest}; \ for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \ (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \ @@ -472,9 +491,8 @@ install-arch-indep: mkdir info @echo "${lispdir}" gzip-el: - ${srcdir}/lib-src/gzip-el.sh ${lispdir} + $(SHELL) ${srcdir}/lib-src/gzip-el.sh ${lispdir} -MAKEPATH=./lib-src/make-path ## Build all the directories to install XEmacs in. ## Since we may be creating several layers of directories, ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use @@ -552,10 +570,10 @@ top_distclean=\ $(RM) config.status config.log confdefs.h config-tmp-* build-install Installation ; \ $(RM) core .sbinit lock/* GNUmakefile Makefile Makefile.in ; \ $(RM) lisp/finder-inf.el* Installation.el Installation.elc ; \ - $(RM) packages mule-packages site-lisp + $(RM) -r site-packages xemacs-packages mule-packages site-lisp distclean: FRC.distclean - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR_DISTCLEAN); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done -${top_distclean} ## `realclean' diff --git a/PROBLEMS b/PROBLEMS index 3f57bc4..db106ae 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -41,8 +41,8 @@ crashes in the function skip-syntax-backward. There have been reports of egcs-1.1 not compiling XEmacs correctly on Alpha Linux. There have also been reports that egcs-1.0.3a is O.K. -*** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using -`-fno-strength-reduce'. +*** Don't use -O2 or -O3 with Cygwin 1.0, CodeFusion-99070 or gcc 2.7.2 on x86 +without also using `-fno-strength-reduce'. gcc will generate incorrect code otherwise. This bug is present in at least 2.6.x and 2.7.[0-2]. This bug has been fixed in GCC 2.7.2.1 and @@ -50,6 +50,25 @@ later. This bug is O/S independent, but is limited to x86 architectures. This problem is known to be fixed in egcs (or pgcc) 1.0 or later. +Unfortunately, later releases of Cygnus-released compilers (not the +Net-released ones) have a bug with the same `problem signature'. + +If you're lucky, you'll get an error while compiling that looks like: + +event-stream.c:3189: internal error--unrecognizable insn: +(insn 256 14 15 (set (reg/v:SI 24) + (minus:SI (reg/v:SI 25) + (const_int 2))) -1 (insn_list 11 (nil)) + (nil)) + 0 0 [main] + +If you're unlucky, your code will simply execute incorrectly. + +*** Don't use gcc-2.95.2 with -mcpu=ultrasparc on Solaris 2.6. + +gcc will assume a 64-bit operating system, even though you've +merely told it to assume a 64-bit instruction set. + *** Don't use -O2 with gcc 2.7.2 under Intel architectures without also using `-fno-caller-saves'. @@ -391,8 +410,8 @@ Marcus Thiessel Marcus Thiessel - Unfortunately, XEmacs releases <21.0 don't work with Motif2.1. It - will compile but you will get excessive X11 errors like + Unfortunately, XEmacs releases prior to 21.0 don't work with + Motif2.1. It will compile but you will get excessive X11 errors like xemacs: X Error of failed request: BadGC (invalid GC parameter) @@ -542,17 +561,23 @@ shell. *** You type Control-H (Backspace) expecting to delete characters. Emacs has traditionally used Control-H for help; unfortunately this -interferes with its use as Backspace on TTY's. One way to solve this -problem is to put this in your .emacs: +interferes with its use as Backspace on TTY's. As of XEmacs 21, +XEmacs looks at the "erase" setting of TTY structures and maps C-h to +backspace when erase is set to C-h. This is sort of a special hack, +but it makes it possible for you to use the standard: + + stty erase ^H - (when (eq tty-erase-char ?\C-h) - (keyboard-translate ?\C-h ?\C-?) - (global-set-key "\M-?" 'help-command)) +to get your backspace key to erase characters. The erase setting is +recorded in the Lisp variable `tty-erase-char', which you can use to +tune the settings in your .emacs. -This checks whether the TTY erase char is C-h, and if it is, makes -Control-H (Backspace) work sensibly, and moves help to Meta-? (ESC ?). +A major drawback of this is that when C-h becomes backspace, it no +longer invokes help. In that case, you need to use f1 for help, or +bind another key. An example of the latter is the following code, +which moves help to Meta-? (ESC ?): -Note that you can probably also access help using F1. + (global-set-key "\M-?" 'help-command) *** Mail agents (VM, Gnus, rmail) cannot get new mail diff --git a/README b/README index 3715e1c..b85267e 100644 --- a/README +++ b/README @@ -16,6 +16,9 @@ occur in building, installing and running XEmacs. See the file `nt/README' for instructions on building XEmacs for Microsoft Windows. +The file 'README.packages' will guide you in the installation of +(essential) add on packages. + Reports of bugs in XEmacs should be posted to the newsgroup comp.emacs.xemacs or sent to the mailing list xemacs@xemacs.org. See the "Bugs" section of the XEmacs manual for more information on how to diff --git a/README.packages b/README.packages index 4ac2cfa..dbbc6c5 100644 --- a/README.packages +++ b/README.packages @@ -224,3 +224,13 @@ The site-packages hierarchy replaces the old 'site-lisp' directory. XEmacs no longer looks into a 'site-lisp' directly by default. A good place to put 'site-start.el' would be in $prefix/lib/xemacs/site-packages/lisp/ + +Finding the right packages +-------------------------- + +If you want to find out which package contains the functionality you +are looking for, use M-x package-get-package-provider, and give it a +symbol that is likely to be in that package. eg, if some code you +want to use has a (require 'thingatpt) in it, try doing +M-x package-get-package-provider RET thingatpt , which will return +something like: (fsf-compat "1.06"). diff --git a/aclocal.m4 b/aclocal.m4 index ff5c7ae..e1a8e77 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -108,7 +108,7 @@ if test "$XEGCC" = yes; then else # PORTME Check for PIC flags for the system compiler. case "$xehost_os" in - hpux9* | hpux10*) + hpux9* | hpux1[[0-9]]*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' dll_cflags='+Z' @@ -569,7 +569,7 @@ if test -z "$ld_dynamic_link_flags"; then ;; solaris2* | solaris7*) - ld_dynamic_link_flags="${wl}-Bdynamic" + ld_dynamic_link_flags= ;; sco3.2v5* | unixware* | sysv5* | sysv4*) diff --git a/configure b/configure index 6ef7a67..edc8c18 100755 --- a/configure +++ b/configure @@ -263,6 +263,7 @@ with_toolbars="" with_tty="" use_union_type="no" with_dnet="" +pdump="no" @@ -361,6 +362,7 @@ while test $# != 0; do const_is_losing | \ usage_tracking | \ use_union_type | \ + pdump | \ debug | \ use_assertions | \ memory_usage_stats | \ @@ -424,22 +426,22 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; "with_database" ) with_database_berkdb=no with_database_dbm=no - with_database_gnudbm=no + with_database_gdbm=no for x in `echo "$val" | sed -e 's/,/ /g'` ; do case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) (echo "$progname: Usage error:" + no ) ;; + b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; + d | db | dbm ) with_database_dbm=yes ;; + g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes ;; + * ) (echo "$progname: Usage error:" echo " " "The \`--$optname' option value must be either \`no' or a comma-separated list of one or more of \`berkdb' and either \`dbm' or \`gnudbm'." echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; esac done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then + if test "$with_database_dbm" = "yes" -a \ + "$with_database_gdbm" = "yes"; then (echo "$progname: Usage error:" echo " " "Only one of \`dbm' and \`gnudbm' may be specified with the \`--$optname' option." @@ -448,18 +450,38 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; "with_sound" ) - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" + for x in `echo "$val" | sed -e 's/,/ /g'` ; do + case "$x" in + n | no | non | none ) new_sdefault=no ;; + a | al | all | both ) new_sdefault=yes ;; + + native ) with_native_sound=yes ;; + nonative ) with_native_sound=no ;; + + nas ) with_nas_sound=yes ;; + nonas ) with_nas_sound=no ;; + + esd ) with_esd_sound=yes ;; + noesd ) with_esd_sound=no ;; + + * ) bogus_sound=yes ;; + esac + if test "$bogus_sound" -o \ + \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then + types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'." + (echo "$progname: Usage error:" +echo " " "Valid types for the \`--$optname' option are: + $types. +The default is to autodetect all sound support." +echo " Use \`$progname --help' to show usage.") >&2 && exit 1 + elif test -n "$new_sdefault" ; then + with_native_sound=$new_sdefault + with_nas_sound=$new_sdefault + with_esd_sound=$new_sdefault + new_sdefault= # reset this + fi + sound_notfirst=true + done ;; "with_xim" ) @@ -701,7 +723,9 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; eval "$opt=\"$val\"" ;; - "run_in_place" | \ + "use_minimal_tagbits" | \ + "use_indexed_lrecord_implementation" | \ + "run_in_place" | \ "with_gnu_make" ) echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2 ;; @@ -794,7 +818,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:798: checking whether ln -s works" >&5 +echo "configure:822: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -1039,7 +1063,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1043: checking "host system type"" >&5 +echo "configure:1067: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1058,6 +1082,7 @@ case "$canonical" in vax-*-* ) machine=vax ;; mips-dec-* ) machine=pmax ;; mips-sgi-* ) machine=iris4d ;; + mips*-linux ) machine=mips ;; romp-ibm-* ) machine=ibmrt ;; rs6000-ibm-aix* ) machine=ibmrs6000 ;; powerpc-ibm-aix* ) machine=ibmrs6000 ;; @@ -1532,7 +1557,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1536: checking for $ac_word" >&5 +echo "configure:1561: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1559,7 +1584,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1563: checking for $ac_word" >&5 +echo "configure:1588: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1607,7 +1632,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1611: checking for $ac_word" >&5 +echo "configure:1636: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1636,7 +1661,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1649,12 +1674,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1653 "configure" +#line 1678 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1682,19 +1707,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1691: checking whether we are using GNU C" >&5 +echo "configure:1716: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1712,7 +1737,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1716: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1741: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1745,7 +1770,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1749: checking for $ac_word" >&5 +echo "configure:1774: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1772,7 +1797,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1776: checking for $ac_word" >&5 +echo "configure:1801: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1820,7 +1845,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1824: checking for $ac_word" >&5 +echo "configure:1849: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1849,7 +1874,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1853: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1878: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1862,12 +1887,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1866 "configure" +#line 1891 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1895,19 +1920,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1924: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1904: checking whether we are using GNU C" >&5 +echo "configure:1929: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1925,7 +1950,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1929: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1954: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1958,7 +1983,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1962: checking for $ac_word" >&5 +echo "configure:1987: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1985,7 +2010,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1989: checking for $ac_word" >&5 +echo "configure:2014: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2033,7 +2058,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2037: checking for $ac_word" >&5 +echo "configure:2062: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2062,7 +2087,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2066: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2091: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -2075,12 +2100,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2079 "configure" +#line 2104 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2108,19 +2133,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2112: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2137: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2117: checking whether we are using GNU C" >&5 +echo "configure:2142: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2138,7 +2163,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2142: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2167: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2175,7 +2200,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2179: checking how to run the C preprocessor" >&5 +echo "configure:2204: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2188,13 +2213,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2205,13 +2230,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2222,13 +2247,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2253,9 +2278,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2257: checking for AIX" >&5 +echo "configure:2282: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2286: checking for GNU libc" >&5 +echo "configure:2311: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2296,7 +2321,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2318,7 +2343,7 @@ EOF cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2604,7 +2629,7 @@ test -n "$unexec" && extra_objs="$extra_objs $unexec" && if test "$ext fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2608: checking for dynodump" >&5 +echo "configure:2633: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2642,12 +2667,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2646: checking for terminateAndUnload in -lC" >&5 +echo "configure:2671: 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:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2762,7 +2787,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2766: checking "for runtime libraries flag"" >&5 +echo "configure:2791: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -2784,14 +2809,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:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2893,10 +2918,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2897: checking for malloc_get_state" >&5 +echo "configure:2922: checking for malloc_get_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -2939,10 +2964,10 @@ doug_lea_malloc=no fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2943: checking for malloc_set_state" >&5 +echo "configure:2968: 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:2994: \"$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 @@ -2985,16 +3010,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2989: checking whether __after_morecore_hook exists" >&5 +echo "configure:3014: 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:3023: \"$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 @@ -3053,7 +3078,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:3057: checking for $ac_word" >&5 +echo "configure:3082: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3108,7 +3133,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:3112: checking for a BSD compatible install" >&5 +echo "configure:3137: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3162,7 +3187,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:3166: checking for $ac_word" >&5 +echo "configure:3191: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3194,15 +3219,15 @@ for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3198: checking for $ac_hdr" >&5 +echo "configure:3223: 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:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3235,15 +3260,15 @@ for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3239: checking for $ac_hdr" >&5 +echo "configure:3264: 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:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3276,15 +3301,15 @@ for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3280: checking for $ac_hdr" >&5 +echo "configure:3305: 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:3288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3314,10 +3339,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3318: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3343: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3333,7 +3358,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3357,10 +3382,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3361: checking for ANSI C header files" >&5 +echo "configure:3386: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3368,7 +3393,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3385,7 +3410,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 @@ -3403,7 +3428,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 @@ -3421,7 +3446,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') @@ -3432,7 +3457,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3458,10 +3483,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3462: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3487: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3470,7 +3495,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3494,10 +3519,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3498: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3523: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3509,7 +3534,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3534,9 +3559,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3538: checking for struct utimbuf" >&5 +echo "configure:3563: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3555,7 +3580,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3584: \"$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 @@ -3575,10 +3600,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3579: checking return type of signal handlers" >&5 +echo "configure:3604: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3595,7 +3620,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3617,10 +3642,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3621: checking for size_t" >&5 +echo "configure:3646: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3651,10 +3676,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3655: checking for pid_t" >&5 +echo "configure:3680: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3685,10 +3710,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3689: checking for uid_t in sys/types.h" >&5 +echo "configure:3714: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3724,10 +3749,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3728: checking for mode_t" >&5 +echo "configure:3753: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3758,10 +3783,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3762: checking for off_t" >&5 +echo "configure:3787: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3791,11 +3816,45 @@ EOF fi +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:3821: checking for ssize_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])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining ssize_t = int +EOF +cat >> confdefs.h <<\EOF +#define ssize_t int +EOF +} + +fi + echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3797: checking for struct timeval" >&5 +echo "configure:3856: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -3811,7 +3870,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3833,10 +3892,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:3837: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3896: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -3844,7 +3903,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3868,10 +3927,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3872: checking for tm_zone in struct tm" >&5 +echo "configure:3931: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3879,7 +3938,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3902,10 +3961,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3906: checking for tzname" >&5 +echo "configure:3965: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3915,7 +3974,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3941,10 +4000,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3945: checking for working const" >&5 +echo "configure:4004: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4018,7 +4077,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4022: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4081: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4043,12 +4102,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4047: checking whether byte ordering is bigendian" >&5 +echo "configure:4106: 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 @@ -4059,11 +4118,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4122: \"$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 @@ -4074,7 +4133,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4091,7 +4150,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:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4131,10 +4190,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4135: checking size of short" >&5 +echo "configure:4194: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4145,7 +4204,7 @@ main() exit(0); } EOF -if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4173,10 +4232,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4177: checking size of int" >&5 +echo "configure:4236: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4187,7 +4246,7 @@ main() exit(0); } EOF -if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4209,10 +4268,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4213: checking size of long" >&5 +echo "configure:4272: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4223,7 +4282,7 @@ main() exit(0); } EOF -if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4245,10 +4304,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4249: checking size of long long" >&5 +echo "configure:4308: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4259,7 +4318,7 @@ main() exit(0); } EOF -if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4322: \"$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 @@ -4281,10 +4340,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4285: checking size of void *" >&5 +echo "configure:4344: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4295,7 +4354,7 @@ main() exit(0); } EOF -if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4358: \"$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 @@ -4318,7 +4377,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4322: checking for long file names" >&5 +echo "configure:4381: 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: @@ -4364,10 +4423,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4368: checking for sin" >&5 +echo "configure:4427: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4453: \"$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 @@ -4408,12 +4467,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4412: checking for sin in -lm" >&5 +echo "configure:4471: 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:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4468,14 +4527,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:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4538: \"$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 @@ -4492,7 +4551,7 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4496: checking type of mail spool file locking" >&5 +echo "configure:4555: checking type of mail spool file locking" >&5 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -4517,12 +4576,12 @@ fi case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4521: checking for cma_open in -lpthreads" >&5 +echo "configure:4580: 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:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4569,7 +4628,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4573: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4632: 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; @@ -4580,7 +4639,7 @@ fi if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4584: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4643: 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 ;; @@ -4590,7 +4649,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4594: checking "for specified window system"" >&5 +echo "configure:4653: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4623,7 +4682,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:4627: checking for X" >&5 +echo "configure:4686: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4683,12 +4742,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:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4757,14 +4816,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:4827: \"$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. @@ -4873,17 +4932,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:4877: checking whether -R must be followed by a space" >&5 +echo "configure:4936: 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:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4899,14 +4958,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:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4942,12 +5001,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4946: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5005: 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:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4982,12 +5041,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:4986: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5045: 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:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5027,10 +5086,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:5031: checking for gethostbyname" >&5 +echo "configure:5090: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5116: \"$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 @@ -5074,12 +5133,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5078: checking for gethostbyname in -lnsl" >&5 +echo "configure:5137: 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:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5120,10 +5179,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:5124: checking for connect" >&5 +echo "configure:5183: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5209: \"$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 @@ -5169,12 +5228,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:5173: checking "$xe_msg_checking"" >&5 +echo "configure:5232: 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:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5209,10 +5268,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:5213: checking for remove" >&5 +echo "configure:5272: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5256,12 +5315,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5260: checking for remove in -lposix" >&5 +echo "configure:5319: 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:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5296,10 +5355,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5300: checking for shmat" >&5 +echo "configure:5359: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5385: \"$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 @@ -5343,12 +5402,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5347: checking for shmat in -lipc" >&5 +echo "configure:5406: 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:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5395,12 +5454,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:5399: checking "$xe_msg_checking"" >&5 +echo "configure:5458: 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: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 @@ -5580,7 +5639,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5584: checking for X defines extracted by xmkmf" >&5 +echo "configure:5643: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5612,15 +5671,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:5616: checking for X11/Intrinsic.h" >&5 +echo "configure:5675: 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:5624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5644,12 +5703,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5648: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5707: 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:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5685,12 +5744,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:5689: checking "$xe_msg_checking"" >&5 +echo "configure:5748: 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:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5728,12 +5787,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5732: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5791: 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:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5767,12 +5826,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5771: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5830: 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:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5806,14 +5865,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5810: checking the version of X11 being used" >&5 +echo "configure:5869: 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:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5838,15 +5897,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5842: checking for $ac_hdr" >&5 +echo "configure:5901: 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:5850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5877,7 +5936,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5881: checking for XFree86" >&5 +echo "configure:5940: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5897,12 +5956,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5901: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5960: 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:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5952,19 +6011,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5956: checking for main in -lXbsd" >&5 +echo "configure:6015: 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:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6001,22 +6060,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:6005: checking for MS-Windows" >&5 +echo "configure:6064: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:6008: checking for main in -lgdi32" >&5 +echo "configure:6067: 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:6079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6082,12 +6141,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:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -6140,7 +6199,7 @@ else fi if test "$with_x11" != "yes"; then - for feature in tooltalk cde offix wmcommand xim xmu + for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then echo "configure: warning: --with-$feature ignored: Not valid without X support" 1>&2 @@ -6163,7 +6222,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6167: checking for WM_COMMAND option" >&5; +echo "configure:6226: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6178,15 +6237,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:6182: checking for X11/Xauth.h" >&5 +echo "configure:6241: 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:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6209,12 +6268,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6213: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6272: 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:6288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6270,15 +6329,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:6274: checking for ${dir}tt_c.h" >&5 +echo "configure:6333: 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:6282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6314,12 +6373,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:6318: checking "$xe_msg_checking"" >&5 +echo "configure:6377: 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:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6387,15 +6446,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:6391: checking for Dt/Dt.h" >&5 +echo "configure:6450: 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:6399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6418,12 +6477,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6422: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6481: 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:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6503,7 +6562,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6507: checking if drag and drop API is needed" >&5 +echo "configure:6566: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6524,18 +6583,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6528: checking for LDAP" >&5 +echo "configure:6587: 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:6531: checking for ldap.h" >&5 +echo "configure:6590: 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:6539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6558,15 +6617,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:6562: checking for lber.h" >&5 +echo "configure:6621: 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:6570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6590,12 +6649,12 @@ fi if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:6594: checking for ldap_search in -lldap" >&5 +echo "configure:6653: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6631,12 +6690,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6635: checking "$xe_msg_checking"" >&5 +echo "configure:6694: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6672,12 +6731,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6676: checking "$xe_msg_checking"" >&5 +echo "configure:6735: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6713,12 +6772,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6717: checking "$xe_msg_checking"" >&5 +echo "configure:6776: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6780,10 +6839,10 @@ EOF for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6784: checking for $ac_func" >&5 +echo "configure:6843: 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:6869: \"$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 @@ -6838,15 +6897,15 @@ fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6842: checking for graphics libraries" >&5 +echo "configure:6901: checking for graphics libraries" >&5 xpm_problem="" if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:6847: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6906: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < int main(int c, char **v) { @@ -6854,7 +6913,7 @@ echo "configure:6847: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6917: \"$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 @@ -6896,17 +6955,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6900: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6959: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -6932,15 +6991,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:6936: checking for compface.h" >&5 +echo "configure:6995: 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:6944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6963,12 +7022,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:6967: checking for UnGenFace in -lcompface" >&5 +echo "configure:7026: 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:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7031,12 +7090,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:7035: checking for inflate in -lc" >&5 +echo "configure:7094: 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:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7066,12 +7125,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:7070: checking for inflate in -lz" >&5 +echo "configure:7129: 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:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7101,12 +7160,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:7105: checking for inflate in -lgz" >&5 +echo "configure:7164: 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:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7147,15 +7206,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:7151: checking for jpeglib.h" >&5 +echo "configure:7210: 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:7159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7178,12 +7237,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7182: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7241: 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:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7230,10 +7289,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7234: checking for pow" >&5 +echo "configure:7293: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7319: \"$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 @@ -7277,15 +7336,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:7281: checking for png.h" >&5 +echo "configure:7340: 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:7289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7308,12 +7367,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7312: checking for png_read_image in -lpng" >&5 +echo "configure:7371: 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:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7347,10 +7406,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:7351: checking for workable png version information" >&5 +echo "configure:7410: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -7358,7 +7417,7 @@ echo "configure:7351: 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:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7421: \"$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 @@ -7401,15 +7460,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:7405: checking for tiffio.h" >&5 +echo "configure:7464: 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:7413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7432,12 +7491,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7436: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7495: 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:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7487,16 +7546,16 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7491: checking for X11 graphics libraries" >&5 +echo "configure:7550: checking for X11 graphics libraries" >&5 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7495: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7554: checking for XawScrollbarSetThumb in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7529,17 +7588,57 @@ fi + +echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6 +echo "configure:7594: checking for XawScrollbarSetThumb in -lXaw3d" >&5 +ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lXaw3d " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + have_xaw3d=yes +else + echo "$ac_t""no" 1>&6 +have_xaw3d=no +fi + + + ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7535: checking for Xm/Xm.h" >&5 +echo "configure:7634: 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:7543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7556,12 +7655,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:7560: checking for XmStringFree in -lXm" >&5 +echo "configure:7659: 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:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7601,9 +7700,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7605: checking for Lesstif" >&5 +echo "configure:7704: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -7631,6 +7730,7 @@ case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) esac case "$with_dialogs" in "" | "yes" | "lucid" ) if test "$have_motif" = "yes"; then with_dialogs="motif" + elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d" elif test "$have_xaw" = "yes"; then with_dialogs="athena" else with_dialogs=no fi ;; @@ -7638,15 +7738,41 @@ esac case "$with_scrollbars" in "" | "yes" ) with_scrollbars="lucid" ;; esac -case "$with_widgets" in "" | "yes" ) +case "$with_widgets" in "" | "yes" | "lucid") if test "$have_motif" = "yes"; then with_widgets="motif" + elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d" + elif test "$have_xaw" = "yes"; then with_widgets="athena" else with_widgets=no fi ;; esac all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" -case "$all_widgets" in *athena* ) +case "$all_widgets" in + *athena*3d ) + { test "$extra_verbose" = "yes" && cat << \EOF + Defining LWLIB_USES_ATHENA +EOF +cat >> confdefs.h <<\EOF +#define LWLIB_USES_ATHENA 1 +EOF +} + + { test "$extra_verbose" = "yes" && cat << \EOF + Defining NEED_ATHENA +EOF +cat >> confdefs.h <<\EOF +#define NEED_ATHENA 1 +EOF +} + + lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi + if test "$have_xaw3d"; then + libs_x="-lXaw3d $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw3d\" to \$libs_x"; fi + else + libs_x="-lXaw $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw\" to \$libs_x"; fi + fi ;; + *athena* ) { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_USES_ATHENA EOF @@ -7691,6 +7817,11 @@ esac test "$with_menubars" = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi test "$with_menubars" = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi +test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ + lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi +case "$with_widgets" in athena* ) + lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;; +esac case "$all_widgets" in *lucid* ) { test "$extra_verbose" = "yes" && cat << \EOF Defining NEED_LUCID @@ -7737,6 +7868,23 @@ cat >> confdefs.h <<\EOF EOF } +case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF + Defining LWLIB_WIDGETS_ATHENA +EOF +cat >> confdefs.h <<\EOF +#define LWLIB_WIDGETS_ATHENA 1 +EOF +} +;; esac +test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ + { test "$extra_verbose" = "yes" && cat << \EOF + Defining LWLIB_TABS_LUCID +EOF +cat >> confdefs.h <<\EOF +#define LWLIB_TABS_LUCID 1 +EOF +} + test "$with_menubars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MENUBARS @@ -7770,6 +7918,14 @@ cat >> confdefs.h <<\EOF EOF } +test "$with_widgets" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_WIDGETS +EOF +cat >> confdefs.h <<\EOF +#define HAVE_WIDGETS 1 +EOF +} + test "$with_menubars" = "lucid" && { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_MENUBARS_LUCID @@ -7812,6 +7968,14 @@ cat >> confdefs.h <<\EOF EOF } +test "$with_widgets" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF + Defining LWLIB_WIDGETS_MOTIF +EOF +cat >> confdefs.h <<\EOF +#define LWLIB_WIDGETS_MOTIF 1 +EOF +} + test "$with_menubars" != "no" && extra_objs="$extra_objs menubar.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"menubar.o\"" @@ -7842,12 +8006,6 @@ if test "$with_x11" = "yes"; then test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"gui-x.o\"" fi -else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi fi @@ -7871,7 +8029,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7875: checking for Mule-related features" >&5 +echo "configure:8033: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7912,15 +8070,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7916: checking for $ac_hdr" >&5 +echo "configure:8074: 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:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7951,12 +8109,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7955: checking for strerror in -lintl" >&5 +echo "configure:8113: 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:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8019,18 +8177,18 @@ EOF fi echo "checking for Mule input methods" 1>&6 -echo "configure:8023: checking for Mule input methods" >&5 +echo "configure:8181: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:8026: checking for XIM" >&5 +echo "configure:8184: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:8029: checking for XOpenIM in -lX11" >&5 +echo "configure:8187: 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:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8065,12 +8223,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:8069: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:8227: 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:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8146,15 +8304,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:8150: checking for XFontSet" >&5 +echo "configure:8308: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:8153: checking for XmbDrawString in -lX11" >&5 +echo "configure:8311: 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:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8205,15 +8363,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:8209: checking for wnn/jllib.h" >&5 +echo "configure:8367: 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:8217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8238,10 +8396,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8242: checking for $ac_func" >&5 +echo "configure:8400: 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:8426: \"$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 @@ -8293,12 +8451,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:8297: checking for crypt in -lcrypt" >&5 +echo "configure:8455: 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:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8344,12 +8502,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:8348: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:8506: 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:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8378,12 +8536,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:8382: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:8540: 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:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8412,12 +8570,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:8416: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:8574: 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:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8446,12 +8604,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:8450: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:8608: 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:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8510,12 +8668,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:8514: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:8672: 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:8688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8561,15 +8719,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:8565: checking for canna/jrkanji.h" >&5 +echo "configure:8723: 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:8573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8596,15 +8754,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:8600: checking for canna/jrkanji.h" >&5 +echo "configure:8758: 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:8608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8632,15 +8790,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:8636: checking for canna/RK.h" >&5 +echo "configure:8794: 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:8644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8663,12 +8821,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8667: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8825: 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:8841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8702,12 +8860,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8706: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8864: 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:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8767,12 +8925,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:8771: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8929: 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:8945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8866,13 +9024,13 @@ fi fi -for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf +for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8873: checking for $ac_func" >&5 +echo "configure:9031: 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:9057: \"$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 @@ -8936,10 +9094,10 @@ case "$opsys" in * ) for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8940: checking for $ac_func" >&5 +echo "configure:9098: 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:9124: \"$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 @@ -8998,10 +9156,10 @@ esac for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9002: checking for $ac_func" >&5 +echo "configure:9160: 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:9186: \"$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 @@ -9060,12 +9218,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:9064: checking for kstat_open in -lkstat" >&5 +echo "configure:9222: 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:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9110,12 +9268,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:9114: checking for kvm_read in -lkvm" >&5 +echo "configure:9272: 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:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9160,16 +9318,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:9164: checking whether netdb declares h_errno" >&5 +echo "configure:9322: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9331: \"$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 @@ -9189,16 +9347,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:9193: checking for sigsetjmp" >&5 +echo "configure:9351: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:9202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9360: \"$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 @@ -9218,11 +9376,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:9222: checking whether localtime caches TZ" >&5 +echo "configure:9380: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9257,7 +9415,7 @@ main() exit (0); } EOF -if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -9287,9 +9445,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:9291: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:9449: 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:9473: \"$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 @@ -9333,19 +9491,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:9337: checking for inline" >&5 +echo "configure:9495: 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:9507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -9395,17 +9553,17 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:9399: checking for working alloca.h" >&5 +echo "configure:9557: 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:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9567: \"$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 @@ -9429,10 +9587,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:9433: checking for alloca" >&5 +echo "configure:9591: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9622: \"$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 @@ -9499,10 +9657,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:9503: checking whether alloca needs Cray hooks" >&5 +echo "configure:9661: 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:9530: checking for $ac_func" >&5 +echo "configure:9688: 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:9714: \"$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 @@ -9582,10 +9740,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:9586: checking stack direction for C alloca" >&5 +echo "configure:9744: 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:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -9633,15 +9791,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9637: checking for vfork.h" >&5 +echo "configure:9795: 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:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9669,10 +9827,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9673: checking for working vfork" >&5 +echo "configure:9831: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -9767,7 +9925,7 @@ main() { } } EOF -if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -9793,10 +9951,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9797: checking for working strcoll" >&5 +echo "configure:9955: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -9806,7 +9964,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -9834,10 +9992,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9838: checking for $ac_func" >&5 +echo "configure:9996: 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:10022: \"$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 @@ -9888,10 +10046,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9892: checking whether getpgrp takes no argument" >&5 +echo "configure:10050: 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:10108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -9973,10 +10131,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9977: checking for working mmap" >&5 +echo "configure:10135: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -10009,7 +10167,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -10044,15 +10202,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:10048: checking for termios.h" >&5 +echo "configure:10206: 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:10056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10095,15 +10253,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:10099: checking for termio.h" >&5 +echo "configure:10257: 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:10107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10135,10 +10293,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:10139: checking for socket" >&5 +echo "configure:10297: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10323: \"$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 @@ -10176,15 +10334,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:10180: checking for netinet/in.h" >&5 +echo "configure:10338: 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:10188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10201,15 +10359,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:10205: checking for arpa/inet.h" >&5 +echo "configure:10363: 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:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10234,9 +10392,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:10238: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:10396: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -10247,7 +10405,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10409: \"$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 @@ -10265,9 +10423,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:10269: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:10427: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -10277,7 +10435,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:10281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10439: \"$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 @@ -10308,10 +10466,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:10312: checking for msgget" >&5 +echo "configure:10470: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10496: \"$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 @@ -10349,15 +10507,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:10353: checking for sys/ipc.h" >&5 +echo "configure:10511: 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:10361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10374,15 +10532,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:10378: checking for sys/msg.h" >&5 +echo "configure:10536: 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:10386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10420,15 +10578,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:10424: checking for dirent.h" >&5 +echo "configure:10582: 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:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10455,15 +10613,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:10459: checking for sys/dir.h" >&5 +echo "configure:10617: 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:10467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10496,15 +10654,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:10500: checking for nlist.h" >&5 +echo "configure:10658: 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:10508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10534,26 +10692,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:10538: checking "for sound support"" >&5 -case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; -esac +echo "configure:10696: 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:10549: checking for multimedia/audio_device.h" >&5 +echo "configure:10703: 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:10557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10601,12 +10755,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:10605: checking for ALopenport in -laudio" >&5 +echo "configure:10759: 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:10775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10648,12 +10802,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:10652: checking for AOpenAudio in -lAlib" >&5 +echo "configure:10806: 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:10822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10702,15 +10856,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:10706: checking for ${dir}/soundcard.h" >&5 +echo "configure:10860: 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:10714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10726,6 +10880,7 @@ rm -f conftest* if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 sound_found=yes + need_miscplay=yes extra_objs="$extra_objs linuxplay.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"linuxplay.o\"" fi @@ -10748,12 +10903,6 @@ fi test "$sound_found" = "yes" && with_native_sound=yes fi -if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi -fi - if test "$with_native_sound" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_NATIVE_SOUND @@ -10766,8 +10915,78 @@ EOF test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$native_sound_lib\" to \$LIBS"; fi fi -case "$with_sound" in both | nas ) - { test "$extra_verbose" = "yes" && cat << \EOF +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:10922: 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:10930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + +echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 +echo "configure:10948: 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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + have_nas_sound=yes +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 +fi + + if test "$have_nas_sound" = "yes"; then + with_nas_sound=yes + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_NAS_SOUND EOF cat >> confdefs.h <<\EOF @@ -10775,12 +10994,12 @@ cat >> confdefs.h <<\EOF EOF } - extra_objs="$extra_objs nas.o" && if test "$extra_verbose" = "yes"; then + extra_objs="$extra_objs nas.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"nas.o\"" fi - libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi - cat > conftest.$ac_ext < conftest.$ac_ext < EOF @@ -10789,7 +11008,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | : else rm -rf conftest* - { test "$extra_verbose" = "yes" && cat << \EOF + old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF Defining NAS_NO_ERROR_JUMP EOF cat >> confdefs.h <<\EOF @@ -10800,14 +11019,124 @@ EOF fi rm -f conftest* -esac + else + test "$with_nas_sound" = "yes" && \ + { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; } + with_nas_sound=no + fi +fi + +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:11034: 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. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_have_esd_config="yes" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no" +fi +have_esd_config="$ac_cv_prog_have_esd_config" +if test -n "$have_esd_config"; then + echo "$ac_t""$have_esd_config" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$have_esd_config" = "yes"; then + save_c_switch_site="$c_switch_site" save_LIBS="$LIBS" + 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:11063: checking for esd_play_stream" >&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 esd_play_stream(); + +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_esd_play_stream) || defined (__stub___esd_play_stream) +choke me +#else +esd_play_stream(); +#endif + +; return 0; } +EOF +if { (eval echo configure:11089: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_esd_play_stream=no" +fi +rm -f conftest* + +if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_esd_sound=yes +else + echo "$ac_t""no" 1>&6 +c_switch_site="$save_c_switch_site" LIBS="$save_LIBS" +fi + + fi + + if test "$have_esd_sound" = "yes"; then + with_esd_sound=yes + need_miscplay=yes + extra_objs="$extra_objs esd.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"esd.o\"" + fi + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_ESD_SOUND +EOF +cat >> confdefs.h <<\EOF +#define HAVE_ESD_SOUND 1 +EOF +} + + else + test "$with_esd_sound" = "yes" && \ + { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; } + with_esd_sound=no + fi +fi + +test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"miscplay.o\"" + fi test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:10811: checking for TTY-related features" >&5 +echo "configure:11140: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -10823,12 +11152,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:10827: checking for tgetent in -lncurses" >&5 +echo "configure:11156: 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:11172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10872,15 +11201,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:10876: checking for ncurses/curses.h" >&5 +echo "configure:11205: 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:10884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10902,15 +11231,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:10906: checking for ncurses/term.h" >&5 +echo "configure:11235: 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:10914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10940,15 +11269,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:10944: checking for ncurses/curses.h" >&5 +echo "configure:11273: 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:10952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10983,12 +11312,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10987: checking for tgetent in -l$lib" >&5 +echo "configure:11316: 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:11332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11030,12 +11359,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:11034: checking for tgetent in -lcurses" >&5 +echo "configure:11363: 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:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11064,12 +11393,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:11068: checking for tgetent in -ltermcap" >&5 +echo "configure:11397: 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:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11128,15 +11457,15 @@ EOF test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:11132: checking for gpm.h" >&5 +echo "configure:11461: 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:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11159,12 +11488,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:11163: checking for Gpm_Open in -lgpm" >&5 +echo "configure:11492: 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:11508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11223,22 +11552,22 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event fi -test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ +test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:11229: checking for database support" >&5 +echo "configure:11558: checking for database support" >&5 -if test "$with_database_gnudbm $with_database_dbm" != "no no"; then +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:11234: checking for ndbm.h" >&5 +echo "configure:11563: 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:11242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11257,23 +11586,23 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then else echo "$ac_t""no" 1>&6 - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ + test "$with_database_gdbm" = "yes" -o \ + "$with_database_dbm" = "yes" && \ { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; } - with_database_gnudbm=no with_database_dbm=no + with_database_gdbm=no with_database_dbm=no fi fi -if test "$with_database_gnudbm" != "no"; then +if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11272: checking for dbm_open in -lgdbm" >&5 +echo "configure:11601: 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:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11298,13 +11627,13 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm + with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm else echo "$ac_t""no" 1>&6 -if test "$with_database_gnudbm" = "yes"; then +if test "$with_database_gdbm" = "yes"; then { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; } fi - with_database_gnudbm=no + with_database_gdbm=no fi @@ -11312,10 +11641,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:11316: checking for dbm_open" >&5 +echo "configure:11645: 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:11671: \"$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 @@ -11357,12 +11686,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11361: checking for dbm_open in -ldbm" >&5 +echo "configure:11690: 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:11706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11401,8 +11730,8 @@ fi fi test -n "$libdbm" && LIBS=""$libdbm" $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libdbm"\" to \$LIBS"; fi -test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ +test "$with_database_gdbm" = "yes" -o \ + "$with_database_dbm" = "yes" && \ { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DBM EOF @@ -11414,10 +11743,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:11418: checking for Berkeley db.h" >&5 +echo "configure:11747: checking for Berkeley db.h" >&5 for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -11451,9 +11780,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:11455: checking for Berkeley DB version" >&5 +echo "configure:11784: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -11472,10 +11801,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:11476: checking for $dbfunc" >&5 +echo "configure:11805: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11831: \"$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 @@ -11517,12 +11846,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:11521: checking for $dbfunc in -ldb" >&5 +echo "configure:11850: 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:11866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11579,7 +11908,7 @@ EOF fi fi -if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ +if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DATABASE @@ -11597,12 +11926,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:11601: checking for SOCKSinit in -lsocks" >&5 +echo "configure:11930: 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:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11666,19 +11995,21 @@ EOF LIBS="-Bstatic -lut -Bdynamic $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi fi -for ac_hdr in dlfcn.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11674: checking for $ac_hdr" >&5 +if test "$with_modules" != "no"; then + echo "checking for module support" 1>&6 +echo "configure:12001: checking for module support" >&5 + + ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 +echo "configure:12005: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < +#include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11693,36 +12024,15 @@ fi rm -f conftest* if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_DLFCN_H 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -fi -done - -test -z "$with_modules" && test ! -z "$have_dlfcn" && { + + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11721: checking for dlopen in -ldl" >&5 +echo "configure:12031: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11747,38 +12057,28 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF -} - DLL_LIB=dl; with_modules=yes + have_dl=yes libdl=dl else echo "$ac_t""no" 1>&6 -fi - } -test -z "$with_modules" && test ! -z "$have_dlfcn" && { -echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11766: checking for _dlopen in -lc" >&5 -ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` +echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 +echo "configure:12066: checking for dlopen in -lc" >&5 +ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11792,72 +12092,37 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF -} - DLL_LIB=; with_modules=yes + have_dl=yes else echo "$ac_t""no" 1>&6 fi - } -test -z "$with_modules" && test ! -z "$have_dlfcn" && { -echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11811: checking for dlopen in -lc" >&5 -ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` -xe_check_libs=" -lc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$ac_t""no" 1>&6 fi -rm -f conftest* -xe_check_libs="" -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF + if test -n "$have_dl"; then + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DLOPEN EOF cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF } - DLL_LIB=; with_modules=yes -else - echo "$ac_t""no" 1>&6 -fi - } -test -z "$with_modules" && { + else + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11856: checking for shl_load in -ldld" >&5 +echo "configure:12121: 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:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11882,27 +12147,25 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF + libdl=dld have_dl=yes; + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SHL_LOAD EOF cat >> confdefs.h <<\EOF #define HAVE_SHL_LOAD 1 EOF } - DLL_LIB=dld; with_modules=yes + else echo "$ac_t""no" 1>&6 -fi - } -test -z "$with_modules" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:11901: checking for dld_init in -ldld" >&5 +echo "configure:12164: 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:12180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11927,21 +12190,27 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF + libdl=dld have_dl=yes; + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DLD_INIT EOF cat >> confdefs.h <<\EOF #define HAVE_DLD_INIT 1 EOF } - DLL_LIB=dld; with_modules=yes + else echo "$ac_t""no" 1>&6 fi - } -if test "$with_modules" = "yes"; then - + +fi + + + fi + + if test -n "$have_dl"; then + dll_ld= dll_ldflags= dll_cflags= @@ -11952,7 +12221,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:11956: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:12225: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -11980,9 +12249,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:11984: checking checking whether we are using GNU C" >&5 +echo "configure:12253: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:12008: checking how to produce PIC code" >&5 +echo "configure:12277: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -12032,7 +12301,7 @@ if test "$XEGCC" = yes; then else # PORTME Check for PIC flags for the system compiler. case "$xehost_os" in - hpux9* | hpux10*) + hpux9* | hpux1[0-9]*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' dll_cflags='+Z' @@ -12097,18 +12366,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:12101: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:12370: 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:12381: \"$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 @@ -12139,7 +12408,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:12143: checking if C compiler can produce shared libraries" >&5 +echo "configure:12412: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -12190,14 +12459,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:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -12222,7 +12491,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:12226: checking for ld used by GCC" >&5 +echo "configure:12495: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -12247,7 +12516,7 @@ echo "configure:12226: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:12251: checking for GNU ld" >&5 +echo "configure:12520: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -12285,7 +12554,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:12289: checking if the linker is GNU ld" >&5 +echo "configure:12558: 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 @@ -12312,7 +12581,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:12316: checking whether the linker supports shared libraries" >&5 +echo "configure:12585: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -12478,7 +12747,7 @@ if test -z "$ld_dynamic_link_flags"; then ;; solaris2* | solaris7*) - ld_dynamic_link_flags="${wl}-Bdynamic" + ld_dynamic_link_flags= ;; sco3.2v5* | unixware* | sysv5* | sysv4*) @@ -12508,6 +12777,8 @@ fi # End of if test "$can_build_shared" = "yes" + fi + if test "$can_build_shared" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SHLIB @@ -12517,21 +12788,18 @@ cat >> confdefs.h <<\EOF EOF } - extra_objs="$extra_objs sysdll.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sysdll.o\"" - fi - extra_objs="$extra_objs emodules.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"emodules.o\"" + extra_objs="$extra_objs sysdll.o emodules.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"sysdll.o emodules.o\"" fi INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" && if test "$extra_verbose" = "yes"; then echo " Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi - test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi + test -n "$libdl" && LIBS="-l${libdl} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${libdl}\" to \$LIBS"; fi for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12532: checking for $ac_func" >&5 +echo "configure:12800: 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:12826: \"$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 @@ -12581,18 +12849,23 @@ else fi done + with_modules=yes else - echo "configure: warning: disabling shared library support" 1>&2 + if test "$with_modules" = "yes"; then + { echo "Error:" "Required module support cannot be provided." >&2; exit 1; } + else + echo "configure: warning: "Module support cannot be provided."" 1>&2 + fi with_modules=no fi fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -12974,10 +13247,10 @@ for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi ac_configure_args="$T" { test "$extra_verbose" = "yes" && cat << EOF - Defining EMACS_CONFIGURATION = "$canonical" + Defining EMACS_CONFIGURATION = "$configuration" EOF cat >> confdefs.h <> confdefs.h <<\EOF EOF } +test "$pdump" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF + Defining PDUMP +EOF +cat >> confdefs.h <<\EOF +#define PDUMP 1 +EOF +} + ( @@ -13181,7 +13462,7 @@ if test ! -z ${emacs_beta_version} ; then xemacs_betaname="-b${emacs_beta_version}" fi else - xemacs_betaname="" + xemacs_betaname="" fi ( @@ -13250,16 +13531,15 @@ test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; -esac -test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." + +test "$with_native_sound" = yes && echo " Compiling in native sound support." +test "$with_nas_sound" = yes && echo " Compiling in network sound (NAS) support." +test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." +test "$with_esd_sound" = yes && echo " Compiling in support for Enlightened Sound Daemon (ESD)." test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." test "$with_database_dbm" = yes && echo " Compiling in support for DBM." -test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." +test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." @@ -13293,15 +13573,20 @@ case "$with_menubars" in echo " *WARNING* The Motif menubar implementation is currently buggy." echo " We recommend using the Lucid menubar instead." echo " Re-run configure with --with-menubars='lucid'." ;; + msw ) echo " Using MS-Windows menubars." ;; esac case "$with_scrollbars" in lucid ) echo " Using Lucid scrollbars." ;; motif ) echo " Using Motif scrollbars." ;; athena ) echo " Using Athena scrollbars." ;; athena3d ) echo " Using Athena-3d scrollbars." ;; + msw ) echo " Using MS-Windows scrollbars." ;; esac case "$with_widgets" in motif ) echo " Using Motif native widgets." ;; + athena ) echo " Using Athena native widgets." ;; + athena3d ) echo " Using Athena-3d native widgets." ;; + msw ) echo " Using MS-Windows native widgets." ;; esac case "$with_dialogs" in motif ) @@ -13315,8 +13600,9 @@ case "$with_dialogs" in ;; athena ) echo " Using Athena dialog boxes." ;; athena3d ) echo " Using Athena-3d dialog boxes." ;; + msw ) echo " Using MS-Windows dialog boxes." ;; esac -test "$with_modules" = "yes" && echo " Compiling in DSO module support." +test "$with_modules" = "yes" && echo " Compiling in dynamic shared object module support." test "$with_clash_detection" = yes && \ echo " Clash detection will use \"$lockdir\" for locking files." echo " movemail will use \"$mail_locking\" for locking mail spool files." @@ -13324,8 +13610,9 @@ test "$with_pop" = yes && echo " Using POP for mail access." test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$debug" = yes && echo " Compiling in extra code for debugging." -test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." +test "$pdump" = yes && echo " Using the new portable dumper (wishful thinking)." +test "$debug" = yes && echo " Compiling in extra code for debugging." +test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ != "no no no no no"; then echo " WARNING: ---------------------------------------------------------" @@ -13349,12 +13636,10 @@ test -n "$exec_prefix" && for file in $internal_makefile_list; do test "$file" = src/Makefile.in && \ file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" + ac_output_files="$ac_output_files $file" && if test "$extra_verbose" = "yes"; then echo " Appending \"$file\" to \$ac_output_files"; fi done ac_output_files="$ac_output_files src/paths.h lib-src/config.values" -if test "$with_modules" = "yes"; then - ac_output_files="$ac_output_files lib-src/ellcc.h" -fi +test "$with_modules" = "yes" && ac_output_files="$ac_output_files lib-src/ellcc.h" && if test "$extra_verbose" = "yes"; then echo " Appending \"lib-src/ellcc.h\" to \$ac_output_files"; fi trap '' 1 2 15 @@ -13467,6 +13752,7 @@ s%@libs_xauth@%$libs_xauth%g s%@dnd_objs@%$dnd_objs%g s%@lwlib_objs@%$lwlib_objs%g s%@ALLOCA@%$ALLOCA%g +s%@have_esd_config@%$have_esd_config%g s%@dll_ld@%$dll_ld%g s%@dll_cflags@%$dll_cflags%g s%@dll_ldflags@%$dll_ldflags%g diff --git a/configure.in b/configure.in index 02d8fb2..74ee273 100644 --- a/configure.in +++ b/configure.in @@ -388,6 +388,7 @@ with_toolbars="" with_tty="" use_union_type="no" with_dnet="" +pdump="no" dnl ------------------ dnl Options Processing @@ -518,6 +519,7 @@ while test $# != 0; do const_is_losing | \ usage_tracking | \ use_union_type | \ + pdump | \ debug | \ use_assertions | \ memory_usage_stats | \ @@ -582,20 +584,20 @@ while test $# != 0; do "with_database" ) with_database_berkdb=no with_database_dbm=no - with_database_gnudbm=no + with_database_gdbm=no for x in `echo "$val" | sed -e 's/,/ /g'` ; do case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) USAGE_ERROR(["The \`--$optname' option value + no ) ;; + b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; + d | db | dbm ) with_database_dbm=yes ;; + g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes ;; + * ) USAGE_ERROR(["The \`--$optname' option value must be either \`no' or a comma-separated list of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."]) ;; esac done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then + if test "$with_database_dbm" = "yes" -a \ + "$with_database_gdbm" = "yes"; then USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified with the \`--$optname' option.") fi @@ -603,18 +605,39 @@ while test $# != 0; do dnl Has the user requested sound support? "with_sound" ) - dnl value can be native, nas or both. yes is allowed - dnl as a backwards compatible synonym for native - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'."]) ;; - esac - eval "$opt=\"$val\"" + dnl values is a subset of all,native,nas,esd + dnl or their negatives: none,nonative,nonas,noesd + for x in `echo "$val" | sed -e 's/,/ /g'` ; do + case "$x" in + dnl all and none are only permitted as the first in the list. + n | no | non | none ) new_sdefault=no ;; + a | al | all | both ) new_sdefault=yes ;; + + native ) with_native_sound=yes ;; + nonative ) with_native_sound=no ;; + + nas ) with_nas_sound=yes ;; + nonas ) with_nas_sound=no ;; + + esd ) with_esd_sound=yes ;; + noesd ) with_esd_sound=no ;; + + * ) bogus_sound=yes ;; + esac + if test "$bogus_sound" -o \ + \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then + types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'." + USAGE_ERROR(["Valid types for the \`--$optname' option are: + $types. +The default is to autodetect all sound support."]) + elif test -n "$new_sdefault" ; then + with_native_sound=$new_sdefault + with_nas_sound=$new_sdefault + with_esd_sound=$new_sdefault + new_sdefault= # reset this + fi + sound_notfirst=true + done ;; dnl Has the user requested XIM support? @@ -761,6 +784,8 @@ while test $# != 0; do ;; dnl Obsolete legacy argument? Warn, but otherwise ignore. + "use_minimal_tagbits" | \ + "use_indexed_lrecord_implementation" | \ "run_in_place" | \ "with_gnu_make" ) AC_MSG_WARN([Obsolete option \`--$optname' ignored.]) @@ -1032,6 +1057,7 @@ case "$canonical" in vax-*-* ) machine=vax ;; mips-dec-* ) machine=pmax ;; mips-sgi-* ) machine=iris4d ;; + mips*-linux ) machine=mips ;; romp-ibm-* ) machine=ibmrt ;; rs6000-ibm-aix* ) machine=ibmrs6000 ;; powerpc-ibm-aix* ) machine=ibmrs6000 ;; @@ -2155,6 +2181,7 @@ AC_TYPE_PID_T AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_OFF_T +AC_CHECK_TYPE(ssize_t, int) AC_MSG_CHECKING(for struct timeval) AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME @@ -2543,7 +2570,7 @@ if test "$with_x11" != "yes"; then dnl if test "$with_tty" = "no" ; then dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) dnl fi - for feature in tooltalk cde offix wmcommand xim xmu + for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) @@ -2862,6 +2889,9 @@ if test "$with_x11" = "yes"; then dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)]) dnl fi + dnl Autodetect -lXaw3d + AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, have_xaw3d=yes, have_xaw3d=no) + dnl autodetect Motif - but only add to libs_x later (if necessary) AC_CHECK_HEADER(Xm/Xm.h, [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], @@ -2890,6 +2920,7 @@ case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) esac case "$with_dialogs" in "" | "yes" | "lucid" ) if test "$have_motif" = "yes"; then with_dialogs="motif" + elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d" elif test "$have_xaw" = "yes"; then with_dialogs="athena" else with_dialogs=no fi ;; @@ -2897,15 +2928,27 @@ esac case "$with_scrollbars" in "" | "yes" ) with_scrollbars="lucid" ;; esac -case "$with_widgets" in "" | "yes" ) +case "$with_widgets" in "" | "yes" | "lucid") if test "$have_motif" = "yes"; then with_widgets="motif" + elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d" + elif test "$have_xaw" = "yes"; then with_widgets="athena" else with_widgets=no fi ;; esac all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" -case "$all_widgets" in *athena* ) +case "$all_widgets" in + *athena*3d ) + AC_DEFINE(LWLIB_USES_ATHENA) + AC_DEFINE(NEED_ATHENA) + XE_APPEND(lwlib-Xaw.o, lwlib_objs) + if test "$have_xaw3d"; then + XE_PREPEND(-lXaw3d, libs_x) + else + XE_PREPEND(-lXaw, libs_x) + fi ;; + *athena* ) AC_DEFINE(LWLIB_USES_ATHENA) AC_DEFINE(NEED_ATHENA) XE_APPEND(lwlib-Xaw.o, lwlib_objs) @@ -2922,6 +2965,11 @@ esac test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs) test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs) test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs) +test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ + XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs) +case "$with_widgets" in athena* ) + XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs);; +esac case "$all_widgets" in *lucid* ) AC_DEFINE(NEED_LUCID) XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;; @@ -2933,11 +2981,15 @@ case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) +case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac +test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ + AC_DEFINE(LWLIB_TABS_LUCID) test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS) test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS) test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS) test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS) +test "$with_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS) test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID) test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) @@ -2945,6 +2997,7 @@ test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) +test "$with_widgets" = "motif" && AC_DEFINE(LWLIB_WIDGETS_MOTIF) test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o) test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o) @@ -2957,12 +3010,6 @@ if test "$with_x11" = "yes"; then test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o) -else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi fi dnl ---------------------- @@ -3114,7 +3161,7 @@ if test "$need_motif" = "yes" ; then XE_COMPUTE_RUNPATH() fi -AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf) +AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf) dnl realpath is buggy on linux, decosf and aix4 @@ -3357,10 +3404,6 @@ dnl Check for sound of various sorts. dnl Autodetect native sound AC_CHECKING("for sound support") -case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; -esac test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then @@ -3418,6 +3461,7 @@ if test "$with_native_sound" != "no"; then for dir in "machine" "sys" "linux"; do AC_CHECK_HEADER(${dir}/soundcard.h, sound_found=yes + need_miscplay=yes XE_ADD_OBJS(linuxplay.o) [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] break) @@ -3427,25 +3471,55 @@ if test "$with_native_sound" != "no"; then test "$sound_found" = "yes" && with_native_sound=yes fi -if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi -fi - if test "$with_native_sound" = "yes"; then AC_DEFINE(HAVE_NATIVE_SOUND) test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS) fi -case "$with_sound" in both | nas ) - AC_DEFINE(HAVE_NAS_SOUND) - XE_ADD_OBJS(nas.o) - XE_PREPEND(-laudio, libs_x) - dnl If the nas library does not contain the error jump point, - dnl then we force safer behavior. - AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) -esac +dnl NAS Sound support +if test "$with_nas_sound" != "no"; then + AC_CHECK_HEADER(audio/audiolib.h, [ + AC_CHECK_LIB(audio, AuOpenServer, have_nas_sound=yes)]) + if test "$have_nas_sound" = "yes"; then + with_nas_sound=yes + AC_DEFINE(HAVE_NAS_SOUND) + XE_ADD_OBJS(nas.o) + XE_PREPEND(-laudio, libs_x) + dnl If the nas library does not contain the error jump point, + dnl then we force safer behavior. + AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes; AC_DEFINE(NAS_NO_ERROR_JUMP)]) + else + test "$with_nas_sound" = "yes" && \ + XE_DIE("Required NAS sound support cannot be provided.") + with_nas_sound=no + fi +fi + +dnl ESD Sound support +if test "$with_esd_sound" != "no"; then + AC_CHECK_PROG(have_esd_config, esd-config, yes, no) + if test "$have_esd_config" = "yes"; then + save_c_switch_site="$c_switch_site" save_LIBS="$LIBS" + XE_APPEND(`esd-config --cflags`, c_switch_site) + XE_PREPEND(`esd-config --libs`, LIBS) + AC_CHECK_FUNC(esd_play_stream, + have_esd_sound=yes, + c_switch_site="$save_c_switch_site" LIBS="$save_LIBS") + fi + + if test "$have_esd_sound" = "yes"; then + with_esd_sound=yes + need_miscplay=yes + XE_ADD_OBJS(esd.o) + AC_DEFINE(HAVE_ESD_SOUND) + else + test "$with_esd_sound" = "yes" && \ + XE_DIE("Required ESD sound support cannot be provided.") + with_esd_sound=no + fi +fi + +test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o) dnl --------------------- dnl TTY-dependent options @@ -3536,26 +3610,26 @@ dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. dnl On FreeBSD, both DB and DBM are part of libc. dnl By default, we check for DBM support in libgdbm, then libc, then libdbm. -test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ +test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && AC_CHECKING(for database support) dnl Check for ndbm.h, required for either kind of DBM support. -if test "$with_database_gnudbm $with_database_dbm" != "no no"; then +if test "$with_database_gdbm $with_database_dbm" != "no no"; then AC_CHECK_HEADER(ndbm.h, [:], [ - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ + test "$with_database_gdbm" = "yes" -o \ + "$with_database_dbm" = "yes" && \ XE_DIE("Required DBM support cannot be provided.") - with_database_gnudbm=no with_database_dbm=no]) + with_database_gdbm=no with_database_dbm=no]) fi dnl Check for DBM support in libgdbm. -if test "$with_database_gnudbm" != "no"; then +if test "$with_database_gdbm" != "no"; then AC_CHECK_LIB(gdbm, dbm_open, [ - with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm], [ - if test "$with_database_gnudbm" = "yes"; then + with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm], [ + if test "$with_database_gdbm" = "yes"; then XE_DIE("Required GNU DBM support cannot be provided.") fi - with_database_gnudbm=no]) + with_database_gdbm=no]) fi dnl Check for DBM support in libc and libdbm. @@ -3569,8 +3643,8 @@ fi dnl Tell make about the DBM support we detected. test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS) -test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ +test "$with_database_gdbm" = "yes" -o \ + "$with_database_dbm" = "yes" && \ AC_DEFINE(HAVE_DBM) dnl Check for Berkeley DB. @@ -3615,7 +3689,7 @@ yes fi fi -if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ +if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no"; then AC_DEFINE(HAVE_DATABASE) XE_ADD_OBJS(database.o) @@ -3634,24 +3708,42 @@ if test "$usage_tracking" = "yes"; then fi dnl autodetect dll support -AC_CHECK_HEADERS(dlfcn.h, [have_dlfcn=yes - AC_DEFINE(HAVE_DLFCN_H)]) -test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_modules=yes]) } -test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_modules=yes]) } -test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_modules=yes]) } -test -z "$with_modules" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_modules=yes]) } -test -z "$with_modules" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_modules=yes]) } -if test "$with_modules" = "yes"; then - XE_SHLIB_STUFF +if test "$with_modules" != "no"; then + AC_CHECKING(for module support) + + dnl Find headers and libraries + AC_CHECK_HEADER(dlfcn.h, [ + AC_CHECK_LIB(dl, dlopen, [ have_dl=yes libdl=dl], [ + AC_CHECK_LIB(c, dlopen, [ have_dl=yes ])])]) + if test -n "$have_dl"; then + AC_DEFINE(HAVE_DLOPEN) + else + AC_CHECK_LIB(dld, shl_load, [ + libdl=dld have_dl=yes; + AC_DEFINE(HAVE_SHL_LOAD)], [ + AC_CHECK_LIB(dld, dld_init, [ + libdl=dld have_dl=yes; + AC_DEFINE(HAVE_DLD_INIT)])]) + fi + + if test -n "$have_dl"; then + dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared + XE_SHLIB_STUFF + fi + if test "$can_build_shared" = "yes"; then AC_DEFINE(HAVE_SHLIB) - XE_ADD_OBJS(sysdll.o) - XE_ADD_OBJS(emodules.o) + XE_ADD_OBJS(sysdll.o emodules.o) XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) - test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS) + test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS) AC_CHECK_FUNCS(dlerror _dlerror) + with_modules=yes else - AC_MSG_WARN(disabling shared library support) + if test "$with_modules" = "yes"; then + XE_DIE("Required module support cannot be provided.") + else + AC_MSG_WARN("Module support cannot be provided.") + fi with_modules=no fi fi @@ -3974,7 +4066,7 @@ if test "$with_site_modules" = "no"; then fi XE_SPACE(ac_configure_args, $ac_configure_args) -AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") +AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration") AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args") AC_DEFINE_UNQUOTED(config_machfile, "$machfile") AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") @@ -4010,6 +4102,7 @@ test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) +test "$pdump" = "yes" && AC_DEFINE(PDUMP) dnl ------------------------------- dnl Report on what we decided to do @@ -4033,7 +4126,7 @@ if test ! -z ${emacs_beta_version} ; then xemacs_betaname="-b${emacs_beta_version}" fi else - xemacs_betaname="" + xemacs_betaname="" fi dnl Start stdout redirection to '| tee -a Installation' @@ -4103,16 +4196,15 @@ test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; -esac -test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." + +test "$with_native_sound" = yes && echo " Compiling in native sound support." +test "$with_nas_sound" = yes && echo " Compiling in network sound (NAS) support." +test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." +test "$with_esd_sound" = yes && echo " Compiling in support for Enlightened Sound Daemon (ESD)." test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." test "$with_database_dbm" = yes && echo " Compiling in support for DBM." -test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." +test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." @@ -4146,15 +4238,20 @@ case "$with_menubars" in echo " *WARNING* The Motif menubar implementation is currently buggy." echo " We recommend using the Lucid menubar instead." echo " Re-run configure with --with-menubars='lucid'." ;; + msw ) echo " Using MS-Windows menubars." ;; esac case "$with_scrollbars" in lucid ) echo " Using Lucid scrollbars." ;; motif ) echo " Using Motif scrollbars." ;; athena ) echo " Using Athena scrollbars." ;; athena3d ) echo " Using Athena-3d scrollbars." ;; + msw ) echo " Using MS-Windows scrollbars." ;; esac case "$with_widgets" in motif ) echo " Using Motif native widgets." ;; + athena ) echo " Using Athena native widgets." ;; + athena3d ) echo " Using Athena-3d native widgets." ;; + msw ) echo " Using MS-Windows native widgets." ;; esac case "$with_dialogs" in motif ) @@ -4168,8 +4265,9 @@ case "$with_dialogs" in ;; athena ) echo " Using Athena dialog boxes." ;; athena3d ) echo " Using Athena-3d dialog boxes." ;; + msw ) echo " Using MS-Windows dialog boxes." ;; esac -test "$with_modules" = "yes" && echo " Compiling in DSO module support." +test "$with_modules" = "yes" && echo " Compiling in dynamic shared object module support." test "$with_clash_detection" = yes && \ echo " Clash detection will use \"$lockdir\" for locking files." echo " movemail will use \"$mail_locking\" for locking mail spool files." @@ -4177,8 +4275,9 @@ test "$with_pop" = yes && echo " Using POP for mail access." test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$debug" = yes && echo " Compiling in extra code for debugging." -test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." +test "$pdump" = yes && echo " Using the new portable dumper (wishful thinking)." +test "$debug" = yes && echo " Compiling in extra code for debugging." +test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ != "no no no no no"; then echo " WARNING: ---------------------------------------------------------" @@ -4209,12 +4308,10 @@ dnl except ./Makefile from $srcdir/Makefile.in for file in $internal_makefile_list; do test "$file" = src/Makefile.in && \ file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" + XE_APPEND($file, ac_output_files) done ac_output_files="$ac_output_files src/paths.h lib-src/config.values" -if test "$with_modules" = "yes"; then - ac_output_files="$ac_output_files lib-src/ellcc.h" -fi +test "$with_modules" = "yes" && XE_APPEND(lib-src/ellcc.h, ac_output_files) AC_OUTPUT($ac_output_files, [for dir in . $MAKE_SUBDIR; do diff --git a/configure.usage b/configure.usage index dbeeb9a..12a020f 100644 --- a/configure.usage +++ b/configure.usage @@ -121,9 +121,13 @@ Additional features: --with-database=TYPE (*) Compile with database support. Valid types are `no' or a comma-separated list of one or more of `berkdb' and either `dbm' or `gnudbm'. ---with-sound=native (*) Compile with native sound support. ---with-sound=nas Compile with network sound support. ---with-sound=both Compile with native and network sound support. +--with-sound=TYPE,[TYPE],... Compile with native sound support. + Valid types are `native', `nas' and `esd'. + Prefix a type with 'no' to disable. + The first option can be `none' or `all'. + `none' is a synonym for `nonative,nonas,noesd'. + `all' is a synonym for native,nas,esd or `all'. + The default is to autodetect all sound support. --native-sound-lib=LIB Native sound support library. Needed on Suns with --with-sound=both because both sound libraries are called libaudio. @@ -159,6 +163,9 @@ Additional features: and localdir files in case run-time searching for them fails. --moduledir=DIR Directory to install dynamic modules in. +--pdump New, experimental, non-working, don't-sue-me-if- + your-house-collapses-and-your-wife-goes-away, + portable dumper. Internationalization options: diff --git a/dynodump/_dynodump.h b/dynodump/_dynodump.h index c09bd7f..847c4eb 100644 --- a/dynodump/_dynodump.h +++ b/dynodump/_dynodump.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _dynodump.h,v 1.5 1996/05/23 18:39:07 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI" #ifndef _DYNODUMP_DOT_H #define _DYNODUMP_DOT_H diff --git a/dynodump/dynodump.c b/dynodump/dynodump.c index b684813..ff4477d 100644 --- a/dynodump/dynodump.c +++ b/dynodump/dynodump.c @@ -73,7 +73,7 @@ * N.B. The above commentary is not quite correct in the flags have been hardwired * to RTLD_SAVREL. */ -#pragma ident "@(#) $Id: dynodump.c,v 1.8 1996/05/23 18:39:21 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI" #define __EXTENSIONS__ 1 diff --git a/dynodump/i386/_relocate.c b/dynodump/i386/_relocate.c index d3ec59c..f97dd1b 100644 --- a/dynodump/i386/_relocate.c +++ b/dynodump/i386/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:12:41 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/i386/machdep.h b/dynodump/i386/machdep.h index c90e29c..4dc66fe 100644 --- a/dynodump/i386/machdep.h +++ b/dynodump/i386/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:43 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" /* * Global include file for all sgs Intel machine dependent macros, constants diff --git a/dynodump/ppc/_relocate.c b/dynodump/ppc/_relocate.c index feb5ca9..754b417 100644 --- a/dynodump/ppc/_relocate.c +++ b/dynodump/ppc/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.3 1995/06/26 20:16:39 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/ppc/machdep.h b/dynodump/ppc/machdep.h index 2a3d1e6..a649a9c 100644 --- a/dynodump/ppc/machdep.h +++ b/dynodump/ppc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:49 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI" /* * Global include file for all sgs PowerPC machine dependent macros, constants diff --git a/dynodump/sparc/_relocate.c b/dynodump/sparc/_relocate.c index 10b0fda..14466f0 100644 --- a/dynodump/sparc/_relocate.c +++ b/dynodump/sparc/_relocate.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:13:26 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" #include #include diff --git a/dynodump/sparc/machdep.h b/dynodump/sparc/machdep.h index 972081e..b4b76d8 100644 --- a/dynodump/sparc/machdep.h +++ b/dynodump/sparc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:55 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:26 steve Exp $ - SMI" /* * Global include file for all sgs SPARC machine dependent macros, constants diff --git a/dynodump/syms.c b/dynodump/syms.c index c060f33..0ac5cb8 100644 --- a/dynodump/syms.c +++ b/dynodump/syms.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: syms.c,v 1.2 1995/03/06 22:39:22 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: syms.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI" #include #include diff --git a/etc/DISTRIB b/etc/DISTRIB index 3dd537c..abd9eb1 100644 --- a/etc/DISTRIB +++ b/etc/DISTRIB @@ -1,8 +1,8 @@ -*- text -*- - XEmacs availability information. Last Modified: 17-Apr-97. + XEmacs availability information. Last Modified: 18-Jul-99. -XEmacs is available via anonymous FTP from ftp.xemacs.org (128.174.252.16) +XEmacs is available via anonymous FTP from ftp.xemacs.org (207.96.122.8) in the directory /pub/xemacs/. ftp.xemacs.org is the primary distribution point, but you may find diff --git a/etc/FTP b/etc/FTP index 965f0b9..2074ec4 100644 --- a/etc/FTP +++ b/etc/FTP @@ -1,282 +1,103 @@ - -*- text -*- - XEmacs availability information. Last Modified: 9-Jul-1998. + XEmacs availability information. Last Modified: 1999-11-08 XEmacs is available via anonymous FTP from ftp.xemacs.org (207.96.122.8) in the directory /pub/xemacs/. ftp.xemacs.org is the primary distribution point, but you may find copies of it at other sites as well. Some sites to try include: - - ftp://ftp.jaist.ac.jp/pub/GNU/xemacs/ - ftp://ring.aist.go.jp/pub/text/xemacs/ - ftp://ring.asahi-net.or.jp/pub/text/xemacs/ - ftp://ftp.uu.net/systems/gnu/xemacs/ - ftp://ftp.sunet.se/pub/gnu/xemacs/ - ftp://ftp.cenatls.cena.dgac.fr/pub/Emacs/xemacs/ - ftp://ftp.th-darmstadt.de/pub/editors/xemacs/ - ftp://sunsite.doc.ic.ac.uk/gnu/xemacs/ - ftp://ftp.lip6.fr/pub/emacs/xemacs/ - ftp://uiarchive.cso.uiuc.edu/pub/packages/xemacs/ - ftp://ftp.technion.ac.il/pub/unsupported/gnu/xemacs/ - ftp://ftp.linux.hr/pub/xemacs/ - ftp://sunsite.cnlab-switch.ch/mirror/xemacs/ - ftp://ftp.unicamp.br/pub/xemacs/ - ftp://ftp.usyd.edu.au/pub/Xemacs/ - ftp://ftp.lab.kdd.co.jp/xemacs/ - ftp://SunSITE.sut.ac.jp/pub/archives/xemacs/ - ftp://sunsite.icm.edu.pl/pub/unix/xemacs + +* North America + + o Canada + + ftp://ftp.crc.ca/pub/packages/editors/xemacs/ + + ftp://sunsite.ualberta.ca/pub/Mirror/xemacs/ + o United States + + ftp://uiarchive.uiuc.edu/pub/packages/xemacs/ + + ftp://metalab.unc.edu/pub/packages/editors/xemacs/ + + ftp://ftp.sunsite.utk.edu/pub/xemacs/ + +* South America + + o Brazil + + ftp://ftp.unicamp.br/pub/xemacs/ + +* Europe + + o Austria + + ftp://gd.tuwien.ac.at/editors/xemacs/ + o Denmark + + ftp://sunsite.auc.dk/pub/emacs/xemacs/ + o England + + ftp://sunsite.doc.ic.ac.uk/packages/xemacs/ + o Finland + + ftp://ftp.funet.fi/pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/ + o France + + ftp://ftp.pasteur.fr/pub/computing/xemacs/ + + ftp://ftp.cenatls.cena.dgac.fr/Emacs/xemacs/ + o Germany + + ftp://ftp.tu-darmstadt.de/pub/editors/xemacs/ + o Hungary + + ftp://ftp.kfki.hu/pub/packages/xemacs/ + o Ireland + + ftp://ftp.eunet.ie/mirrors/ftp.xemacs.org/pub/xemacs/ + o Italy + + ftp://ftp.uniroma2.it/unix/misc/dist/XEMACS/ + o Norway + + ftp://sunsite.uio.no/pub/xemacs + o Poland + + ftp://ftp.icm.edu.pl/pub/unix/editors/xemacs/ + o Russia + + ftp://ftp.srcc.msu.su/mirror/ftp.xemacs.org/ + o Sweden + + ftp://ftp.sunet.se/pub/gnu/xemacs/ + o Switzerland + + ftp://sunsite.cnlab-switch.ch/mirror/xemacs/ + +* Asia + + o Japan + + ftp://ftp.netlab.is.tsukuba.ac.jp/pub/GNU/xemacs/ + + ftp://ftp.jaist.ac.jp/pub/GNU/xemacs/ + + ftp://ring.aist.go.jp/pub/text/xemacs/ + + ftp://ring.asahi-net.or.jp/pub/text/xemacs/ + + ftp://sunsite.sut.ac.jp/pub/archives/packages/xemacs/ + + ftp://ftp.dti.ad.jp/pub/unix/editor/xemacs/ + + ftp://mirror.nucba.ac.jp/mirror/xemacs/ + o Korea + + ftp://ftp.kreonet.re.kr/pub/tools/emacs/xemacs/ + o Taiwan + + ftp://coda.nctu.edu.tw/Editors/xemacs/ + +* Africa + + o South Africa + + ftp://ftp.sun.ac.za/xemacs/ + +* Middle East + + o Saudi Arabia + + ftp://ftp.isu.net.sa/pub/mirrors/ftp.xemacs.org/ + +* Australia + + o ftp://mirror.aarnet.edu.au/pub/xemacs The most up-to-date list of distribution sites can always be found on -the XEmacs WWW page, http://www.xemacs.org/. Try to pick a site -that is networkologically close to you. If you know of other mirrors -of the XEmacs archives, please send us mail and we will list them here -as well. +the XEmacs WWW page, http://www.xemacs.org/. Try to pick a site that +is networkologically close to you. If you know of other mirrors of +the XEmacs archives, please send us mail and we will list them here as +well. There are mailing lists and newsgroups specifically for discussing and reporting bugs in XEmacs; see the file MAILINGLISTS in this directory. -The FTP and ordering information in the remainder of this file applies -to the versions of GNU Emacs distributed by the Free Software Foundation, -not to XEmacs. - ----------------------------------------------------------------------- -How to get GNU Software by Internet FTP or by UUCP. Last updated 11 June 95. - -* Please send improvements to this file to gnu@prep.ai.mit.edu. - -* No Warranties - -We distribute software in the hope that it will be useful, but without -any warranty. No author or distributor of this software accepts -responsibility to anyone for the consequences of using it or for -whether it serves any particular purpose or works at all, unless he -says so in writing. - -* Updates - -If you find this file in the Emacs distribution, there is a chance it -is out of date. If you plan to FTP files from a GNU FTP host, you -might as well start by FTPing the current version of this file, which -is `/pub/gnu/GNUinfo/FTP'. - -* How to FTP - -Use the ftp program on your system (ask locally if you can't find it) -to connect to the host you are ftping from. Unless indicated -otherwise, login in as user "anonymous", with password: "your e-mail -address" and set "binary" mode (to transfer all eight bits in each -byte). - -* FTPing GNU Software - -** How to FTP GNU Emacs - -If you are on the Internet (see also "** Alternative Internet FTP -Sources" below), you can at present copy the latest distribution -version of GNU Emacs from the file /pub/gnu/emacs-M.N.tar on host -prep.ai.mit.edu (or the file /pub/gnu/emacs-M.N.tar.gz which has been -run through gzip after tar). M and N stand for version numbers; look -at a listing of the directory through ftp to see what version is -available. These files are about 11 and 4 megabytes long, -respectively. After you unpack the distribution, be sure to look at -the files README and INSTALL. - -Because of difficulties in transferring large files, sometimes a split -version of the tar file is created. This would be in a directory -named /pub/gnu/emacs-M.N.tar-split or perhaps -/pub/gnu/emacs-M.N.tar.gz-split, containing files of 100000 characters -each. There is generally no trouble in ftping files of this size. -They can be combined with cat to make a tar file or compressed tar -file. If you can't find such files on prep.ai.mit.edu, have a look at -archive.cis.ohio-state.edu. - -ALWAYS USE BINARY/IMAGE MODE TO TRANSFER THESE FILES! -Text mode does not work for tar files or compressed files. - -Some ftp'ers have found it necessary for successful file transfer: - - to explicitly use prep.ai.mit.edu internet address: -18.159.0.42 (as of 18 June 95) - -Files of differences from previous widely distributed GNU Emacs -versions to the present version are also available on prep.ai.mit.edu -under names of the form emacs.diff-OO.OO-NN.NN in directory /pub/gnu. -These are made with diff -rc2. Sometimes there are versions -compressed with gzip of these difference files as well; their names -have .gz appended. - -The Emacs manual in source form is included in the distribution. The -dvi file produced by TeX is not included, but a copy may be available -for ftp under the name /pub/gnu/emacs.dvi. - -The Emacs Lisp Reference Manual is in a separate file: - /pub/gnu/elisp-manual-NN.tar.gz - -** VMS FTP sites with GNU Software -You can anonymously ftp a VMS version of GNU emacs from: - - ftp.stacken.kth.se:[.GNU-VMS] - GNU Emacs and some other VMS -ports (and some VMS binaries) of GNU software - - mango.rsmas.miami.edu has a VMS version of the GCC/G++ compiler. -Contact angel@flipper.miami.edu (angel li) for details. - - addvax.llnl.gov - GNU Emacs - - VMSD.OAC.UCI.EDU - GNU Emacs - - RIGEL.EFD.LTH.SE [130.235.48.3] - GNU Emacs - - ctrsci.cc.utah.edu - GNU Emacs - The 00readme.txt file gives details - - cc.utah.edu [128.110.8.24] - misc. GNU software - user -anonymous, pass guest. The 00README.txt file gives details. - -** Other GNU Software and How To FTP It - -Other GNU software is available on prep.ai.mit.edu under directory -/pub/gnu. diff files to convert between versions (like those used for -GNU Emacs), exist for some of these programs. Some programs have misc -support files as well. Have a look on prep to see which ones. -Compressed versions of the tar or diff files are often available -(indicated by a .gz suffix and made with the `gzip' program). Some of -this software is in beta test (probably still buggy), and is being -made available for use by hackers who like to test software. - -The file /pub/gnu/DESCRIPTIONS has a list of the packages distributed -on prep.ai.mit.edu with a brief description explaining what -each one can be used for. - -More information about these programs can typically be found in the -GNU Bulletin. To receive a copy, write to gnu@prep.ai.mit.edu. - -** Scheme and How to FTP It - -The latest distribution version of C Scheme is available via anonymous FTP -from altdorf.ai.mit.edu in /archive/scheme-X.XX/ (where X.XX is some version -number). - -Read the files INSTALL and README in the top level C Scheme directory. - -** TeX and How to Obtain It - -We don't distribute TeX now, but it is free software. - -TeX is a document formatter that is used, among other things, by the FSF -for all its documentation. You will need it if you want to make printed -manuals. - -TeX is freely redistributable. You can get it by ftp, tape, or CD/ROM. - -*** For FTP instructions, retrieve the file -ftp.cs.umb.edu:pub/tex/unixtex.ftp. (We don't include it here because it -changes relatively frequently. Sorry.) - -*** For TeX on a single tape (4mm DAT or QIC-24), ordering information is -available from unixtex@u.washington.edu. A distribution fee in the area -of US$210.00 covers administrative costs. Tapes will be available at -least through summer of 1994. - -*** The FSF hopes soon to distribute tapes of TeX itself, after the -University of Washington distribution service goes away. - -*** A minimal TeX collection (enough to process Texinfo files, anyway) -is included on the GNU source CD/ROM. See the file ORDERS in this -directory for more information. - -** Alternative Internet FTP Sources - -Please do NOT use a site outside your country, until you have checked -all sites inside your country, and then your continent. Trans-ocean -TCP/IP links are very expensive and usually very low speed. - -The administrators of louie.udel.edu maintains copies of GNU Emacs. -The files are available via anonymous ftp under directory ~ftp/gnu. - -Emacs and other GNU programs may be available via anonymous ftp from -these US sites: ftp.kpc.com:/pub/mirror/gnu (Silicon Valley, CA) -ftp.hawaii.edu:/mirrors/gnu, f.ms.uky.edu:/pub3/gnu, -ftp.digex.net:/pub/gnu (Internet address 164.109.10.23, nightly full -mirror, ran by mcguire@digex.net), wuarchive.wustl.edu:/systems/gnu, -col.hp.com:/mirrors/gnu, ftp.cs.columbia.edu:/archives/gnu/prep, -uiarchive.cso.uiuc.edu:/pub/gnu (Internet address 128.174.5.14, -nightly full mirror, ran by ftpadmin@uiuc.edu), -jaguar.utah.edu:/gnustuff, gatekeeper.dec.com:/pub/GNU, -labrea.stanford.edu, archive.cis.ohio-state.edu, and -ftp.uu.net:/archive/systems/gnu. - -And these foreign sites: ftp.cs.ubc.ca:/mirror2/gnu (Western Canada, -daily full mirror, ran by ftp-admin@cs.ubc.ca), -ftp.inf.utfsm.cl:/pub/gnu (Chile 146.83.198.3 nightly full mirror, ran -by ftp@inf.utfsm.cl), ftp.unicamp.br:/pub/gnu (Brazil manual mirror, -ran by oliva@dcc.unicamp.br), archie.au:/gnu (Australia (archie.oz or -archie.oz.au for ACSnet)), ftp.technion.ac.il:/pub/unsupported/gnu -(Israel, daily full mirror, ran by ftp-admin), ftp.sun.ac.za:/pub/gnu -(South Africa), ftp.etsimo.uniovi.es:/pub/gnu (Spain), -ftp.mcc.ac.uk:/pub/gnu (130.88.203.12 daily full mirror, ran by -root@ftp.mcc.ac.uk), unix.hensa.ac.uk:/mirrors/uunet/systems/gnu, -ftp.warwick.ac.uk (137.205.192.14 daily full mirror, ran by -unixhelp@warwick.ac.uk), ftp.informatik.tu-muenchen.de, -ftp.informatik.rwth-aachen.de, or germany.eu.net (mirror ran by -archive-admin@germany.eu.net) (Germany), isy.liu.se (Sweden), -ftp.stacken.kth.se or ftp.luth.se:/pub/unix/gnu (Sweden), -ftp.sunet.se:/pub/gnu (Sweden 130.238.127.3 daily mirror, ran by -archive@ftp.sunet.se (also mirrors the Mailing List Archives) -ftp.nl.net (Netherlands), ftp.win.tue.nl:/pub/gnu (Netherlands -131.155.70.100 daily mirror, ran by ftp@win.tue.nl), -ftp.funet.fi:/pub/gnu (Finland 128.214.6.100, ran by gnu-adm), -ftp.denet.dk (Denmark), ugle.unit.no (Norway 129.241.1.97), -ftp.eunet.ch or nic.switch.ch:/mirror/gnu (Switzerland), -irisa.irisa.fr:/pub/gnu or ftp.univ-lyon1.fr:pub/gnu (ran by -ftpmaint@ftp.univ-lyon1.fr) (France), ftp.ieunet.ie:pub/gnu (Ireland -192.111.39.1 weekly mirror, ran by archive@ieunet.ie), archive.eu.net -(Europe 192.16.202.1), cair-archive.kaist.ac.kr:/pub/gnu (Korea -143.248.11.171, ran by ftpkeeper@cair-archive.kaist.ac.kr), -ftp.nectec.or.th:/pub/mirrors/gnu (Thailand 192.150.251.32 daily -mirror, ran by ftp@nwg.nectec.or.th), -utsun.s.u-tokyo.ac.jp:/ftpsync/prep or ftp.cs.titech.ac.jp (Japan, -nemacs, the japanese port of GNU Emacs, is under ~ftp/JAPAN). - -* Getting GNU software in Great Britain - -jpo@cs.nott.ac.uk is willing to distribute those GNU sources he has -available. The smaller items are available from the info-server (send -to info-server@cs.nott.ac.uk) the larger items by negotiation. Due to -communication costs this service is only available within the UK. - -BattenIG@computer-science.birmingham.ac.uk (aka -I.G.Batten@fulcrum.bt.co.uk) is also willing to distribute those GNU -sources he has. He can also write tapes in qic-21 and qic-24 formats. - -lmjm@doc.ic.ac.uk is willing to distribute those GNU sources he has -along with comp.sources.unix, comp.sources.x, X windows et al. The -archive, on src.doc.ic.ac.uk in directory /gnu, is available via ftp -over the Internet (on 146.169.3.7), ftam over IXI, HTTP, FSP, Gopher, -ftpmail, NFS, Lanmanger over IP, telnet, and uucp. Due to -communication costs this service is only available within the UK. -Mail to info-server@doc.ic.ac.uk for details. He can also write sun -cartridge or exabyte tapes. - -UK sites with just anonymous FTP access are in the above list. - -* Getting GNU software via UUCP - -OSU is distributing via UUCP: most GNU software, MIT C Scheme, -Compress, News, RN, NNTP, Patch, some Appletalk stuff, some of the -Internet Requests For Comment (RFC) et al.. See their periodic -postings on the Usenet newsgroup comp.sources.d for informational -updates. Current details from or -<...!osu-cis!staff>. - -Information on how to uucp some GNU programs is available via -electronic mail from: uunet!hutch!barber, hqda-ai!merlin, acornrc!bob, -hao!scicom!qetzal!upba!ugn!nepa!denny, ncar!noao!asuvax!hrc!dan, -bigtex!james (aka james@bigtex.cactus.org), oli-stl!root, -src@contrib.de (Germany), toku@dit.co.jp (Japan) and info@ftp.uu.net. -* If You Like The Software + How to get GNU Software by Internet FTP or by UUCP: -If you like the software developed and distributed by the Free -Software Foundation, please express your satisfaction with a donation. -Your donations will help to support the Foundation and make our future -efforts successful, including a complete development and operating -system, called GNU (Gnu's Not Un*x), which will run Un*x user -programs. For more information on GNU and the Foundation, contact us -at the above address. +The XEmacs project is separate from and not managed by the GNU +project. The latest GNU project FTP and UUCP availability information +can be found at ftp://ftp.gnu.org/gnu/GNUinfo/FTP -Ordering a distribution tape from the Foundation is often a good -way to bring your company or university to make a donation. diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS index 2bab54a..d175754 100644 --- a/etc/MAILINGLISTS +++ b/etc/MAILINGLISTS @@ -1,1206 +1,112 @@ - XEmacs Electronic Mailing Lists. Last Modified: 1997-01-13 + XEmacs Electronic Mailing Lists. Last Modified: 1999-11-08 -XEmacs has its own mailing list and newsgroup which are distinct from -the FSF GNU Emacs mailing lists and newsgroups. The mailing list is: +XEmacs has its own mailing lists and newsgroup which are distinct from +the FSF GNU Emacs mailing lists and newsgroups. The mailing lists are: - xemacs@xemacs.org For reporting all bugs in XEmacs, including bugs - in the compilation and installation procedures. - Also for all random questions and conversation - about XEmacs. +xemacs@xemacs.org comp.emacs.xemacs bi-directional gateway. + + xemacs 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. -This mailing list is bidirectionally gatewayed into the USENET newsgroup -comp.emacs.xemacs. +xemacs-announce@xemacs.org XEmacs Announcements. -To be added or removed from this mailing list, send mail to -xemacs-request@xemacs.org (If it is possible for you to read the -messages via the newsgroup, we would prefer that; the fewer people there -are on the mailing list, the less trouble it is to maintain.) + xemacs-announce is a read-only, low volume list for announcements + concerning the XEmacs project and new releases of the XEmacs + software. -Please do NOT send messages about problems with XEmacs to the FSF GNU -Emacs newsgroups and mailing lists (listed below) unless you are sure -that the problem you are reporting is a problem with both versions of -GNU Emacs. People who aren't subscribed to the XEmacs mailing list most -likely are not interested in hearing about problems with it. - -The XEmacs mailing list is archived at ftp://ftp.xemacs.org/pub/xemacs/mlists/. - -See the file etc/BETA for more information about mailing lists for use -by beta testers and XEmacs developers. - -IMPORTANT IMPORTANT IMPORTANT: - -Aside from the names of the mailing lists and newsgroups corresponding -to this version of Emacs, the guidelines enumerated below still apply. -Please read them before sending a message. - ------------------------------------------------------------------------ - GNU Project Electronic Mailing Lists and gnUSENET Newsgroups - Last Updated 1 July 97 - - Please report improvements to: gnu@prep.ai.mit.edu - -* GNU mailing lists are also distributed as USENET news groups - -The mailing lists are gated both ways with the gnu.all newsgroups at -ohio-state.edu. The one-to-one correspondence is indicated below. If -you don't know if your site is on USENET, ask your system administrator. -If you are a USENET site and don't get the gnu.all newsgroups, please -ask your USENET administrator to get them. If he has your feeds ask -their feeds, you should win. And everyone else wins: newsgroups make -better use of the limited bandwidth of the computer networks and your -home machine than mailing list traffic; and staying off the mailing -lists make better use of the people who maintain the lists and the -machines that the GNU people working with rms use (i.e. we have more -time to produce code!!). Thanx. - -* Getting the mailing lists directly - -If several users at your site or local network want to read a list and -you aren't a USENET site, Project GNU would prefer that you would set up -one address that redistributes locally. This reduces overhead on our -people and machines, your gateway machine, and the network(s) used to -transport the mail from us to you. - -* How to subscribe to and report bugs in mailing lists - -Send messages ABOUT these lists, such as reports of mail problems, or -requests to be added or removed, to help-gnu-emacs-request (or -info-gnu-request, bug-gdb-request, etc.), NOT to info-gnu-emacs (or -info-gnu, etc.). These -request addresses go only to the -people who can do something about your requests or problems, and thus -avoids disturbing everyone else. - -Note that all GNU mailing lists are maintained by volunteers. They get -behind occasionally. Wait at least 3 or 4 days before asking again. -Thanks! - -Many of the GNU mailing lists are very large and are received by many -people. Please don't send them anything that is not seriously important -to all their readers. All GNU mailing lists are unmoderated, mail -reflectors, except info-gnu, info-gnu-emacs, info-gcc, info-g++, -info-gnu-fortran. - -All addresses below are in internet format. Consult the mail guru for -your computer to figure out address syntaxes from other networks. From -UUCP machines: - ..!ucbvax!prep.ai.mit.edu!ADDRESS - ..!uunet!prep.ai.mit.edu!ADDRESS - -If a message you mail to a list is returned from a MAILER-DAEMON (often -with the line: - ----- Transcript of session follows ----- - don't resend the message to the list. All this return means is that -your original message failed to reach a few addresses on the list. Such -messages are NEVER a reason to resend a piece of mail a 2nd time. This -just bothers all (less the few delivery failures (which will probably -just fail again!)) of the readers of the list with a message they have -already seen. It also wastes computer and network resources. - -It is appropriate to send these to the -request address for a list, and -ask them to check the problem out. - -* Send Specific Requests for Information to: gnu@prep.ai.mit.edu - -Specific requests for information about obtaining GNU software, or GNU -activities in Cambridge and elsewhere can be directed to: - gnu@prep.ai.mit.edu - -* General Information about all lists - -Please keep each message under 25,000 characters. Some mailers bounce -messages that are longer than this. If your message is long, it is -generally better to send a message offering to make the large file -available to only those people who want it (e.g. mailing it to people -who ask, or putting it up for FTP). In the case of gnu.emacs.sources, -somewhat larger postings (up to 10 parts of no more than 25,000 -characters each) are acceptable (assuming they are likely to be of -interest to a reasonable number of people); if it is larger than that -have it added to archive.cis.ohio-state.edu (the GNU Emacs Lisp ftp and -uucp archive on and announce) its location there. Good bug reports are -short. See section '* General Information about bug-* lists and ...' -for further details. - -Most of the time, when you reply to a message sent to a list, the reply -should not go to the list. But most mail reading programs supply, by -default, all the recipients of the original as recipients of the reply. -Make a point of deleting the list address from the header when it does -not belong. This prevents bothering all readers of a list, and reduces -network congestion. - -The GNU mailing lists and newsgroups, like the GNU project itself, exist -to promote the freedom to share software. So don't use these lists to -promote or recommend non-free software. (Using them to post ordering -information is the ultimate faux pas.) If there is no free program to -do a certain task, then somebody should write one! - -* General Information about info-* lists - -These lists and their newsgroups are meant for important announcements. -Since the GNU project uses software development as a means for social -change, the announcements may be technical or political. - -Most GNU projects info-* lists (and their corresponding gnu.*.announce -newsgroups) are moderated to keep their content significant and -relevant. If you have a bug to report, send it to the bug-* list. If -you need help on something else and the help-* list exists, ask it. - -See section '* General Information about all lists'. - -* General Information about help-* lists - -These lists (and their newsgroups) exist for anyone to ask questions -about the GNU software that the list deals with. The lists are read by -people who are willing to take the time to help other users. - -When you answer the questions that people ask on the help-* lists, keep -in mind that you shouldn't answer by promoting a proprietary program as -a solution. The only real solutions are the ones all the readers can -share. - -If a program crashes, or if you build it following the standard -procedure on a system on which it is supposed to work and it does not -work at all, or if an command does not behave as it is documented to -behave, this is a bug. Don't send bug reports to a help-* list; mail -them to the bug-* list instead. - -See section '* General Information about all lists'. - -* General Information about bug-* lists and reporting program bugs - -If you think something is a bug in a program, it might be one; or, it -might be a misunderstanding or even a feature. Before beginning to -report bugs, please read the section ``Reporting Emacs Bugs'' toward the -end of the GNU Emacs reference manual (or node Emacs/Bugs in Emacs's -built-in Info system) for a discussion of how and when to send in bug -reports. For GNU programs other than GNU Emacs, also consult their -documentation for their bug reporting procedures. Always include the -version number of the GNU program, as well as the operating system and -machine the program was ran on (if the program doesn't have a version -number, send the date of the latest entry in the file ChangeLog). For -GNU Emacs bugs, type "M-x emacs-version". A debugger backtrace of any -core dump, can also be useful. Be careful to separate out hypothesis -from fact! For bugs in GNU Emacs lisp, set variable debug-on-error to -t, and re-enter the command(s) that cause the error message; Emacs will -pop up a debug buffer if something is wrong; please include a copy of -the buffer in your bug report. Please also try to make your bug report -as short as possible; distill the problem to as few lines of code and/or -input as possible. GNU maintainers give priority to the shortest, high -quality bug reports. - -Please don't send in a patch without a test case to illustrate the -problem the patch is supposed to fix. Sometimes the patches aren't -correct or aren't the best way to do the job, and without a test case -there is no way to debug an alternate fix. - -The purpose of reporting a bug is to enable the bug to be fixed for the -sake of the whole community of users. You may or may not receive a -response; the maintainers will send one if that helps them find or -verify a fix. Most GNU maintainers are volunteers and all are -overworked; they don't have time to help individuals and still fix the -bugs and make the improvements that everyone wants. If you want help -for yourself in particular, you may have to hire someone. The GNU -project maintains a list of people providing such services. It is -distributed with GNU Emacs in file etc/SERVICE, and can be requested -from gnu@prep.ai.mit.edu. - -Anything addressed to the implementors and maintainers of a GNU program -via a bug-* list, should NOT be sent to the corresponding info-* or -help-* list. - -Please DON'T post your bug reports on the gnu.*.bug newsgroups! Mail -them to bug-*@prep instead! At first sight, it seems to make no -difference: anything sent to one will be propagated to the other; but: - - if you post on the newsgroup, the information about how to -reach you is lost in the message that goes on the mailing list. It -can be very important to know how to reach you, if there is anything -in the bug report that we don't understand; - - bug reports reach the GNU maintainers quickest when they are -sent to the bug-* mailing list submittal address; - - mail is much more reliable then netnews; and - - if the internet mailers can't get your bug report delivered, -they almost always send you an error message, so you can find another -way to get the bug report in. When netnews fails to get your message -delivered to the maintainers, you'll never know about it and the -maintainers will never see the bug report. - -And please DON'T post your GNU bug reports to comp.* or other gnu.* -newsgroups, they never make it to the GNU maintainers at all. Please -mail them to bug-*@prep instead! - -See section '* General Information about all lists'. - -* info-gnu-request@prep.ai.mit.edu to subscribe to info-gnu -** gnUSENET newsgroup: gnu.announce -** Send announcements to: info-gnu@prep.ai.mit.edu - -This list distributes progress reports on the GNU Project. It is also -used by the GNU Project to ask people for various kinds of help. It is -NOT for general discussion. - -The list is filtered to remove items meant for info-gnu-request, that -can be answered by the moderator without bothering the list, or should -have been sent to another list. - -See section '* General Information about info-* lists'. - -* gnu-misc-discuss-request@prep.ai.mit.edu to subscribe to gnu-misc-discuss -** gnUSENET newsgroup: gnu.misc.discuss -** Send contributions to: gnu-misc-discuss@prep.ai.mit.edu - -This list is for serious discussion of freed software, the GNU Project, -the GNU Manifesto, and their implications. It's THE place for -discussion that is not appropriate in the other GNU mailing lists and -gnUSENET newsgroups. - -Flaming is out of place. Tit-for-tat is not welcome. Repetition -should not occur. - -Good READING and writing are expected. Before posting, wait a while, -cool off, and think. - -Don't use this group for complaints and bug reports about GNU software! -The maintainers don't read this group; they won't see your complaint. -Use the appropriate bug-reporting mailing list instead, so that people -who can do something about the problem will see it. - -Don't trust pronouncements made on gnu-misc-discuss about what GNU is, -what FSF position is, what the GNU General Public License is, etc., -unless they are made by someone you know is well connected with GNU and -are sure the message is not forged. - -USENET and gnUSENET readers are expected to have read ALL the articles -in news.announce.newusers before posting. If news.announce.newusers is -empty at your site, wait (the articles are posted monthly), your posting -isn't that urgent! Readers on the Internet can anonymous FTP these -articles from host ftp.uu.net under directory ?? - -Someone from the Free Software Foundation will attempt to follow this -group as time and volume permits. - -Remember, "GNUs Not Unix" and "gnUSENET is Not USENET". We have -higher standards! - -Note that sending technical questions about specific GNU software to -gnu-misc-discuss is likely to be less useful than sending them to the -appropriate mailing list or gnUSENET newsgroup, since more technical -people read those. - -* bug-gnu-sql-request@prep.ai.mit.edu to subscribe to bug-gnu-sql -** gnUSENET newsgroup: NONE PLANNED -** GNU-SQL BUG reports to: bug-gnu-sql@prep.ai.mit.edu - -This list distributes, to the active maintainers of GNU's SQL (GNU's SQL -full scale database server), bug reports and fixes for, and suggestions -for improvements to GNU's SQL. User discussion of GNU's SQL also occurs -here. - -There are no other GNU mailing lists or gnUSENET newsgroups for GNU's SQL. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-guile-request@prep.ai.mit.edu to subscribe to bug-guile -** gnUSENET newsgroup: NONE PLANNED -** GUILE BUG reports to: bug-guile@prep.ai.mit.edu - -This list distributes, to the active maintainers of GUILE (GNU's -Ubiquitous Extension Language), bug reports and fixes for, and suggestions for -improvements to GUILE. User discussion of GUILE also occurs here. - -There are no other GNU mailing lists or gnUSENET newsgroups for GUILE . - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* guile-sources-request@prep.ai.mit.edu to subscribe to guile-sources -** gnUSENET newsgroup: NONE PLANNED -** Guile source code to: guile-sources@prep.ai.mit.edu - -This list will be for the posting, by their authors, of GUILE, Scheme, -and C sources and patches that improve Guile. Its contents will be -reviewed by the FSF for inclusion in future releases of GUILE. - -Please do NOT discuss or request source code here. Use bug-guile for -those purposes. This allows the automatic archiving of sources posted -to this list. - -Please do NOT post such sources to any other GNU mailing list (e.g -bug-guile) or gnUSENET newsgroups. It's up to each poster to decide -whether to cross-post to any non-gnUSENET newsgroup. - -Please do NOT announce that you have posted source code to guile.sources -to any other GNU mailing list (e.g. bug-guile) or gnUSENET newsgroups. -People who want to keep up with sources will read this list. It's up to -each poster to decide whether to announce a guile.sources article in any -non-gnUSENET newsgroup (e.g. comp.emacs or comp.sources.d). - -If source or patches that were previously posted or a simple fix is -requested in bug-guile, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not by a broadcast medium that reaches millions -of sites. - -If the requested source is very long (>10k bytes) send mail offering to -send it. This prevents the requester from getting many redundant copies -and saves network bandwidth. - -* bug-gnustep-request@prep.ai.mit.edu to subscribe to bug-gnustep -** gnUSENET newsgroup: gnu.gnustep.bug -** Gnustep bug reports to: bug-gnustep@prep.ai.mit.edu -** FAQ-URL: none known -** FAQ-Archive-name: none known -** FAQ-Posting-frequency: none known - -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in GNUstep to its active developers. - -Subscribers to bug-gnustep get all info-gnustep messages. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-gnustep-request@prep.ai.mit.edu to subscribe to help-gnustep -** gnUSENET newsgroup: gnu.gnustep.help -** Send contributions to: help-gnustep@prep.ai.mit.edu -** FAQ-URL: none known -** FAQ-Archive-name: none known -** FAQ-Posting-frequency: none known - -This list is the place for users and installers of the GNUstep to ask -for help. Please send bug reports to bug-gnustep@prep.ai.mit.edu -instead of posting them here. - -See section '* General Information about help-* lists'. - -* discuss-gnustep-request@prep.ai.mit.edu to subscribe to discuss-gnustep -** gnUSENET newsgroup: gnu.gnustep.discuss -** Send contributions to: discuss-gnustep@prep.ai.mit.edu -** FAQ-URL: none known -** FAQ-Archive-name: none known -** FAQ-Posting-frequency: none known - -This list is the place for GNUstep users and developers to discuss -GNUstep. Please send bug reports to bug-gnustep@prep.ai.mit.edu -instead of posting them here. - -See section '* General Information about discuss-* lists'. - -* info-gnustep-request@prep.ai.mit.edu to subscribe to info-gnustep -** gnUSENET newsgroup: gnu.gnustep.announce -** Send announcements to: info-gnustep@prep.ai.mit.edu -** FAQ-URL: none known -** FAQ-Archive-name: none known -** FAQ-Posting-frequency: none known - -This list distributes announcements and progress reports on GNUstep. -It is NOT for general discussion; please use discuss-gnustep for that. - -The list is filtered to remove items meant for info-gnustep-request, that -can be answered by the moderator without bothering the list, or should -have been sent to another list. - -Do not report GNUstep bugs to info-gnustep, help-gnustep, or -discuss-gnustep, mail them to bug-gnustep@prep.ai.mit.edu instead. - -See section '* General Information about info-* lists'. - -* bug-hurd-request@prep.ai.mit.edu to subscribe to bug-hurd -** gnUSENET newsgroup: gnu.hurd.bug -** Hurd bug reports to: bug-hurd@prep.ai.mit.edu - -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in the GNU Hurd to its active developers. - -No info-gnu-hurd list is planned. Announcements about the GNU Hurd will -be made to the list info-gnu@prep.ai.mit.edu (see above). - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-hurd-request@prep.ai.mit.edu to subscribe to help-hurd -** gnUSENET newsgroup: gnu.hurd.help -** Send contributions to: help-hurd@prep.ai.mit.edu - -This list is the place for users and installers of the GNU Hurd to ask -for help. - -No info-gnu-hurd list is planned. Announcements about the GNU Hurd will -be made to the list info-gnu@prep.ai.mit.edu (see above). - -See section '* General Information about help-* lists'. - -* hurd-ann-request@prep.ai.mit.edu IS NOW DEFUNCT -** gnUSENET newsgroup: NEVER EXISTED -** DEAD address: hurd-ann@prep.ai.mit.edu - -This list is dead. Announcements about the GNU Hurd will be made to the -list info-gnu@prep.ai.mit.edu (see above). - -* bug-gnu-emacs-request@prep.ai.mit.edu to subscribe to bug-gnu-emacs -** gnUSENET newsgroup: gnu.emacs.bug -** Gnu Emacs bug reports to: bug-gnu-emacs@prep.ai.mit.edu - -This list distributes, to the active maintainers of GNU Emacs, bug -reports and fixes for, and suggestions for improvements in GNU Emacs. - -Send bugs in the GNU Emacs Lisp reference manual to: - lisp-manual-bugs@prep.ai.mit.edu - -lisp-manual-bugs is neither a mailing list nor a gnUSENET newsgroup. -It's just a bug-reporting address. - -Subscribers to bug-gnu-emacs get all info-gnu-emacs messages. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* gnu-emacs-sources-request@prep.ai.mit.edu to subscribe to gnu-emacs-sources -** gnUSENET newsgroup: gnu.emacs.sources -** Gnu Emacs source code to: gnu-emacs-sources@prep.ai.mit.edu - -This list/newsgroup will be for the posting, by their authors, of Emacs -Lisp and C sources and patches that improve GNU Emacs. Its contents -will be reviewed by the FSF for inclusion in future releases of GNU -Emacs. - -Please do NOT discuss or request source code here. Use -help-gnu-emacs/gnu.emacs.help for those purposes. This allows the -automatic archiving of sources posted to this list/newsgroup. - -Please do NOT post such sources to any other GNU mailing list (e.g -help-gnu-emacs) or gnUSENET newsgroups (e.g. gnu.emacs.help). It's up -to each poster to decide whether to cross-post to any non-gnUSENET -newsgroup (e.g. comp.emacs or vmsnet.sources). - -Please do NOT announce that you have posted source code to -gnu.emacs.sources to any other GNU mailing list (e.g. help-gnu-emacs) or -gnUSENET newsgroups (e.g. gnu.emacs.help). People who want to keep up -with sources will read this list/newsgroup. It's up to each poster to -decide whether to announce a gnu.emacs.sources article in any -non-gnUSENET newsgroup (e.g. comp.emacs or comp.sources.d). - -If source or patches that were previously posted or a simple fix is -requested in help-gnu-emacs, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not by a broadcast medium that reaches millions -of sites. - -If the requested source is very long (>10k bytes) send mail offering to -send it. This prevents the requester from getting many redundant copies -and saves network bandwidth. - -* help-gnu-emacs-request@prep.ai.mit.edu to subscribe to help-gnu-emacs -** gnUSENET newsgroup: gnu.emacs.help (and one-way into comp.emacs) -** Send contributions to: help-gnu-emacs@prep.ai.mit.edu - -This list is the place for users and installers of GNU Emacs to ask for -help. Please send bug reports to bug-gnu-emacs instead of posting them -here. - -Since help-gnu-emacs is a very large list, send it only those items that -are seriously important to many people. - -If source or patches that were previously posted or a simple fix is -requested in help-gnu-emacs, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not a broadcast medium that reaches millions of -sites. - -This list is also gated one way to USENET's newsgroup comp.emacs (once -known as net.emacs). This one-way gating is done for users whose sites -get comp.emacs, but not gnu.emacs.help. Users at non-USENET sites may -receive all articles from comp.emacs by making their request to: -unix-emacs-request@bbn.com - -If Emacs crashes, or if you build Emacs following the standard procedure -on a system which Emacs is supposed to work on (see etc/MACHINES) and it -does not work at all, or if an editing command does not behave as it is -documented to behave, this is a bug. Don't send bug reports to -help-gnu-emacs (gnu.emacs.help) or post them to comp.emacs; mail them to -bug-gnu-emacs@prep.ai.mit.edu instead. - -See section '* General Information about help-* lists'. - -* info-gnu-emacs-request@prep.ai.mit.edu to subscribe to info-gnu-emacs -** gnUSENET newsgroup: gnu.emacs.announce (and one-way into comp.emacs) -** Send announcements to: info-gnu-emacs@prep.ai.mit.edu - -This list distributes announcements and progress reports on GNU Emacs. -It is NOT for general discussion; please use help-gnu-emacs for that. - -The list is filtered to remove items meant for info-gnu-emacs-request, -that can be answered by the moderator without bothering the list, or -should have been sent to another list. - -info-gnu-emacs is also gated one way to USENET's newsgroup comp.emacs -(once known as net.emacs). This one-way gating is done for users whose -sites get comp.emacs, but not gnu.emacs.announce. Users at non-USENET -sites may receive all articles from comp.emacs by making their request -to: unix-emacs-request@bbn.com - -Do not report GNU Emacs bugs to info-gnu-emacs or comp.emacs, instead -mail them to bug-gnu-emacs@prep.ai.mit.edu. - -See section '* General Information about info-* lists'. - -* vms-gnu-emacs-request@prep.ai.mit.edu to subscribe -** gnUSENET newsgroup: gnu.emacs.vms -** Send contributions to: vms-gnu-emacs@prep.ai.mit.edu - -This list was a working group who did the initial port of GNU Emacs to -the VMS operating system. It still discusses problems and solutions to -the VMS port and the distribution of it. - -* bug-bash-request@prep.ai.mit.edu to subscribe to bug-bash -** gnUSENET newsgroup: gnu.bash.bug -** BASH bug reports to: bug-bash@prep.ai.mit.edu - -This list distributes, to the active maintainers of BASH (the Bourne -Again SHell), bug reports and fixes for, and suggestions for -improvements in BASH. User discussion of BASH also occurs here. - -Always report the version number of the operating system, hardware, and -bash (flag -version on startup or check the variable $BASH_VERSION in a -running bash). - -There are no other GNU mailing lists or gnUSENET newsgroups for BASH. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-gdb-request@prep.ai.mit.edu to subscribe to bug-gdb -** gnUSENET newsgroup: gnu.gdb.bug -** GDB bug reports to: bug-gdb@prep.ai.mit.edu - -This list distributes, to the active maintainers of GDB (Gnu's -DeBugger), bug reports and fixes for, and suggestions for improvements -in GDB. - -There are no other GNU mailing lists or gnUSENET newsgroups for GDB. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-octave-request@che.utexas.edu to subscribe to bug-octave -** gnUSENET newsgroup: NONE PLANNED -** Octave bug reports to: bug-octave@che.utexas.edu - -This list distributes, to the active maintainers of Octave (a system -for numerical computations), bug reports and fixes for, and -suggestions for improvements to Octave. - -The help-octave mailing list is for user discussion of Octave. - -See section '* General Information about bug-* lists and reporting -program bugs'. - - -* help-octave-request@che.utexas.edu to subscribe to help-octave -** gnUSENET newsgroup: NONE PLANNED -** Send contributions to: help-octave@che.utexas.edu - -This list is the place for users and installers of Octave to ask for -help. Please send bug reports to bug-octave instead of posting them -here. - -If Octave crashes, or if you build Octave following the standard -procedure on a system on which Octave is supposed to work on and it -does not work at all, or if a command does not behave as it is -documented to behave, this is a bug. Don't send bug reports to -help-octave; mail them to bug-octave@che.utexas.edu instead. - -See section '* General Information about help-* lists'. +xemacs-beta@xemacs.org XEmacs Beta Testers. -* bug-gcc-request@prep.ai.mit.edu to subscribe to bug-gcc -** gnUSENET newsgroup: gnu.gcc.bug -** GCC bug reports to: bug-gcc@prep.ai.mit.edu + xemacs-beta is an open list for bug reports and general + communication about beta versions of XEmacs. -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in the GNU C Compiler to its active -developers. +xemacs-build-reports@xemacs.org XEmacs Build Report Submissions. + + xemacs-build-reports 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. -Please don't send in a patch without a test case to illustrate the -problem the patch is supposed to fix. Sometimes the patches aren't -correct or aren't the best way to do the job, and without a test case -there is no way to debug an alternate fix. +xemacs-cvs@xemacs.org XEmacs CVS Commit Notices. -The most convenient form of test case is a piece of cpp output that can -be passed directly to cc1. Preferably written in C, not C++ or -Objective C. + 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. (For more information on the XEmacs CVS Archive: + http://cvs.xemacs.org/.) -Subscribers to bug-gcc get all info-gcc messages. +xemacs-mule@xemacs.org XEmacs International Extensions. -See section '* General Information about bug-* lists and reporting -program bugs'. + 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. -* help-gcc-request@prep.ai.mit.edu to subscribe to help-gcc -** gnUSENET newsgroup: gnu.gcc.help -** Send contributions to: help-gcc@prep.ai.mit.edu +xemacs-nt@xemacs.org XEmacs on Windows NT/98/95. -This list is the place for users and installers of the GNU C Compiler to -ask for help. + xemacs-nt is a developer's 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 98/95. -If gcc crashes, or if you build gcc following the standard procedure on -a system which gcc is supposed to work on (see config.sub) and it does -not work at all, or if an command line option does not behave as it is -documented to behave, this is a bug. Don't send bug reports to help-gcc -(gnu.gcc.help); mail them to bug-gcc@prep.ai.mit.edu instead. +xemacs-patches@xemacs.org XEmacs Patch Submissions. -See section '* General Information about help-* lists'. + 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. -* info-gcc-request@prep.ai.mit.edu to subscribe to info-gcc -** gnUSENET newsgroup: gnu.gcc.announce -** Send announcements to: info-gcc@prep.ai.mit.edu +xemacs-users-ja@xemacs.org XEmacs (Japanese). -This list distributes announcements and progress reports on the GNU C -Compiler. It is NOT for general discussion; please use help-gcc for -that. + 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 xemacs list. For fastest + response, bugs not specifically related to Japanese or Mule features + should be reported on xemacs (in English). -The list is filtered to remove items meant for info-gcc-request, that -can be answered by the moderator without bothering the list, or should -have been sent to another list. +xemacs-beta-ja@xemacs.org XEmacs Beta (Japanese). -See section '* General Information about info-* lists'. + xemacs-beta-ja is an open list for bug reports and general + communication about beta versions of XEmacs, especially features + related to Mule and Japanese-handling. Japanese is the preferred + language of discussion. Bugs not specifically related to Japanese or + Mule features should be reported on xemacs-beta (in English). Please + consider sending bug reports on Mule to xemacs-mule, in English. -* bug-gnu960-request@ichips.intel.com to subscribe to bug-gnu960 -** gnUSENET newsgroup: NONE PLANNED -** Intel 960 Port bug reports to: bug-gnu960@ichips.intel.com +The most up to date information on the mailing lists can always be +found at http://www.xemacs.org/. -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in Intel's port of GNU software to the -Intel 960 microprocessor. +Subscriptions: -You can also fax to: GNU/960 - 1-503-696-4930. +Subscription to all the lists is accomplished by sending an e-mail +message to LISTNAME-request@xemacs.org with `subscribe' (without the +quotes) as the BODY of the message. -There are no other GNU mailing lists or gnUSENET newsgroups for Intel's -port of GNU software to the Intel 960 microprocessor. +To unsubscribe, send an e-mail to LISTNAME-request@xemacs.org with +`unsubscribe' (without the quotes) as the BODY of the message. -See section '* General Information about bug-* lists and reporting -program bugs'. +List Archives: -* bug-glibc-request@prep.ai.mit.edu to subscribe to bug-glibc -** gnUSENET newsgroup: gnu.glibc.bug -** GNU C Library bug reports to: bug-glibc@prep.ai.mit.edu +A browsable and searchable archive of these lists is available at +http://www.xemacs.org/list-archives/. -This list distributes, to the active maintainers of glibc (GNU's C -library), bug reports and fixes for, and suggestions for improvements in -glibc. User discussion of glibc also occurs here. +Problems: -Announcements of new releases of glibc are made on both info-gcc and -bug-glibc. +Any comments, questions, or complaints about the lists should be +brought to the attention of the XEmacs Mailing List Manager +. -There are no other GNU mailing lists or gnUSENET newsgroups for the GNU -C Library. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-g++-request@prep.ai.mit.edu to subscribe to bug-g++ -** gnUSENET newsgroup: gnu.g++.bug -** G++ bug reports to: bug-g++@prep.ai.mit.edu - -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in the GNU C++ Compiler to its active -developers. - -G++ uses the GNU C-Compiler back end. Active developers may wish to -subscribe to bug-gcc@prep.ai.mit.edu as well. - -Subscribers to bug-g++ get all info-g++ messages. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-g++-request@prep.ai.mit.edu to subscribe to help-g++ -** gnUSENET newsgroup: gnu.g++.help (and one-way into comp.lang.c++) -** Send contributions to: help-g++@prep.ai.mit.edu - -This list is the place for users and installers of the GNU C++ Compiler -to ask for help. Please send bug reports to bug-g++@prep.ai.mit.edu -instead of posting them here. - -help-g++ is also gated one way to USENET's newsgroup comp.lang.c++. -This one-way gating is done for users whose sites get comp.lang.c++, but -not gnu.g++.help. - -See section '* General Information about help-* lists'. - -* info-g++-request@prep.ai.mit.edu to subscribe to info-g++ -** gnUSENET newsgroup: gnu.g++.announce (and one-way into comp.lang.c++) -** Send announcements to: info-g++@prep.ai.mit.edu - -This list distributes announcements and progress reports on the GNU C++ -Compiler. It is NOT for general discussion; please use help-g++ for -that. - -The list is filtered to remove items meant for info-g++-request, that -can be answered by the moderator without bothering the list, or should -have been sent to another list. - -It is also gated one way to USENET's newsgroup comp.lang.c++. This -one-way gating is done for users whose sites get comp.lang.c++, but not -gnu.g++.announce. - -Do not report g++ bugs to info-g++ or comp.lang.c++, mail them to -bug-g++@prep.ai.mit.edu instead. - -See section '* General Information about info-* lists'. - -* bug-lib-g++-request@prep.ai.mit.edu to subscribe to bug-lib-g++ -** gnUSENET newsgroup: gnu.g++.lib.bug -** lib-g++ bug reports to: bug-lib-g++@prep.ai.mit.edu - -This list distributes, to the active maintainers of libg++ (GNU's -library for C++), bug reports and fixes for, and suggestions for -improvements in lib-g++. User discussion of libg++ also occurs here. - -Announcements of new releases of libg++ are made on both info-g++ and -bug-lib-g++. - -There are no other GNU mailing lists or gnUSENET newsgroups for GNU's -G++ Library. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* info-gnu-fortran-request@prep.ai.mit.edu to subscribe to info-gnu-fortran -** gnUSENET newsgroup: NONE YET -** Send announcements to: info-gnu-fortran@prep.ai.mit.edu - -This list is for progress reports about the GNU Fortran compiler. In -the future it will also be used for release notices. - -The list is filtered to remove items meant for info-gnu-fortran-request, -that can be answered by the moderator without bothering the list, or -should have been sent to another list. - -People on the Internet can get a current status report by fingering the -address fortran@gnu.ai.mit.edu. - -See section '* General Information about info-* lists'. - -There are no other GNU mailing lists or gnUSENET newsgroups for GNU -Fortran (yet). - -* bug-oleo-request@prep.ai.mit.edu to subscribe to bug-oleo -** gnUSENET newsgroup: NONE PLANNED -** Oleo bug reports to: bug-oleo@prep.ai.mit.edu - -This list distributes, to the active maintainers of Oleo (the GNU -spreadsheet), bug reports and fixes for, and suggestions for -improvements to Oleo. User discussion of Oleo also occurs here. - -There are no other GNU mailing lists or gnUSENET newsgroups for Oleo . - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-gmp-request@prep.ai.mit.edu to subscribe to bug-gmp -** gnUSENET newsgroup: NONE PLANNED -** gmp bug reports to: bug-gmp@prep.ai.mit.edu - -This list distributes, to the active maintainers of gmp (the GNU -Multiple Precision Library), bug reports and fixes for, and suggestions -for improvements to gmp. User discussion of gmp also occurs here. - -There are no other GNU mailing lists or gnUSENET newsgroups for gmp . - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-pine-request@prep.ai.mit.edu to subscribe to bug-pine -** gnUSENET newsgroup: NONE PLANNED -** pine bug reports to: bug-pine@prep.ai.mit.edu - -This list distributes, to the active maintainers of pine (the GNU -version of the pine mail reader), bug reports and fixes for, and suggestions -for improvements to pine. User discussion of pine also occurs here. - -There are no other GNU mailing lists or gnUSENET newsgroups for pine . - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-cfengine-request@prep.ai.mit.edu to subscribe to bug-cfengine -** gnUSENET newsgroup: gnu.cfengine.bug -** cfengine bug reports to: bug-cfengine@prep.ai.mit.edu - -This list distributes, to the active maintainers of cfengine (configure -BSD and System-5-like operating systems attached to a TCP/IP network), -bug reports and fixes for, and suggestions for improvements to cfengine. -User discussion of cfengine also occurs here. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-cfengine-request@prep.ai.mit.edu to subscribe to help-cfengine -** gnUSENET newsgroup: gnu.cfengine.help -** Send contributions to: help-cfengine@prep.ai.mit.edu - -This list is the place for users and installers of cfengine to ask for -help. Please send bug reports to bug-cfengine instead of posting them -here. - -This list is also used for announcements about cfengine and related -programs, and small but important patches. Announcements of cfengine -releases are also made to info-gnu@prep.ai.mit.edu (see above) - -Since help-cfengine is a large list, send it only those items that -are seriously important to many people. - -If source or patches that were previously posted or a simple fix is -requested in help-cfengine, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not a broadcast medium that reaches millions of -sites. - -See section '* General Information about help-* lists'. -Also see section '* General Information about info-* lists'. - -* bug-gnu-smalltalk-request@prep.ai.mit.edu to subscribe to bug-gnu-smalltalk -** gnUSENET newsgroup: gnu.smalltalk.bug -** GNU Smalltalk bug reports to: bug-gnu-smalltalk@prep.ai.mit.edu - -GNU Smalltalk is the GNU project implementation of the Smalltalk language. - -This list distributes, to the active maintainers of GNU Smalltalk, bug -reports and fixes for, and suggestions for improvements to GNU -Smalltalk. User discussion of GNU Smalltalk also occurs here. - -For now, new releases of GNU Smalltalk will also be announced on this list. - -There are no other GNU mailing lists or gnUSENET newsgroups for GNU -Smalltalk. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* st-next-request@laplace.eng.sun.com to subscribe to st-next -** gnUSENET newsgroup: NONE PLANNED -** Send contributions to: st-next@laplace.eng.sun.com - -For people interested in working on GNU Smalltalk on the NeXT. - -* bug-groff-request@prep.ai.mit.edu to subscribe to bug-groff -** gnUSENET newsgroup: gnu.groff.bug -** GNU groff bug reports to: bug-groff@prep.ai.mit.edu - -groff is the GNU project implementation, in C++, of the traditional Unix -document formatting tools. - -This list distributes, to the active maintainers of groff, bug reports -and fixes for, and suggestions for improvements to groff (and it -component programs). User discussion of groff also occurs here. - -For now, new releases of groff will also be announced on this list. - -There are no other GNU mailing lists or gnUSENET newsgroups for groff. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-ghostscript-request@prep.ai.mit.edu to subscribe to bug-ghostscript -** gnUSENET newsgroup: gnu.ghostscript.bug -** Ghostscript bug reports to: bug-ghostscript@prep.ai.mit.edu - -Ghostscript is the GNU project implementation of a language and graphics -library with a remarkable similarity to PostScript. - -This list distributes, to the active maintainers of Ghostscript, bug -reports and fixes for, and suggestions for improvements in Ghostscript. - -For now, new releases of Ghostscript will also be announced on this list. - -There are no other GNU mailing lists or gnUSENET newsgroups for -Ghostscript. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-gnu-utils-request@prep.ai.mit.edu to subscribe to bug-gnu-utils -** gnUSENET newsgroup: gnu.utils.bug -** GNU Utilities bug reports to: bug-gnu-utils@prep.ai.mit.edu - -This list distributes, to the active maintainers of these programs, bug -reports and fixes for, and suggestions for improvements in GNU programs -not covered by other bug-* mailing lists/gnu.*.bug newsgroups. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-gnu-utils-request@prep.ai.mit.edu to subscribe to help-gnu-utils -** gnUSENET newsgroup: gnu.utils.help -** Send contributions to: help-gnu-utils@prep.ai.mit.edu - -This list is the place for users and installers of GNU programs not -covered by other GNU mailing lists/gnu.* newsgroups to ask for help. - -Don't send bug reports to help-gnu-utils (gnu.utils.help); mail them to -bug-gnu-utils@prep.ai.mit.edu instead. - -See section '* General Information about help-* lists'. - -* info-gnu-utils-request@prep.ai.mit.edu IS NOW DEFUNCT -** a gnUSENET newsgroup bever existed -** DEAD address: info-gnu-utils@prep.ai.mit.edu - -This list is dead. Announcements about GNU Utilities will be made to the -list info-gnu@prep.ai.mit.edu (see above). - -* info-cvs-request@prep.ai.mit.edu to subscribe to info-cvs. -** USENET newsgroup: (none) -** CVS discussions/questions to: info-cvs@prep.ai.mit.edu - -This list is for discussion and dissemination of information about -CVS. Please check the FAQ before posting questions, however. - -* bug-cvs-request@prep.ai.mit.edu to subscribe to bug-cvs. -** USENET newsgroup: (none) -** CVS bug reports to: bug-cvs@prep.ai.mit.edu - -This list distributes bug reports, fixes, and suggestions for -improvements to the maintainers of CVS. - -* bug-fortran-mode-request@erl.mit.edu to subscribe to bug-fortran-mode -** USENET newsgroup: (none) -** Fortran mode bug reports to: bug-fortran-mode@erl.mit.edu - -This list collects bug reports, fixes for bugs, and suggestions for -improvements in GNU Emacs's Fortran mode (a major mode to support -editing Fortran source code). - -It is the place to report Fortran mode bugs by all users of Fortran -mode. - -Always report the version number Fortran mode reports on startup as well -as the version of Emacs. - -There is no info-fortran-mode list. There are no USENET gateways to -bug-fortran-mode at this time. - -* info-gnus-request@flab.fujitsu.co.jp to subscribe -** gnUSENET newsgroup: NONE YET -** Send contributions to: info-gnus@flab.fujitsu.co.jp - -The list is intended to exchange useful information about GNUS, such as -bug reports, useful hooks, and extensions of GNUS. GNUS is an NNTP-base -network news reader for GNU Emacs (which also works with a news spool). -English and Japanese are the official languages of the list. GNUS is -quite different than gnews. - -* info-gnus-english-request@prep.ai.mit.edu to subscribe -** gnUSENET newsgroup: gnu.emacs.gnus -** Send contributions to: info-gnus-english@prep.ai.mit.edu - -The list has the same charter as info-gnus. The difference is that -English is the only official language of the list. - -info-gnus-english/gnu.emacs.gnus is forward to info-gnus, but NOT -vice-versa. - -* info-gnews-request@ics.uci.edu to subscribe to info-gnews -** gnUSENET newsgroup: gnu.emacs.gnews -** Send contributions to: info-gnews@ics.uci.edu - -This newsgroup is intended to exchange useful information about gnews, -such as bug reports, useful hooks, and extensions of gnews. gnews is an -NNTP-base network news reader for GNU Emacs (which also works a news -spool). It is quite different than GNUS. - -* gnu-emacs-ada-request@grebyn.com to subscribe to gnu-emacs-ada -** gnUSENET newsgroup: NONE PLANNED -** Gnu Emacs Ada support bug reports to: gnu-emacs-ada@grebyn.com - -This list distributes bug reports for, fixes for bugs in, and -suggestions for improvements in GNU Emacs' editing support of the Ada -programming language. - -There are no other GNU mailing lists or gnUSENET newsgroups for GNU -Emacs' editing support of Ada. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* bug-vm-request@uunet.uu.net to subscribe to bug-vm -** gnUSENET newsgroup: gnu.emacs.vm.bug -** VM mail reader bug reports to: bug-vm@uunet.uu.net - -This list discusses bugs in View Mail mode for GNU Emacs, with an -emphasis on beta and prerelease versions. - -Always report the version number of VM you are using, as well as the -version of Emacs you're running. If you believe it is significant, -report the operating system used and the hardware. - -Subscribers to bug-vm get all info-vm messages. - -* info-vm-request@uunet.uu.net to subscribe to info-vm -** gnUSENET newsgroup: gnu.emacs.vm.info -** Send contributions to: info-vm@uunet.uu.net - -This list discusses the View Mail mode for GNU Emacs, an alternative to -rmail mode. - -* supercite-request@warsaw.nlm.nih.gov to subscribe to supercite -** gnUSENET newsgroup: NONE PLANNED -** Send articles to: supercite@warsaw.nlm.nih.gov -*** UUCP: ..!uunet!warsaw.nlm.nih.gov!supercite-request - -The supercite mailing list covers issues related to the advanced -mail/news citation package called Supercite for GNU Emacs. - -* auc-tex-request@iesd.auc.dk to subscribe -** USENET newsgroup: NONE YET -** Send contributions to: auc-tex@iesd.auc.dk - -The list is intended to exchange information about AUC TeX, such as -bug reports, request for help, and information on current -developments. AUC TeX is a much enhanced LaTeX mode for GNU Emacs. - -The list is unmoderated. - -* bug-gnu-chess-request@prep.ai.mit.edu to subscribe to bug-gnu-chess -** gnUSENET newsgroup: gnu.chess.bug -** GNU Chess bug reports to: bug-gnu-chess@prep.ai.mit.edu - -This list directly accesses the GNU Chess developer's group. If you -have a *BUG* to report about the program, which can also include a -feature enhancement request, please send it to this list. - -Subscribers to bug-gnu-chess get all info-gnu-chess messages. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -* help-gnu-chess-request@prep.ai.mit.edu IS NOW DEFUNCT -** gnUSENET newsgroup: NONE PLANNED -** DEAD address: help-gnu-chess@prep.ai.mit.edu - -This list is dead. Use info-gnu-chess@prep.ai.mit.edu/gnu.chess instead. - -* info-gnu-chess-request@prep.ai.mit.edu to subscribe to info-gnu-chess -** gnUSENET newsgroup: gnu.chess -** Send contributions to: info-gnu-chess@prep.ai.mit.edu -** FAQ-URL: http://www.research.digital.com/SRC/personal/Tim_Mann/chess.html -** FAQ-Archive-name: games/chess/gnu-faq -** FAQ-Posting-frequency: monthly - -This list is the place for users and installers of GNU Chess to ask for -help. This list is also used for games played by people or other -entities against the program, and other generalized non-bug, -non-enhancement data. Please send bug reports to bug-gnu-chess instead -of posting them here. - -This list is also used for announcements about GNU Chess and related -programs, and small but important patches. Announcements of GNU Chess -releases are also made to info-gnu@prep.ai.mit.edu (see above) - -Since info-gnu-chess is a large list, send it only those items that -are seriously important to many people. - -If source or patches that were previously posted or a simple fix is -requested in info-gnu-chess, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not a broadcast medium that reaches millions of -sites. - -See section '* General Information about help-* lists'. -Also see section '* General Information about info-* lists'. - -* bug-gnu-shogi-request@prep.ai.mit.edu to subscribe to bug-gnu-shogi -** gnUSENET newsgroup: NONE PLANNED -** GNU Shogi bug reports to: bug-gnu-shogi@prep.ai.mit.edu - -This list directly accesses the GNU Shogi developer's group. If you -have a *BUG* to report about the program, which can also include a -feature enhancement request, please send it to this list. - -Subscribers to bug-gnu-shogi get all info-gnu-shogi messages. - -See section '* General Information about bug-* lists and reporting -program bugs'. - -Shogi is a game something like chess. There are several different types -of pieces, a board that is 9 by 9 squares, and the modification that a -captured piece can be reintroduced on the board by the capturing player -(and used). Due to this last difference from Western chess, a Shogi -game never simplifies. - -* help-gnu-shogi-request@prep.ai.mit.edu IS NOW DEFUNCT -** gnUSENET newsgroup: NONE PLANNED -** DEAD address: help-gnu-shogi@prep.ai.mit.edu - -This list is dead. - -* info-gnu-shogi-request@prep.ai.mit.edu to subscribe to info-gnu-shogi -** gnUSENET newsgroup: NONE PLANNED -** Send contributions to: info-gnu-shogi@prep.ai.mit.edu - -This list is the place for users and installers of GNU Shogi to ask for -help. This list is also used for games played by people or other -entities against the program, and other generalized non-bug, -non-enhancement data. Please send bug reports to bug-gnu-shogi instead -of posting them here. - -This list is also used for announcements about GNU Shogi and related -programs, and small but important patches. Announcements of GNU Shogi -releases are also made to info-gnu@prep.ai.mit.edu (see above) - -Since info-gnu-shogi is a large list, send it only those items that -are seriously important to many people. - -If source or patches that were previously posted or a simple fix is -requested in info-gnu-shogi, please mail it to the requester. Do NOT -repost it. If you also want something that is requested, send mail to -the requester asking him to forward it to you. This kind of traffic is -best handled by e-mail, not a broadcast medium that reaches millions of -sites. - -See section '* General Information about help-* lists'. -Also see section '* General Information about info-* lists'. - -* gnu-manual-request@a.cs.uiuc.edu IS NOW DEFUNCT -** DEAD: Gnusenet newsgroup: gnu.emacs.lisp.manual -** DEAD address: gnu-manual@a.cs.uiuc.edu -*** DEAD UUCP address: ..!uunet!uiucdcs!gnu-manual-request - -This list and newsgroup is dead. It was a working group whose -volunteers wrote, proofread and commented on the developing GNU Emacs -Lisp programmers manual. - -Send bugs in the GNU Emacs Lisp reference manual to: - lisp-manual-bugs@prep.ai.mit.edu - -lisp-manual-bugs is neither a mailing list nor a gnUSENET newsgroup. -It's just a bug-reporting address. - -* no mailing list request -** gnUSENET newsgroup: gnu.gnusenet.config -** no mailing list - -This newsgroup has nothing to do with GNU software, especially its -configuration. It exists to distribute information about the -administration and configuration of gnUSENET: the gnu.all alternative -USENET hierarchy that carry the GNU mailing lists. +----------------------------------------------------------------------- -Administrators of gnUSENET hosts receiving the gnu.all newsgroups are -welcome to ask questions here or via e-mail of gnu@prep.ai.mit.edu. + GNU Project Electronic Mailing Lists and gnUSENET Newsgroups: -* no mailing list request -** gnUSENET newsgroup: gnu.gnusenet.test -** no mailing list +The XEmacs project is separate from and not managed by the GNU +project. The latest information about the GNU project mailing lists +can be found at ftp://ftp.gnu.org/gnu/GNUinfo/MAILINGLISTS -This newsgroup has nothing to do with GNU software, especially its -testing. It exists to allow test messages to be made in gnUSENET: the -gnu.all alternative USENET hierarchy that carry the GNU mailing lists. +Please do NOT send messages about problems with XEmacs to the FSF GNU +Emacs newsgroups and mailing lists unless you are sure that the +problem you are reporting is a problem with both versions of GNU +Emacs. People who aren't subscribed to the XEmacs mailing list most +likely are not interested in hearing about problems with it. -Local variables: -mode: outline -fill-column: 72 -End: diff --git a/etc/NEWS b/etc/NEWS index 29238ae..3dcba1e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -33,30 +33,6 @@ file. * Changes in XEmacs 21.2 ======================== -** The functions in rect.el have been almost completely rewritten... -to avoid inserting undesirable spaces, notably at the end of lines. -Two typical examples of this old behavior are `string-rectangle', which filled -all lines up to the right side of the rectangle, and `clear-rectangle', which -filled even empty lines up to the left side. - -This is not the case any more. All these functions have been rewritten to -avoid inserting unwanted spaces, and an optional prefix now allows them to -behave the old way. - -As a side effect, `move-to-column' now also accepts 'coerce as its second -argument, meaning that the line shouldn't be filled if its too short to reach -the desired column. - -** You can now customize and save comments for faces and variables. - -In Custom buffers, a new menu entry allows you to add and edit a comment. -Comments for variables can also be assigned by calling -`customize-set-(value|variable)' with a prefix argument. - -** XEmacs now locates the early package hierarchy at ~/.xemacs/packages. - -This has changed from simply ~/.xemacs. - ** `delete-key-deletes-forward' now defaults to t. `delete-key-deletes-forward' is the variable that regulates the @@ -83,6 +59,33 @@ The new behavior affects all functions performing interactive searches, like `zap-to-char', `list-matching-lines', `tags-search' etc. The incremental search facility has always behaved that way. +** The rectangle functions have been almost completely rewritten in +order to avoid inserting undesirable spaces, notably at the end of +lines. Two typical examples of the old behavior were +`string-rectangle', which filled all lines up to the right side of the +rectangle, and `clear-rectangle', which filled even empty lines up to +the left side. All functions have been rewritten to avoid inserting +unwanted spaces, and an optional prefix now allows them to behave the +old way. + +As a side effect, the FORCE argument to `move-to-column' now +understands the special value `coerce', which means that the line +should not be filled if it is too short to reach the desired column. + +** Incremental search will now highlight all visible matches, making +it easier to anticipate where consecutive C-s or C-r will place the +point. If you want to disable the feature, set +`isearch-highlight-all-matches' to nil. + +** You can now customize and save comments for faces and variables. +In Custom buffers, a new menu entry allows you to add and edit a +comment. Comments for variables can also be assigned by calling +`customize-set-(value|variable)' with a prefix argument. + +** XEmacs now locates the early package hierarchies at +~/.xemacs/mule-packages/ and ~/.xemacs/xemacs-packages/. Previously, +the early packages were located in ~/.xemacs/. + ** You can now create "indirect buffers", like in GNU Emacs. An indirect buffer shares its text with another buffer ("base buffer"), but has its own major mode, local variables, extents, and narrowing. @@ -112,23 +115,16 @@ maintained internally. The new primitives available for this purpose are functions named `user-name-completion' and `user-name-all-completions'. -** Native widgets can be displayed in buffers. - -The glyph system has been extended to allow the display of glyphs that -are implemented as native window-system widgets. Thus you can embed -buttons, scrollbars, combo boxes, edit fields and progress gauges in a -buffer. As a side effect subwindow support now works once again. - -This support is currently only available under MS-Windows. - -** X-Face support is now available under MS-Windows +** XEmacs can now play sound using Enlightenment Sound Daemon (ESD). +It will try NAS first, then ESD, then playing native sound directly. +** X-Face support is now available under MS-Windows. If an X-Face libary built under MS-Windows is available then XEmacs will use this at build time. -** The font-menu is now available under MS-Windows +** The font-menu is now available under MS-Windows. -** MS-Windows support for selection is much more robust +** MS-Windows support for selection is now much more robust. Generally selection should now do what you would expect under MS-Windows: the middle mouse button will paste your current selection @@ -137,13 +133,78 @@ clipboard can be made; the kill-ring and friends will be updated as per X. The only thing selection doesn't do is set the clipboard automatically -as this would break the MS-Windows model. If you want this behaviour +as this would break the MS-Windows model. If you want this behaviour then set `selection-sets-clipboard' to t +** New command-line switches -user-init-file and -user-init-directory. +These can be used to specify alternate locations for what is normally +~/.emacs and ~/.xemacs. + +Moreover, -user (which used to only work in unpredictable ways) +is now equivalent to +-user-init-file ~/.emacs -user-init-directory ~/.xemacs. + +** Etags changes. + +*** In DOS, etags looks for file.cgz if it cannot find file.c. + +*** New option --ignore-case-regex is an alternative to --regex. It is now +possible to bind a regexp to a language, by prepending the regexp with +{lang}, where lang is one of the languages that `etags --help' prints out. +This feature is useful especially for regex files, where each line contains +a regular expression. The manual contains details. + +*** In C and derived languages, etags creates tags for function +declarations when given the --declarations option. + +*** In C++, tags are created for "operator". The tags have the form +"operator+", without spaces between the keyword and the operator. + +*** New language Ada: tags are functions, procedures, packages, tasks, and +types. + +*** In Fortran, procedure is no more tagged. + +*** In Java, tags are created for "interface". + +*** In Lisp, "(defstruct (foo", "(defun (operator" and similar constructs +are now tagged. + +*** In Perl, the --globals option tags global variables. my and local +variables are tagged. + +*** New language Python: 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. + * Lisp and internal changes in XEmacs 21.2 ========================================== +** A new portable dumper is available. + +Olivier Galibert has written a portable dumper for XEmacs, based on +initial work by Kyle Jones. Normally, XEmacs C sources link into an +executable called `temacs', which loads the Lisp code and "unexecs" +into a proper `xemacs' executable. 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. + +A portable dumper is a different approach to dumping: instead of +dumping full-fledged executable, it only dumps out the initialized +data structures (both Lisp and C) into an external file. A normally +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'. + +This is all very experimental, though. Configure with `--pdump' to +try testing it. NOTE: it is expected that `make' will fail after +dumping `xemacs.dmp'. This is because Makefiles have not yet been +modified to not expect `temacs' producing an `xemacs' executable. You +can try it out by simply running `src/temacs'. If it starts without +failure, the portable dumping worked. + ** Much effort has been invested to make XEmacs Lisp faster: *** Many basic lisp operations are now faster. @@ -180,6 +241,23 @@ Many operations do not see any improvement. Surprisingly, running Speeding up your favorite slow operation is an excellent project to improve XEmacs. Don't forget to profile! +** Native widgets can be displayed in buffers. + +The glyph system has been extended to allow the display of glyphs that +are implemented as native window-system widgets. Thus you can embed +buttons, scrollbars, combo boxes, edit fields and progress gauges in a +buffer. As a side effect subwindow support now works once again. + +All of this is still very experimental. This feature is currently +more complete under MS-Windows. + +** user-init-directory is now an absolute, unexpanded path. +Previously, `user-init-directory' used to be relative to +(concat "~" init-file-user). This turned out to be too complicated +for most packages (and some core Lisp files) to use correctly. + +Also, `init-file-user' has been obsoleted in the process. + ** XEmacs finally has an automated test suite! Although this is not yet very sophisticated, it is already responsible for several important bug fixes in XEmacs. To try it out, simply use @@ -211,14 +289,12 @@ now results in something like this: An extra bonus is that checking for circularities is not just friendlier, but actually faster than checking for C-g. -** The new form `ignore-file-errors', similar to `ignore-errors' may -be used as a short-hand for condition-case when you wish to ignore -file-related error. For example: - - (ignore-file-errors (delete-file "foo")) +** Functions for decoding base64 encoding are now available; see +`base64-encode-region', `base64-encode-string', `base64-decode-region' +and `base64-decode-string'. -** The arguments to `locate-file' are now much more "lispy". As -before, the usage is: +** The arguments to `locate-file' are now more Lisp-like. As before, +the usage is: (locate-file FILENAME PATH-LIST &optional SUFFIXES MODE) @@ -226,15 +302,21 @@ Except that SUFFIXES are now a list of strings instead of a single, colon-separated string. MODE is now a symbol or a list of symbols (symbols `exists', `executable', `writable', and `readable' are supported) instead of an integer code. See the documentation for -details. +details. Of course, the old form is still accepted for backward +compatibility. -Of course, the old form is still accepted for backward compatibility. +Several bugs in locate-file have been fixed, most notably its failure +to call expand-file-name on elements of PATH-LIST. Because of that +elements of load-path of the form "~/..." used to not work. +locate-file is now guaranteed to expand files during its course of +operation. ** `translate-region' has been improved in several ways. Its TABLE argument used to be a 256-character string. In addition to this, it -can now also be a vector or a char-table (which is useful for Mule.) -If TABLE a vector or a generic char-table, you can map characters to -strings instead of to other characters. For instance: +can now also be a vector or a char-table, which makes the function +useful for Mule, which it wasn't. If TABLE a vector or a generic +char-table, you can map characters to strings instead of to other +characters. For instance: (let ((table (make-char-table 'generic))) (put-char-table ?a "the letter a" table) @@ -242,18 +324,11 @@ strings instead of to other characters. For instance: (put-char-table ?c ?\n table) (translate-region (point-min) (point-max) table)) -** The `keywordp' function now returns non-nil only on symbols -interned in the global obarray. For example: - - (keywordp (intern ":foo" [0])) - => nil - (keywordp (intern ":foo")) ; The same as (keywordp :foo) - => t +** The new form `ignore-file-errors', similar to `ignore-errors' may +be used as a short-hand for condition-case when you wish to ignore +file-related error. For example: -This behaviour is compatible with other code which treats symbols -beginning with colon as keywords only if they are interned in the -global obarray. `keywordp' used to wrongly return t in both cases -above. + (ignore-file-errors (delete-file "foo")) ** The first argument to `intern-soft' may now also be a symbol, like with `unintern'. If given a symbol, `intern-soft' will look for that @@ -266,9 +341,18 @@ to check whether a specific symbol is interned in an obarray, e.g.: (intern-soft (make-symbol "foo")) => nil -** Functions for decoding base64 encoding are now available; see -`base64-encode-region', `base64-encode-string', `base64-decode-region' -and `base64-decode-string'. +** The `keywordp' function now returns non-nil only on symbols +interned in the global obarray. For example: + + (keywordp (intern ":foo" [0])) + => nil + (keywordp (intern ":foo")) ; The same as (keywordp :foo) + => t + +This behaviour is compatible with other code which treats symbols +beginning with colon as keywords only if they are interned in the +global obarray. `keywordp' used to wrongly return t in both cases +above. * Changes in XEmacs 21.0 @@ -752,7 +836,7 @@ directory hierarchy has been rewritten to support the package system. Look under "Startup Paths" in the Info documentation for more information. -*** site-lisp is now longer part of the load-path by default. +*** site-lisp is no longer part of the load-path by default. Its use is deprecated, but you can specify --with-site-lisp=yes at the configure command line to get it back. diff --git a/etc/OONEWS b/etc/OONEWS index 56e72d7..57b3174 100644 --- a/etc/OONEWS +++ b/etc/OONEWS @@ -2403,7 +2403,7 @@ source; if you're going to use this, you'd better be able to. *** utils/bench.el Commentary: -Adapted from Shane Holder's bench.el by steve@altair.xemacs.org. +Adapted from Shane Holder's bench.el by steve@xemacs.org. To run Extract the shar file in /tmp, or modify bench-lisp-file to diff --git a/etc/README.HYPERBOLE b/etc/README.HYPERBOLE index b1e8e63..5b0fd2e 100644 --- a/etc/README.HYPERBOLE +++ b/etc/README.HYPERBOLE @@ -2,5 +2,5 @@ Hyperbole is a suite of tools for enhancing productivity. The latest working version of this package with major enhancements is available together with professional support exclusively from their -developer, Altrasoft Inc. See http://www.altrasoft.com for product +developer, BeOpen Inc. See http://www.beopen.com for product and service details. diff --git a/etc/README.OO-BROWSER b/etc/README.OO-BROWSER index f572fab..f480ee4 100644 --- a/etc/README.OO-BROWSER +++ b/etc/README.OO-BROWSER @@ -2,5 +2,5 @@ The OO-Browser is a tool for examining object oriented code. The latest working version of this package with major enhancements is available together with professional support exclusively from their -developer, Altrasoft Inc. See http://www.altrasoft.com for product +developer, BeOpen Inc. See http://www.beopen.com for product and service details. diff --git a/etc/SERVICE b/etc/SERVICE index 9219b24..b54b83f 100644 --- a/etc/SERVICE +++ b/etc/SERVICE @@ -40,13 +40,13 @@ For a current copy of this directory, or to have yourself listed, ask: ** Please keep the entries in this file alphabetical **  -Altrasoft +BeOpen 4880 Stevens Creek Blvd., Suite 205 San Jose, CA 95129-1034 +1 408 243 3300 -http://www.altrasoft.com +http://www.beopen.com -Altrasoft provides corporate-quality support, development and user +BeOpen provides corporate-quality support, development and user documentation for GNU Emacs, XEmacs and InfoDock. (InfoDock is a turnkey information management and software development toolset built atop emacs, written by one of our associates.) Emacs distributions for a variety of diff --git a/etc/aliases.ksh b/etc/aliases.ksh index 90c0e70..a45d60d 100755 --- a/etc/aliases.ksh +++ b/etc/aliases.ksh @@ -24,7 +24,7 @@ # Shortcuts for sh-derived Unix shells (ksh, zsh, bash) -# From Steve Baur +# From Steve Baur # Run temacs as XEmacs function runtemacs { diff --git a/etc/editclient.sh b/etc/editclient.sh index 8e1c9b7..99152dd 100644 --- a/etc/editclient.sh +++ b/etc/editclient.sh @@ -1,6 +1,5 @@ #!/bin/sh -if gnuclient -batch -eval t >/dev/null 2>&1 -then +if gnuclient -batch -eval t >/dev/null 2>&1; then exec gnuclient ${1+"$@"} else xemacs -unmapped -f gnuserv-start & diff --git a/etc/etags.1 b/etc/etags.1 index 2a6c375..735b187 100644 --- a/etc/etags.1 +++ b/etc/etags.1 @@ -1,6 +1,6 @@ .\" Copyright (c) 1992 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH etags 1 "19apr1994" "GNU Tools" "GNU Tools" +.TH etags 1 "02nov1999" "GNU Tools" "GNU Tools" .de BP .sp .ti -.2i @@ -12,24 +12,33 @@ etags, ctags \- generate tag file for Emacs, vi .SH SYNOPSIS .hy 0 .na -.B etags [\|\-aCDRSVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|] +.B etags [\|\-aCDGImRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] +.if n .br +.B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] .br -[\|\-\-c++\|] [\|\-\-no\-defines\|] [\|\-\-ignore\-indentation\|] -[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|] -[\|\-\-no\-regexp\|] [\|\-\-help\|] [\|\-\-version\|] -[\|\-\-include=\fIfile\fP\|] [\|\-\-output=\fItagfile\fP\|] -[\|\-\-append\|] \fIfile\fP .\|.\|. +[\|\-\-append\|] [\|\-\-c++\|] [\|\-\-no\-defines\|] +[\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|] +[\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|] +[\|\-\-members\|] [\|\-\-output=\fItagfile\fP\|] +[\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|] +[\|\-\-ignore\-case\-regex=\fIregexp\fP\|] +[\|\-\-help\|] [\|\-\-version\|] +\fIfile\fP .\|.\|. -.B ctags [\|\-aCdRSVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|] +.B ctags [\|\-aCdgImRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|] +.if n .br +.B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] .br -[\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|] -[\|\-\-c++\|] [\|\-\-defines\|] [\|\-\-ignore\-indentation\|] -[\|\-\-no\-warn\|] [\|\-\-cxref\|] [\|\-\-backward\-search\|] -[\|\-\-forward\-search\|] [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|] -[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|] +[\|\-\-append\|] [\|\-\-backward\-search\|] [\|\-\-c++\|] +[\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|] +[\|\-\-globals\|] [\|\-\-ignore\-indentation\|] +[\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] +[\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|] +[\|\-\-ignore\-case\-regex=\fIregexp\fP\|] +[\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|] +[\|\-\-update\|] [\|\-\-no\-warn\|] [\|\-\-help\|] [\|\-\-version\|] -.br -[\|\-\-output=\fItagfile\fP\|] [\|\-\-append\|] [\|\-\-update\|] \fIfile\fP .\|.\|. +\fIfile\fP .\|.\|. .ad b .hy 1 .SH DESCRIPTION @@ -40,8 +49,8 @@ understood by format understood by .BR vi ( 1 )\c \&. Both forms of the program understand -the syntax of C, Objective C, C++, Java, Fortran, Pascal, Cobol, -LaTeX, Scheme, Emacs Lisp/Common Lisp, Postscript, Erlang, Prolog and +the syntax of C, Objective C, C++, Java, Fortran, Pascal, Cobol, Ada, Perl, +LaTeX, Scheme, Emacs Lisp/Common Lisp, Postscript, Erlang, Python, Prolog and most assembler\-like syntaxes. Both forms read the files specified on the command line, and write a tag table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for @@ -77,18 +86,39 @@ Treat files with `\|.c\|' and `\|.h\|' extensions as C++ code, not C code. Files with `\|.C\|', `\|.H\|', `\|.cxx\|', `\|.hxx\|', or `\|.cc\|' extensions are always assumed to be C++ code. .TP +.B \-\-declarations +In C and derived languages, create tags for function declarations, +and create tags for extern variables unless \-\-no\-globals is used. +.TP .B \-d, \-\-defines -Create tag entries for C preprocessor constant definitions +Create tag entries for C preprocessor constant definitions and enum constants, too. This is the -default behavior for \fBetags\fP, so this option is only accepted -by \fBctags\fP. +default behavior for \fBetags\fP. .TP .B \-D, \-\-no\-defines Do not create tag entries for C preprocessor constant definitions and enum constants. This may make the tags file much smaller if many header files are tagged. -This is the default behavior for \fBctags\fP, so this option is only -accepted by \fBetags\fP. +This is the default behavior for \fBctags\fP. +.TP +.B \-g, \-\-globals +Create tag entries for global variables in C, C++, Objective C, Java, +and Perl. +This is the default behavior for \fBetags\fP. +.TP +.B \-G, \-\-no\-globals +Do not tag global variables. Typically this reduces the file size by +one fourth. This is the default behavior for \fBctags\fP. +.TP +\fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP +Include a note in the tag file indicating that, when searching for a +tag, one should also consult the tags file \fIfile\fP after checking the +current file. This options is only accepted by \fBetags\fP. +.TP +.B \-I, \-\-ignore\-indentation +Don't rely on indentation as much as we normally do. Currently, this +means not to assume that a closing brace in the first column is the +final brace of a function or structure definition in C and C++. .TP \fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP Parse the following files according to the given language. More than @@ -99,27 +129,30 @@ detection of language based on filename extension. The `none' language may be used to disable language parsing altogether; only regexp matching is done in this case (see the \fB\-\-regex\fP option). .TP -\fB\-\-no_globals\fP -Do not tag global variables in C, C++, Objective C, Java. Typically -this reduces the file size by one fourth. +.B \-m, \-\-members +Create tag entries for variables that are members of structure-like +constructs in C++, Objective C, Java. .TP -\fB\-\-members\fP -Tag variables that are members of strucure-like constructs in C++, -Objective C, Java. +.B \-M, \-\-no\-members +Do not tag member variables. This is the default behavior. +.TP +.B \-\-packages\-only +Only tag packages in Ada files. .TP \fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP Explicit name of file for tag table; overrides default `\|TAGS\|' or `\|tags\|'. (But ignored with \fB\-v\fP or \fB\-x\fP.) .TP \fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP -Make tags based on regexp matching for each line of the files -following this option, in addition to the tags made with the standard -parsing based on language. May be freely intermixed with filenames -and the \fB\-R\fP option. The regexps are cumulative, i.e. each -option will add to the previous ones. The regexps are of the form: +\fB\-\-ignore\-case\-regex=\fIregexp\fP\ +Make tags based on regexp matching for each line of the files following +this option, in addition to the tags made with the standard parsing based +on language. When using \-\-regex, case is significant, while it is not +with \-\-ignore\-case\-regex. May be freely intermixed with filenames and +the \fB\-R\fP option. The regexps are cumulative, i.e. each option will +add to the previous ones. The regexps are of the form: .br - - \fB/\fP\fItagregexp\fP[\fB/\fP\fInameregexp\fP]\fB/\fP + \fB/\fP\fItagregexp\fP[\fB/\fP\fInameregexp\fP]\fB/\fP .br where \fItagregexp\fP is used to match the lines that must be tagged. @@ -127,8 +160,8 @@ It should not match useless characters. If the match is such that more characters than needed are unavoidably matched by \fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP ignores regexps without a -\fInameregexp\fP. The syntax of regexps is the same as in emacs, -augmented with intervals of the form \\{m,n\\}, as id ed or grep. +\fInameregexp\fP. The syntax of regexps is the same as in emacs, +augmented with intervals of the form \\{m,n\\}, as in ed or grep. .br Here are some examples. All the regexps are quoted to protect them from shell interpretation. @@ -152,16 +185,25 @@ Tag TCL files (this last example shows the usage of a \fItagregexp\fP): .br \fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP +.br +A regexp can be preceded by {lang}, thus restriciting it to match lines of +files of the specified language. Use \fBetags --help\bP to obtain a list +of the recognised languages. This feature is particularly useful inside +\fBregex files\fB. A regex file contains one regex per line. Empty lines, +and those lines beginning with space or tab are ignored. Lines beginning +with @ are references to regex files whose name follows the @ sign. Other +lines are considered regular expressions like those following \-\-regex. +.br +For example, the command +.br +etags \-\-regex=@regex.file *.c +.br +reads the regexes contained in the file regex.file. .TP .B \-R, \-\-no\-regex Don't do any more regexp matching on the following files. May be freely intermixed with filenames and the \fB\-\-regex\fP option. .TP -.B \-S, \-\-ignore\-indentation -Don't rely on indentation as much as we normally do. Currently, this -means not to assume that a closing brace in the first column is the -final brace of a function or structure definition in C and C++. -.TP .B \-t, \-\-typedefs Record typedefs in C code as tags. Since this is the default behaviour of \fBetags\fP, only \fBctags\fP accepts this option. @@ -192,7 +234,7 @@ allowed with it. Instead of generating a tag file, write a cross reference (in \fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option. .TP -.B \-H, \-\-help +.B \-h, \-H, \-\-help Print usage information. .TP .B \-V, \-\-version @@ -209,7 +251,7 @@ Stallman. .BR vi ( 1 ). .SH COPYING -Copyright (c) 1992 Free Software Foundation, Inc. +Copyright (c) 1999 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice diff --git a/etc/gnuserv.1 b/etc/gnuserv.1 index f87359f..781d24e 100644 --- a/etc/gnuserv.1 +++ b/etc/gnuserv.1 @@ -291,4 +291,4 @@ Andy Norman (ange@hplb.hpl.hp.com), based heavily upon etc/emacsclient.c, etc/server.c and lisp/server.el from the GNU Emacs 18.52 distribution. Various modifications from Bob Weiner (weiner@mot.com), Darrell Kindred (dkindred@cmu.edu), Arup Mukherjee (arup@cmu.edu), Ben -Wing (ben@xemacs.org) and Hrvoje Niksic (hniksic@srce.hr). +Wing (ben@xemacs.org) and Hrvoje Niksic (hniksic@xemacs.org). diff --git a/etc/package-index.LATEST.pgp b/etc/package-index.LATEST.pgp index 6feef5a..3464c72 100644 --- a/etc/package-index.LATEST.pgp +++ b/etc/package-index.LATEST.pgp @@ -120,7 +120,7 @@ Hash: SHA1 author-version "10.38" date "1999-05-18" build-date "1999-07-30" - maintainer "SL Baur " + maintainer "SL Baur " distribution mule priority medium category "mule" @@ -230,7 +230,7 @@ Hash: SHA1 author-version "21.1" date "1999-06-30" build-date "1999-07-30" - maintainer "SL Baur " + maintainer "SL Baur " distribution mule priority high category "mule" diff --git a/etc/sample.Xdefaults b/etc/sample.Xdefaults index 52199e8..71151aa 100644 --- a/etc/sample.Xdefaults +++ b/etc/sample.Xdefaults @@ -75,6 +75,13 @@ Emacs*dialog*XmList*Background: WhiteSmoke ! While this one is for Athena dialog boxes. Emacs*dialog*Command*Background: WhiteSmoke +! Athena dialog boxes are sometimes built with the Xaw3d +! variant of the Athena toolkit. +! XEmacs being nice to 8bit displays, it defaults to: +Emacs*dialog*Command*beNiceToColormap: true +! If you are shocked by the ugliness of the 3d rendition, +! you may want to set (even on 8bit displays) the above to false. + ! Xlw Scrollbar colors Emacs*XlwScrollBar.Foreground: Gray30 Emacs*XlwScrollBar.Background: Gray75 diff --git a/etc/xemacs.1 b/etc/xemacs.1 index e86dce2..c912a1c 100644 --- a/etc/xemacs.1 +++ b/etc/xemacs.1 @@ -742,10 +742,10 @@ was written by Steve Baur , Martin Buchholz , Richard Mlynarik , -Hrvoje Niksic , +Hrvoje Niksic , Chuck Thompson , -Ben Wing , -Jamie Zawinski , +Ben Wing , +Jamie Zawinski , and many others. It was based on an early version of .I GNU Emacs Version diff --git a/info/cl.info b/info/cl.info index 06f1c56..fdd0642 100644 --- a/info/cl.info +++ b/info/cl.info @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -29,79 +28,79 @@ the original English.  Indirect: -cl.info-1: 1190 -cl.info-2: 46365 -cl.info-3: 89150 -cl.info-4: 138909 -cl.info-5: 176907 -cl.info-6: 219515 +cl.info-1: 1164 +cl.info-2: 46335 +cl.info-3: 89116 +cl.info-4: 138874 +cl.info-5: 176870 +cl.info-6: 219475  Tag Table: (Indirect) -Node: Top1190 -Node: Overview2742 -Node: Usage5021 -Node: Organization5671 -Node: Installation7494 -Node: Naming Conventions8647 -Node: Program Structure10786 -Node: Argument Lists11254 -Node: Time of Evaluation21039 -Node: Function Aliases27019 -Node: Predicates27603 -Node: Type Predicates27923 -Node: Equality Predicates32966 -Node: Control Structure35742 -Node: Assignment36546 -Node: Generalized Variables37788 -Node: Basic Setf39095 -Node: Modify Macros46365 -Node: Customizing Setf53575 -Node: Variable Bindings60865 -Node: Dynamic Bindings61446 -Node: Lexical Bindings62336 -Node: Function Bindings66440 -Node: Macro Bindings68827 -Node: Conditionals71751 -Node: Blocks and Exits74834 -Node: Iteration77890 -Node: Loop Facility83364 -Node: Loop Basics84291 -Node: Loop Examples86891 -Node: For Clauses89150 -Node: Iteration Clauses101028 -Node: Accumulation Clauses102869 -Node: Other Clauses105213 -Node: Multiple Values111282 -Node: Macros113175 -Node: Declarations116393 -Node: Symbols124885 -Node: Property Lists125185 -Node: Creating Symbols128386 -Node: Numbers130464 -Node: Predicates on Numbers130944 -Node: Numerical Functions131973 -Node: Random Numbers136200 -Node: Implementation Parameters138909 -Node: Sequences142481 -Node: Sequence Basics143154 -Node: Mapping over Sequences146733 -Node: Sequence Functions152587 -Node: Searching Sequences158762 -Node: Sorting Sequences161800 -Node: Lists164348 -Node: List Functions164773 -Node: Substitution of Expressions169036 -Node: Lists as Sets170922 -Node: Association Lists174984 -Node: Hash Tables176687 -Node: Structures176907 -Node: Assertions191690 -Node: Efficiency Concerns194633 -Node: Common Lisp Compatibility200960 -Node: Old CL Compatibility204118 -Node: Porting Common Lisp208501 -Node: Function Index219515 -Node: Variable Index230778 +Node: Top1164 +Node: Overview2716 +Node: Usage4995 +Node: Organization5645 +Node: Installation7468 +Node: Naming Conventions8621 +Node: Program Structure10760 +Node: Argument Lists11228 +Node: Time of Evaluation21011 +Node: Function Aliases26991 +Node: Predicates27575 +Node: Type Predicates27895 +Node: Equality Predicates32937 +Node: Control Structure35713 +Node: Assignment36517 +Node: Generalized Variables37758 +Node: Basic Setf39065 +Node: Modify Macros46335 +Node: Customizing Setf53544 +Node: Variable Bindings60833 +Node: Dynamic Bindings61414 +Node: Lexical Bindings62304 +Node: Function Bindings66408 +Node: Macro Bindings68795 +Node: Conditionals71718 +Node: Blocks and Exits74801 +Node: Iteration77857 +Node: Loop Facility83330 +Node: Loop Basics84257 +Node: Loop Examples86857 +Node: For Clauses89116 +Node: Iteration Clauses100993 +Node: Accumulation Clauses102834 +Node: Other Clauses105178 +Node: Multiple Values111247 +Node: Macros113140 +Node: Declarations116358 +Node: Symbols124850 +Node: Property Lists125150 +Node: Creating Symbols128351 +Node: Numbers130429 +Node: Predicates on Numbers130909 +Node: Numerical Functions131938 +Node: Random Numbers136165 +Node: Implementation Parameters138874 +Node: Sequences142446 +Node: Sequence Basics143119 +Node: Mapping over Sequences146697 +Node: Sequence Functions152551 +Node: Searching Sequences158726 +Node: Sorting Sequences161763 +Node: Lists164311 +Node: List Functions164736 +Node: Substitution of Expressions168999 +Node: Lists as Sets170885 +Node: Association Lists174947 +Node: Hash Tables176650 +Node: Structures176870 +Node: Assertions191653 +Node: Efficiency Concerns194596 +Node: Common Lisp Compatibility200923 +Node: Old CL Compatibility204079 +Node: Porting Common Lisp208462 +Node: Function Index219475 +Node: Variable Index230738  End Tag Table diff --git a/info/cl.info-1 b/info/cl.info-1 index cc97278..39091b8 100644 --- a/info/cl.info-1 +++ b/info/cl.info-1 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -231,7 +230,7 @@ name: mod* rem* random* Internal function and variable names in the package are prefixed by -`cl-'. Here is a complete list of functions *not* prefixed by `cl-' +`cl-'. Here is a complete list of functions _not_ prefixed by `cl-' which were not taken from Common Lisp: member delete remove remq @@ -297,13 +296,13 @@ this package to implement Common Lisp argument lists seamlessly. Instead, this package defines alternates for several Lisp forms which you must use if you need Common Lisp argument lists. - - Special Form: defun* NAME ARGLIST BODY... + - Special Form: defun* name arglist body... This form is identical to the regular `defun' form, except that ARGLIST is allowed to be a full Common Lisp argument list. Also, the function body is enclosed in an implicit block called NAME; - *note Blocks and Exits::.. + *note Blocks and Exits::. - - Special Form: defsubst* NAME ARGLIST BODY... + - Special Form: defsubst* name arglist body... This is just like `defun*', except that the function that is defined is automatically proclaimed `inline', i.e., calls to it may be expanded into in-line code by the byte compiler. This is @@ -314,7 +313,7 @@ you must use if you need Common Lisp argument lists. processing of keyword arguments, default values, etc., to be done at compile-time whenever possible. - - Special Form: defmacro* NAME ARGLIST BODY... + - Special Form: defmacro* name arglist body... This is identical to the regular `defmacro' form, except that ARGLIST is allowed to be a full Common Lisp argument list. The `&environment' keyword is supported as described in Steele. The @@ -323,7 +322,7 @@ you must use if you need Common Lisp argument lists. Emacs Lisp interpreter. The macro expander body is enclosed in an implicit block called NAME. - - Special Form: function* SYMBOL-OR-LAMBDA + - Special Form: function* symbol-or-lambda This is identical to the regular `function' form, except that if the argument is a `lambda' form then that form may use a full Common Lisp argument list. @@ -332,7 +331,7 @@ you must use if you need Common Lisp argument lists. package that include ARGLISTs in their syntax allow full Common Lisp argument lists. - Note that it is *not* necessary to use `defun*' in order to have + Note that it is _not_ necessary to use `defun*' in order to have access to most "CL" features in your function. These features are always present; `defun*''s only difference from `defun' is its more flexible argument lists and its implicit block. @@ -426,7 +425,7 @@ the scan for keyword arguments by calling `memq' to search for keywords in a "rest" argument. Technically speaking, this is incorrect, since `memq' looks at the odd-numbered values as well as the even-numbered keywords. The net effect is that if you happen to pass a keyword symbol -as the *value* of another keyword argument, where that keyword symbol +as the _value_ of another keyword argument, where that keyword symbol happens to equal the name of a valid keyword argument of the same function, then the keyword parser will become confused. This minor bug can only affect you if you use keyword symbols as general-purpose data @@ -473,7 +472,7 @@ dotted, so that the argument list `(a b . c)' is functionally equivalent to `(a b &rest c)'. If the optimization quality `safety' is set to 0 (*note -Declarations::.), error checking for wrong number of arguments and +Declarations::), error checking for wrong number of arguments and invalid keyword arguments is disabled. By default, argument lists are rigorously checked. @@ -492,7 +491,7 @@ certain top-level forms evaluated at compile-time. For example, the compiler effectively evaluates `defmacro' forms at compile-time so that later parts of the file can refer to the macros that are defined. - - Special Form: eval-when (SITUATIONS...) FORMS... + - Special Form: eval-when (situations...) forms... This form controls when the body FORMS are evaluated. The SITUATIONS list may contain any set of the symbols `compile', `load', and `eval' (or their long-winded ANSI equivalents, @@ -563,7 +562,7 @@ construct and is described below. This package defines a version of `(eval-when (compile load eval) ...)' and so is not itself defined by this package. - - Special Form: eval-when-compile FORMS... + - Special Form: eval-when-compile forms... The FORMS are evaluated at compile-time; at execution time, this form acts like a quoted constant of the resulting value. Used at top-level, `eval-when-compile' is just like `eval-when (compile @@ -572,7 +571,7 @@ this package. This form is similar to the `#.' syntax of true Common Lisp. - - Special Form: load-time-value FORM + - Special Form: load-time-value form The FORM is evaluated at load-time; at execution time, this form acts like a quoted constant of the resulting value. @@ -617,7 +616,7 @@ Function Aliases This section describes a feature from GNU Emacs 19 which this package makes available in other versions of Emacs. - - Function: defalias SYMBOL FUNCTION + - Function: defalias symbol function This function sets SYMBOL's function cell to FUNCTION. It is equivalent to `fset', except that in GNU Emacs 19 it also records the setting in `load-history' so that it can be undone by a later @@ -647,7 +646,7 @@ Type Predicates The "CL" package defines a version of the Common Lisp `typep' predicate. - - Function: typep OBJECT TYPE + - Function: typep object type Check if OBJECT is of type TYPE, where TYPE is a (quoted) type name of the sort used by Common Lisp. For example, `(typep foo 'integer)' is equivalent to `(integerp foo)'. @@ -704,7 +703,7 @@ beginning with a symbol. The following function and macro (not technically predicates) are related to `typep'. - - Function: coerce OBJECT TYPE + - Function: coerce object type This function attempts to convert OBJECT to the specified TYPE. If OBJECT is already of that type as determined by `typep', it is simply returned. Otherwise, certain types of conversions will be @@ -715,13 +714,13 @@ related to `typep'. integers can be coerced in versions of Emacs that support floats. In all other circumstances, `coerce' signals an error. - - Special Form: deftype NAME ARGLIST FORMS... + - Special Form: deftype name arglist forms... This macro defines a new type called NAME. It is similar to `defmacro' in many ways; when NAME is encountered as a type name, the body FORMS are evaluated and should return a type specifier that is equivalent to the type. The ARGLIST is a Common Lisp argument list of the sort accepted by `defmacro*'. The type - specifier `(NAME ARGS...)' is expanded by calling the expander + specifier `(NAME ARGS...)' is expanded by calling the expander with those arguments; the type symbol `NAME' is expanded by calling the expander with no arguments. The ARGLIST is processed the same as for `defmacro*' except that optional arguments without @@ -753,7 +752,7 @@ Equality Predicates This package defines two Common Lisp predicates, `eql' and `equalp'. - - Function: eql A B + - Function: eql a b This function is almost the same as `eq', except that if A and B are numbers of the same type, it compares them for numeric equality (as if by `equal' instead of `eq'). This makes a @@ -784,7 +783,7 @@ This package defines two Common Lisp predicates, `eql' and `equalp'. fact the only known way to distinguish between the two zeros in Emacs Lisp is to `format' them and check for a minus sign. - - Function: equalp A B + - Function: equalp a b This function is a more flexible version of `equal'. In particular, it compares strings and characters case-insensitively, and it compares numbers without regard to type (so that `(equalp 3 @@ -831,7 +830,7 @@ Assignment The `psetq' form is just like `setq', except that multiple assignments are done in parallel rather than sequentially. - - Special Form: psetq [SYMBOL FORM]... + - Special Form: psetq [symbol form]... This special form (actually a macro) is used to assign to several variables simultaneously. Given only one SYMBOL and FORM, it has the same effect as `setq'. Given several SYMBOL and FORM pairs, @@ -853,7 +852,7 @@ are done in parallel rather than sequentially. The simplest use of `psetq' is `(psetq x y y x)', which exchanges the values of two variables. (The `rotatef' form provides an even - more convenient way to swap two variables; *note Modify Macros::..) + more convenient way to swap two variables; *note Modify Macros::.) `psetq' always returns `nil'. @@ -896,7 +895,7 @@ Basic Setf The `setf' macro is the most basic way to operate on generalized variables. - - Special Form: setf [PLACE FORM]... + - Special Form: setf [place form]... This macro evaluates FORM and stores it in PLACE, which must be a valid generalized variable form. If there are several PLACE and FORM pairs, the assignments are done sequentially just as with diff --git a/info/cl.info-2 b/info/cl.info-2 index cd1974e..8c49371 100644 --- a/info/cl.info-2 +++ b/info/cl.info-2 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -37,14 +36,14 @@ This package defines a number of other macros besides `setf' that operate on generalized variables. Many are interesting and useful even when the PLACE is just a variable name. - - Special Form: psetf [PLACE FORM]... + - Special Form: psetf [place form]... This macro is to `setf' what `psetq' is to `setq': When several PLACEs and FORMs are involved, the assignments take place in parallel rather than sequentially. Specifically, all subforms are evaluated from left to right, then all the assignments are done (in an undefined order). - - Special Form: incf PLACE &optional X + - Special Form: incf place &optional x This macro increments the number stored in PLACE by one, or by X if specified. The incremented value is returned. For example, `(incf i)' is equivalent to `(setq i (1+ i))', and `(incf (car x) @@ -57,7 +56,7 @@ when the PLACE is just a variable name. appears to increment `i' once, then increment the element of `vec' addressed by `i'; this is indeed exactly what it does, which means - the above form is *not* equivalent to the "obvious" expansion, + the above form is _not_ equivalent to the "obvious" expansion, (setf (aref vec (incf i)) (1+ (aref vec (incf i)))) ; Wrong! @@ -72,28 +71,28 @@ when the PLACE is just a variable name. As a more Emacs-specific example of `incf', the expression `(incf (point) N)' is essentially equivalent to `(forward-char N)'. - - Special Form: decf PLACE &optional X + - Special Form: decf place &optional x This macro decrements the number stored in PLACE by one, or by X if specified. - - Special Form: pop PLACE + - Special Form: pop place This macro removes and returns the first element of the list stored in PLACE. It is analogous to `(prog1 (car PLACE) (setf PLACE (cdr PLACE)))', except that it takes care to evaluate all subforms only once. - - Special Form: push X PLACE + - Special Form: push x place This macro inserts X at the front of the list stored in PLACE. It is analogous to `(setf PLACE (cons X PLACE))', except for evaluation of the subforms. - - Special Form: pushnew X PLACE &key :test :test-not :key + - Special Form: pushnew x place &key :test :test-not :key This macro inserts X at the front of the list stored in PLACE, but only if X was not `eql' to any existing element of the list. The optional keyword arguments are interpreted in the same way as for `adjoin'. *Note Lists as Sets::. - - Special Form: shiftf PLACE... NEWVALUE + - Special Form: shiftf place... newvalue This macro shifts the PLACEs left by one, shifting in the value of NEWVALUE (which may be any Lisp expression, not just a generalized variable), and returning the value shifted out of the first PLACE. @@ -108,7 +107,7 @@ when the PLACE is just a variable name. except that the subforms of A, B, and C are actually evaluated only once each and in the apparent order. - - Special Form: rotatef PLACE... + - Special Form: rotatef place... This macro rotates the PLACEs left by one in circular fashion. Thus, `(rotatef A B C D)' is equivalent to @@ -123,7 +122,7 @@ when the PLACE is just a variable name. The following macros were invented for this package; they have no analogues in Common Lisp. - - Special Form: letf (BINDINGS...) FORMS... + - Special Form: letf (bindings...) forms... This macro is analogous to `let', but for generalized variables rather than just symbols. Each BINDING should be of the form `(PLACE VALUE)'; the original contents of the PLACEs are saved, @@ -168,7 +167,7 @@ analogues in Common Lisp. not bound on entry, it is simply made unbound by `makunbound' or `fmakunbound' on exit. - - Special Form: letf* (BINDINGS...) FORMS... + - Special Form: letf* (bindings...) forms... This macro is to `letf' what `let*' is to `let': It does the bindings in sequential rather than parallel order. @@ -188,14 +187,14 @@ analogues in Common Lisp. that `callf' is an extension to standard Common Lisp. - Special Form: callf2 FUNCTION ARG1 PLACE ARGS... - This macro is like `callf', except that PLACE is the *second* + This macro is like `callf', except that PLACE is the _second_ argument of FUNCTION rather than the first. For example, `(push X PLACE)' is equivalent to `(callf2 cons X PLACE)'. The `callf' and `callf2' macros serve as building blocks for other macros like `incf', `pushnew', and `define-modify-macro'. The `letf' and `letf*' macros are used in the processing of symbol macros; *note -Macro Bindings::.. +Macro Bindings::.  File: cl.info, Node: Customizing Setf, Prev: Modify Macros, Up: Generalized Variables @@ -207,7 +206,7 @@ Common Lisp defines three macros, `define-modify-macro', `defsetf', and `define-setf-method', that allow the user to extend generalized variables in various ways. - - Special Form: define-modify-macro NAME ARGLIST FUNCTION [DOC-STRING] + - Special Form: define-modify-macro name arglist function [doc-string] This macro defines a "read-modify-write" macro similar to `incf' and `decf'. The macro NAME is defined to take a PLACE argument followed by additional arguments described by ARGLIST. The call @@ -237,7 +236,7 @@ variables in various ways. `get-setf-method', or consult the source file `cl-macs.el' to see how to use the internal `setf' building blocks. - - Special Form: defsetf ACCESS-FN UPDATE-FN + - Special Form: defsetf access-fn update-fn This is the simpler of two `defsetf' forms. Where ACCESS-FN is the name of a function which accesses a place, this declares UPDATE-FN to be the corresponding store function. From now on, @@ -270,7 +269,7 @@ variables in various ways. (defsetf symbol-value set) (defsetf buffer-name rename-buffer t) - - Special Form: defsetf ACCESS-FN ARGLIST (STORE-VAR) FORMS... + - Special Form: defsetf access-fn arglist (store-var) forms... This is the second, more complex, form of `defsetf'. It is rather like `defmacro' except for the additional STORE-VAR argument. The FORMS should return a Lisp form which stores the value of @@ -295,7 +294,7 @@ variables in various ways. (defsetf nth (n x) (store) (list 'setcar (list 'nthcdr n x) store)) - - Special Form: define-setf-method ACCESS-FN ARGLIST FORMS... + - Special Form: define-setf-method access-fn arglist forms... This is the most general way to create new place forms. When a `setf' to ACCESS-FN with arguments described by ARGLIST is expanded, the FORMS are evaluated and must return a list of five @@ -334,7 +333,7 @@ variables in various ways. optimize away most temporaries that turn out to be unnecessary, so there is little reason for the setf-method itself to optimize. - - Function: get-setf-method PLACE &optional ENV + - Function: get-setf-method place &optional env This function returns the setf-method for PLACE, by invoking the definition previously recorded by `defsetf' or `define-setf-method'. The result is a list of five values as @@ -357,7 +356,7 @@ variables in various ways. Modern Common Lisp defines a second, independent way to specify the `setf' behavior of a function, namely "`setf' functions" whose names are lists `(setf NAME)' rather than symbols. For example, `(defun -(setf foo) ...)' defines the function that is used when `setf' is +(setf foo) ...)' defines the function that is used when `setf' is applied to `foo'. This package does not currently support `setf' functions. In particular, it is a compile-time error to use `setf' on a form which has not already been `defsetf''d or otherwise declared; in @@ -393,7 +392,7 @@ The standard `let' form binds variables whose names are known at compile-time. The `progv' form provides an easy way to bind variables whose names are computed at run-time. - - Special Form: progv SYMBOLS VALUES FORMS... + - Special Form: progv symbols values forms... This form establishes `let'-style variable bindings on a set of variables computed at run-time. The expressions SYMBOLS and VALUES are evaluated, and must return lists of symbols and values, @@ -412,7 +411,7 @@ Lexical Bindings The "CL" package defines the following macro which more closely follows the Common Lisp `let' form: - - Special Form: lexical-let (BINDINGS...) FORMS... + - Special Form: lexical-let (bindings...) forms... This form is exactly like `let' except that the bindings it establishes are purely lexical. Lexical bindings are similar to local variables in a language like C: Only the code physically @@ -500,7 +499,7 @@ the Common Lisp `let' form: The `lexical-let' form is an extension to Common Lisp. In true Common Lisp, all bindings are lexical unless declared otherwise. - - Special Form: lexical-let* (BINDINGS...) FORMS... + - Special Form: lexical-let* (bindings...) forms... This form is just like `lexical-let', except that the bindings are made sequentially in the manner of `let*'. @@ -512,7 +511,7 @@ Function Bindings These forms make `let'-like bindings to functions instead of variables. - - Special Form: flet (BINDINGS...) FORMS... + - Special Form: flet (bindings...) forms... This form establishes `let'-style bindings on the function cells of symbols rather than on the value cells. Each BINDING must be a list of the form `(NAME ARGLIST FORMS...)', which defines a @@ -548,7 +547,7 @@ These forms make `let'-like bindings to functions instead of variables. enclosed in an implicit block as if by `defun*'. *Note Program Structure::. - - Special Form: labels (BINDINGS...) FORMS... + - Special Form: labels (bindings...) forms... The `labels' form is a synonym for `flet'. (In Common Lisp, `labels' and `flet' differ in ways that depend on their lexical scoping; these distinctions vanish in dynamically scoped Emacs @@ -562,7 +561,7 @@ Macro Bindings These forms create local macros and "symbol macros." - - Special Form: macrolet (BINDINGS...) FORMS... + - Special Form: macrolet (bindings...) forms... This form is analogous to `flet', but for macros instead of functions. Each BINDING is a list of the same form as the arguments to `defmacro*' (i.e., a macro name, argument list, and @@ -574,7 +573,7 @@ These forms create local macros and "symbol macros." that appear physically within the body FORMS, possibly after expansion of other macros in the body. - - Special Form: symbol-macrolet (BINDINGS...) FORMS... + - Special Form: symbol-macrolet (bindings...) forms... This form creates "symbol macros", which are macros that look like variable references rather than function calls. Each BINDING is a list `(VAR EXPANSION)'; any reference to VAR within the body FORMS @@ -612,7 +611,7 @@ These forms create local macros and "symbol macros." => (2 3 4 5) In this example, the `my-dolist' macro is similar to `dolist' - (*note Iteration::.) except that the variable `x' becomes a true + (*note Iteration::) except that the variable `x' becomes a true reference onto the elements of the list. The `my-dolist' call shown here expands to @@ -637,7 +636,7 @@ Conditionals These conditional forms augment Emacs Lisp's simple `if', `and', `or', and `cond' forms. - - Special Form: when TEST FORMS... + - Special Form: when test forms... This is a variant of `if' where there are no "else" forms, and possibly several "then" forms. In particular, @@ -647,7 +646,7 @@ and `cond' forms. (if TEST (progn A B C) nil) - - Special Form: unless TEST FORMS... + - Special Form: unless test forms... This is a variant of `if' where there are no "then" forms, and possibly several "else" forms: @@ -657,7 +656,7 @@ and `cond' forms. (when (not TEST) A B C) - - Special Form: case KEYFORM CLAUSE... + - Special Form: case keyform clause... This macro evaluates KEYFORM, then compares it with the key values listed in the various CLAUSEs. Whichever clause matches the key is executed; comparison is done by `eql'. If no clause matches, @@ -685,12 +684,12 @@ and `cond' forms. ((?\r ?\n) (do-ret-thing)) (t (do-other-thing))) - - Special Form: ecase KEYFORM CLAUSE... + - Special Form: ecase keyform clause... This macro is just like `case', except that if the key does not match any of the clauses, an error is signalled rather than simply returning `nil'. - - Special Form: typecase KEYFORM CLAUSE... + - Special Form: typecase keyform clause... This macro is a version of `case' that checks for types rather than values. Each CLAUSE is of the form `(TYPE BODY...)'. *Note Type Predicates::, for a description of type specifiers. For @@ -706,7 +705,7 @@ and `cond' forms. `otherwise' is also allowed. To make one clause match any of several types, use an `(or ...)' type specifier. - - Special Form: etypecase KEYFORM CLAUSE... + - Special Form: etypecase keyform clause... This macro is just like `typecase', except that if the key does not match any of the clauses, an error is signalled rather than simply returning `nil'. @@ -724,7 +723,7 @@ the lexical scoping allows the optimizing byte-compiler to omit the costly `catch' step if the body of the block does not actually `return-from' the block. - - Special Form: block NAME FORMS... + - Special Form: block name forms... The FORMS are evaluated as if by a `progn'. However, if any of the FORMS execute `(return-from NAME)', they will jump out and return directly from the `block' form. The `block' returns the @@ -762,13 +761,13 @@ costly `catch' step if the body of the block does not actually that `do' loops and `defun*' functions which don't use `return' don't pay the overhead to support it. - - Special Form: return-from NAME [RESULT] + - Special Form: return-from name [result] This macro returns from the block named NAME, which must be an (unevaluated) symbol. If a RESULT form is specified, it is evaluated to produce the result returned from the `block'. Otherwise, `nil' is returned. - - Special Form: return [RESULT] + - Special Form: return [result] This macro is exactly like `(return-from nil RESULT)'. Common Lisp loops like `do' and `dolist' implicitly enclose themselves in `nil' blocks. @@ -782,12 +781,12 @@ Iteration The macros described here provide more sophisticated, high-level looping constructs to complement Emacs Lisp's basic `while' loop. - - Special Form: loop FORMS... + - Special Form: loop forms... The "CL" package supports both the simple, old-style meaning of `loop' and the extremely powerful and flexible feature known as the "Loop Facility" or "Loop Macro". This more advanced facility - is discussed in the following section; *note Loop Facility::.. - The simple form of `loop' is described here. + is discussed in the following section; *note Loop Facility::. The + simple form of `loop' is described here. If `loop' is followed by zero or more Lisp expressions, then `(loop EXPRS...)' simply creates an infinite loop executing the @@ -806,7 +805,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. the above notation would simply access and throw away the value of a variable.) - - Special Form: do (SPEC...) (END-TEST [RESULT...]) FORMS... + - Special Form: do (spec...) (end-test [result...]) forms... This macro creates a general iterative loop. Each SPEC is of the form @@ -828,7 +827,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. VAR has no STEP form, it is bound to its INIT value but not otherwise modified during the `do' loop (unless the code explicitly modifies it); this case is just a shorthand for putting - a `(let ((VAR INIT)) ...)' around the loop. If INIT is also + a `(let ((VAR INIT)) ...)' around the loop. If INIT is also omitted it defaults to `nil', and in this case a plain `VAR' can be used in place of `(VAR)', again following the analogy with `let'. @@ -845,7 +844,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. ((or (null x) (null y)) (nreverse z))) - - Special Form: do* (SPEC...) (END-TEST [RESULT...]) FORMS... + - Special Form: do* (spec...) (end-test [result...]) forms... This is to `do' what `let*' is to `let'. In particular, the initial values are bound as if by `let*' rather than `let', and the steps are assigned as if by `setq' rather than `psetq'. @@ -861,7 +860,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. (nreverse z)) (push (f x y) z)) - - Special Form: dolist (VAR LIST [RESULT]) FORMS... + - Special Form: dolist (var list [result]) forms... This is a more specialized loop which iterates across the elements of a list. LIST should evaluate to a list; the body FORMS are executed with VAR bound to each element of the list in turn. @@ -869,7 +868,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. `nil' to produce the result returned by the loop. The loop is surrounded by an implicit `nil' block. - - Special Form: dotimes (VAR COUNT [RESULT]) FORMS... + - Special Form: dotimes (var count [result]) forms... This is a more specialized loop which iterates a specified number of times. The body is executed with VAR bound to the integers from zero (inclusive) to COUNT (exclusive), in turn. Then the @@ -878,7 +877,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. return value for the loop form. The loop is surrounded by an implicit `nil' block. - - Special Form: do-symbols (VAR [OBARRAY [RESULT]]) FORMS... + - Special Form: do-symbols (var [obarray [result]]) forms... This loop iterates over all interned symbols. If OBARRAY is specified and is not `nil', it loops over all symbols in that obarray. For each symbol, the body FORMS are evaluated with VAR @@ -887,7 +886,7 @@ looping constructs to complement Emacs Lisp's basic `while' loop. bound to `nil') to get the return value. The loop is surrounded by an implicit `nil' block. - - Special Form: do-all-symbols (VAR [RESULT]) FORMS... + - Special Form: do-all-symbols (var [result]) forms... This is identical to `do-symbols' except that the OBARRAY argument is omitted; it always iterates over the default obarray. @@ -933,7 +932,7 @@ to be very easy to learn and well-suited to its purpose. place at byte-compile time; compiled `loop's are just as efficient as the equivalent `while' loops written longhand. - - Special Form: loop CLAUSES... + - Special Form: loop clauses... A loop construct consists of a series of CLAUSEs, each introduced by a symbol like `for' or `do'. Clauses are simply strung together in the argument list of `loop', with minimal extra diff --git a/info/cl.info-3 b/info/cl.info-3 index 40c734f..69e4664 100644 --- a/info/cl.info-3 +++ b/info/cl.info-3 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -141,7 +140,7 @@ form you use is purely a matter of style. This clause type is taken from older versions of the `loop' macro, and is not present in modern Common Lisp. The `using (sequence - ...)' term of the older macros is not supported. + ...)' term of the older macros is not supported. `for VAR being the elements of-ref SEQUENCE' This clause iterates over a sequence, with VAR a `setf'-able @@ -168,7 +167,7 @@ form you use is purely a matter of style. Due to a minor implementation restriction, it will not work to have more than one `for' clause iterating over symbols, hash tables, keymaps, overlays, or intervals in a given `loop'. Fortunately, - it would rarely if ever be useful to do so. It *is* legal to mix + it would rarely if ever be useful to do so. It _is_ legal to mix one of these types of clauses with other clauses like `for ... to' or `while'. @@ -553,20 +552,20 @@ functions, by contrast, always return exactly one result. This package makes no attempt to emulate Common Lisp multiple return values; Emacs versions of Common Lisp functions that return more than one value either return just the first value (as in `compiler-macroexpand') or -return a list of values (as in `get-setf-method'). This package *does* +return a list of values (as in `get-setf-method'). This package _does_ define placeholders for the Common Lisp functions that work with multiple values, but in Emacs Lisp these functions simply operate on lists instead. The `values' form, for example, is a synonym for `list' in Emacs. - - Special Form: multiple-value-bind (VAR...) VALUES-FORM FORMS... + - Special Form: multiple-value-bind (var...) values-form forms... This form evaluates VALUES-FORM, which must return a list of values. It then binds the VARs to these respective values, as if by `let', and then executes the body FORMS. If there are more VARs than values, the extra VARs are bound to `nil'. If there are fewer VARs than values, the excess values are ignored. - - Special Form: multiple-value-setq (VAR...) FORM + - Special Form: multiple-value-setq (var...) form This form evaluates FORM, which must return a list of values. It then sets the VARs to these respective values, as if by `setq'. Extra VARs or values are treated the same as in @@ -595,7 +594,7 @@ Argument Lists::. Destructuring is made available to the user by way of the following macro: - - Special Form: destructuring-bind ARGLIST EXPR FORMS... + - Special Form: destructuring-bind arglist expr forms... This macro expands to code which executes FORMS, with the variables in ARGLIST bound to the list of values returned by EXPR. The ARGLIST can include all the features allowed for `defmacro' @@ -608,7 +607,7 @@ macro: facility, which allows you to define compile-time expansions and optimizations for your functions. - - Special Form: define-compiler-macro NAME ARGLIST FORMS... + - Special Form: define-compiler-macro name arglist forms... This form is similar to `defmacro', except that it only expands calls to NAME at compile-time; calls processed by the Lisp interpreter are not expanded, nor are they expanded by the @@ -640,7 +639,7 @@ optimizations for your functions. optimizes a number of other cases, including common `:test' predicates.) - - Function: compiler-macroexpand FORM + - Function: compiler-macroexpand form This function is analogous to `macroexpand', except that it expands compiler macros rather than regular macros. It returns FORM unchanged if it is not a call to a function for which a @@ -673,12 +672,12 @@ when the optimizing Emacs 19 byte compiler is being used, however. Under the earlier non-optimizing compiler, these declarations will effectively be ignored. - - Function: proclaim DECL-SPEC + - Function: proclaim decl-spec This function records a "global" declaration specified by DECL-SPEC. Since `proclaim' is a function, DECL-SPEC is evaluated and thus should normally be quoted. - - Special Form: declaim DECL-SPECS... + - Special Form: declaim decl-specs... This macro is like `proclaim', except that it takes any number of DECL-SPEC arguments, and the arguments are unevaluated and unquoted. The `declaim' macro also puts an `(eval-when (compile @@ -688,7 +687,7 @@ effectively be ignored. compiler treats the rest of the file that contains the `declaim' form.) - - Special Form: declare DECL-SPECS... + - Special Form: declare decl-specs... This macro is used to make declarations within functions and other code. Common Lisp allows declarations in various locations, generally at the beginning of any of the many "implicit `progn's" @@ -696,10 +695,10 @@ effectively be ignored. etc. Currently the only declaration understood by `declare' is `special'. - - Special Form: locally DECLARATIONS... FORMS... + - Special Form: locally declarations... forms... In this package, `locally' is no different from `progn'. - - Special Form: the TYPE FORM + - Special Form: the type form Type information provided by `the' is ignored in this package; in other words, `(the TYPE FORM)' is equivalent to FORM. Future versions of the optimizing byte-compiler may make use of this @@ -846,7 +845,7 @@ These functions augment the standard Emacs Lisp functions `get' and functions for working with property lists as first-class data structures not attached to particular symbols. - - Function: get* SYMBOL PROPERTY &optional DEFAULT + - Function: get* symbol property &optional default This function is like `get', except that if the property is not found, the DEFAULT argument provides the return value. (The Emacs Lisp `get' function always uses `nil' as the default; this @@ -855,7 +854,7 @@ structures not attached to particular symbols. The `get*' function is `setf'-able; when used in this fashion, the DEFAULT argument is allowed but ignored. - - Function: remprop SYMBOL PROPERTY + - Function: remprop symbol property This function removes the entry for PROPERTY from the property list of SYMBOL. It returns a true value if the property was indeed found and removed, or `nil' if there was no such property. @@ -865,7 +864,7 @@ structures not attached to particular symbols. was `nil'; thus, setting a property to `nil' was close enough to `remprop' for most purposes.) - - Function: getf PLACE PROPERTY &optional DEFAULT + - Function: getf place property &optional default This function scans the list PLACE as if it were a property list, i.e., a list of alternating property names and values. If an even-numbered element of PLACE is found which is `eq' to PROPERTY, @@ -896,7 +895,7 @@ structures not attached to particular symbols. When not used as a `setf' form, `getf' is just a regular function and its PLACE argument can actually be any Lisp expression. - - Special Form: remf PLACE PROPERTY + - Special Form: remf place property This macro removes the property-value pair for PROPERTY from the property list stored at PLACE, which is any `setf'-able place expression. It returns true if the property was found. Note that @@ -913,7 +912,7 @@ Creating Symbols These functions create unique symbols, typically for use as temporary variables. - - Function: gensym &optional X + - Function: gensym &optional x This function creates a new, uninterned symbol (using `make-symbol') with a unique name. (The name of an uninterned symbol is relevant only if the symbol is printed.) By default, @@ -937,9 +936,9 @@ variables. and uninterned symbols, so their names had to be treated more carefully. - - Function: gentemp &optional X + - Function: gentemp &optional x This function is like `gensym', except that it produces a new - *interned* symbol. If the symbol that is generated already + _interned_ symbol. If the symbol that is generated already exists, the function keeps incrementing the counter and trying again until a new symbol is generated. @@ -974,23 +973,23 @@ Predicates on Numbers These functions return `t' if the specified condition is true of the numerical argument, or `nil' otherwise. - - Function: plusp NUMBER + - Function: plusp number This predicate tests whether NUMBER is positive. It is an error if the argument is not a number. - - Function: minusp NUMBER + - Function: minusp number This predicate tests whether NUMBER is negative. It is an error if the argument is not a number. - - Function: oddp INTEGER + - Function: oddp integer This predicate tests whether INTEGER is odd. It is an error if the argument is not an integer. - - Function: evenp INTEGER + - Function: evenp integer This predicate tests whether INTEGER is even. It is an error if the argument is not an integer. - - Function: floatp-safe OBJECT + - Function: floatp-safe object This predicate tests whether OBJECT is a floating-point number. On systems that support floating-point, this is equivalent to `floatp'. On other systems, this always returns `nil'. @@ -1003,34 +1002,34 @@ Numerical Functions These functions perform various arithmetic operations on numbers. - - Function: abs NUMBER + - Function: abs number This function returns the absolute value of NUMBER. (Newer versions of Emacs provide this as a built-in function; this package defines `abs' only for Emacs 18 versions which don't provide it as a primitive.) - - Function: expt BASE POWER + - Function: expt base power This function returns BASE raised to the power of NUMBER. (Newer versions of Emacs provide this as a built-in function; this package defines `expt' only for Emacs 18 versions which don't provide it as a primitive.) - - Function: gcd &rest INTEGERS + - Function: gcd &rest integers This function returns the Greatest Common Divisor of the arguments. For one argument, it returns the absolute value of that argument. For zero arguments, it returns zero. - - Function: lcm &rest INTEGERS + - Function: lcm &rest integers This function returns the Least Common Multiple of the arguments. For one argument, it returns the absolute value of that argument. For zero arguments, it returns one. - - Function: isqrt INTEGER + - Function: isqrt integer This function computes the "integer square root" of its integer argument, i.e., the greatest integer less than or equal to the true square root of the argument. - - Function: floor* NUMBER &optional DIVISOR + - Function: floor* number &optional divisor This function implements the Common Lisp `floor' function. It is called `floor*' to avoid name conflicts with the simpler `floor' function built-in to Emacs 19. @@ -1055,31 +1054,31 @@ These functions perform various arithmetic operations on numbers. function, except that it returns the two results in a list since Emacs Lisp does not support multiple-valued functions. - - Function: ceiling* NUMBER &optional DIVISOR + - Function: ceiling* number &optional divisor This function implements the Common Lisp `ceiling' function, which is analogous to `floor' except that it rounds the argument or quotient of the arguments up toward plus infinity. The remainder will be between 0 and minus R. - - Function: truncate* NUMBER &optional DIVISOR + - Function: truncate* number &optional divisor This function implements the Common Lisp `truncate' function, which is analogous to `floor' except that it rounds the argument or quotient of the arguments toward zero. Thus it is equivalent to `floor*' if the argument or quotient is positive, or to `ceiling*' otherwise. The remainder has the same sign as NUMBER. - - Function: round* NUMBER &optional DIVISOR + - Function: round* number &optional divisor This function implements the Common Lisp `round' function, which is analogous to `floor' except that it rounds the argument or quotient of the arguments to the nearest integer. In the case of a tie (the argument or quotient is exactly halfway between two integers), it rounds to the even integer. - - Function: mod* NUMBER DIVISOR + - Function: mod* number divisor This function returns the same value as the second return value of `floor'. - - Function: rem* NUMBER DIVISOR + - Function: rem* number divisor This function returns the same value as the second return value of `truncate'. @@ -1099,7 +1098,7 @@ number generator. It uses its own additive-congruential algorithm, which is much more likely to give statistically clean random numbers than the simple generators supplied by many operating systems. - - Function: random* NUMBER &optional STATE + - Function: random* number &optional state This function returns a random nonnegative number less than NUMBER, and of the same type (either integer or floating-point). The STATE argument should be a `random-state' object which holds @@ -1116,7 +1115,7 @@ than the simple generators supplied by many operating systems. sequence generated from this variable will be irreproducible for all intents and purposes. - - Function: make-random-state &optional STATE + - Function: make-random-state &optional state This function creates or copies a `random-state' object. If STATE is omitted or `nil', it returns a new copy of `*random-state*'. This is a copy in the sense that future sequences of calls to @@ -1139,7 +1138,7 @@ than the simple generators supplied by many operating systems. later rerun, it can read the original run's random-state from the file. - - Function: random-state-p OBJECT + - Function: random-state-p object This predicate returns `t' if OBJECT is a `random-state' object, or `nil' otherwise. diff --git a/info/cl.info-4 b/info/cl.info-4 index 34e70ca..71656e9 100644 --- a/info/cl.info-4 +++ b/info/cl.info-4 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -71,7 +70,7 @@ the constants' names. - Variable: most-positive-float This constant equals the largest value a Lisp float can hold. For those systems whose arithmetic supports infinities, this is the - largest *finite* value. For IEEE machines, the value is + largest _finite_ value. For IEEE machines, the value is approximately `1.79e+308'. - Variable: most-negative-float @@ -84,7 +83,7 @@ the constants' names. supported or `2.22e-308' if not. - Variable: least-positive-normalized-float - This constant equals the smallest *normalized* Lisp float greater + This constant equals the smallest _normalized_ Lisp float greater than zero, i.e., the smallest value for which IEEE denormalization will not result in a loss of precision. For IEEE machines, this value is about `2.22e-308'. For machines that do not support the @@ -136,7 +135,7 @@ Sequence Basics =============== Many of the sequence functions take keyword arguments; *note Argument -Lists::.. All keyword arguments are optional and, if specified, may +Lists::. All keyword arguments are optional and, if specified, may appear in any order. The `:key' argument should be passed either `nil', or a function of @@ -155,7 +154,7 @@ the original sequence function arguments from which they are derived, or, if they both come from the same sequence, in the same order as they appear in that sequence.) The `:test' argument specifies a function which must return true (non-`nil') to indicate a match; instead, you -may use `:test-not' to give a function which returns *false* to +may use `:test-not' to give a function which returns _false_ to indicate a match. The default test function is `:test 'eql'. Many functions which take ITEM and `:test' or `:test-not' arguments @@ -188,7 +187,7 @@ elements. Therefore, it is a bad idea to depend on side effects of these functions. For example, `:from-end' may cause the sequence to be scanned actually in reverse, or it may be scanned forwards but computing a result "as if" it were scanned backwards. (Some functions, -like `mapcar*' and `every', *do* specify exactly the order in which the +like `mapcar*' and `every', _do_ specify exactly the order in which the function is called so side effects are perfectly acceptable in those cases.) @@ -208,7 +207,7 @@ These functions "map" the function you specify over the elements of lists or arrays. They are all variations on the theme of the built-in function `mapcar'. - - Function: mapcar* FUNCTION SEQ &rest MORE-SEQS + - Function: mapcar* function seq &rest more-seqs This function calls FUNCTION on successive parallel sets of elements from its argument sequences. Given a single SEQ argument it is equivalent to `mapcar'; given N sequences, it calls the @@ -224,7 +223,7 @@ function `mapcar'. argument. This package's `mapcar*' works as a compatible superset of both. - - Function: map RESULT-TYPE FUNCTION SEQ &rest MORE-SEQS + - Function: map result-type function seq &rest more-seqs This function maps FUNCTION over the argument sequences, just like `mapcar*', but it returns a sequence of type RESULT-TYPE rather than a list. RESULT-TYPE must be one of the following symbols: @@ -232,7 +231,7 @@ function `mapcar'. as for `mapcar*'), or `nil' (in which case the results are thrown away and `map' returns `nil'). - - Function: maplist FUNCTION LIST &rest MORE-LISTS + - Function: maplist function list &rest more-lists This function calls FUNCTION on each of its argument lists, then on the `cdr's of those lists, and so on, until the shortest list runs out. The results are returned in the form of a list. Thus, @@ -240,26 +239,26 @@ function `mapcar'. pointers themselves rather than the `car's of the advancing pointers. - - Function: mapc FUNCTION SEQ &rest MORE-SEQS + - Function: mapc function seq &rest more-seqs This function is like `mapcar*', except that the values returned by FUNCTION are ignored and thrown away rather than being collected into a list. The return value of `mapc' is SEQ, the first sequence. - - Function: mapl FUNCTION LIST &rest MORE-LISTS + - Function: mapl function list &rest more-lists This function is like `maplist', except that it throws away the values returned by FUNCTION. - - Function: mapcan FUNCTION SEQ &rest MORE-SEQS + - Function: mapcan function seq &rest more-seqs This function is like `mapcar*', except that it concatenates the return values (which must be lists) using `nconc', rather than simply collecting them into a list. - - Function: mapcon FUNCTION LIST &rest MORE-LISTS + - Function: mapcon function list &rest more-lists This function is like `maplist', except that it concatenates the return values using `nconc'. - - Function: some PREDICATE SEQ &rest MORE-SEQS + - Function: some predicate seq &rest more-seqs This function calls PREDICATE on each element of SEQ in turn; if PREDICATE returns a non-`nil' value, `some' returns that value, otherwise it returns `nil'. Given several sequence arguments, it @@ -268,24 +267,24 @@ function `mapcar'. order in which the elements are visited, and on the fact that mapping stops immediately as soon as PREDICATE returns non-`nil'. - - Function: every PREDICATE SEQ &rest MORE-SEQS + - Function: every predicate seq &rest more-seqs This function calls PREDICATE on each element of the sequence(s) in turn; it returns `nil' as soon as PREDICATE returns `nil' for any element, or `t' if the predicate was true for all elements. - - Function: notany PREDICATE SEQ &rest MORE-SEQS + - Function: notany predicate seq &rest more-seqs This function calls PREDICATE on each element of the sequence(s) in turn; it returns `nil' as soon as PREDICATE returns a non-`nil' value for any element, or `t' if the predicate was `nil' for all elements. - - Function: notevery PREDICATE SEQ &rest MORE-SEQS + - Function: notevery predicate seq &rest more-seqs This function calls PREDICATE on each element of the sequence(s) in turn; it returns a non-`nil' value as soon as PREDICATE returns `nil' for any element, or `t' if the predicate was true for all elements. - - Function: reduce FUNCTION SEQ &key :from-end :start :end + - Function: reduce function seq &key :from-end :start :end :initial-value :key This function combines the elements of SEQ using an associative binary operation. Suppose FUNCTION is `*' and SEQ is the list `(2 @@ -308,7 +307,7 @@ function `mapcar'. If `:initial-value' is specified, it is effectively added to the front (or rear in the case of `:from-end') of the sequence. The - `:key' function is *not* applied to the initial value. + `:key' function is _not_ applied to the initial value. If the sequence, including the initial value, has exactly one element then that element is returned without ever calling @@ -329,7 +328,7 @@ Sequence Functions This section describes a number of Common Lisp functions for operating on sequences. - - Function: subseq SEQUENCE START &optional END + - Function: subseq sequence start &optional end This function returns a given subsequence of the argument SEQUENCE, which may be a list, string, or vector. The indices START and END must be in range, and START must be no greater than @@ -340,25 +339,25 @@ on sequences. As an extension to Common Lisp, START and/or END may be negative, in which case they represent a distance back from the end of the sequence. This is for compatibility with Emacs' `substring' - function. Note that `subseq' is the *only* sequence function that + function. Note that `subseq' is the _only_ sequence function that allows negative START and END. You can use `setf' on a `subseq' form to replace a specified range of elements with elements from another sequence. The replacement is done as if by `replace', described below. - - Function: concatenate RESULT-TYPE &rest SEQS + - Function: concatenate result-type &rest seqs This function concatenates the argument sequences together to form a result sequence of type RESULT-TYPE, one of the symbols `vector', `string', or `list'. The arguments are always copied, even in cases such as `(concatenate 'list '(1 2 3))' where the result is identical to an argument. - - Function: fill SEQ ITEM &key :start :end + - Function: fill seq item &key :start :end This function fills the elements of the sequence (or the specified part of the sequence) with the value ITEM. - - Function: replace SEQ1 SEQ2 &key :start1 :end1 :start2 :end2 + - Function: replace seq1 seq2 &key :start1 :end1 :start2 :end2 This function copies part of SEQ2 into part of SEQ1. The sequence SEQ1 is not stretched or resized; the amount of data copied is simply the shorter of the source and destination (sub)sequences. @@ -370,7 +369,7 @@ on sequences. share storage but are not `eq', and the start and end arguments specify overlapping regions, the effect is undefined. - - Function: remove* ITEM SEQ &key :test :test-not :key :count :start + - Function: remove* item seq &key :test :test-not :key :count :start :end :from-end This returns a copy of SEQ with all elements matching ITEM removed. The result may share storage with or be `eq' to SEQ in @@ -386,7 +385,7 @@ on sequences. sequence rather than the beginning (this matters only if COUNT was also specified). - - Function: delete* ITEM SEQ &key :test :test-not :key :count :start + - Function: delete* item seq &key :test :test-not :key :count :start :end :from-end This deletes all elements of SEQ which match ITEM. It is a destructive operation. Since Emacs Lisp does not support @@ -400,22 +399,22 @@ on sequences. The predicate-oriented functions `remove-if', `remove-if-not', `delete-if', and `delete-if-not' are defined similarly. - - Function: delete ITEM LIST + - Function: delete item list This MacLisp-compatible function deletes from LIST all elements which are `equal' to ITEM. The `delete' function is built-in to Emacs 19; this package defines it equivalently in Emacs 18. - - Function: remove ITEM LIST + - Function: remove item list This function removes from LIST all elements which are `equal' to ITEM. This package defines it for symmetry with `delete', even though `remove' is not built-in to Emacs 19. - - Function: remq ITEM LIST + - Function: remq item list This function removes from LIST all elements which are `eq' to ITEM. This package defines it for symmetry with `delq', even though `remq' is not built-in to Emacs 19. - - Function: remove-duplicates SEQ &key :test :test-not :key :start + - Function: remove-duplicates seq &key :test :test-not :key :start :end :from-end This function returns a copy of SEQ with duplicate elements removed. Specifically, if two elements from the sequence match @@ -425,19 +424,19 @@ on sequences. specified, only elements within that subsequence are examined or removed. - - Function: delete-duplicates SEQ &key :test :test-not :key :start + - Function: delete-duplicates seq &key :test :test-not :key :start :end :from-end This function deletes duplicate elements from SEQ. It is a destructive version of `remove-duplicates'. - - Function: substitute NEW OLD SEQ &key :test :test-not :key :count + - Function: substitute new old seq &key :test :test-not :key :count :start :end :from-end This function returns a copy of SEQ, with all elements matching OLD replaced with NEW. The `:count', `:start', `:end', and `:from-end' arguments may be used to limit the number of substitutions made. - - Function: nsubstitute NEW OLD SEQ &key :test :test-not :key :count + - Function: nsubstitute new old seq &key :test :test-not :key :count :start :end :from-end This is a destructive version of `substitute'; it performs the substitution using `setcar' or `aset' rather than by returning a @@ -454,9 +453,9 @@ Searching Sequences =================== These functions search for elements or subsequences in a sequence. -(See also `member*' and `assoc*'; *note Lists::..) +(See also `member*' and `assoc*'; *note Lists::.) - - Function: find ITEM SEQ &key :test :test-not :key :start :end + - Function: find item seq &key :test :test-not :key :start :end :from-end This function searches SEQ for an element matching ITEM. If it finds a match, it returns the matching element. Otherwise, it @@ -465,7 +464,7 @@ These functions search for elements or subsequences in a sequence. `:start' and `:end' arguments may be used to limit the range of elements that are searched. - - Function: position ITEM SEQ &key :test :test-not :key :start :end + - Function: position item seq &key :test :test-not :key :start :end :from-end This function is like `find', except that it returns the integer position in the sequence of the matching item rather than the item @@ -473,14 +472,14 @@ These functions search for elements or subsequences in a sequence. a whole, even if `:start' is non-zero. The function returns `nil' if no matching element was found. - - Function: count ITEM SEQ &key :test :test-not :key :start :end + - Function: count item seq &key :test :test-not :key :start :end This function returns the number of elements of SEQ which match ITEM. The result is always a nonnegative integer. The `find-if', `find-if-not', `position-if', `position-if-not', `count-if', and `count-if-not' functions are defined similarly. - - Function: mismatch SEQ1 SEQ2 &key :test :test-not :key :start1 :end1 + - Function: mismatch seq1 seq2 &key :test :test-not :key :start1 :end1 :start2 :end2 :from-end This function compares the specified parts of SEQ1 and SEQ2. If they are the same length and the corresponding elements match @@ -499,7 +498,7 @@ These functions search for elements or subsequences in a sequence. An interesting example is `(mismatch str1 str2 :key 'upcase)', which compares two strings case-insensitively. - - Function: search SEQ1 SEQ2 &key :test :test-not :key :from-end + - Function: search seq1 seq2 &key :test :test-not :key :from-end :start1 :end1 :start2 :end2 This function searches SEQ2 for a subsequence that matches SEQ1 (or part of it specified by `:start1' and `:end1'.) Only matches @@ -507,7 +506,7 @@ These functions search for elements or subsequences in a sequence. `:end2' will be considered. The return value is the index of the leftmost element of the leftmost match, relative to the start of SEQ2, or `nil' if no matches were found. If `:from-end' is true, - the function finds the *rightmost* matching subsequence. + the function finds the _rightmost_ matching subsequence.  File: cl.info, Node: Sorting Sequences, Prev: Searching Sequences, Up: Sequences @@ -515,7 +514,7 @@ File: cl.info, Node: Sorting Sequences, Prev: Searching Sequences, Up: Sequen Sorting Sequences ================= - - Function: sort* SEQ PREDICATE &key :key + - Function: sort* seq predicate &key :key This function sorts SEQ into increasing order as determined by using PREDICATE to compare pairs of elements. PREDICATE should return true (non-`nil') if and only if its first argument is less @@ -538,7 +537,7 @@ Sorting Sequences The `sort*' function is destructive; it sorts lists by actually rearranging the `cdr' pointers in suitable fashion. - - Function: stable-sort SEQ PREDICATE &key :key + - Function: stable-sort seq predicate &key :key This function sorts SEQ "stably", meaning two elements which are equal in terms of PREDICATE are guaranteed not to be rearranged out of their original order by the sort. @@ -548,7 +547,7 @@ Sorting Sequences However, this package reserves the right to use non-stable methods for `sort*' in the future. - - Function: merge TYPE SEQ1 SEQ2 PREDICATE &key :key + - Function: merge type seq1 seq2 predicate &key :key This function merges two sequences SEQ1 and SEQ2 by interleaving their elements. The result sequence, of type TYPE (in the sense of `concatenate'), has length equal to the sum of the lengths of @@ -586,54 +585,54 @@ List Functions This section describes a number of simple operations on lists, i.e., chains of cons cells. - - Function: caddr X + - Function: caddr x This function is equivalent to `(car (cdr (cdr X)))'. Likewise, this package defines all 28 `cXXXr' functions where XXX is up to four `a's and/or `d's. All of these functions are `setf'-able, and calls to them are expanded inline by the byte-compiler for maximum efficiency. - - Function: first X + - Function: first x This function is a synonym for `(car X)'. Likewise, the functions `second', `third', ..., through `tenth' return the given element of the list X. - - Function: rest X + - Function: rest x This function is a synonym for `(cdr X)'. - - Function: endp X + - Function: endp x Common Lisp defines this function to act like `null', but signalling an error if `x' is neither a `nil' nor a cons cell. This package simply defines `endp' as a synonym for `null'. - - Function: list-length X + - Function: list-length x This function returns the length of list X, exactly like `(length X)', except that if X is a circular list (where the cdr-chain forms a loop rather than terminating with `nil'), this function returns `nil'. (The regular `length' function would get stuck if given a circular list.) - - Function: last X &optional N + - Function: last x &optional n This function returns the last cons, or the Nth-to-last cons, of the list X. If N is omitted it defaults to 1. The "last cons" means the first cons cell of the list whose `cdr' is not another cons cell. (For normal lists, the `cdr' of the last cons will be `nil'.) This function returns `nil' if X is `nil' or shorter than - N. Note that the last *element* of the list is `(car (last X))'. + N. Note that the last _element_ of the list is `(car (last X))'. - - Function: butlast X &optional N + - Function: butlast x &optional n This function returns the list X with the last element, or the last N elements, removed. If N is greater than zero it makes a copy of the list so as not to damage the original list. In general, `(append (butlast X N) (last X N))' will return a list equal to X. - - Function: nbutlast X &optional N + - Function: nbutlast x &optional n This is a version of `butlast' that works by destructively modifying the `cdr' of the appropriate element, rather than making a copy of the list. - - Function: list* ARG &rest OTHERS + - Function: list* arg &rest others This function constructs a list of its arguments. The final argument becomes the `cdr' of the last cell constructed. Thus, `(list* A B C)' is equivalent to `(cons A (cons B C))', and @@ -643,7 +642,7 @@ chains of cons cells. it is not a name invented for this package like `member*' or `defun*'.) - - Function: ldiff LIST SUBLIST + - Function: ldiff list sublist If SUBLIST is a sublist of LIST, i.e., is `eq' to one of the cons cells of LIST, then this function returns a copy of the part of LIST up to but not including SUBLIST. For example, `(ldiff x @@ -651,11 +650,11 @@ chains of cons cells. result is a copy; the original LIST is not modified. If SUBLIST is not a sublist of LIST, a copy of the entire LIST is returned. - - Function: copy-list LIST + - Function: copy-list list This function returns a copy of the list LIST. It copies dotted lists like `(1 2 . 3)' correctly. - - Function: copy-tree X &optional VECP + - Function: copy-tree x &optional vecp This function returns a copy of the tree of cons cells X. Unlike `copy-sequence' (and its alias `copy-list'), which copies only along the `cdr' direction, this function copies (recursively) @@ -664,7 +663,7 @@ chains of cons cells. VECP argument is true, this function copies vectors (recursively) as well as cons cells. - - Function: tree-equal X Y &key :test :test-not :key + - Function: tree-equal x y &key :test :test-not :key This function compares two trees of cons cells. If X and Y are both cons cells, their `car's and `cdr's are compared recursively. If neither X nor Y is a cons cell, they are compared by `eql', or @@ -682,7 +681,7 @@ These functions substitute elements throughout a tree of cons cells. (*Note Sequence Functions::, for the `substitute' function, which works on just the top-level elements of a list.) - - Function: subst NEW OLD TREE &key :test :test-not :key + - Function: subst new old tree &key :test :test-not :key This function substitutes occurrences of OLD with NEW in TREE, a tree of cons cells. It returns a substituted tree, which will be a copy except that it may share storage with the argument TREE in @@ -695,20 +694,20 @@ on just the top-level elements of a list.) test (`eql' by default). The `:key' function is applied to the elements of the tree but not to OLD. - - Function: nsubst NEW OLD TREE &key :test :test-not :key + - Function: nsubst new old tree &key :test :test-not :key This function is like `subst', except that it works by destructive modification (by `setcar' or `setcdr') rather than copying. The `subst-if', `subst-if-not', `nsubst-if', and `nsubst-if-not' functions are defined similarly. - - Function: sublis ALIST TREE &key :test :test-not :key + - Function: sublis alist tree &key :test :test-not :key This function is like `subst', except that it takes an association list ALIST of OLD-NEW pairs. Each element of the tree (after applying the `:key' function, if any), is compared with the `car's of ALIST; if it matches, it is replaced by the corresponding `cdr'. - - Function: nsublis ALIST TREE &key :test :test-not :key + - Function: nsublis alist tree &key :test :test-not :key This is a destructive version of `sublis'.  @@ -720,13 +719,13 @@ Lists as Sets These functions perform operations on lists which represent sets of elements. - - Function: member ITEM LIST + - Function: member item list This MacLisp-compatible function searches LIST for an element which is `equal' to ITEM. The `member' function is built-in to Emacs 19; this package defines it equivalently in Emacs 18. See the following function for a Common-Lisp compatible version. - - Function: member* ITEM LIST &key :test :test-not :key + - Function: member* item list &key :test :test-not :key This function searches LIST for an element matching ITEM. If a match is found, it returns the cons cell whose `car' was the matching element. Otherwise, it returns `nil'. Elements are @@ -742,11 +741,11 @@ elements. The `member-if' and `member-if-not' functions analogously search for elements which satisfy a given predicate. - - Function: tailp SUBLIST LIST + - Function: tailp sublist list This function returns `t' if SUBLIST is a sublist of LIST, i.e., if SUBLIST is `eql' to LIST or to any of its `cdr's. - - Function: adjoin ITEM LIST &key :test :test-not :key + - Function: adjoin item list &key :test :test-not :key This function conses ITEM onto the front of LIST, like `(cons ITEM LIST)', but only if ITEM is not already present on the list (as determined by `member*'). If a `:key' argument is specified, it @@ -754,7 +753,7 @@ elements which satisfy a given predicate. search, on the reasoning that ITEM is "about" to become part of the list. - - Function: union LIST1 LIST2 &key :test :test-not :key + - Function: union list1 list2 &key :test :test-not :key This function combines two lists which represent sets of items, returning a list that represents the union of those two sets. The result list will contain all items which appear in LIST1 or LIST2, @@ -764,38 +763,38 @@ elements which satisfy a given predicate. result list. The order of elements in the result list is also undefined. - - Function: nunion LIST1 LIST2 &key :test :test-not :key + - Function: nunion list1 list2 &key :test :test-not :key This is a destructive version of `union'; rather than copying, it tries to reuse the storage of the argument lists if possible. - - Function: intersection LIST1 LIST2 &key :test :test-not :key + - Function: intersection list1 list2 &key :test :test-not :key This function computes the intersection of the sets represented by LIST1 and LIST2. It returns the list of items which appear in both LIST1 and LIST2. - - Function: nintersection LIST1 LIST2 &key :test :test-not :key + - Function: nintersection list1 list2 &key :test :test-not :key This is a destructive version of `intersection'. It tries to - reuse storage of LIST1 rather than copying. It does *not* reuse + reuse storage of LIST1 rather than copying. It does _not_ reuse the storage of LIST2. - - Function: set-difference LIST1 LIST2 &key :test :test-not :key + - Function: set-difference list1 list2 &key :test :test-not :key This function computes the "set difference" of LIST1 and LIST2, - i.e., the set of elements that appear in LIST1 but *not* in LIST2. + i.e., the set of elements that appear in LIST1 but _not_ in LIST2. - - Function: nset-difference LIST1 LIST2 &key :test :test-not :key + - Function: nset-difference list1 list2 &key :test :test-not :key This is a destructive `set-difference', which will try to reuse LIST1 if possible. - - Function: set-exclusive-or LIST1 LIST2 &key :test :test-not :key + - Function: set-exclusive-or list1 list2 &key :test :test-not :key This function computes the "set exclusive or" of LIST1 and LIST2, i.e., the set of elements that appear in exactly one of LIST1 and LIST2. - - Function: nset-exclusive-or LIST1 LIST2 &key :test :test-not :key + - Function: nset-exclusive-or list1 list2 &key :test :test-not :key This is a destructive `set-exclusive-or', which will try to reuse LIST1 and LIST2 if possible. - - Function: subsetp LIST1 LIST2 &key :test :test-not :key + - Function: subsetp list1 list2 &key :test :test-not :key This function checks whether LIST1 represents a subset of LIST2, i.e., whether every element of LIST1 also appears in LIST2. @@ -809,7 +808,7 @@ An "association list" is a list representing a mapping from one set of values to another; any list whose elements are cons cells is an association list. - - Function: assoc* ITEM A-LIST &key :test :test-not :key + - Function: assoc* item a-list &key :test :test-not :key This function searches the association list A-LIST for an element whose `car' matches (in the sense of `:test', `:test-not', and `:key', or by comparison with `eql') a given ITEM. It returns the @@ -819,12 +818,12 @@ association list. `assoc' ignores `nil's but considers any other non-cons elements of A-LIST to be an error.) - - Function: rassoc* ITEM A-LIST &key :test :test-not :key + - Function: rassoc* item a-list &key :test :test-not :key This function searches for an element whose `cdr' matches ITEM. If A-LIST represents a mapping, this applies the inverse of the mapping to ITEM. - - Function: rassoc ITEM A-LIST + - Function: rassoc item a-list This function searches like `rassoc*' with a `:test' argument of `equal'. It is analogous to Emacs Lisp's standard `assoc' function, which derives from the MacLisp rather than the Common @@ -835,10 +834,10 @@ functions are defined similarly. Two simple functions for constructing association lists are: - - Function: acons KEY VALUE ALIST + - Function: acons key value alist This is equivalent to `(cons (cons KEY VALUE) ALIST)'. - - Function: pairlis KEYS VALUES &optional ALIST + - Function: pairlis keys values &optional alist This is equivalent to `(nconc (mapcar* 'cons KEYS VALUES) ALIST)'.  diff --git a/info/cl.info-5 b/info/cl.info-5 index 6ea0a18..a2351b0 100644 --- a/info/cl.info-5 +++ b/info/cl.info-5 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -46,7 +45,7 @@ provides no way to create new distinct types, this package implements structures as vectors (or lists upon request) with a special "tag" symbol to identify them. - - Special Form: defstruct NAME SLOTS... + - Special Form: defstruct name slots... The `defstruct' form defines a new structure type called NAME, with the specified SLOTS. (The SLOTS may begin with a string which documents the structure type.) In the simplest case, NAME @@ -169,7 +168,7 @@ symbol to identify them. descriptor. It is legal to include arguments which don't correspond to slot names; these are useful if they are referred to in the defaults for optional, keyword, or `&aux' - arguments which *do* correspond to slots. + arguments which _do_ correspond to slots. You can specify any number of full-format `:constructor' options on a structure. The default constructor is still @@ -354,7 +353,7 @@ is less than 3, then the byte-compiler will optimize away the following assertions. Because assertions might be optimized away, it is a bad idea for them to include side-effects. - - Special Form: assert TEST-FORM [SHOW-ARGS STRING ARGS...] + - Special Form: assert test-form [show-args string args...] This form verifies that TEST-FORM is true (i.e., evaluates to a non-`nil' value). If so, it returns `nil'. If the test is not satisfied, `assert' signals an error. @@ -376,7 +375,7 @@ idea for them to include side-effects. Emacs Lisp does not support continuable errors, it makes no sense to specify PLACES. - - Special Form: check-type FORM TYPE [STRING] + - Special Form: check-type form type [string] This form verifies that FORM evaluates to a value of type TYPE. If so, it returns `nil'. If not, `check-type' signals a `wrong-type-argument' error. The default error message lists the @@ -395,7 +394,7 @@ idea for them to include side-effects. The following error-related macro is also defined: - - Special Form: ignore-errors FORMS... + - Special Form: ignore-errors forms... This executes FORMS exactly like a `progn', except that errors are ignored during the FORMS. More precisely, if an error is signalled then `ignore-errors' immediately aborts execution of the @@ -428,7 +427,7 @@ which are the most efficient ways of doing these respective operations in Lisp. Thus, there is no performance penalty for using the more readable `incf' and `push' forms in your compiled code. - *Interpreted* code, on the other hand, must expand these macros + _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 "Special Form" instead of "Function" in this manual @@ -440,7 +439,7 @@ thrown away a hundred times. You can find out how a macro expands by using the `cl-prettyexpand' function. - - Function: cl-prettyexpand FORM &optional FULL + - Function: cl-prettyexpand form &optional full This function takes a single Lisp form as an argument and inserts a nicely formatted copy of it in the current buffer (which must be in Lisp mode so that indentation works properly). It also expands @@ -465,7 +464,7 @@ function. just leaves it alone. The temporary variable `G1004' was created by `gensym'.) - If the optional argument FULL is true, then *all* macros are + If the optional argument FULL is true, then _all_ macros are expanded, including `block', `eval-when', and compiler macros. Expansion is done as if FORM were a top-level form in a file being compiled. For example, @@ -508,7 +507,7 @@ Functions taking keyword arguments will accept an odd number of arguments, treating the trailing keyword as if it were followed by the value `nil'. - Argument lists (as processed by `defun*' and friends) *are* checked + Argument lists (as processed by `defun*' and friends) _are_ checked rigorously except for the minor point just mentioned; in particular, keyword arguments are checked for validity, and `&allow-other-keys' and `:allow-other-keys' are fully implemented. Keyword validity checking @@ -532,7 +531,7 @@ top-level context. The patch will not harm versions of the Emacs 18 compiler which have already had a similar patch applied, nor will it affect the optimizing Emacs 19 byte-compiler written by Jamie Zawinski and Hallvard Furuseth. The patch is applied to the byte compiler's -code in Emacs' memory, *not* to the `bytecomp.elc' file stored on disk. +code in Emacs' memory, _not_ to the `bytecomp.elc' file stored on disk. The Emacs 19 compiler (for Emacs 18) is available from various Emacs Lisp archive sites such as `archive.cis.ohio-state.edu'. Its use is @@ -564,13 +563,13 @@ lists). In order to allow an efficient implementation, keyword arguments use a slightly cheesy parser which may be confused if a keyword symbol is -passed as the *value* of another keyword argument. (Specifically, +passed as the _value_ of another keyword argument. (Specifically, `(memq :KEYWORD REST-OF-ARGUMENTS)' is used to scan for `:KEYWORD' among the supplied keyword arguments.) The `eql' and `equal' predicates do not distinguish between IEEE floating-point plus and minus zero. The `equalp' predicate has several -differences with Common Lisp; *note Predicates::.. +differences with Common Lisp; *note Predicates::. The `setf' mechanism is entirely compatible, except that setf-methods return a list of five values rather than five values @@ -591,7 +590,7 @@ since Emacs Lisp cannot support multiple return values directly. The macros will be compatible with Common Lisp if `values' or `values-list' is always used to return to a `multiple-value-bind' or other multiple-value receiver; if `values' is used without -`multiple-value-...' or vice-versa the effect will be different from +`multiple-value-...' or vice-versa the effect will be different from Common Lisp. Many Common Lisp declarations are ignored, and others match the @@ -709,7 +708,7 @@ an Emacs implementation of true Common Lisp. Some of the remaining differences between Emacs Lisp and Common Lisp make it difficult to port large Common Lisp applications to Emacs. For one, some of the features in this package are not fully compliant with ANSI or Steele; -*note Common Lisp Compatibility::.. But there are also quite a few +*note Common Lisp Compatibility::. But there are also quite a few features that this package does not provide at all. Here are some major omissions that you will want watch out for when bringing Common Lisp code into Emacs. diff --git a/info/cl.info-6 b/info/cl.info-6 index 09892f7..6f6dd9c 100644 --- a/info/cl.info-6 +++ b/info/cl.info-6 @@ -1,5 +1,4 @@ -This is Info file ../info/cl.info, produced by Makeinfo version 1.68 -from the input file cl.texi. +This is ../info/cl.info, produced by makeinfo version 4.0 from cl.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -126,8 +125,8 @@ Function Index * list-length: List Functions. * load-time-value: Time of Evaluation. * locally: Declarations. -* loop <1>: Iteration. -* loop: Loop Basics. +* loop <1>: Loop Basics. +* loop: Iteration. * macrolet: Macro Bindings. * make-random-state: Random Numbers. * map: Mapping over Sequences. diff --git a/info/custom.info b/info/custom.info index ccf40ba..6e119d0 100644 --- a/info/custom.info +++ b/info/custom.info @@ -1,5 +1,5 @@ -This is Info file ../info/custom.info, produced by Makeinfo version -1.68 from the input file custom.texi. +This is ../info/custom.info, produced by makeinfo version 3.12s from +custom.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -58,7 +58,7 @@ Declaring Groups Use `defgroup' to declare new customization groups. - - Function: defgroup SYMBOL MEMBERS DOC [KEYWORD VALUE]... + - Function: defgroup symbol members doc [keyword value]... Declare SYMBOL as a customization group containing MEMBERS. SYMBOL does not need to be quoted. @@ -89,7 +89,7 @@ Declaring Variables Use `defcustom' to declare user editable variables. - - Function: defcustom SYMBOL VALUE DOC [KEYWORD VALUE]... + - Function: defcustom symbol value doc [keyword value]... Declare SYMBOL as a customizable variable that defaults to VALUE. Neither SYMBOL nor VALUE needs to be quoted. If SYMBOL is not already bound, initialize it to VALUE. @@ -156,7 +156,7 @@ default value, `saved-value' for a value saved by the user, and Use `custom-add-option' to specify that a specific function is useful as an member of a hook. - - Function: custom-add-option SYMBOL OPTION + - Function: custom-add-option symbol option To the variable SYMBOL add OPTION. If SYMBOL is a hook variable, OPTION should be a hook member. For @@ -170,7 +170,7 @@ Declaring Faces Faces are declared with `defface'. - - Function: defface FACE SPEC DOC [KEYWORD VALUE]... + - Function: defface face spec doc [keyword value]... Declare FACE as a customizable face that defaults to SPEC. FACE does not need to be quoted. @@ -225,7 +225,7 @@ subgroups, with each subgroup being member of the top level group. The top level group for the package should itself be member of one or more of the standard customization groups. There exists a group for -each *finder* keyword. Press `C-h p' to see a list of finder keywords, +each _finder_ keyword. Press `C-h p' to see a list of finder keywords, and add you group to each of them, using the `:group' keyword.  @@ -240,18 +240,18 @@ Utilities Widget type for specifying the info manual entry for a customization option. It takes one argument, an info address. - - Function: custom-add-to-group GROUP MEMBER WIDGET + - Function: custom-add-to-group group member widget To existing GROUP add a new MEMBER of type WIDGET, If there already is an entry for that member, overwrite it. - - Function: custom-add-link SYMBOL WIDGET + - Function: custom-add-link symbol widget To the custom option SYMBOL add the link WIDGET. - - Function: custom-add-load SYMBOL LOAD + - Function: custom-add-load symbol load To the custom option SYMBOL add the dependency LOAD. LOAD should be either a library file name, or a feature name. - - Function: customize-menu-create SYMBOL &optional NAME + - Function: customize-menu-create symbol &optional name Create menu for customization group SYMBOL. If optional NAME is given, use that as the name of the menu. Otherwise the menu will be named `Customize'. The menu is in a format applicable to @@ -378,15 +378,16 @@ Wishlist Add colors. +  Tag Table: -Node: Top230 -Node: Declaring Groups1651 -Node: Declaring Variables2752 -Node: Declaring Faces5843 -Node: Usage for Package Authors7541 -Node: Utilities8320 -Node: The Init File9404 -Node: Wishlist9856 +Node: Top206 +Node: Declaring Groups1627 +Node: Declaring Variables2728 +Node: Declaring Faces5819 +Node: Usage for Package Authors7517 +Node: Utilities8296 +Node: The Init File9380 +Node: Wishlist9832  End Tag Table diff --git a/info/emodules.info b/info/emodules.info index f81e90f..6de33b4 100644 --- a/info/emodules.info +++ b/info/emodules.info @@ -1,5 +1,5 @@ -This is Info file ../info/emodules.info, produced by Makeinfo version -1.68 from the input file emodules.texi. +This is ../info/emodules.info, produced by makeinfo version 3.12s from +emodules.texi. This file documents the module loading technology of XEmacs. @@ -47,7 +47,7 @@ support documentation. * Defining Variables:: Creating new Lisp variables * Index:: Concept Index - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Annatomy of a Module @@ -244,7 +244,7 @@ place-holder, not an actual function name. `syms_of_module' This required function is responsible for introducing to the Lisp reader all functions that you have defined in your module using - `DEFUN()'. Note that *only* functions are declared here, using + `DEFUN()'. Note that _only_ functions are declared here, using the `DEFSUBR()' macro. No variables are declared. `vars_of_module' @@ -276,7 +276,7 @@ Required Variables Not only does a module need to declare the initialization functions mentioned above, it is also required to provide certain variables which the module loading code searches for in order to determine the viability -of a module. You are *not* required to provide these variables in your +of a module. You are _not_ required to provide these variables in your source files. They are automatically set up in the module initialization file by the `ellcc' compiler. These variables are discussed here simply for the sake of completeness. @@ -820,7 +820,7 @@ initialization function using special XEmacs macros such as how to use these macros is to look at existing source code, or read the internals manual. - One *very* important difference between XEmacs variables and module + One _very_ important difference between XEmacs variables and module variables is how you use pure space. Simply put, you *never* use pure space in XEmacs modules. The pure space storage is of a limited size, and is initialized propperly during the dumping of XEmacs. Because @@ -880,9 +880,9 @@ Index * documentation <1>: Initialization Mode. * documentation: Introduction. * DSO: Introduction. -* ellcc <1>: Introduction. -* ellcc: Using ellcc. * ELLCC: Environment Variables. +* ellcc <1>: Using ellcc. +* ellcc: Introduction. * ELLCFLAGS: Environment Variables. * ELLDLLFLAGS: Environment Variables. * ELLLD: Environment Variables. @@ -901,16 +901,16 @@ Index * header files: Introduction. * help: Introduction. * include files: Required Header File. -* initialization <1>: Required Variables. -* initialization <2>: Initialization Mode. +* initialization <1>: Initialization Mode. +* initialization <2>: Required Variables. * initialization: Required Functions. * linker: Introduction. * linking: Link Mode. * module compiler: Using ellcc. * module format: Annatomy of a Module. * module skeleton: Annatomy of a Module. -* modules_of_module <1>: Required Functions. -* modules_of_module: Loading other Modules. +* modules_of_module <1>: Loading other Modules. +* modules_of_module: Required Functions. * objects, defining: Defining Variables. * objects, Lisp: Defining Variables. * paths: Other ellcc options. @@ -930,23 +930,23 @@ Index  Tag Table: -Node: Top1562 -Node: Introduction2908 -Node: Annatomy of a Module7417 -Node: Required Header File8233 -Node: Required Functions10154 -Node: Required Variables12403 -Node: Loading other Modules15090 -Node: Using ellcc17148 -Node: Compile Mode18943 -Node: Initialization Mode20311 -Node: Link Mode25343 -Node: Other ellcc options26490 -Node: Environment Variables29070 -Node: Defining Functions30761 -Node: Using DEFUN32772 -Node: Declaring Functions34483 -Node: Defining Variables35826 -Node: Index38071 +Node: Top1538 +Node: Introduction2886 +Node: Annatomy of a Module7395 +Node: Required Header File8211 +Node: Required Functions10132 +Node: Required Variables12381 +Node: Loading other Modules15068 +Node: Using ellcc17126 +Node: Compile Mode18921 +Node: Initialization Mode20289 +Node: Link Mode25321 +Node: Other ellcc options26468 +Node: Environment Variables29048 +Node: Defining Functions30739 +Node: Using DEFUN32750 +Node: Declaring Functions34461 +Node: Defining Variables35804 +Node: Index38049  End Tag Table diff --git a/info/external-widget.info b/info/external-widget.info index def4c1b..e7ebc60 100644 --- a/info/external-widget.info +++ b/info/external-widget.info @@ -1,5 +1,5 @@ -This is Info file ../info/external-widget.info, produced by Makeinfo -version 1.68 from the input file external-widget.texi. +This is ../info/external-widget.info, produced by makeinfo version 4.0 +from external-widget.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -129,9 +129,9 @@ are not seen by Emacs.  Tag Table: -Node: Top258 -Node: Using an External Client Widget688 -Node: External Client Widget Resource Settings2403 -Node: Motif-Specific Info About the External Client Widget5146 +Node: Top232 +Node: Using an External Client Widget662 +Node: External Client Widget Resource Settings2377 +Node: Motif-Specific Info About the External Client Widget5120  End Tag Table diff --git a/info/info.info b/info/info.info index ff9d60e..b81e791 100644 --- a/info/info.info +++ b/info/info.info @@ -1,5 +1,5 @@ -This is Info file ../info/info.info, produced by Makeinfo version 1.68 -from the input file info.texi. +This is ../info/info.info, produced by makeinfo version 3.12s from +info.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -9,7 +9,7 @@ END-INFO-DIR-ENTRY This file describes how to use Info, the on-line, menu-driven GNU documentation system. - Copyright (C) 1989, 92, 96, 97 Free Software Foundation, Inc. + Copyright (C) 1989, 92, 96, 97, 98, 99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -31,20 +31,17 @@ File: info.info, Node: Top, Next: Getting Started, Up: (dir) Info: An Introduction ********************* - Info is a program for reading documentation, which you are using now. + Info is a program for reading documentation, which you might be using +now to read this. - To learn how to use Info, type the command `h'. It brings you to a -programmed instruction sequence. - - To learn advanced Info commands, type `n' twice. This brings you to -`Info for Experts', skipping over the `Getting Started' chapter. + To learn how to use Info, type the command `h' while using the Info +program. It brings you to a programmed instruction sequence. * Menu: * Getting Started:: Getting started using an Info reader. * Advanced Info:: Advanced commands within Info. -* Create an Info File:: How to make your own Info file. -* The Standalone Info Program: (info-stnd.info). +* Creating an Info File:: How to make your own Info file.  File: info.info, Node: Getting Started, Next: Advanced Info, Prev: Top, Up: Top @@ -172,7 +169,7 @@ Another `n' command now would take you to the next node, `Help-^L'. you to the `Previous' node. When you get there, you can do an `n' again to return here. - This all probably seems insultingly simple so far, but *do not* be + This all probably seems insultingly simple so far, but _do not_ be led into skimming. Things will get more complicated soon. Also, do not try a new command until you are told it is time to. Otherwise, you may make Info skip past an important warning that was coming up. @@ -204,7 +201,7 @@ not anything above the top until you have typed some spaces). When you type the space, the two lines that were at the bottom of the screen appear at the top, followed by more lines. Delete takes the -two lines from the top and moves them to the bottom, *usually*, but if +two lines from the top and moves them to the bottom, _usually_, but if there are not a full screen's worth of lines above them they may not make it all the way to the bottom. @@ -298,8 +295,8 @@ actually visible in its node. If you cannot find a menu in a node by looking at it, then the node does not have a menu and the `m' command is not available. - The command to go to one of the subnodes is `m'--but *do not do it -yet!* Before you use `m', you must understand the difference between + The command to go to one of the subnodes is `m'--but _do not do it +yet!_ Before you use `m', you must understand the difference between commands and arguments. So far, you have learned several commands that do not need arguments. When you type one, Info processes it and is instantly ready for another command. The `m' command is different: it @@ -338,16 +335,16 @@ what you have entered. not need to type the argument: you just type a Return, and it stands for the subtopic of the line you are on. - Here is a menu to give you a chance to practice. - - * Menu: The menu starts here. + Here is a menu to give you a chance to practice. This menu gives you +three ways of going to one place, Help-FOO: - This menu gives you three ways of going to one place, Help-FOO. +* Menu: - * Foo: Help-FOO. A node you can visit for fun. +* Foo: Help-FOO. A node you can visit for fun. * Bar: Help-FOO. Strange! two ways to get to the same place. * Help-FOO:: And yet another! ->> Now type just an `m' and see what happens: + + >> Now type just an `m' and see what happens: Now you are "inside" an `m' command. Commands cannot be used now; the next thing you will type must be the name of a subtopic. @@ -393,7 +390,7 @@ Menus move Down in the tree, and `Up' moves Up. `Previous', on the other hand, is usually used to "stay on the same level but go backwards" You can go back to the node `Help-M' by typing the command `u' for -"Up". That puts you at the *front* of the node--to get back to where +"Up". That puts you at the _front_ of the node--to get back to where you were reading you have to type some s. >> Now type `u' to move back up to `Help-M'. @@ -423,7 +420,7 @@ back to `Help-M'. Then follow directions again and you will end up back here. - Note the difference between `l' and `p': `l' moves to where *you* + Note the difference between `l' and `p': `l' moves to where _you_ last were, whereas `p' always moves to the node which the header says is the `Previous' node (from this node, to `Help-M'). @@ -432,7 +429,7 @@ node, which is the first one you saw when you entered Info, has a menu which leads (directly, or indirectly through other menus), to all the nodes that exist. - >> Try doing a `d', then do an `l' to return here (yes, *do* + >> Try doing a `d', then do an `l' to return here (yes, _do_ return). Sometimes, in Info documentation, you will see a cross reference. @@ -499,14 +496,14 @@ and Return, to get to the node about Info and see what other help is available.  -File: info.info, Node: Advanced Info, Next: Create an Info File, Prev: Getting Started, Up: Top +File: info.info, Node: Advanced Info, Next: Creating an Info File, Prev: Getting Started, Up: Top Info for Experts **************** This chapter describes various advanced Info commands, and how to write an Info as distinct from a Texinfo file. (However, in most -cases, writing a Texinfo file is better, since you can use it *both* to +cases, writing a Texinfo file is better, since you can use it _both_ to generate an Info file and to make a printed manual. *Note Overview of Texinfo: (texinfo)Top.) @@ -562,10 +559,10 @@ short for the `m' command together with an argument. `1' goes through the first item in the current node's menu; `2' goes through the second item, etc. - If you display supports multiple fonts, and you are using Emacs' Info -mode to read Info files, the `*' for the fifth menu item is underlines, -and so is the `*' for the ninth item; these underlines make it easy to -see at a glance which number to use for an item. + If your display supports multiple fonts, and you are using Emacs' +Info mode to read Info files, the `*' for the fifth menu item is +underlined, and so is the `*' for the ninth item; these underlines make +it easy to see at a glance which number to use for an item. On ordinary terminals, you won't have underlining. If you need to actually count items, it is better to use `m' instead, and specify the @@ -587,7 +584,7 @@ Adding a new node to Info 2. Put that topic in the menu in the directory. *Note Menu: Menus. - Usually, the way to create the nodes is with Texinfo *note Overview + Usually, the way to create the nodes is with Texinfo (*note Overview of Texinfo: (texinfo)Top.); this has the advantage that you can also make a printed manual from them. However, if you want to edit an Info file, here is how. @@ -597,8 +594,8 @@ one. It must have a <^_> character before it (invisible to the user; this node has one but you cannot see it), and it ends with either a <^_>, a <^L>, or the end of file. Note: If you put in a <^L> to end a new node, be sure that there is a <^_> after it to start the next one, -since <^L> cannot *start* a node. Also, a nicer way to make a node -boundary be a page boundary as well is to put a <^L> *right after* the +since <^L> cannot _start_ a node. Also, a nicer way to make a node +boundary be a page boundary as well is to put a <^L> _right after_ the <^_>. The <^_> starting a node must be followed by a newline or a <^L> @@ -634,10 +631,10 @@ make it possible to make old-fashioned, unstructured files into nodes of the tree. The `Node:' name, in which a node states its own name, must not -contain a filename, since Info when searching for a node does not -expect one to be there. The `Next', `Previous' and `Up' names may -contain them. In this node, since the `Up' node is in the same file, -it was not necessary to use one. +contain a filename, since Info when searching for a node does not expect +one to be there. The `Next', `Previous' and `Up' names may contain +them. In this node, since the `Up' node is in the same file, it was +not necessary to use one. Note that the nodes in this file have a file name in the header line. The file names are ignored by Info, but they serve as comments @@ -682,13 +679,13 @@ to see them all need not keep revisiting the Menu. The Info Directory is simply the menu of the node `(dir)Top'--that is, node `Top' in file `.../info/dir'. You can put new entries in that -menu just like any other menu. The Info Directory is *not* the same as +menu just like any other menu. The Info Directory is _not_ the same as the file directory called `info'. It happens that many of Info's files live on that file directory, but they do not have to; and files on that directory are not automatically listed in the Info Directory node. Also, although the Info node graph is claimed to be a "hierarchy", -in fact it can be *any* directed graph. Shared structures and pointer +in fact it can be _any_ directed graph. Shared structures and pointer cycles are perfectly possible, and can be used if they are appropriate to the meaning to be expressed. There is no need for all the nodes in a file to form a connected structure. In fact, this file has two @@ -707,7 +704,7 @@ Creating Cross References A cross reference can be placed anywhere in the text, unlike a menu item which must go at the front of a line. A cross reference looks like a menu item except that it has `*note' instead of `*'. It -*cannot* be terminated by a `)', because `)''s are so often part of +_cannot_ be terminated by a `)', because `)''s are so often part of node names. If you wish to enclose a cross reference in parentheses, terminate it with a period first. Here are two examples of cross references pointers: @@ -802,43 +799,42 @@ Setting Variables: (emacs)Examining. when the function `Info-directory' is called.  -File: info.info, Node: Create an Info File, Prev: Advanced Info, Up: Top - -Creating an Info File from a Makeinfo file -****************************************** +File: info.info, Node: Creating an Info File, Prev: Advanced Info, Up: Top - `makeinfo' is a utility that converts a Texinfo file into an Info -file; `texinfo-format-region' and `texinfo-format-buffer' are GNU Emacs -functions that do the same. - - *Note Creating an Info File: (texinfo)Create an Info File, to learn -how to create an Info file from a Texinfo file. +Creating an Info File +********************* *Note Overview of Texinfo: (texinfo)Top, to learn how to write a Texinfo file. + *Note Creating an Info File: (texinfo)Creating an Info File, to +learn how to create an Info file from a Texinfo file. + + *Note Installing an Info File: (texinfo)Installing an Info File, to +learn how to install an Info file after you have created one. +  Tag Table: -Node: Top1085 -Node: Getting Started1770 -Node: Help-Small-Screen2518 -Node: Help4267 -Node: Help-P5297 -Node: Help-^L6159 -Node: Help-M9037 -Node: Help-FOO15047 -Node: Help-Adv15785 -Node: Help-Cross18460 -Node: Help-Q19106 -Node: Advanced Info19733 -Node: Expert20709 -Node: Add23222 -Node: Menus26581 -Node: Cross-refs29455 -Node: Tags30157 -Node: Checking31459 -Node: Emacs Info Variables32412 -Node: Create an Info File33401 +Node: Top1069 +Node: Getting Started1614 +Node: Help-Small-Screen2362 +Node: Help4111 +Node: Help-P5141 +Node: Help-^L6003 +Node: Help-M8881 +Node: Help-FOO14861 +Node: Help-Adv15599 +Node: Help-Cross18274 +Node: Help-Q18920 +Node: Advanced Info19547 +Node: Expert20525 +Node: Add23039 +Node: Menus26399 +Node: Cross-refs29273 +Node: Tags29975 +Node: Checking31277 +Node: Emacs Info Variables32230 +Node: Creating an Info File33219  End Tag Table diff --git a/info/internals.info b/info/internals.info index c7464dc..478c0bd 100644 --- a/info/internals.info +++ b/info/internals.info @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -39,141 +39,141 @@ Foundation instead of in the original English.  Indirect: -internals.info-1: 1789 -internals.info-2: 45943 -internals.info-3: 93017 -internals.info-4: 141389 -internals.info-5: 183420 -internals.info-6: 232841 -internals.info-7: 281571 -internals.info-8: 330967 +internals.info-1: 1772 +internals.info-2: 45928 +internals.info-3: 93001 +internals.info-4: 141367 +internals.info-5: 183398 +internals.info-6: 232819 +internals.info-7: 281549 +internals.info-8: 331006  Tag Table: (Indirect) -Node: Top1789 -Node: A History of Emacs6369 -Node: Through Version 187894 -Node: Lucid Emacs11315 -Node: GNU Emacs 1914333 -Node: GNU Emacs 2016516 -Node: XEmacs16943 -Node: XEmacs From the Outside20122 -Node: The Lisp Language21890 -Node: XEmacs From the Perspective of Building31435 -Node: XEmacs From the Inside37560 -Node: The XEmacs Object System (Abstractly Speaking)45943 -Node: How Lisp Objects Are Represented in C60031 -Node: Rules When Writing New C Code68593 -Node: General Coding Rules69397 -Node: Writing Lisp Primitives74557 -Node: Adding Global Lisp Variables85727 -Node: Coding for Mule89365 -Node: Character-Related Data Types90344 -Node: Working With Character and Byte Positions93017 -Node: Conversion to and from External Data96767 -Node: General Guidelines for Writing Mule-Aware Code101648 -Node: An Example of Mule-Aware Code103679 -Node: Techniques for XEmacs Developers105666 -Node: A Summary of the Various XEmacs Modules109437 -Node: Low-Level Modules110257 -Node: Basic Lisp Modules117779 -Node: Modules for Standard Editing Operations126103 -Node: Editor-Level Control Flow Modules131991 -Node: Modules for the Basic Displayable Lisp Objects135438 -Node: Modules for other Display-Related Lisp Objects137960 -Node: Modules for the Redisplay Mechanism139038 -Node: Modules for Interfacing with the File System141389 -Node: Modules for Other Aspects of the Lisp Interpreter and Object System145087 -Node: Modules for Interfacing with the Operating System150541 -Node: Modules for Interfacing with X Windows158202 -Node: Modules for Internationalization161638 -Node: Allocation of Objects in XEmacs Lisp164275 -Node: Introduction to Allocation164829 -Node: Garbage Collection170292 -Node: GCPROing173245 -Node: Garbage Collection - Step by Step180056 -Node: Invocation180448 -Node: garbage_collect_1183420 -Node: mark_object192900 -Node: gc_sweep194712 -Node: sweep_lcrecords_1199775 -Node: compact_string_chars200770 -Node: sweep_strings202950 -Node: sweep_bit_vectors_1203915 -Node: Integers and Characters204591 -Node: Allocation from Frob Blocks205343 -Node: lrecords206947 -Node: Low-level allocation219409 -Node: Pure Space223577 -Node: Cons223752 -Node: Vector224468 -Node: Bit Vector225045 -Node: Symbol225538 -Node: Marker226107 -Node: String226662 -Node: Compiled Function230277 -Node: Events and the Event Loop230446 -Node: Introduction to Events230925 -Node: Main Loop232841 -Node: Specifics of the Event Gathering Mechanism236417 -Node: Specifics About the Emacs Event248870 -Node: The Event Stream Callback Routines249125 -Node: Other Event Loop Functions249370 -Node: Converting Events250510 -Node: Dispatching Events; The Command Builder251119 -Node: Evaluation; Stack Frames; Bindings251354 -Node: Evaluation251696 -Node: Dynamic Binding; The specbinding Stack; Unwind-Protects258236 -Node: Simple Special Forms260620 -Node: Catch and Throw261402 -Node: Symbols and Variables263977 -Node: Introduction to Symbols264241 -Node: Obarrays265279 -Node: Symbol Values268812 -Node: Buffers and Textual Representation271100 -Node: Introduction to Buffers271758 -Node: The Text in a Buffer274421 -Node: Buffer Lists281571 -Node: Markers and Extents283522 -Node: Bufbytes and Emchars285787 -Node: The Buffer Object286002 -Node: MULE Character Sets and Encodings289482 -Node: Character Sets290544 -Node: Encodings293987 -Node: Japanese EUC (Extended Unix Code)295054 -Node: JIS7295868 -Node: Internal Mule Encodings297218 -Node: Internal String Encoding299048 -Node: Internal Character Encoding301161 -Node: CCL302885 -Node: The Lisp Reader and Compiler309637 -Node: Lstreams309850 -Node: Creating an Lstream310881 -Node: Lstream Types312091 -Node: Lstream Functions312343 -Node: Lstream Methods315865 -Node: Consoles; Devices; Frames; Windows318994 -Node: Introduction to Consoles; Devices; Frames; Windows319309 -Node: Point321801 -Node: Window Hierarchy323080 -Node: The Window Object327530 -Node: The Redisplay Mechanism330967 -Node: Critical Redisplay Sections331759 -Node: Line Start Cache332714 -Node: Redisplay Piece by Piece335951 -Node: Extents337987 -Node: Introduction to Extents338525 -Node: Extent Ordering339651 -Node: Format of the Extent Info340892 -Node: Zero-Length Extents342780 -Node: Mathematics of Extent Ordering344178 -Node: Extent Fragments348935 -Node: Faces350022 -Node: Glyphs350138 -Node: Specifiers353156 -Node: Menus353285 -Node: Subprocesses355543 -Node: Interface to X Windows357519 -Node: Index357690 +Node: Top1772 +Node: A History of Emacs6354 +Node: Through Version 187879 +Node: Lucid Emacs11300 +Node: GNU Emacs 1914318 +Node: GNU Emacs 2016501 +Node: XEmacs16928 +Node: XEmacs From the Outside20107 +Node: The Lisp Language21875 +Node: XEmacs From the Perspective of Building31420 +Node: XEmacs From the Inside37545 +Node: The XEmacs Object System (Abstractly Speaking)45928 +Node: How Lisp Objects Are Represented in C60016 +Node: Rules When Writing New C Code68578 +Node: General Coding Rules69382 +Node: Writing Lisp Primitives74542 +Node: Adding Global Lisp Variables85711 +Node: Coding for Mule89349 +Node: Character-Related Data Types90328 +Node: Working With Character and Byte Positions93001 +Node: Conversion to and from External Data96751 +Node: General Guidelines for Writing Mule-Aware Code101632 +Node: An Example of Mule-Aware Code103663 +Node: Techniques for XEmacs Developers105650 +Node: A Summary of the Various XEmacs Modules109415 +Node: Low-Level Modules110235 +Node: Basic Lisp Modules117757 +Node: Modules for Standard Editing Operations126081 +Node: Editor-Level Control Flow Modules131969 +Node: Modules for the Basic Displayable Lisp Objects135416 +Node: Modules for other Display-Related Lisp Objects137938 +Node: Modules for the Redisplay Mechanism139016 +Node: Modules for Interfacing with the File System141367 +Node: Modules for Other Aspects of the Lisp Interpreter and Object System145065 +Node: Modules for Interfacing with the Operating System150519 +Node: Modules for Interfacing with X Windows158180 +Node: Modules for Internationalization161616 +Node: Allocation of Objects in XEmacs Lisp164253 +Node: Introduction to Allocation164807 +Node: Garbage Collection170270 +Node: GCPROing173223 +Node: Garbage Collection - Step by Step180034 +Node: Invocation180426 +Node: garbage_collect_1183398 +Node: mark_object192878 +Node: gc_sweep194690 +Node: sweep_lcrecords_1199753 +Node: compact_string_chars200748 +Node: sweep_strings202928 +Node: sweep_bit_vectors_1203893 +Node: Integers and Characters204569 +Node: Allocation from Frob Blocks205321 +Node: lrecords206925 +Node: Low-level allocation219387 +Node: Pure Space223555 +Node: Cons223730 +Node: Vector224446 +Node: Bit Vector225023 +Node: Symbol225516 +Node: Marker226085 +Node: String226640 +Node: Compiled Function230255 +Node: Events and the Event Loop230424 +Node: Introduction to Events230903 +Node: Main Loop232819 +Node: Specifics of the Event Gathering Mechanism236395 +Node: Specifics About the Emacs Event248848 +Node: The Event Stream Callback Routines249103 +Node: Other Event Loop Functions249348 +Node: Converting Events250488 +Node: Dispatching Events; The Command Builder251097 +Node: Evaluation; Stack Frames; Bindings251332 +Node: Evaluation251674 +Node: Dynamic Binding; The specbinding Stack; Unwind-Protects258214 +Node: Simple Special Forms260598 +Node: Catch and Throw261380 +Node: Symbols and Variables263955 +Node: Introduction to Symbols264219 +Node: Obarrays265257 +Node: Symbol Values268790 +Node: Buffers and Textual Representation271078 +Node: Introduction to Buffers271736 +Node: The Text in a Buffer274399 +Node: Buffer Lists281549 +Node: Markers and Extents283500 +Node: Bufbytes and Emchars285765 +Node: The Buffer Object285980 +Node: MULE Character Sets and Encodings289460 +Node: Character Sets290522 +Node: Encodings293965 +Node: Japanese EUC (Extended Unix Code)295032 +Node: JIS7295846 +Node: Internal Mule Encodings297196 +Node: Internal String Encoding299026 +Node: Internal Character Encoding301139 +Node: CCL302863 +Node: The Lisp Reader and Compiler309615 +Node: Lstreams309828 +Node: Creating an Lstream310859 +Node: Lstream Types312069 +Node: Lstream Functions312321 +Node: Lstream Methods315890 +Node: Consoles; Devices; Frames; Windows319033 +Node: Introduction to Consoles; Devices; Frames; Windows319348 +Node: Point321840 +Node: Window Hierarchy323119 +Node: The Window Object327569 +Node: The Redisplay Mechanism331006 +Node: Critical Redisplay Sections331798 +Node: Line Start Cache332753 +Node: Redisplay Piece by Piece335990 +Node: Extents338026 +Node: Introduction to Extents338564 +Node: Extent Ordering339690 +Node: Format of the Extent Info340931 +Node: Zero-Length Extents342819 +Node: Mathematics of Extent Ordering344217 +Node: Extent Fragments348974 +Node: Faces350061 +Node: Glyphs350177 +Node: Specifiers353195 +Node: Menus353324 +Node: Subprocesses355582 +Node: Interface to X Windows357558 +Node: Index357729  End Tag Table diff --git a/info/internals.info-1 b/info/internals.info-1 index c43d904..e45a1de 100644 --- a/info/internals.info-1 +++ b/info/internals.info-1 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -73,7 +73,7 @@ File: internals.info, Node: Top, Next: A History of Emacs, Prev: (dir), Up: * Index:: Index including concepts, functions, variables, and other terms. - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Here are other nodes that are inferiors of those already listed, mentioned here so you can get to them in one step: @@ -886,7 +886,7 @@ for easy upgrading of parts of a system without upgrading the rest. It would be impossible to pre-determine and pre-specify the information for all possible configurations. - In fact, the `s/' and `m/' files are basically *evil*, since they + In fact, the `s/' and `m/' files are basically _evil_, since they contain unmaintainable platform-specific hard-coded information. XEmacs has been moving in the direction of having all system-specific information be determined dynamically by `configure'. Perhaps someday @@ -897,7 +897,7 @@ we can `rm -rf src/s src/m'. features of your system) from template files. You then run `make', which compiles the auxiliary code and programs in `lib-src/' and `lwlib/' and the main XEmacs executable in `src/'. The result of -compiling and linking is an executable called `temacs', which is *not* +compiling and linking is an executable called `temacs', which is _not_ the final XEmacs executable. `temacs' by itself is not intended to function as an editor or even display any windows on the screen, and if you simply run it, it will exit immediately. The `Makefile' runs diff --git a/info/internals.info-2 b/info/internals.info-2 index 8d78cb4..33026bd 100644 --- a/info/internals.info-2 +++ b/info/internals.info-2 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -286,7 +286,7 @@ but detached extents (extents not referring to any text, as happens to some extents when the text they are referring to is deleted) are temporary. Note that some permanent objects, such as faces and coding systems, cannot be deleted. Note also that windows are unique in that -they can be *undeleted* after having previously been deleted. (This +they can be _undeleted_ after having previously been deleted. (This happens as a result of restoring a window configuration.) Note that many types of objects have a "read syntax", i.e. a way of @@ -493,7 +493,7 @@ advantages: 1. 31 bits can be used for Lisp Integers. - 2. *Any* pointer can be represented directly, and no bit masking + 2. _Any_ pointer can be represented directly, and no bit masking operations are necessary. The disadvantages are: @@ -535,7 +535,7 @@ have to be a statement rather than just used in an expression. The reason for this is that standard C doesn't let you "construct" a structure (but GCC does). Granted, this sometimes isn't too convenient; for the case of integers, at least, you can use the function -`make_int()', which constructs and *returns* an integer Lisp object. +`make_int()', which constructs and _returns_ an integer Lisp object. Note that the `XSETTYPE()' macros are also affected by `ERROR_CHECK_TYPECHECK' and make sure that the structure is of the right type in the case of record types, where the type is contained in @@ -870,7 +870,7 @@ call the C function. Defining the C function is not enough to make a Lisp primitive available; you must also create the Lisp symbol for the primitive (the -symbol is "interned"; *note Obarrays::.) and store a suitable subr +symbol is "interned"; *note Obarrays::) and store a suitable subr object in its function cell. (If you don't do this, the primitive won't be seen by Lisp code.) The code looks like this: @@ -956,7 +956,7 @@ variable gets changed. Whether or not you `DEFVAR_LISP()' a variable, you need to initialize it in the `vars_of_*()' function; otherwise it will end up -as all zeroes, which is the integer 0 (*not* `nil'), and this is +as all zeroes, which is the integer 0 (_not_ `nil'), and this is probably not what you want. Also, if the variable is not `DEFVAR_LISP()'ed, *you must call* `staticpro()' on the C variable in the `vars_of_*()' function. Otherwise, the garbage-collection diff --git a/info/internals.info-3 b/info/internals.info-3 index b9844e5..4d9538c 100644 --- a/info/internals.info-3 +++ b/info/internals.info-3 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -255,7 +255,7 @@ General Guidelines for Writing Mule-Aware Code This section contains some general guidance on how to write Mule-aware code, as well as some pitfalls you should avoid. -*Never use `char' and `char *'.* +_Never use `char' and `char *'._ In XEmacs, the use of `char' and `char *' is almost always a mistake. If you want to manipulate an Emacs character from "C", use `Emchar'. If you want to examine a specific octet in the @@ -264,12 +264,12 @@ Mule-aware code, as well as some pitfalls you should avoid. pointer to move through the internal text, use `Bufbyte *'. Also note that you almost certainly do not need `Emchar *'. -*Be careful not to confuse `Charcount', `Bytecount', and `Bufpos'.* +_Be careful not to confuse `Charcount', `Bytecount', and `Bufpos'._ The whole point of using different types is to avoid confusion about the use of certain variables. Lest this effect be nullified, you need to be careful about using the right types. -*Always convert external data* +_Always convert external data_ It is extremely important to always convert external data, because XEmacs can crash if unexpected 8bit sequences are copied to its internal buffers literally. @@ -405,12 +405,11 @@ you can try to improve the test suite in `tests/automated'. The basic rule is that you should assume builds using `--srcdir' and the `#include <...>' syntax needs to be used when the to-be-included generated file is in a potentially different - directory *at compile time*. The non-obvious C rule is that - `#include "..."' means to search for the included file in the - same directory as the including file, *not* in the current - directory. + directory _at compile time_. The non-obvious C rule is that + `#include "..."' means to search for the included file in the same + directory as the including file, _not_ in the current directory. - * Header files should *not* include `' and `"lisp.h"'. It + * Header files should _not_ include `' and `"lisp.h"'. It is the responsibility of the `.c' files that use it to do so. * If the header uses `INLINE', either directly or through @@ -522,7 +521,7 @@ file linked, respectively. (Actually, this is not really true. should be made constant, and before all other Emacs files and all libraries. In particular, the allocation modules `gmalloc.c', `alloca.c', etc. are normally placed past `lastfile.c', and all of the -files that implement Xt widget classes *must* be placed after +files that implement Xt widget classes _must_ be placed after `lastfile.c' because they contain various structures that must be statically initialized and into which Xt writes at various times.) `pre-crt0.c' and `lastfile.c' contain exported symbols that are used to @@ -737,7 +736,7 @@ functions, traversing stack frames, and binding variables; the control primitives and other special forms such as `while', `if', `eval', `let', `and', `or', `progn', etc.; handling of non-local exits, unwind-protects, and exception handlers; entering the debugger; methods -for the subr Lisp object type; etc. It does *not* include the `read' +for the subr Lisp object type; etc. It does _not_ include the `read' function, the `print' function, or the handling of symbols and obarrays. `backtrace.h' contains some structures related to stack frames and @@ -796,7 +795,7 @@ arithmetic. `bytecode.c' implements the byte-code interpreter and compiled-function objects, and `bytecode.h' contains associated -structures. Note that the byte-code *compiler* is written in Lisp. +structures. Note that the byte-code _compiler_ is written in Lisp.  File: internals.info, Node: Modules for Standard Editing Operations, Next: Editor-Level Control Flow Modules, Prev: Basic Lisp Modules, Up: A Summary of the Various XEmacs Modules @@ -814,7 +813,7 @@ by other properties; manipulate lists of buffers (remember that buffers are permanent objects and stored in various ordered lists); retrieve or change buffer properties; etc. It also contains the definitions of all the built-in buffer-local variables (which can be viewed as buffer -properties). It does *not* contain code to manipulate buffer-local +properties). It does _not_ contain code to manipulate buffer-local variables (that's in `symbols.c', described above); or code to manipulate the text in a buffer. @@ -973,7 +972,7 @@ provide another implementation of those API functions. Note that the choice of whether to use `event-Xt.c' or `event-tty.c' is made at compile time! Or at the very latest, it is made at startup -time. `event-Xt.c' handles events for *both* X and TTY frames; +time. `event-Xt.c' handles events for _both_ X and TTY frames; `event-tty.c' is only used when X support is not compiled into XEmacs. The reason for this is that there is only one event loop in XEmacs: thus, it needs to be able to receive events from all different kinds of diff --git a/info/internals.info-4 b/info/internals.info-4 index f32214c..d2c7e72 100644 --- a/info/internals.info-4 +++ b/info/internals.info-4 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -776,7 +776,7 @@ and as such may not look like they normally do. In particular: * Vectors have their size field munged, so anything that looks at this field will fail. - * Note that `XFOOBAR()' macros *will* work correctly on object + * Note that `XFOOBAR()' macros _will_ work correctly on object pointers with their mark bit set, because the logical shift operations that remove the tag also remove the mark bit. @@ -829,7 +829,7 @@ some rules, though: 1. For every `GCPRON', there have to be declarations of `struct gcpro gcpro1, gcpro2', etc. - 2. You *must* `UNGCPRO' anything that's `GCPRO'ed, and you *must not* + 2. You _must_ `UNGCPRO' anything that's `GCPRO'ed, and you _must not_ `UNGCPRO' if you haven't `GCPRO'ed. Getting either of these wrong will lead to crashes, often in completely random places unrelated to where the problem lies. @@ -864,7 +864,7 @@ some rules, though: with `struct gcpro ngcpro1, ngcpro2', etc.), `NNGCPRON', etc. This avoids compiler warnings about shadowed locals. - 7. It is *always* better to err on the side of extra `GCPRO's rather + 7. It is _always_ better to err on the side of extra `GCPRO's rather than too few. The extra cycles spent on this are almost never going to make a whit of difference in the speed of anything. @@ -874,12 +874,12 @@ some rules, though: One exception from this rule is if you ever plan to change the parameter value, and store a new object in it. In that case, you - *must* `GCPRO' the parameter, because otherwise the new object + _must_ `GCPRO' the parameter, because otherwise the new object will not be protected. So, if you create any Lisp objects (remember, this happens in all sorts of circumstances, e.g. with `Fcons()', etc.), you are - responsible for `GCPRO'ing them, unless you are *absolutely sure* + responsible for `GCPRO'ing them, unless you are _absolutely sure_ that there's no possibility that a garbage-collection can occur while you need to use the object. Even then, consider `GCPRO'ing. @@ -887,7 +887,7 @@ some rules, though: whenever a QUIT can occur where execution can continue past this. (Remember, this is almost anywhere.) - 10. If you have the *least smidgeon of doubt* about whether you need + 10. If you have the _least smidgeon of doubt_ about whether you need to `GCPRO', you should `GCPRO'. 11. Beware of `GCPRO'ing something that is uninitialized. If you have @@ -945,14 +945,14 @@ Invocation The first thing that anyone should know about garbage collection is: when and how the garbage collector is invoked. One might think that this could happen every time new memory is allocated, e.g. new objects are -created, but this is *not* the case. Instead, we have the following +created, but this is _not_ the case. Instead, we have the following situation: The entry point of any process of garbage collection is an invocation of the function `garbage_collect_1' in file `alloc.c'. The invocation -can occur *explicitly* by calling the function `Fgarbage_collect' (in +can occur _explicitly_ by calling the function `Fgarbage_collect' (in addition this function provides information about the freed memory), or -can occur *implicitly* in four different situations: +can occur _implicitly_ in four different situations: 1. In function `main_1' in file `emacs.c'. This function is called at each startup of xemacs. The garbage collection is invoked after all initial creations are completed, but only if a special internal diff --git a/info/internals.info-5 b/info/internals.info-5 index cbb9a34..f5cbeb4 100644 --- a/info/internals.info-5 +++ b/info/internals.info-5 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -654,8 +654,8 @@ create one of these, copy an existing model and modify as necessary. WARNING #1: The finalize method is also called at the end of the dump phase; this time with the for_disksave parameter set to - non-zero. The object is *not* about to disappear, so you have to - make sure to *not* free any extra `malloc()'ed memory if you're + non-zero. The object is _not_ about to disappear, so you have to + make sure to _not_ free any extra `malloc()'ed memory if you're going to need it later. (Also, signal an error if there are any operating-system and window-system resources here, because they can't be dumped.) @@ -667,12 +667,12 @@ create one of these, copy an existing model and modify as necessary. `for_disksave' proviso), we've gotten nastily burned in some cases by not doing this. - WARNING #2: The finalize method is *only* called for lcrecords, - *not* for simply lrecords. If you need a finalize method for + WARNING #2: The finalize method is _only_ called for lcrecords, + _not_ for simply lrecords. If you need a finalize method for simple lrecords, you have to stick it in the `ADDITIONAL_FREE_foo()' macro in `alloc.c'. - WARNING #3: Things are in an *extremely* bizarre state when + WARNING #3: Things are in an _extremely_ bizarre state when `ADDITIONAL_FREE_foo()' is called, so you have to be incredibly careful when writing one of these functions. See the comment in `gc_sweep()'. If you ever have to add one of these, consider @@ -692,11 +692,11 @@ create one of these, copy an existing model and modify as necessary. 5. A "hash" method. This is used to hash objects when they are to be compared with `equal'. The rule here is that if two objects are - `equal', they *must* hash to the same value; i.e. your hash + `equal', they _must_ hash to the same value; i.e. your hash function should use some subset of the sub-fields of the object that are compared in the "equal" method. If you specify this method as `NULL', the object's pointer will be used as the hash, - which will *fail* if the object has an `equal' method, so don't do + which will _fail_ if the object has an `equal' method, so don't do this. To hash a sub-Lisp-object, call `internal_hash()'. Bump the depth @@ -816,7 +816,7 @@ immediately puts the conses onto the cons free list, and decrements the statistics on memory allocation appropriately. This is used to good effect by some extremely commonly-used code, to avoid generating extra objects and thereby triggering GC sooner. However, you have to be -*extremely* careful when doing this. If you mess this up, you will get +_extremely_ careful when doing this. If you mess this up, you will get BADLY BURNED, and it has happened before.  @@ -829,7 +829,7 @@ Vector all are threaded through the variable `all_vectors'. Vectors are marked strangely during garbage collection, by kludging the size field. Note that the `struct Lisp_Vector' is declared with its `contents' -field being a *stretchy* array of one element. It is actually +field being a _stretchy_ array of one element. It is actually `malloc()'ed with the right size, however, and access to any element through the `contents' array works fine. diff --git a/info/internals.info-6 b/info/internals.info-6 index 2692bef..820bedd 100644 --- a/info/internals.info-6 +++ b/info/internals.info-6 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -204,8 +204,8 @@ is replaced but the rest stays the same. system-specific event loop can be operating at a time, and must be able to receive all kinds of events simultaneously. For the two existing event loops (implemented in `event-tty.c' and `event-Xt.c', -respectively), the TTY event loop *only* handles TTY consoles, while -the Xt event loop handles *both* TTY and X consoles. This situation is +respectively), the TTY event loop _only_ handles TTY consoles, while +the Xt event loop handles _both_ TTY and X consoles. This situation is different from all of the output handlers, where you simply have one per console type. @@ -954,12 +954,12 @@ characters back again). Once the buffer is killed, the memory allocated for the buffer text will be freed, but it will still be sitting on the heap, taking up virtual memory, and will not be released back to the operating system. (However, if you have compiled XEmacs with rel-alloc, -the situation is different. In this case, the space *will* be released +the situation is different. In this case, the space _will_ be released back to the operating system. However, this tends to result in a noticeable speed penalty.) Astute readers may notice that the text in a buffer is represented as -an array of *bytes*, while (at least in the MULE case) an Emchar is a +an array of _bytes_, while (at least in the MULE case) an Emchar is a 19-bit integer, which clearly cannot fit in a byte. This means (of course) that the text in a buffer uses a different representation from an Emchar: specifically, the 19-bit Emchar becomes a series of one to @@ -986,7 +986,7 @@ at that position, we need to follow these steps: so, adding the size of the gap to it. By convention, memory indices begin at 1, just like buffer positions and byte indices, and when referring to the position that is "at" the gap, we always - use the memory position at the *beginning*, not at the end, of the + use the memory position at the _beginning_, not at the end, of the gap. 3. Fetch the appropriate bytes at the determined memory position. diff --git a/info/internals.info-7 b/info/internals.info-7 index 79231c67..f7310c5 100644 --- a/info/internals.info-7 +++ b/info/internals.info-7 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -277,7 +277,7 @@ later. For example, Latin-1 is a 96-character charset, and JISX0208 (the Japanese national character set) is a 94x94-character charset. - [Note that, although the ranges above define the *valid* position + [Note that, although the ranges above define the _valid_ position codes for a charset, some of the slots in a particular charset may in fact be empty. This is the case for JISX0208, for example, where (e.g.) all the slots whose first position code is in the range 118 - 127 are @@ -845,17 +845,20 @@ Lstream Functions - Function: void Lstream_fungetc (Lstream *STREAM, int C) Function equivalents of the above macros. - - Function: int Lstream_read (Lstream *STREAM, void *DATA, int SIZE) + - Function: ssize_t Lstream_read (Lstream *STREAM, void *DATA, size_t + SIZE) Read SIZE bytes of DATA from the stream. Return the number of bytes read. 0 means EOF. -1 means an error occurred and no bytes were read. - - Function: int Lstream_write (Lstream *STREAM, void *DATA, int SIZE) + - Function: ssize_t Lstream_write (Lstream *STREAM, void *DATA, size_t + SIZE) Write SIZE bytes of DATA to the stream. Return the number of bytes written. -1 means an error occurred and no bytes were written. - - Function: void Lstream_unread (Lstream *STREAM, void *DATA, int SIZE) + - Function: void Lstream_unread (Lstream *STREAM, void *DATA, size_t + SIZE) Push back SIZE bytes of DATA onto the input queue. The next call to `Lstream_read()' with the same size will read the same bytes back. Note that this will be the case even if there is other @@ -879,8 +882,8 @@ File: internals.info, Node: Lstream Methods, Prev: Lstream Functions, Up: Lst Lstream Methods =============== - - Lstream Method: int reader (Lstream *STREAM, unsigned char *DATA, - int SIZE) + - Lstream Method: ssize_t reader (Lstream *STREAM, unsigned char + *DATA, size_t SIZE) Read some data from the stream's end and store it into DATA, which can hold SIZE bytes. Return the number of bytes read. A return value of 0 means no bytes can be read at this time. This may be @@ -897,8 +900,8 @@ Lstream Methods This function can be `NULL' if the stream is output-only. - - Lstream Method: int writer (Lstream *STREAM, CONST unsigned char - *DATA, int SIZE) + - Lstream Method: ssize_t writer (Lstream *STREAM, CONST unsigned char + *DATA, size_t SIZE) Send some data to the stream's end. Data to be sent is in DATA and is SIZE bytes. Return the number of bytes sent. This function can send and return fewer bytes than is passed in; in that @@ -1028,9 +1031,9 @@ Window Hierarchy If a frame contains multiple windows (panes), they are always created by splitting an existing window along the horizontal or vertical axis. Terminology is a bit confusing here: to "split a window horizontally" -means to create two side-by-side windows, i.e. to make a *vertical* cut +means to create two side-by-side windows, i.e. to make a _vertical_ cut in a window. Likewise, to "split a window vertically" means to create -two windows, one above the other, by making a *horizontal* cut. +two windows, one above the other, by making a _horizontal_ cut. If you split a window and then split again along the same axis, you will end up with a number of panes all arranged along the same axis. @@ -1068,7 +1071,7 @@ combination window. 5. All functions that accept windows must be prepared to accept combination windows, and do something sane (e.g. signal an error - if so). Combination windows *do* escape to the Lisp level. + if so). Combination windows _do_ escape to the Lisp level. 6. All windows have three fields governing their contents: these are "hchild" (a list of horizontally-arrayed children), "vchild" (a diff --git a/info/internals.info-8 b/info/internals.info-8 index 1d5c420..68652f1 100644 --- a/info/internals.info-8 +++ b/info/internals.info-8 @@ -1,5 +1,5 @@ -This is Info file ../../info/internals.info, produced by Makeinfo -version 1.68 from the input file internals.texi. +This is ../info/internals.info, produced by makeinfo version 3.12s from +internals/internals.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -308,7 +308,7 @@ structure to be there. A list of extents is maintained as a double gap array: one gap array is ordered by start index (the "display order") and the other is ordered by end index (the "e-order"). Note that positions in an extent -list should logically be conceived of as referring *to* a particular +list should logically be conceived of as referring _to_ a particular extent (as is the norm in programs) rather than sitting between two extents. Note also that callers of these functions should not be aware of the fact that the extent list is implemented as an array, except for @@ -376,7 +376,7 @@ overlap a range. range; this is equivalent to treating a point P as the range [P, P]. - * In the case of an *extent* overlapping a point or range, the extent + * In the case of an _extent_ overlapping a point or range, the extent is normally treated as having closed endpoints. This applies consistently in the discussion of stacks of extents and such below. Note that this definition of overlap is not necessarily consistent @@ -768,8 +768,8 @@ Index * gc_sweep: gc_sweep. * GNU Emacs 19: GNU Emacs 19. * GNU Emacs 20: GNU Emacs 20. -* Gosling, James <1>: Through Version 18. -* Gosling, James: The Lisp Language. +* Gosling, James <1>: The Lisp Language. +* Gosling, James: Through Version 18. * Great Usenet Renaming: Through Version 18. * Hackers (Steven Levy): A History of Emacs. * hierarchy of windows: Window Hierarchy. diff --git a/info/lispref.info b/info/lispref.info index b7c31a9..19586e0 100644 --- a/info/lispref.info +++ b/info/lispref.info @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -51,836 +51,838 @@ Foundation instead of in the original English.  Indirect: -lispref.info-1: 2387 -lispref.info-2: 48394 -lispref.info-3: 96933 -lispref.info-4: 146792 -lispref.info-5: 195517 -lispref.info-6: 243211 -lispref.info-7: 291472 -lispref.info-8: 340630 -lispref.info-9: 387982 -lispref.info-10: 436629 -lispref.info-11: 484512 -lispref.info-12: 531109 -lispref.info-13: 579014 -lispref.info-14: 627229 -lispref.info-15: 675480 -lispref.info-16: 724640 -lispref.info-17: 771866 -lispref.info-18: 818656 -lispref.info-19: 865712 -lispref.info-20: 914446 -lispref.info-21: 963810 -lispref.info-22: 1010651 -lispref.info-23: 1057664 -lispref.info-24: 1107066 -lispref.info-25: 1156744 -lispref.info-26: 1206642 -lispref.info-27: 1255865 -lispref.info-28: 1304640 -lispref.info-29: 1353618 -lispref.info-30: 1394929 -lispref.info-31: 1444081 -lispref.info-32: 1493295 -lispref.info-33: 1542879 -lispref.info-34: 1591063 -lispref.info-35: 1636699 -lispref.info-36: 1678018 -lispref.info-37: 1722965 -lispref.info-38: 1772661 -lispref.info-39: 1821723 -lispref.info-40: 1871108 -lispref.info-41: 1921004 -lispref.info-42: 1969995 -lispref.info-43: 2014504 -lispref.info-44: 2052883 +lispref.info-1: 2368 +lispref.info-2: 48387 +lispref.info-3: 96926 +lispref.info-4: 146768 +lispref.info-5: 195602 +lispref.info-6: 243287 +lispref.info-7: 291570 +lispref.info-8: 340706 +lispref.info-9: 388028 +lispref.info-10: 436667 +lispref.info-11: 484610 +lispref.info-12: 531222 +lispref.info-13: 579121 +lispref.info-14: 627344 +lispref.info-15: 675598 +lispref.info-16: 724800 +lispref.info-17: 772040 +lispref.info-18: 818890 +lispref.info-19: 865941 +lispref.info-20: 914671 +lispref.info-21: 964093 +lispref.info-22: 1011012 +lispref.info-23: 1058039 +lispref.info-24: 1107438 +lispref.info-25: 1157120 +lispref.info-26: 1207030 +lispref.info-27: 1256253 +lispref.info-28: 1305020 +lispref.info-29: 1353992 +lispref.info-30: 1395327 +lispref.info-31: 1444470 +lispref.info-32: 1493683 +lispref.info-33: 1543257 +lispref.info-34: 1591434 +lispref.info-35: 1637066 +lispref.info-36: 1678382 +lispref.info-37: 1723323 +lispref.info-38: 1773010 +lispref.info-39: 1822114 +lispref.info-40: 1871518 +lispref.info-41: 1921402 +lispref.info-42: 1970393 +lispref.info-43: 2014285 +lispref.info-44: 2052621  Tag Table: (Indirect) -Node: Top2387 -Node: Copying48394 -Node: Introduction67552 -Node: Caveats69143 -Node: Lisp History70872 -Node: Conventions72128 -Node: Some Terms72943 -Node: nil and t73664 -Node: Evaluation Notation75341 -Node: Printing Notation76254 -Node: Error Messages77128 -Node: Buffer Text Notation77569 -Node: Format of Descriptions78444 -Node: A Sample Function Description79298 -Node: A Sample Variable Description83284 -Node: Acknowledgements84192 -Node: Lisp Data Types86170 -Node: Printed Representation88725 -Node: Comments90768 -Node: Primitive Types91666 -Node: Programming Types93325 -Node: Integer Type95277 -Node: Floating Point Type96314 -Node: Character Type96933 -Node: Symbol Type104839 -Node: Sequence Type107534 -Node: Cons Cell Type109055 -Node: Dotted Pair Notation113538 -Node: Association List Type115659 -Node: Array Type116542 -Node: String Type118008 -Node: Vector Type120689 -Node: Bit Vector Type121461 -Node: Function Type122323 -Node: Macro Type123439 -Node: Primitive Function Type124136 -Node: Compiled-Function Type125663 -Node: Autoload Type126217 -Node: Char Table Type127231 -Node: Hash Table Type127405 -Node: Range Table Type128560 -Node: Weak List Type129413 -Node: Editing Types129563 -Node: Buffer Type131190 -Node: Marker Type133226 -Node: Extent Type133950 -Node: Window Type135218 -Node: Frame Type136629 -Node: Device Type137424 -Node: Console Type138250 -Node: Window Configuration Type139451 -Node: Event Type140149 -Node: Process Type140313 -Node: Stream Type141348 -Node: Keymap Type142473 -Node: Syntax Table Type143011 -Node: Display Table Type144035 -Node: Database Type144474 -Node: Charset Type144640 -Node: Coding System Type144804 -Node: ToolTalk Message Type144988 -Node: ToolTalk Pattern Type145187 -Node: Window-System Types145359 -Node: Face Type146505 -Node: Glyph Type146636 -Node: Specifier Type146792 -Node: Font Instance Type146965 -Node: Color Instance Type147155 -Node: Image Instance Type147352 -Node: Toolbar Button Type147550 -Node: Subwindow Type147743 -Node: X Resource Type147922 -Node: Type Predicates148075 -Node: Equality Predicates157205 -Node: Numbers162010 -Node: Integer Basics163465 -Node: Float Basics165815 -Node: Predicates on Numbers167557 -Node: Comparison of Numbers169190 -Node: Numeric Conversions173011 -Node: Arithmetic Operations174477 -Node: Rounding Operations179942 -Node: Bitwise Operations181047 -Node: Math Functions189982 -Node: Random Numbers192298 -Node: Strings and Characters194064 -Node: String Basics195517 -Node: Predicates for Strings197939 -Node: Creating Strings198702 -Node: Predicates for Characters204030 -Node: Character Codes205101 -Node: Text Comparison206514 -Node: String Conversion209876 -Node: Modifying Strings213554 -Node: String Properties214195 -Node: Formatting Strings214838 -Node: Character Case224446 -Node: Case Tables227593 -Node: Char Tables231492 -Node: Char Table Types232884 -Node: Working With Char Tables234459 -Node: Lists236408 -Node: Cons Cells237531 -Node: Lists as Boxes238867 -Node: List-related Predicates241509 -Node: List Elements243211 -Node: Building Lists248240 -Node: Modifying Lists254235 -Node: Setcar255047 -Node: Setcdr257468 -Node: Rearrangement259978 -Node: Sets And Lists265537 -Node: Association Lists269766 -Node: Property Lists279267 -Node: Working With Normal Plists280815 -Node: Working With Lax Plists283083 -Node: Converting Plists To/From Alists285323 -Node: Weak Lists286671 -Node: Sequences Arrays Vectors288836 -Node: Sequence Functions291472 -Node: Arrays295133 -Node: Array Functions298198 -Node: Vectors300731 -Node: Vector Functions302229 -Node: Bit Vectors304803 -Node: Bit Vector Functions305648 -Node: Symbols307899 -Node: Symbol Components308948 -Node: Definitions313127 -Node: Creating Symbols315352 -Node: Symbol Properties322390 -Node: Plists and Alists323906 -Node: Symbol Plists325656 -Node: Other Plists327466 -Node: Evaluation329244 -Node: Intro Eval330049 -Node: Eval333540 -Node: Forms337960 -Node: Self-Evaluating Forms339117 -Node: Symbol Forms340630 -Node: Classifying Lists341547 -Node: Function Indirection342303 -Node: Function Forms345418 -Node: Macro Forms346417 -Node: Special Forms348017 -Node: Autoloading350351 -Node: Quoting350849 -Node: Control Structures352212 -Node: Sequencing353834 -Node: Conditionals356699 -Node: Combining Conditions360122 -Node: Iteration363392 -Node: Nonlocal Exits365177 -Node: Catch and Throw365879 -Node: Examples of Catch369723 -Node: Errors371742 -Node: Signaling Errors373231 -Node: Processing of Errors376299 -Node: Handling Errors377629 -Node: Error Symbols384535 -Node: Cleanups387982 -Node: Variables391762 -Node: Global Variables393531 -Node: Constant Variables394607 -Node: Local Variables395233 -Node: Void Variables400177 -Node: Defining Variables403688 -Node: Accessing Variables410853 -Node: Setting Variables412279 -Node: Variable Scoping416798 -Node: Scope418397 -Node: Extent419922 -Node: Impl of Scope421401 -Node: Using Scoping423364 -Node: Buffer-Local Variables424886 -Node: Intro to Buffer-Local425722 -Node: Creating Buffer-Local428265 -Node: Default Value433485 -Node: Variable Aliases436629 -Node: Functions438415 -Node: What Is a Function439509 -Node: Lambda Expressions443556 -Node: Lambda Components444466 -Node: Simple Lambda446298 -Node: Argument List447957 -Node: Function Documentation451685 -Node: Function Names453627 -Node: Defining Functions456201 -Node: Calling Functions459243 -Node: Mapping Functions463092 -Node: Anonymous Functions465445 -Node: Function Cells468690 -Node: Inline Functions473500 -Node: Related Topics475310 -Node: Macros476363 -Node: Simple Macro477647 -Node: Expansion478382 -Node: Compiling Macros481356 -Node: Defining Macros483194 -Node: Backquote484512 -Node: Problems with Macros486910 -Node: Argument Evaluation487605 -Node: Surprising Local Vars490506 -Node: Eval During Expansion492574 -Node: Repeated Expansion494268 -Node: Customization496179 -Node: Common Keywords496648 -Node: Group Definitions499493 -Node: Variable Definitions501686 -Node: Customization Types506669 -Node: Simple Types508105 -Node: Composite Types510262 -Node: Splicing into Lists514952 -Node: Type Keywords516787 -Node: Loading520307 -Node: How Programs Do Loading521980 -Node: Autoload531109 -Node: Repeated Loading537189 -Node: Named Features539303 -Node: Unloading545736 -Node: Hooks for Loading547892 -Node: Byte Compilation548609 -Node: Speed of Byte-Code550526 -Node: Compilation Functions551733 -Node: Docs and Compilation558122 -Node: Dynamic Loading560775 -Node: Eval During Compile563139 -Node: Compiled-Function Objects564404 -Node: Disassembly569203 -Node: Debugging576457 -Node: Debugger577869 -Node: Error Debugging579014 -Node: Infinite Loops581767 -Node: Function Debugging583011 -Node: Explicit Debug585801 -Node: Using Debugger586573 -Node: Debugger Commands588437 -Node: Invoking the Debugger592754 -Node: Internals of Debugger596669 -Node: Syntax Errors601546 -Node: Excess Open602794 -Node: Excess Close604669 -Node: Compilation Errors606090 -Node: Edebug607378 -Node: Using Edebug609485 -Node: Instrumenting612182 -Node: Edebug Execution Modes615671 -Node: Jumping618781 -Node: Edebug Misc621124 -Node: Breakpoints622513 -Node: Global Break Condition625319 -Node: Embedded Breakpoints626274 -Node: Trapping Errors627229 -Node: Edebug Views629305 -Node: Edebug Eval631270 -Node: Eval List632447 -Node: Reading in Edebug635832 -Node: Printing in Edebug636631 -Node: Tracing638346 -Node: Coverage Testing640232 -Node: The Outside Context642273 -Node: Checking Whether to Stop643222 -Node: Edebug Display Update643868 -Node: Edebug Recursive Edit645890 -Node: Instrumenting Macro Calls647544 -Node: Specification List650026 -Node: Backtracking659437 -Node: Debugging Backquote661375 -Node: Specification Examples665081 -Node: Edebug Options667148 -Node: Read and Print672485 -Node: Streams Intro673462 -Node: Input Streams675480 -Node: Input Functions680381 -Node: Output Streams682441 -Node: Output Functions686493 -Node: Output Variables690793 -Node: Minibuffers695592 -Node: Intro to Minibuffers696677 -Node: Text from Minibuffer699005 -Node: Object from Minibuffer703668 -Node: Minibuffer History706865 -Node: Completion709775 -Node: Basic Completion711750 -Node: Minibuffer Completion716757 -Node: Completion Commands719992 -Node: High-Level Completion724640 -Node: Reading File Names728664 -Node: Programmed Completion732353 -Node: Yes-or-No Queries734563 -Node: Multiple Queries740259 -Node: Minibuffer Misc744324 -Node: Command Loop749193 -Node: Command Overview750539 -Node: Defining Commands753823 -Node: Using Interactive754571 -Node: Interactive Codes759345 -Node: Interactive Examples765149 -Node: Interactive Call766463 -Node: Command Loop Info771866 -Node: Events776845 -Node: Event Types778305 -Node: Event Contents780228 -Node: Event Predicates784704 -Node: Accessing Mouse Event Positions786029 -Node: Frame-Level Event Position Info786728 -Node: Window-Level Event Position Info787768 -Node: Event Text Position Info789532 -Node: Event Glyph Position Info792024 -Node: Event Toolbar Position Info793347 -Node: Other Event Position Info794018 -Node: Accessing Other Event Info794427 -Node: Working With Events796047 -Node: Converting Events801975 -Node: Reading Input804928 -Node: Key Sequence Input805930 -Node: Reading One Event807884 -Node: Dispatching an Event810645 -Node: Quoted Character Input811096 -Node: Peeking and Discarding812444 -Node: Waiting816348 -Node: Quitting818656 -Node: Prefix Command Arguments823064 -Node: Recursive Editing828151 -Node: Disabling Commands832948 -Node: Command History835016 -Node: Keyboard Macros836755 -Node: Keymaps838973 -Node: Keymap Terminology840550 -Node: Format of Keymaps843480 -Node: Creating Keymaps843891 -Node: Inheritance and Keymaps845970 -Node: Key Sequences848342 -Node: Prefix Keys852912 -Node: Active Keymaps856497 -Node: Key Lookup865712 -Node: Functions for Key Lookup870876 -Node: Changing Key Bindings876579 -Node: Key Binding Commands883466 -Node: Scanning Keymaps885532 -Node: Other Keymap Functions894044 -Node: Menus894666 -Node: Menu Format895208 -Node: Menubar Format903793 -Node: Menubar904418 -Node: Modifying Menus907532 -Node: Menu Filters912550 -Node: Pop-Up Menus914446 -Node: Menu Accelerators916652 -Node: Creating Menu Accelerators917374 -Node: Keyboard Menu Traversal918692 -Node: Menu Accelerator Functions919419 -Node: Buffers Menu922454 -Node: Dialog Boxes923748 -Node: Dialog Box Format923915 -Node: Dialog Box Functions925285 -Node: Toolbar925683 -Node: Toolbar Intro926008 -Node: Toolbar Descriptor Format928419 -Node: Specifying the Toolbar932913 -Node: Other Toolbar Variables936521 -Node: Scrollbars940948 -Node: Drag and Drop941084 -Node: Supported Protocols942160 -Node: OffiX DND942663 -Node: CDE dt943670 -Node: MSWindows OLE944261 -Node: Loose ends944432 -Node: Drop Interface944824 -Node: Drag Interface945846 -Node: Modes946020 -Node: Major Modes946971 -Node: Major Mode Conventions949887 -Node: Example Major Modes955842 -Node: Auto Major Mode963810 -Node: Mode Help971260 -Node: Derived Modes972361 -Node: Minor Modes974552 -Node: Minor Mode Conventions975854 -Node: Keymaps and Minor Modes978718 -Node: Modeline Format979553 -Node: Modeline Data981322 -Node: Modeline Variables985594 -Node: %-Constructs990310 -Node: Hooks993221 -Node: Documentation999985 -Node: Documentation Basics1001408 -Node: Accessing Documentation1004460 -Node: Keys in Documentation1010651 -Node: Describing Characters1014114 -Node: Help Functions1016468 -Node: Obsoleteness1022911 -Node: Files1025905 -Node: Visiting Files1027830 -Node: Visiting Functions1029335 -Node: Subroutines of Visiting1034383 -Node: Saving Buffers1036459 -Node: Reading from Files1042552 -Node: Writing to Files1044709 -Node: File Locks1047426 -Node: Information about Files1050479 -Node: Testing Accessibility1051240 -Node: Kinds of Files1054980 -Node: Truenames1056661 -Node: File Attributes1057664 -Node: Changing File Attributes1062804 -Node: File Names1068210 -Node: File Name Components1069819 -Node: Directory Names1072920 -Node: Relative File Names1076373 -Node: File Name Expansion1077451 -Node: Unique File Names1081358 -Node: File Name Completion1082973 -Node: User Name Completion1085634 -Node: Contents of Directories1086974 -Node: Create/Delete Dirs1090287 -Node: Magic File Names1091393 -Node: Partial Files1097023 -Node: Intro to Partial Files1097251 -Node: Creating a Partial File1098491 -Node: Detached Partial Files1099426 -Node: Format Conversion1100548 -Node: Files and MS-DOS1107066 -Node: Backups and Auto-Saving1109130 -Node: Backup Files1109805 -Node: Making Backups1111202 -Node: Rename or Copy1113951 -Node: Numbered Backups1116444 -Node: Backup Names1118689 -Node: Auto-Saving1121972 -Node: Reverting1130114 -Node: Buffers1133272 -Node: Buffer Basics1134687 -Node: Current Buffer1136740 -Node: Buffer Names1141430 -Node: Buffer File Name1144635 -Node: Buffer Modification1148755 -Node: Modification Time1150951 -Node: Read Only Buffers1154326 -Node: The Buffer List1156744 -Node: Creating Buffers1161574 -Node: Killing Buffers1163723 -Node: Indirect Buffers1167454 -Node: Windows1170026 -Node: Basic Windows1171504 -Node: Splitting Windows1174602 -Node: Deleting Windows1181473 -Node: Selecting Windows1184154 -Node: Cyclic Window Ordering1187283 -Node: Buffers and Windows1191907 -Node: Displaying Buffers1193748 -Node: Choosing Window1198926 -Node: Window Point1206642 -Node: Window Start1208688 -Node: Vertical Scrolling1213178 -Node: Horizontal Scrolling1219315 -Node: Size of Window1222824 -Node: Position of Window1227542 -Node: Resizing Windows1229782 -Node: Window Configurations1235211 -Node: Frames1238636 -Node: Creating Frames1240405 -Node: Frame Properties1241746 -Node: Property Access1242562 -Node: Initial Properties1243411 -Node: X Frame Properties1245897 -Node: Size and Position1250531 -Node: Frame Name1252527 -Node: Frame Titles1253441 -Node: Deleting Frames1255265 -Node: Finding All Frames1255865 -Node: Frames and Windows1257859 -Node: Minibuffers and Frames1259564 -Node: Input Focus1260483 -Node: Visibility of Frames1263561 -Node: Raising and Lowering1265480 -Node: Frame Configurations1267857 -Node: Frame Hooks1268451 -Node: Consoles and Devices1270258 -Node: Basic Console Functions1273002 -Node: Basic Device Functions1273425 -Node: Console Types and Device Classes1274141 -Node: Connecting to a Console or Device1276338 -Node: The Selected Console and Device1278501 -Node: Console and Device I/O1279527 -Node: Positions1280291 -Node: Point1281260 -Node: Motion1284353 -Node: Character Motion1285120 -Node: Word Motion1287357 -Node: Buffer End Motion1288858 -Node: Text Lines1290355 -Node: Screen Lines1294950 -Node: List Motion1299013 -Node: Skipping Characters1302421 -Node: Excursions1304640 -Node: Narrowing1307675 -Node: Markers1313002 -Node: Overview of Markers1313904 -Node: Predicates on Markers1318597 -Node: Creating Markers1319843 -Node: Information from Markers1323880 -Node: Changing Markers1324978 -Node: The Mark1326356 -Node: The Region1334850 -Node: Text1340537 -Node: Near Point1343239 -Node: Buffer Contents1346961 -Node: Comparing Text1348367 -Node: Insertion1349775 -Node: Commands for Insertion1353618 -Node: Deletion1356576 -Node: User-Level Deletion1360173 -Node: The Kill Ring1364303 -Node: Kill Ring Concepts1366477 -Node: Kill Functions1367531 -Node: Yank Commands1369436 -Node: Low-Level Kill Ring1371307 -Node: Internals of Kill Ring1374093 -Node: Undo1376873 -Node: Maintaining Undo1381202 -Node: Filling1383822 -Node: Margins1389818 -Node: Auto Filling1393748 -Node: Sorting1394929 -Node: Columns1404230 -Node: Indentation1406746 -Node: Primitive Indent1407525 -Node: Mode-Specific Indent1408769 -Node: Region Indent1411280 -Node: Relative Indent1414228 -Node: Indent Tabs1416610 -Node: Motion by Indent1417932 -Node: Case Changes1418711 -Node: Text Properties1421962 -Node: Examining Properties1423777 -Node: Changing Properties1425644 -Node: Property Search1429239 -Node: Special Properties1433950 -Node: Saving Properties1434231 -Node: Substitution1437373 -Node: Registers1440644 -Node: Transposition1443187 -Node: Change Hooks1444081 -Node: Transformations1446121 -Node: Searching and Matching1450506 -Node: String Search1451637 -Node: Regular Expressions1456361 -Node: Syntax of Regexps1457728 -Node: Regexp Example1472108 -Node: Regexp Search1474278 -Node: POSIX Regexps1480366 -Node: Search and Replace1482201 -Node: Match Data1485566 -Node: Simple Match Data1486696 -Node: Replacing Match1490961 -Node: Entire Match Data1493295 -Node: Saving Match Data1495286 -Node: Searching and Case1496669 -Node: Standard Regexps1498703 -Node: Syntax Tables1500901 -Node: Syntax Basics1502017 -Node: Syntax Descriptors1504992 -Node: Syntax Class Table1506842 -Node: Syntax Flags1512880 -Node: Syntax Table Functions1516097 -Node: Motion and Syntax1519961 -Node: Parsing Expressions1521413 -Node: Standard Syntax Tables1527482 -Node: Syntax Table Internals1528326 -Node: Abbrevs1529353 -Node: Abbrev Mode1531157 -Node: Abbrev Tables1531877 -Node: Defining Abbrevs1533410 -Node: Abbrev Files1535315 -Node: Abbrev Expansion1537089 -Node: Standard Abbrev Tables1541720 -Node: Extents1542879 -Node: Intro to Extents1544122 -Node: Creating and Modifying Extents1548116 -Node: Extent Endpoints1549625 -Node: Finding Extents1552890 -Node: Mapping Over Extents1556641 -Node: Extent Properties1562759 -Node: Detached Extents1572903 -Node: Extent Parents1574762 -Node: Duplicable Extents1576457 -Node: Extents and Events1579680 -Node: Atomic Extents1581588 -Node: Specifiers1582035 -Node: Introduction to Specifiers1583838 -Node: Specifiers In-Depth1586148 -Node: Specifier Instancing1591063 -Node: Specifier Types1594325 -Node: Adding Specifications1599399 -Node: Retrieving Specifications1608762 -Node: Specifier Tag Functions1612497 -Node: Specifier Instancing Functions1615731 -Node: Specifier Example1619138 -Node: Creating Specifiers1622244 -Node: Specifier Validation Functions1624493 -Node: Other Specification Functions1626877 -Node: Faces and Window-System Objects1630696 -Node: Faces1631020 -Node: Merging Faces1632639 -Node: Basic Face Functions1634600 -Node: Face Properties1636699 -Node: Face Convenience Functions1646258 -Node: Other Face Display Functions1649391 -Node: Fonts1650204 -Node: Font Specifiers1650905 -Node: Font Instances1651146 -Node: Font Instance Names1652113 -Node: Font Instance Size1652954 -Node: Font Instance Characteristics1654240 -Node: Font Convenience Functions1655409 -Node: Colors1656699 -Node: Color Specifiers1657139 -Node: Color Instances1657366 -Node: Color Instance Properties1658110 -Node: Color Convenience Functions1658736 -Node: Glyphs1659789 -Node: Glyph Functions1661381 -Node: Creating Glyphs1661788 -Node: Glyph Properties1663375 -Node: Glyph Convenience Functions1672542 -Node: Glyph Dimensions1676489 -Node: Images1677569 -Node: Image Specifiers1678018 -Node: Image Instantiator Conversion1689442 -Node: Image Instances1690807 -Node: Image Instance Types1691558 -Node: Image Instance Functions1694213 -Node: Glyph Types1698783 -Node: Mouse Pointer1700555 -Node: Redisplay Glyphs1703558 -Node: Subwindows1704591 -Node: Annotations1704834 -Node: Annotation Basics1705851 -Node: Annotation Primitives1709789 -Node: Annotation Properties1711118 -Node: Locating Annotations1714158 -Node: Margin Primitives1714995 -Node: Annotation Hooks1716889 -Node: Display1717549 -Node: Refresh Screen1718527 -Node: Truncation1720438 -Node: The Echo Area1722965 -Node: Warnings1729401 -Node: Invisible Text1733837 -Node: Selective Display1736417 -Node: Overlay Arrow1740544 -Node: Temporary Displays1741898 -Node: Blinking1746019 -Node: Usual Display1748203 -Node: Display Tables1750753 -Node: Display Table Format1751557 -Node: Active Display Table1753001 -Node: Character Descriptors1754193 -Node: Beeping1754951 -Node: Hash Tables1759717 -Node: Introduction to Hash Tables1760325 -Node: Working With Hash Tables1766350 -Node: Weak Hash Tables1767467 -Node: Range Tables1769266 -Node: Introduction to Range Tables1769955 -Node: Working With Range Tables1770386 -Node: Databases1771271 -Node: Connecting to a Database1771570 -Node: Working With a Database1772661 -Node: Other Database Functions1773519 -Node: Processes1774093 -Node: Subprocess Creation1776317 -Node: Synchronous Processes1779610 -Node: MS-DOS Subprocesses1786308 -Node: Asynchronous Processes1787382 -Node: Deleting Processes1791086 -Node: Process Information1792957 -Node: Input to Processes1796885 -Node: Signals to Processes1799154 -Node: Output from Processes1803574 -Node: Process Buffers1804386 -Node: Filter Functions1807255 -Node: Accepting Output1812822 -Node: Sentinels1814349 -Node: Process Window Size1817842 -Node: Transaction Queues1818191 -Node: Network1819889 -Node: System Interface1821723 -Node: Starting Up1822993 -Node: Start-up Summary1823587 -Node: Init File1827141 -Node: Terminal-Specific1829525 -Node: Command Line Arguments1832684 -Node: Getting Out1836173 -Node: Killing XEmacs1836742 -Node: Suspending XEmacs1838411 -Node: System Environment1841727 -Node: User Identification1848392 -Node: Time of Day1851922 -Node: Time Conversion1854711 -Node: Timers1859753 -Node: Terminal Input1861926 -Node: Input Modes1862429 -Node: Translating Input1864842 -Node: Recording Input1869007 -Node: Terminal Output1871108 -Node: Flow Control1874731 -Node: Batch Mode1878524 -Node: X-Windows1879906 -Node: X Selections1880718 -Node: X Server1882928 -Node: Resources1883329 -Node: Server Data1888470 -Node: Grabs1889677 -Node: X Miscellaneous1891258 -Node: ToolTalk Support1893643 -Node: XEmacs ToolTalk API Summary1893860 -Node: Sending Messages1895160 -Node: Example of Sending Messages1895411 -Node: Elisp Interface for Sending Messages1896473 -Node: Receiving Messages1902866 -Node: Example of Receiving Messages1903089 -Node: Elisp Interface for Receiving Messages1903925 -Node: LDAP Support1907750 -Node: Building XEmacs with LDAP support1908246 -Node: XEmacs LDAP API1909224 -Node: LDAP Variables1909954 -Node: The High-Level LDAP API1912431 -Node: The Low-Level LDAP API1913544 -Node: The LDAP Lisp Object1913818 -Node: Opening and Closing a LDAP Connection1914371 -Node: Searching on a LDAP Server (Low-level)1916154 -Node: Syntax of Search Filters1917549 -Node: Internationalization1918847 -Node: I18N Levels 1 and 21919184 -Node: I18N Level 31919890 -Node: Level 3 Basics1920171 -Node: Level 3 Primitives1921004 -Node: Dynamic Messaging1922610 -Node: Domain Specification1923073 -Node: Documentation String Extraction1924976 -Node: I18N Level 41925894 -Node: MULE1926086 -Node: Internationalization Terminology1927197 -Node: Charsets1935736 -Node: Charset Properties1936432 -Node: Basic Charset Functions1941118 -Node: Charset Property Functions1943299 -Node: Predefined Charsets1945342 -Node: MULE Characters1948262 -Node: Composite Characters1949109 -Node: ISO 20221950363 -Node: Coding Systems1956085 -Node: Coding System Types1958007 -Node: EOL Conversion1959826 -Node: Coding System Properties1961009 -Node: Basic Coding System Functions1964861 -Node: Coding System Property Functions1966765 -Node: Encoding and Decoding Text1967323 -Node: Detection of Textual Encoding1968459 -Node: Big5 and Shift-JIS Functions1969995 -Node: CCL1971083 -Node: CCL Syntax1974187 -Node: CCL Statements1975775 -Node: CCL Expressions1980423 -Node: Calling CCL1983575 -Node: CCL Examples1986565 -Node: Category Tables1986702 -Node: Tips1989061 -Node: Style Tips1989702 -Node: Compilation Tips1999222 -Node: Documentation Tips2001138 -Node: Comment Tips2006647 -Node: Library Headers2009649 -Node: Building XEmacs and Object Allocation2013621 -Node: Building XEmacs2014504 -Node: Pure Storage2020839 -Node: Garbage Collection2023627 -Node: Standard Errors2034766 -Node: Standard Buffer-Local Variables2038975 -Node: Standard Keymaps2041651 -Node: Standard Hooks2045383 -Node: Index2052883 +Node: Top2368 +Node: Copying48387 +Node: Introduction67545 +Node: Caveats69136 +Node: Lisp History70867 +Node: Conventions72123 +Node: Some Terms72938 +Node: nil and t73659 +Node: Evaluation Notation75336 +Node: Printing Notation76249 +Node: Error Messages77123 +Node: Buffer Text Notation77564 +Node: Format of Descriptions78439 +Node: A Sample Function Description79293 +Node: A Sample Variable Description83279 +Node: Acknowledgements84187 +Node: Lisp Data Types86165 +Node: Printed Representation88720 +Node: Comments90762 +Node: Primitive Types91659 +Node: Programming Types93318 +Node: Integer Type95270 +Node: Floating Point Type96307 +Node: Character Type96926 +Node: Symbol Type104832 +Node: Sequence Type107527 +Node: Cons Cell Type109046 +Node: Dotted Pair Notation113530 +Node: Association List Type115651 +Node: Array Type116534 +Node: String Type118000 +Node: Vector Type120681 +Node: Bit Vector Type121453 +Node: Function Type122315 +Node: Macro Type123428 +Node: Primitive Function Type124125 +Node: Compiled-Function Type125651 +Node: Autoload Type126205 +Node: Char Table Type127219 +Node: Hash Table Type127393 +Node: Range Table Type128548 +Node: Weak List Type129401 +Node: Editing Types129551 +Node: Buffer Type131178 +Node: Marker Type133205 +Node: Extent Type133929 +Node: Window Type135197 +Node: Frame Type136608 +Node: Device Type137403 +Node: Console Type138229 +Node: Window Configuration Type139430 +Node: Event Type140128 +Node: Process Type140292 +Node: Stream Type141327 +Node: Keymap Type142450 +Node: Syntax Table Type142988 +Node: Display Table Type144011 +Node: Database Type144450 +Node: Charset Type144616 +Node: Coding System Type144780 +Node: ToolTalk Message Type144964 +Node: ToolTalk Pattern Type145163 +Node: Window-System Types145335 +Node: Face Type146481 +Node: Glyph Type146612 +Node: Specifier Type146768 +Node: Font Instance Type146941 +Node: Color Instance Type147131 +Node: Image Instance Type147328 +Node: Toolbar Button Type147526 +Node: Subwindow Type147719 +Node: X Resource Type147898 +Node: Type Predicates148051 +Node: Equality Predicates157180 +Node: Numbers161985 +Node: Integer Basics163440 +Node: Float Basics165789 +Node: Predicates on Numbers167531 +Node: Comparison of Numbers169164 +Node: Numeric Conversions172985 +Node: Arithmetic Operations174451 +Node: Rounding Operations179916 +Node: Bitwise Operations181021 +Node: Math Functions190067 +Node: Random Numbers192383 +Node: Strings and Characters194149 +Node: String Basics195602 +Node: Predicates for Strings198020 +Node: Creating Strings198783 +Node: Predicates for Characters204100 +Node: Character Codes205171 +Node: Text Comparison206584 +Node: String Conversion209946 +Node: Modifying Strings213622 +Node: String Properties214263 +Node: Formatting Strings214906 +Node: Character Case224524 +Node: Case Tables227670 +Node: Char Tables231568 +Node: Char Table Types232960 +Node: Working With Char Tables234535 +Node: Lists236484 +Node: Cons Cells237607 +Node: Lists as Boxes238943 +Node: List-related Predicates241585 +Node: List Elements243287 +Node: Building Lists248316 +Node: Modifying Lists254308 +Node: Setcar255120 +Node: Setcdr257541 +Node: Rearrangement260052 +Node: Sets And Lists265638 +Node: Association Lists269866 +Ref: Association Lists-Footnote-1279161 +Node: Property Lists279366 +Node: Working With Normal Plists280914 +Node: Working With Lax Plists283182 +Node: Converting Plists To/From Alists285422 +Node: Weak Lists286770 +Node: Sequences Arrays Vectors288934 +Node: Sequence Functions291570 +Node: Arrays295229 +Node: Array Functions298293 +Node: Vectors300826 +Node: Vector Functions302324 +Node: Bit Vectors304895 +Node: Bit Vector Functions305740 +Node: Symbols307990 +Node: Symbol Components309039 +Node: Definitions313212 +Node: Creating Symbols315437 +Node: Symbol Properties322471 +Node: Plists and Alists323987 +Node: Symbol Plists325736 +Node: Other Plists327545 +Node: Evaluation329323 +Node: Intro Eval330128 +Ref: Intro Eval-Footnote-1333481 +Node: Eval333616 +Node: Forms338034 +Node: Self-Evaluating Forms339193 +Node: Symbol Forms340706 +Node: Classifying Lists341623 +Node: Function Indirection342379 +Node: Function Forms345490 +Node: Macro Forms346487 +Node: Special Forms348087 +Node: Autoloading350396 +Node: Quoting350894 +Node: Control Structures352255 +Node: Sequencing353875 +Node: Conditionals356740 +Node: Combining Conditions360163 +Node: Iteration363433 +Node: Nonlocal Exits365212 +Node: Catch and Throw365914 +Node: Examples of Catch369753 +Node: Errors371772 +Node: Signaling Errors373261 +Node: Processing of Errors376337 +Node: Handling Errors377666 +Node: Error Symbols384582 +Node: Cleanups388028 +Node: Variables391806 +Node: Global Variables393575 +Node: Constant Variables394651 +Node: Local Variables395277 +Node: Void Variables400214 +Node: Defining Variables403730 +Node: Accessing Variables410894 +Node: Setting Variables412319 +Node: Variable Scoping416838 +Node: Scope418437 +Node: Extent419962 +Node: Impl of Scope421441 +Node: Using Scoping423404 +Node: Buffer-Local Variables424926 +Node: Intro to Buffer-Local425762 +Node: Creating Buffer-Local428305 +Node: Default Value433524 +Node: Variable Aliases436667 +Node: Functions438452 +Node: What Is a Function439546 +Node: Lambda Expressions443592 +Node: Lambda Components444502 +Node: Simple Lambda446334 +Node: Argument List447991 +Node: Function Documentation451719 +Node: Function Names453661 +Node: Defining Functions456234 +Node: Calling Functions459274 +Node: Mapping Functions463123 +Node: Anonymous Functions465516 +Node: Function Cells468761 +Node: Inline Functions473571 +Node: Related Topics475381 +Node: Macros476434 +Node: Simple Macro477718 +Node: Expansion478453 +Node: Compiling Macros481457 +Node: Defining Macros483293 +Node: Backquote484610 +Node: Problems with Macros487007 +Node: Argument Evaluation487702 +Node: Surprising Local Vars490617 +Node: Eval During Expansion492685 +Node: Repeated Expansion494378 +Node: Customization496294 +Node: Common Keywords496763 +Node: Group Definitions499608 +Node: Variable Definitions501800 +Node: Customization Types506783 +Node: Simple Types508218 +Node: Composite Types510375 +Node: Splicing into Lists515065 +Node: Type Keywords516900 +Node: Loading520420 +Node: How Programs Do Loading522095 +Node: Autoload531222 +Node: Repeated Loading537301 +Node: Named Features539414 +Node: Unloading545846 +Node: Hooks for Loading548002 +Node: Byte Compilation548719 +Node: Speed of Byte-Code550636 +Node: Compilation Functions551843 +Node: Docs and Compilation558230 +Node: Dynamic Loading560883 +Node: Eval During Compile563247 +Node: Compiled-Function Objects564512 +Node: Disassembly569310 +Node: Debugging576564 +Node: Debugger577976 +Node: Error Debugging579121 +Node: Infinite Loops581874 +Node: Function Debugging583118 +Node: Explicit Debug585908 +Node: Using Debugger586679 +Node: Debugger Commands588541 +Node: Invoking the Debugger592858 +Node: Internals of Debugger596773 +Node: Syntax Errors601660 +Node: Excess Open602908 +Node: Excess Close604783 +Node: Compilation Errors606204 +Node: Edebug607492 +Node: Using Edebug609600 +Node: Instrumenting612297 +Node: Edebug Execution Modes615786 +Node: Jumping618896 +Node: Edebug Misc621239 +Node: Breakpoints622628 +Node: Global Break Condition625434 +Node: Embedded Breakpoints626389 +Node: Trapping Errors627344 +Node: Edebug Views629420 +Node: Edebug Eval631385 +Node: Eval List632562 +Node: Reading in Edebug635947 +Node: Printing in Edebug636746 +Node: Tracing638461 +Node: Coverage Testing640347 +Node: The Outside Context642388 +Node: Checking Whether to Stop643337 +Node: Edebug Display Update643984 +Node: Edebug Recursive Edit646007 +Node: Instrumenting Macro Calls647662 +Node: Specification List650144 +Node: Backtracking659555 +Node: Debugging Backquote661493 +Node: Specification Examples665199 +Node: Edebug Options667266 +Node: Read and Print672603 +Node: Streams Intro673580 +Node: Input Streams675598 +Node: Input Functions680499 +Node: Output Streams682559 +Node: Output Functions686610 +Node: Output Variables690910 +Node: Minibuffers695709 +Node: Intro to Minibuffers696794 +Node: Text from Minibuffer699120 +Node: Object from Minibuffer703782 +Node: Minibuffer History706999 +Node: Completion709909 +Node: Basic Completion711884 +Node: Minibuffer Completion716908 +Node: Completion Commands720153 +Node: High-Level Completion724800 +Node: Reading File Names728824 +Node: Programmed Completion732513 +Node: Yes-or-No Queries734723 +Node: Multiple Queries740460 +Node: Minibuffer Misc744524 +Node: Command Loop749390 +Node: Command Overview750734 +Node: Defining Commands754012 +Node: Using Interactive754760 +Node: Interactive Codes759533 +Node: Interactive Examples765325 +Node: Interactive Call766639 +Node: Command Loop Info772040 +Node: Events777019 +Node: Event Types778479 +Node: Event Contents780402 +Node: Event Predicates784878 +Node: Accessing Mouse Event Positions786203 +Node: Frame-Level Event Position Info786902 +Node: Window-Level Event Position Info787942 +Node: Event Text Position Info789706 +Node: Event Glyph Position Info792198 +Node: Event Toolbar Position Info793521 +Node: Other Event Position Info794192 +Node: Accessing Other Event Info794601 +Node: Working With Events796221 +Node: Converting Events802209 +Node: Reading Input805162 +Node: Key Sequence Input806164 +Node: Reading One Event808118 +Node: Dispatching an Event810879 +Node: Quoted Character Input811330 +Node: Peeking and Discarding812678 +Node: Waiting816582 +Node: Quitting818890 +Node: Prefix Command Arguments823298 +Node: Recursive Editing828385 +Node: Disabling Commands833181 +Node: Command History835249 +Node: Keyboard Macros836986 +Node: Keymaps839203 +Node: Keymap Terminology840780 +Node: Format of Keymaps843709 +Node: Creating Keymaps844120 +Node: Inheritance and Keymaps846199 +Node: Key Sequences848571 +Node: Prefix Keys853141 +Node: Active Keymaps856726 +Node: Key Lookup865941 +Node: Functions for Key Lookup871104 +Node: Changing Key Bindings876801 +Node: Key Binding Commands883698 +Node: Scanning Keymaps885763 +Node: Other Keymap Functions894274 +Node: Menus894896 +Node: Menu Format895438 +Node: Menubar Format904023 +Node: Menubar904648 +Node: Modifying Menus907761 +Node: Menu Filters912775 +Node: Pop-Up Menus914671 +Node: Menu Accelerators916876 +Node: Creating Menu Accelerators917598 +Node: Keyboard Menu Traversal918916 +Node: Menu Accelerator Functions919643 +Node: Buffers Menu922678 +Node: Dialog Boxes923972 +Node: Dialog Box Format924139 +Node: Dialog Box Functions925509 +Node: Toolbar925906 +Node: Toolbar Intro926231 +Node: Toolbar Descriptor Format928641 +Node: Specifying the Toolbar933135 +Node: Other Toolbar Variables936740 +Node: Scrollbars941167 +Node: Drag and Drop941303 +Node: Supported Protocols942379 +Node: OffiX DND942882 +Node: CDE dt943889 +Node: MSWindows OLE944480 +Node: Loose ends944651 +Node: Drop Interface945043 +Node: Drag Interface946065 +Node: Modes946239 +Node: Major Modes947190 +Node: Major Mode Conventions950105 +Node: Example Major Modes956060 +Node: Auto Major Mode964093 +Node: Mode Help971541 +Node: Derived Modes972642 +Node: Minor Modes974833 +Node: Minor Mode Conventions976135 +Node: Keymaps and Minor Modes978998 +Node: Modeline Format979833 +Node: Modeline Data981601 +Node: Modeline Variables985871 +Node: %-Constructs990587 +Node: Hooks993498 +Node: Documentation1000260 +Node: Documentation Basics1001683 +Node: Accessing Documentation1004733 +Node: Keys in Documentation1011012 +Node: Describing Characters1014491 +Node: Help Functions1016840 +Node: Obsoleteness1023291 +Node: Files1026285 +Node: Visiting Files1028210 +Node: Visiting Functions1029715 +Node: Subroutines of Visiting1034762 +Node: Saving Buffers1036835 +Node: Reading from Files1042928 +Node: Writing to Files1045085 +Node: File Locks1047802 +Node: Information about Files1050855 +Node: Testing Accessibility1051616 +Node: Kinds of Files1055356 +Node: Truenames1057037 +Node: File Attributes1058039 +Node: Changing File Attributes1063178 +Node: File Names1068584 +Node: File Name Components1070193 +Node: Directory Names1073294 +Node: Relative File Names1076747 +Node: File Name Expansion1077825 +Node: Unique File Names1081732 +Node: File Name Completion1083347 +Node: User Name Completion1086008 +Node: Contents of Directories1087348 +Node: Create/Delete Dirs1090661 +Node: Magic File Names1091767 +Node: Partial Files1097397 +Node: Intro to Partial Files1097625 +Node: Creating a Partial File1098865 +Node: Detached Partial Files1099800 +Node: Format Conversion1100922 +Node: Files and MS-DOS1107438 +Node: Backups and Auto-Saving1109502 +Node: Backup Files1110177 +Node: Making Backups1111574 +Node: Rename or Copy1114323 +Node: Numbered Backups1116816 +Node: Backup Names1119060 +Node: Auto-Saving1122352 +Node: Reverting1130494 +Node: Buffers1133652 +Node: Buffer Basics1135069 +Node: Current Buffer1137122 +Node: Buffer Names1141810 +Node: Buffer File Name1145015 +Node: Buffer Modification1149134 +Node: Modification Time1151327 +Node: Read Only Buffers1154702 +Node: The Buffer List1157120 +Node: Creating Buffers1161950 +Node: Killing Buffers1164096 +Node: Indirect Buffers1167827 +Node: Windows1170399 +Node: Basic Windows1171877 +Node: Splitting Windows1174975 +Node: Deleting Windows1181864 +Node: Selecting Windows1184544 +Node: Cyclic Window Ordering1187673 +Node: Buffers and Windows1192297 +Node: Displaying Buffers1194138 +Node: Choosing Window1199314 +Node: Window Point1207030 +Node: Window Start1209076 +Node: Vertical Scrolling1213566 +Node: Horizontal Scrolling1219703 +Node: Size of Window1223212 +Node: Position of Window1227930 +Node: Resizing Windows1230170 +Node: Window Configurations1235599 +Node: Frames1239024 +Node: Creating Frames1240793 +Node: Frame Properties1242134 +Node: Property Access1242950 +Node: Initial Properties1243799 +Node: X Frame Properties1246285 +Node: Size and Position1250919 +Node: Frame Name1252915 +Node: Frame Titles1253829 +Node: Deleting Frames1255653 +Node: Finding All Frames1256253 +Node: Frames and Windows1258247 +Node: Minibuffers and Frames1259952 +Node: Input Focus1260870 +Node: Visibility of Frames1263947 +Node: Raising and Lowering1265866 +Node: Frame Configurations1268242 +Node: Frame Hooks1268836 +Node: Consoles and Devices1270641 +Node: Basic Console Functions1273385 +Node: Basic Device Functions1273808 +Node: Console Types and Device Classes1274524 +Node: Connecting to a Console or Device1276721 +Node: The Selected Console and Device1278884 +Node: Console and Device I/O1279910 +Node: Positions1280674 +Node: Point1281643 +Node: Motion1284733 +Node: Character Motion1285500 +Node: Word Motion1287737 +Node: Buffer End Motion1289238 +Node: Text Lines1290735 +Node: Screen Lines1295330 +Node: List Motion1299393 +Node: Skipping Characters1302801 +Node: Excursions1305020 +Node: Narrowing1308052 +Node: Markers1313377 +Node: Overview of Markers1314283 +Node: Predicates on Markers1318975 +Node: Creating Markers1320221 +Node: Information from Markers1324258 +Node: Changing Markers1325356 +Node: The Mark1326734 +Node: The Region1335228 +Node: Text1340915 +Node: Near Point1343614 +Node: Buffer Contents1347336 +Node: Comparing Text1348742 +Node: Insertion1350150 +Node: Commands for Insertion1353992 +Node: Deletion1356948 +Node: User-Level Deletion1360543 +Node: The Kill Ring1364704 +Node: Kill Ring Concepts1366878 +Node: Kill Functions1367932 +Node: Yank Commands1369837 +Node: Low-Level Kill Ring1371708 +Node: Internals of Kill Ring1374494 +Node: Undo1377274 +Node: Maintaining Undo1381603 +Node: Filling1384223 +Node: Margins1390217 +Node: Auto Filling1394146 +Node: Sorting1395327 +Node: Columns1404627 +Node: Indentation1407143 +Node: Primitive Indent1407922 +Node: Mode-Specific Indent1409166 +Node: Region Indent1411677 +Node: Relative Indent1414625 +Node: Indent Tabs1417007 +Node: Motion by Indent1418328 +Node: Case Changes1419107 +Node: Text Properties1422358 +Node: Examining Properties1424171 +Node: Changing Properties1426038 +Node: Property Search1429629 +Node: Special Properties1434340 +Node: Saving Properties1434621 +Node: Substitution1437763 +Node: Registers1441033 +Node: Transposition1443576 +Node: Change Hooks1444470 +Node: Transformations1446510 +Node: Searching and Matching1450895 +Node: String Search1452026 +Node: Regular Expressions1456750 +Node: Syntax of Regexps1458117 +Node: Regexp Example1472496 +Node: Regexp Search1474666 +Node: POSIX Regexps1480754 +Node: Search and Replace1482589 +Node: Match Data1485954 +Node: Simple Match Data1487084 +Node: Replacing Match1491349 +Node: Entire Match Data1493683 +Node: Saving Match Data1495674 +Node: Searching and Case1497055 +Node: Standard Regexps1499089 +Node: Syntax Tables1501287 +Node: Syntax Basics1502401 +Node: Syntax Descriptors1505373 +Node: Syntax Class Table1507223 +Node: Syntax Flags1513261 +Node: Syntax Table Functions1516478 +Node: Motion and Syntax1520342 +Node: Parsing Expressions1521794 +Node: Standard Syntax Tables1527863 +Node: Syntax Table Internals1528707 +Node: Abbrevs1529733 +Node: Abbrev Mode1531536 +Node: Abbrev Tables1532256 +Node: Defining Abbrevs1533789 +Node: Abbrev Files1535694 +Node: Abbrev Expansion1537467 +Node: Standard Abbrev Tables1542098 +Node: Extents1543257 +Node: Intro to Extents1544500 +Node: Creating and Modifying Extents1548494 +Node: Extent Endpoints1550001 +Node: Finding Extents1553264 +Node: Mapping Over Extents1557013 +Node: Extent Properties1563130 +Node: Detached Extents1573274 +Node: Extent Parents1575133 +Node: Duplicable Extents1576828 +Node: Extents and Events1580049 +Node: Atomic Extents1581956 +Node: Specifiers1582403 +Node: Introduction to Specifiers1584210 +Node: Specifiers In-Depth1586520 +Node: Specifier Instancing1591434 +Node: Specifier Types1594696 +Node: Adding Specifications1599770 +Node: Retrieving Specifications1609132 +Node: Specifier Tag Functions1612867 +Node: Specifier Instancing Functions1616101 +Node: Specifier Example1619508 +Node: Creating Specifiers1622614 +Node: Specifier Validation Functions1624863 +Node: Other Specification Functions1627247 +Node: Faces and Window-System Objects1631066 +Node: Faces1631390 +Node: Merging Faces1633007 +Node: Basic Face Functions1634968 +Node: Face Properties1637066 +Node: Face Convenience Functions1646625 +Node: Other Face Display Functions1649755 +Node: Fonts1650568 +Node: Font Specifiers1651269 +Node: Font Instances1651510 +Node: Font Instance Names1652477 +Node: Font Instance Size1653318 +Node: Font Instance Characteristics1654604 +Node: Font Convenience Functions1655773 +Node: Colors1657063 +Node: Color Specifiers1657503 +Node: Color Instances1657730 +Node: Color Instance Properties1658474 +Node: Color Convenience Functions1659100 +Node: Glyphs1660153 +Node: Glyph Functions1661745 +Node: Creating Glyphs1662152 +Node: Glyph Properties1663739 +Node: Glyph Convenience Functions1672906 +Node: Glyph Dimensions1676853 +Node: Images1677933 +Node: Image Specifiers1678382 +Node: Image Instantiator Conversion1689804 +Node: Image Instances1691169 +Node: Image Instance Types1691920 +Node: Image Instance Functions1694575 +Node: Glyph Types1699144 +Node: Mouse Pointer1700916 +Node: Redisplay Glyphs1703919 +Node: Subwindows1704952 +Node: Annotations1705195 +Node: Annotation Basics1706211 +Node: Annotation Primitives1710149 +Node: Annotation Properties1711478 +Node: Locating Annotations1714518 +Node: Margin Primitives1715355 +Node: Annotation Hooks1717249 +Node: Display1717909 +Node: Refresh Screen1718887 +Node: Truncation1720798 +Node: The Echo Area1723323 +Node: Warnings1729758 +Node: Invisible Text1734194 +Node: Selective Display1736773 +Node: Overlay Arrow1740899 +Node: Temporary Displays1742252 +Node: Blinking1746373 +Node: Usual Display1748558 +Node: Display Tables1751107 +Node: Display Table Format1751911 +Node: Active Display Table1753353 +Node: Character Descriptors1754545 +Node: Beeping1755302 +Node: Hash Tables1760068 +Node: Introduction to Hash Tables1760676 +Node: Working With Hash Tables1766699 +Node: Weak Hash Tables1767816 +Node: Range Tables1769615 +Node: Introduction to Range Tables1770304 +Node: Working With Range Tables1770735 +Node: Databases1771620 +Node: Connecting to a Database1771919 +Node: Working With a Database1773010 +Node: Other Database Functions1773868 +Node: Processes1774442 +Node: Subprocess Creation1776666 +Node: Synchronous Processes1779955 +Node: MS-DOS Subprocesses1786673 +Node: Asynchronous Processes1787747 +Node: Deleting Processes1791460 +Node: Process Information1793331 +Node: Input to Processes1797257 +Node: Signals to Processes1799547 +Node: Output from Processes1803967 +Node: Process Buffers1804779 +Node: Filter Functions1807646 +Node: Accepting Output1813216 +Node: Sentinels1814743 +Node: Process Window Size1818233 +Node: Transaction Queues1818582 +Node: Network1820280 +Node: System Interface1822114 +Node: Starting Up1823384 +Node: Start-up Summary1823978 +Node: Init File1827532 +Node: Terminal-Specific1829913 +Node: Command Line Arguments1833072 +Node: Getting Out1836561 +Node: Killing XEmacs1837130 +Node: Suspending XEmacs1838799 +Node: System Environment1842141 +Node: User Identification1848808 +Node: Time of Day1852337 +Node: Time Conversion1855124 +Node: Timers1860164 +Node: Terminal Input1862337 +Node: Input Modes1862840 +Node: Translating Input1865253 +Node: Recording Input1869418 +Node: Terminal Output1871518 +Node: Flow Control1875141 +Node: Batch Mode1878933 +Node: X-Windows1880315 +Node: X Selections1881127 +Node: X Server1883337 +Node: Resources1883738 +Node: Server Data1888879 +Node: Grabs1890086 +Node: X Miscellaneous1891667 +Node: ToolTalk Support1894052 +Node: XEmacs ToolTalk API Summary1894269 +Node: Sending Messages1895569 +Node: Example of Sending Messages1895820 +Node: Elisp Interface for Sending Messages1896882 +Node: Receiving Messages1903275 +Node: Example of Receiving Messages1903498 +Node: Elisp Interface for Receiving Messages1904334 +Node: LDAP Support1908159 +Node: Building XEmacs with LDAP support1908655 +Node: XEmacs LDAP API1909633 +Node: LDAP Variables1910363 +Node: The High-Level LDAP API1912839 +Node: The Low-Level LDAP API1913944 +Node: The LDAP Lisp Object1914218 +Node: Opening and Closing a LDAP Connection1914771 +Node: Searching on a LDAP Server (Low-level)1916554 +Node: Syntax of Search Filters1917947 +Node: Internationalization1919245 +Node: I18N Levels 1 and 21919582 +Node: I18N Level 31920288 +Node: Level 3 Basics1920569 +Node: Level 3 Primitives1921402 +Node: Dynamic Messaging1923008 +Node: Domain Specification1923471 +Node: Documentation String Extraction1925374 +Node: I18N Level 41926292 +Node: MULE1926484 +Node: Internationalization Terminology1927595 +Node: Charsets1936134 +Node: Charset Properties1936830 +Node: Basic Charset Functions1941516 +Node: Charset Property Functions1943697 +Node: Predefined Charsets1945740 +Node: MULE Characters1948660 +Node: Composite Characters1949507 +Node: ISO 20221950761 +Node: Coding Systems1956483 +Node: Coding System Types1958405 +Node: EOL Conversion1960224 +Node: Coding System Properties1961407 +Node: Basic Coding System Functions1965259 +Node: Coding System Property Functions1967163 +Node: Encoding and Decoding Text1967721 +Node: Detection of Textual Encoding1968857 +Node: Big5 and Shift-JIS Functions1970393 +Node: CCL1971481 +Node: CCL Syntax1974585 +Node: CCL Statements1976173 +Node: CCL Expressions1980821 +Node: Calling CCL1983360 +Node: CCL Examples1986349 +Node: Category Tables1986486 +Node: Tips1988845 +Node: Style Tips1989486 +Node: Compilation Tips1999005 +Node: Documentation Tips2000919 +Node: Comment Tips2006428 +Node: Library Headers2009430 +Node: Building XEmacs and Object Allocation2013402 +Node: Building XEmacs2014285 +Node: Pure Storage2020620 +Node: Garbage Collection2023408 +Node: Standard Errors2034547 +Node: Standard Buffer-Local Variables2038756 +Node: Standard Keymaps2041389 +Node: Standard Hooks2045121 +Node: Index2052621  End Tag Table diff --git a/info/lispref.info-1 b/info/lispref.info-1 index 097bf97..99ffbd8 100644 --- a/info/lispref.info-1 +++ b/info/lispref.info-1 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -151,7 +151,7 @@ Appendices * Index:: Index including concepts, functions, variables, and other terms. - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Here are other nodes that are inferiors of those already listed, mentioned here so you can get to them in one step: @@ -303,7 +303,7 @@ Kinds of Forms * Classifying Lists:: How to distinguish various sorts of list forms. * Function Forms:: Forms that call functions. * Macro Forms:: Forms that call macros. -* Special Forms:: "Special forms" are idiosyncratic primitives, +* Special Forms:: ``Special forms'' are idiosyncratic primitives, most of them extremely important. * Autoloading:: Functions set up to load files containing their real definitions. @@ -466,7 +466,7 @@ Command Loop * Events:: What input looks like when you read it. * Reading Input:: How to read input events from the keyboard or mouse. * Waiting:: Waiting for user input or elapsed time. -* Quitting:: How `C-g' works. How to catch or defer quitting. +* Quitting:: How C-g works. How to catch or defer quitting. * Prefix Command Arguments:: How the commands to set prefix args work. * Recursive Editing:: Entering a recursive edit, and why you usually shouldn't. @@ -651,7 +651,7 @@ Buffers is visited. * Buffer Modification:: A buffer is "modified" if it needs to be saved. * Modification Time:: Determining whether the visited file was changed - "behind XEmacs's back". + ``behind XEmacs's back''. * Read Only Buffers:: Modifying text is not allowed in a read-only buffer. * The Buffer List:: How to look at all the existing buffers. @@ -720,8 +720,8 @@ Markers * Information from Markers:: Finding the marker's buffer or character position. * Changing Markers:: Moving the marker to a new buffer or position. -* The Mark:: How "the mark" is implemented with a marker. -* The Region:: How to access "the region". +* The Mark:: How ``the mark'' is implemented with a marker. +* The Region:: How to access ``the region''. Text @@ -828,10 +828,10 @@ Specifiers (under user control) in a wide variety of contexts. * Specifiers In-Depth:: Gory details about specifier innards. -* Specifier Instancing:: Instancing means obtaining the "value" of +* Specifier Instancing:: Instancing means obtaining the ``value'' of a specifier in a particular context. * Specifier Types:: Specifiers come in different flavors. -* Adding Specifications:: Specifications control a specifier's "value" +* Adding Specifications:: Specifications control a specifier's ``value'' by giving conditions under which a particular value is valid. * Retrieving Specifications:: Querying a specifier's specifications. diff --git a/info/lispref.info-10 b/info/lispref.info-10 index 74ab646..d81ddda 100644 --- a/info/lispref.info-10 +++ b/info/lispref.info-10 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -60,9 +60,9 @@ reference the former variable, the current value of the latter is returned. Any time you change the value of the former variable, the value of the latter is actually changed. This is useful in cases where you want to rename a variable but still make old code work (*note -Obsoleteness::.). +Obsoleteness::). - - Function: defvaralias VARIABLE ALIAS + - Function: defvaralias variable alias This function defines VARIABLE as an alias for ALIAS. Thenceforth, any operations performed on VARIABLE will actually be performed on ALIAS. Both VARIABLE and ALIAS should be symbols. @@ -74,12 +74,12 @@ Obsoleteness::.). variable, a variable that has a buffer-local value in any buffer, or the symbols `nil' or `t'. - - Function: variable-alias VARIABLE + - Function: variable-alias variable If VARIABLE is aliased to another variable, this function returns that variable. VARIABLE should be a symbol. If VARIABLE is not aliased, this function returns `nil'. - - Function: indirect-variable OBJECT + - Function: indirect-variable object This function returns the variable at the end of OBJECT's variable-alias chain. If OBJECT is a symbol, follow all variable aliases and return the final (non-aliased) symbol. If OBJECT is @@ -169,7 +169,7 @@ function-like objects. A "command" is an object that `command-execute' can invoke; it is a possible definition for a key sequence. Some functions are commands; a function written in Lisp is a command if it contains an - interactive declaration (*note Defining Commands::.). Such a + interactive declaration (*note Defining Commands::). Such a function can be called from Lisp expressions like other functions; in this case, the fact that the function is a command makes no difference. @@ -191,7 +191,7 @@ function-like objects. A "compiled function" is a function that has been compiled by the byte compiler. *Note Compiled-Function Type::. - - Function: subrp OBJECT + - Function: subrp object This function returns `t' if OBJECT is a built-in function (i.e., a Lisp primitive). @@ -200,7 +200,7 @@ function-like objects. (subrp (symbol-function 'message)) => t - - Function: compiled-function-p OBJECT + - Function: compiled-function-p object This function returns `t' if OBJECT is a compiled function. For example: @@ -310,10 +310,10 @@ right. Then it applies the lambda expression to the argument values 1, It is not often useful to write a lambda expression as the CAR of a form in this way. You can get the same result, of making local variables and giving them values, using the special form `let' (*note -Local Variables::.). And `let' is clearer and easier to use. In +Local Variables::). And `let' is clearer and easier to use. In practice, lambda expressions are either stored as the function definitions of symbols, to produce named functions, or passed as -arguments to other functions (*note Anonymous Functions::.). +arguments to other functions (*note Anonymous Functions::). However, calls to explicit lambda expressions were very useful in the old days of Lisp, before the special form `let' was invented. At that @@ -427,7 +427,7 @@ one or two complete sentences that summarize the function's purpose. source file, but since these spaces come before the starting double-quote, they are not part of the string. Some people make a practice of indenting any additional lines of the string so that the -text lines up in the program source. *This is a mistake.* The +text lines up in the program source. _This is a mistake._ The indentation of the following lines is inside the string; what looks nice in the source code will look ugly when displayed by the help commands. @@ -453,7 +453,7 @@ strictest sense has no name. It is simply a list whose first element is However, a symbol can serve as the name of a function. This happens when you put the function in the symbol's "function cell" (*note Symbol -Components::.). Then the symbol itself becomes a valid, callable +Components::). Then the symbol itself becomes a valid, callable function, equivalent to the list or subr-object that its function cell refers to. The contents of the function cell are also called the symbol's "function definition". The procedure of using a symbol's @@ -483,7 +483,7 @@ function definition. For most purposes, there is no need to distinguish. Even so, keep in mind that a function need not have a unique name. -While a given function object *usually* appears in the function cell of +While a given function object _usually_ appears in the function cell of only one symbol, this is just a matter of convenience. It is easy to store it in several symbols using `fset'; then each of the symbols is equally well a name for the same function. @@ -501,7 +501,7 @@ Defining Functions is called "defining a function", and it is done with the `defun' special form. - - Special Form: defun NAME ARGUMENT-LIST BODY-FORMS + - Special Form: defun name argument-list body-forms `defun' is the usual way to define new Lisp functions. It defines the symbol NAME as a function that looks like this: @@ -510,7 +510,7 @@ special form. `defun' stores this lambda expression in the function cell of NAME. It returns the value NAME, but usually we ignore this value. - As described previously (*note Lambda Expressions::.), + As described previously (*note Lambda Expressions::), ARGUMENT-LIST is a list of argument names and may include the keywords `&optional' and `&rest'. Also, the first two forms in BODY-FORMS may be a documentation string and an interactive @@ -553,8 +553,8 @@ special form. distinguish deliberate redefinition from unintentional redefinition. - - Function: define-function NAME DEFINITION - - Function: defalias NAME DEFINITION + - Function: define-function name definition + - Function: defalias name definition These equivalent special forms define the symbol NAME as a function, with definition DEFINITION (which can be any valid Lisp function). @@ -563,7 +563,7 @@ special form. specific function name is being defined--especially where that name appears explicitly in the source file being loaded. This is because `define-function' and `defalias' record which file defined - the function, just like `defun'. (*note Unloading::.). + the function, just like `defun'. (*note Unloading::). By contrast, in programs that manipulate function definitions for other purposes, it is better to use `fset', which does not keep @@ -594,7 +594,7 @@ Usually that's just what you want. Occasionally you need to decide at run time which function to call. To do that, use the functions `funcall' and `apply'. - - Function: funcall FUNCTION &rest ARGUMENTS + - Function: funcall function &rest arguments `funcall' calls FUNCTION with ARGUMENTS, and returns whatever FUNCTION returns. @@ -603,7 +603,7 @@ run time which function to call. To do that, use the functions that you can use any expression to obtain the function to be called. It also means that `funcall' does not see the expressions you write for the ARGUMENTS, only their values. These values are - *not* evaluated a second time in the act of calling FUNCTION; + _not_ evaluated a second time in the act of calling FUNCTION; `funcall' enters the normal procedure for calling a function at the place where the arguments have already been evaluated. @@ -624,7 +624,7 @@ run time which function to call. To do that, use the functions Compare these example with the examples of `apply'. - - Function: apply FUNCTION &rest ARGUMENTS + - Function: apply function &rest arguments `apply' calls FUNCTION with ARGUMENTS, just like `funcall' but with one difference: the last of ARGUMENTS is a list of arguments to give to FUNCTION, rather than a single argument. We also say @@ -659,10 +659,10 @@ function arguments are often called "functionals". function as the argument. Here are two different kinds of no-op function: - - Function: identity ARG + - Function: identity arg This function returns ARG and has no side effects. - - Function: ignore &rest ARGS + - Function: ignore &rest args This function ignores any arguments and returns `nil'.  @@ -676,7 +676,7 @@ list or other collection. XEmacs Lisp has three such functions; `mapcar' and `mapconcat', which scan a list, are described here. For the third mapping function, `mapatoms', see *Note Creating Symbols::. - - Function: mapcar FUNCTION SEQUENCE + - Function: mapcar function sequence `mapcar' applies FUNCTION to each element of SEQUENCE in turn, and returns a list of the results. @@ -692,10 +692,10 @@ the third mapping function, `mapatoms', see *Note Creating Symbols::. => (2 3 4) (mapcar 'char-to-string "abc") => ("a" "b" "c") - + ;; Call each function in `my-hooks'. (mapcar 'funcall my-hooks) - + (defun mapcar* (f &rest args) "Apply FUNCTION to successive cars of all ARGS. Return the list of results." @@ -706,11 +706,11 @@ the third mapping function, `mapatoms', see *Note Creating Symbols::. (apply 'mapcar* f ;; Recurse for rest of elements. (mapcar 'cdr args))))) - + (mapcar* 'cons '(a b c) '(1 2 3 4)) => ((a . 1) (b . 2) (c . 3)) - - Function: mapconcat FUNCTION SEQUENCE SEPARATOR + - Function: mapconcat function sequence separator `mapconcat' applies FUNCTION to each element of SEQUENCE: the results, which must be strings, are concatenated. Between each pair of result strings, `mapconcat' inserts the string SEPARATOR. @@ -724,7 +724,7 @@ the third mapping function, `mapatoms', see *Note Creating Symbols::. '(The cat in the hat) " ") => "The cat in the hat" - + (mapconcat (function (lambda (x) (format "%c" (1+ x)))) "HAL-8000" "") @@ -750,15 +750,15 @@ this: => (lambda (x) (+ 12 x)) This computes a list that looks like `(lambda (x) (+ 12 x))' and makes -it the value (*not* the function definition!) of `silly'. +it the value (_not_ the function definition!) of `silly'. Here is how we might call this function: (funcall silly 1) => 13 -(It does *not* work to write `(silly 1)', because this function is not -the *function definition* of `silly'. We have not given `silly' any +(It does _not_ work to write `(silly 1)', because this function is not +the _function definition_ of `silly'. We have not given `silly' any function definition, just a value as a variable.) Most of the time, anonymous functions are constants that appear in @@ -776,7 +776,7 @@ a number by two: In such cases, we usually use the special form `function' instead of simple quotation to quote the anonymous function. - - Special Form: function FUNCTION-OBJECT + - Special Form: function function-object This special form returns FUNCTION-OBJECT without evaluating it. In this, it is equivalent to `quote'. However, it serves as a note to the XEmacs Lisp compiler that FUNCTION-OBJECT is intended @@ -826,7 +826,7 @@ and set the function cell of symbols. See also the function `indirect-function' in *Note Function Indirection::. - - Function: symbol-function SYMBOL + - Function: symbol-function symbol This returns the object in the function cell of SYMBOL. If the symbol's function cell is void, a `void-function' error is signaled. @@ -858,12 +858,12 @@ cell contains no object whatsoever. `fboundp'. After you have given a symbol a function definition, you can make it void once more using `fmakunbound'. - - Function: fboundp SYMBOL + - Function: fboundp symbol This function returns `t' if the symbol has an object in its function cell, `nil' otherwise. It does not check that the object is a legitimate function. - - Function: fmakunbound SYMBOL + - Function: fmakunbound symbol This function makes SYMBOL's function cell void, so that a subsequent attempt to access this cell will cause a `void-function' error. (See also `makunbound', in *Note Local Variables::.) @@ -877,7 +877,7 @@ can make it void once more using `fmakunbound'. (foo 1) error--> Symbol's function definition is void: foo - - Function: fset SYMBOL OBJECT + - Function: fset symbol object This function stores OBJECT in the function cell of SYMBOL. The result is OBJECT. Normally OBJECT should be a function or the name of a function, but this is not checked. @@ -1078,7 +1078,7 @@ macro definition that does the job: (list 'setq var (list '1+ var))) When this is called with `(inc x)', the argument `var' has the value -`x'--*not* the *value* of `x'. The body of the macro uses this to +`x'--_not_ the _value_ of `x'. The body of the macro uses this to construct the expansion, which is `(setq x (1+ x))'. Once the macro definition returns this expansion, Lisp proceeds to evaluate it, thus incrementing `x'. @@ -1119,7 +1119,7 @@ this is unusual. You can see the expansion of a given macro call by calling `macroexpand'. - - Function: macroexpand FORM &optional ENVIRONMENT + - Function: macroexpand form &optional environment This function expands FORM, if it is a macro call. If the result is another macro call, it is expanded in turn, until something which is not a macro call results. That is the value returned by @@ -1142,14 +1142,14 @@ this is unusual. (defmacro inc (var) (list 'setq var (list '1+ var))) => inc - + (macroexpand '(inc r)) => (setq r (1+ r)) - + (defmacro inc2 (var1 var2) (list 'progn (list 'inc var1) (list 'inc var2))) => inc2 - + (macroexpand '(inc2 r s)) => (progn (inc r) (inc s)) ; `inc' not expanded here. @@ -1184,10 +1184,10 @@ macro in the same file where it is used and before its first use. the file. This is in case the file needs the required packages for proper compilation. One way to ensure that necessary macro definitions are available during compilation is to require the files that define -them (*note Named Features::.). To avoid loading the macro definition -files when someone *runs* the compiled program, write +them (*note Named Features::). To avoid loading the macro definition +files when someone _runs_ the compiled program, write `eval-when-compile' around the `require' calls (*note Eval During -Compile::.). +Compile::).  File: lispref.info, Node: Defining Macros, Next: Backquote, Prev: Compiling Macros, Up: Macros @@ -1206,7 +1206,7 @@ an anonymous macro to functionals such as `mapcar'. In practice, all Lisp macros have names, and they are usually defined with the special form `defmacro'. - - Special Form: defmacro NAME ARGUMENT-LIST BODY-FORMS... + - Special Form: defmacro name argument-list body-forms... `defmacro' defines the symbol NAME as a macro that looks like this: (macro lambda ARGUMENT-LIST . BODY-FORMS) @@ -1217,7 +1217,7 @@ form `defmacro'. The shape and meaning of ARGUMENT-LIST is the same as in a function, and the keywords `&rest' and `&optional' may be used - (*note Argument List::.). Macros may have a documentation string, + (*note Argument List::). Macros may have a documentation string, but any `interactive' declaration is ignored since macros cannot be called interactively. diff --git a/info/lispref.info-11 b/info/lispref.info-11 index 9369659..260c1fe 100644 --- a/info/lispref.info-11 +++ b/info/lispref.info-11 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -61,7 +61,7 @@ of constants and nonconstant parts. To make this easier, use the macro Backquote allows you to quote a list, but selectively evaluate elements of that list. In the simplest case, it is identical to the -special form `quote' (*note Quoting::.). For example, these two forms +special form `quote' (*note Quoting::). For example, these two forms yield identical results: `(a list of (+ 2 3) elements) @@ -148,19 +148,18 @@ find in Pascal. (cons 'while (cons (list '<= var final) (append body (list (list 'inc var))))))) => for + (for i from 1 to 3 do (setq square (* i i)) (princ (format "\n%d %d" i square))) ==> - (let ((i 1)) (while (<= i 3) (setq square (* i i)) (princ (format "%d %d" i square)) (inc i))) - - - -|1 1 + + -|1 1 -|2 4 -|3 9 => nil @@ -224,8 +223,7 @@ number of times: (defmacro for (var from init to final do &rest body) "Execute a simple for loop: (for i from 1 to 10 do (print i))." - - `(let ((,var ,init) + `(let ((,var ,init) (max ,final)) (while (<= ,var max) ,@body @@ -246,7 +244,7 @@ supposed to refer to the user's binding of `max', really access the binding made by `for'. The way to correct this is to use an uninterned symbol instead of -`max' (*note Creating Symbols::.). The uninterned symbol can be bound +`max' (*note Creating Symbols::). The uninterned symbol can be bound and referred to just like any other symbol, but since it is created by `for', we know that it cannot already appear in the user's program. Since it is not interned, there is no way the user can put it into the @@ -274,7 +272,7 @@ Evaluating Macro Arguments in Expansion Another problem can happen if you evaluate any of the macro argument expressions during the computation of the expansion, such as by calling -`eval' (*note Eval::.). If the argument is supposed to refer to the +`eval' (*note Eval::). If the argument is supposed to refer to the user's variables, you may have trouble if the user happens to use a variable with the same name as one of the macro arguments. Inside the macro body, the macro argument binding is the most local binding of this @@ -329,7 +327,7 @@ example: (defmacro empty-object () (list 'quote (cons nil nil))) - + (defun initialize (condition) (let ((object (empty-object))) (if condition @@ -458,7 +456,7 @@ and add your group to each of them using the `:group' keyword. The way to declare new customization groups is with `defgroup'. - - Macro: defgroup GROUP MEMBERS DOC [KEYWORD VALUE]... + - Macro: defgroup group members doc [keyword value]... Declare GROUP as a customization group containing MEMBERS. Do not quote the symbol GROUP. The argument DOC specifies the documentation string for the group. @@ -474,7 +472,7 @@ and add your group to each of them using the `:group' keyword. are `custom-variable' for a variable, `custom-face' for a face, and `custom-group' for a group. - In addition to the common keywords (*note Common Keywords::.), you + In addition to the common keywords (*note Common Keywords::), you can use this keyword in `defgroup': `:prefix PREFIX' @@ -492,7 +490,7 @@ Defining Customization Variables Use `defcustom' to declare user-editable variables. - - Macro: defcustom OPTION DEFAULT DOC [KEYWORD VALUE]... + - Macro: defcustom option default doc [keyword value]... Declare OPTION as a customizable user option variable. Do not quote OPTION. The argument DOC specifies the documentation string for the variable. @@ -621,7 +619,7 @@ example: symbol, one of the customization type names defined in the following sections. After this symbol come a number of arguments, depending on the symbol. Between the type symbol and its arguments, you can -optionally write keyword-value pairs (*note Type Keywords::.). +optionally write keyword-value pairs (*note Type Keywords::). Some of the type symbols do not use any arguments; those are called "simple types". For a simple type, if you do not use any keyword-value @@ -1007,7 +1005,7 @@ the forms are function definitions and variable definitions. * Autoload:: Setting up a function to autoload. * Repeated Loading:: Precautions about loading a file twice. * Named Features:: Loading a library if it isn't already loaded. -* Unloading:: How to "unload" a library that was loaded. +* Unloading:: How to ``unload'' a library that was loaded. * Hooks for Loading:: Providing code to be run when particular libraries are loaded. @@ -1020,11 +1018,11 @@ How Programs Do Loading XEmacs Lisp has several interfaces for loading. For example, `autoload' creates a placeholder object for a function in a file; trying to call the autoloading function loads the file to get the -function's real definition (*note Autoload::.). `require' loads a file -if it isn't already loaded (*note Named Features::.). Ultimately, all +function's real definition (*note Autoload::). `require' loads a file +if it isn't already loaded (*note Named Features::). Ultimately, all these facilities call the `load' function to do the work. - - Function: load FILENAME &optional MISSING-OK NOMESSAGE NOSUFFIX + - Function: load filename &optional missing-ok nomessage nosuffix This function finds and opens a file of Lisp code, evaluates all the forms in it, and closes the file. @@ -1129,7 +1127,7 @@ these facilities call the `load' function to do the work. should bind `load-path' locally with `let' around the calls to `load'. - - Function: locate-file FILENAME PATH-LIST &optional SUFFIXES MODE + - Function: locate-file filename path-list &optional suffixes mode This function searches for a file in the same way that `load' does, and returns the file found (if any). (In fact, `load' uses this function to search through `load-path'.) It searches for FILENAME @@ -1144,7 +1142,7 @@ these facilities call the `load' function to do the work. you will have to call `locate-file-clear-hashing' to get it back on track. See that function for details. - - Function: locate-file-clear-hashing PATH + - Function: locate-file-clear-hashing path This function clears the hash records for the specified list of directories. `locate-file' uses a hashing scheme to speed lookup, and will correctly track the following environmental changes: diff --git a/info/lispref.info-12 b/info/lispref.info-12 index 994bfc1..326fc16 100644 --- a/info/lispref.info-12 +++ b/info/lispref.info-12 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -71,8 +71,8 @@ arranges to execute them when Emacs is built. Magic comments are the most convenient way to make a function autoload, but only for packages installed along with Emacs. - - Function: autoload FUNCTION FILENAME &optional DOCSTRING INTERACTIVE - TYPE + - Function: autoload function filename &optional docstring interactive + type This function defines the function (or macro) named FUNCTION so as to load automatically from FILENAME. The string FILENAME specifies the file to load to get the real definition of FUNCTION. @@ -118,7 +118,7 @@ installed along with Emacs. In this case, `"prolog"' is the name of the file to load, 169681 refers to the documentation string in the `DOC' file (*note - Documentation Basics::.), `t' means the function is interactive, + Documentation Basics::), `t' means the function is interactive, and `nil' that it is not a macro or a keymap. The autoloaded file usually contains other definitions and may @@ -150,7 +150,7 @@ for all files in the current directory. The same magic comment can copy any kind of form into `loaddefs.el'. If the form following the magic comment is not a function definition, it is copied verbatim. You can also use a magic comment to execute a -form at build time *without* executing it when the file itself is +form at build time _without_ executing it when the file itself is loaded. To do this, write the form "on the same line" as the magic comment. Since it is in a comment, it does nothing when you load the source file; but `update-file-autoloads' copies it to `loaddefs.el', @@ -216,7 +216,7 @@ avoid the problem, write this: (cons '(leif-mode " Leif") minor-mode-alist))) To add an element to a list just once, use `add-to-list' (*note -Setting Variables::.). +Setting Variables::). Occasionally you will want to test explicitly whether a library has already been loaded. Here's one way to test, in a library, whether it @@ -281,7 +281,7 @@ This adds `comint' to the global `features' list, so that `(require 'comint)' will henceforth know that nothing needs to be done. When `require' is used at top level in a file, it takes effect when -you byte-compile that file (*note Byte Compilation::.) as well as when +you byte-compile that file (*note Byte Compilation::) as well as when you load it. This is in case the required package contains macros that the byte compiler must know about. @@ -300,7 +300,7 @@ loading the file in question. Loading the file does execute the `provide' call, so the subsequent `require' call does nothing while loading. - - Function: provide FEATURE + - Function: provide feature This function announces that FEATURE is now loaded, or being loaded, into the current XEmacs session. This means that the facilities associated with FEATURE are or will be available for @@ -323,7 +323,7 @@ loading. or `provide' calls that occurred during the load are undone. *Note Autoload::. - - Function: require FEATURE &optional FILENAME + - Function: require feature &optional filename This function checks whether FEATURE is present in the current XEmacs session (using `(featurep FEATURE)'; see below). If it is not, then `require' loads FILENAME with `load'. If FILENAME is @@ -333,7 +333,7 @@ loading. If loading the file fails to provide FEATURE, `require' signals an error, `Required feature FEATURE was not provided'. - - Function: featurep FEXP + - Function: featurep fexp This function returns `t' if feature FEXP is present in this Emacs. Use this to conditionalize execution of lisp code based on the presence or absence of emacs or environment extensions. @@ -396,7 +396,7 @@ Unloading reclaim memory for other Lisp objects. To do this, use the function `unload-feature': - - Command: unload-feature FEATURE &optional FORCE + - Command: unload-feature feature &optional force This command unloads the library that provided feature FEATURE. It undefines all functions, macros, and variables defined in that library with `defconst', `defvar', `defun', `defmacro', @@ -564,11 +564,11 @@ Macros::. load the file. But it does execute any `require' calls at top level in the file. One way to ensure that necessary macro definitions are available during compilation is to `require' the file that defines them -(*note Named Features::.). To avoid loading the macro definition files -when someone *runs* the compiled program, write `eval-when-compile' -around the `require' calls (*note Eval During Compile::.). +(*note Named Features::). To avoid loading the macro definition files +when someone _runs_ the compiled program, write `eval-when-compile' +around the `require' calls (*note Eval During Compile::). - - Function: byte-compile SYMBOL + - Function: byte-compile symbol This function byte-compiles the function definition of SYMBOL, replacing the previous definition with the compiled one. The function definition of SYMBOL must be the actual code for the @@ -603,7 +603,7 @@ around the `require' calls (*note Eval During Compile::.). except for certain primitives that are coded as special instructions. - - Command: compile-defun &optional ARG + - Command: compile-defun &optional arg This command reads the defun containing point, compiles it, and evaluates the result. If you use this on a defun that is actually a function definition, the effect is to install a compiled version @@ -612,7 +612,7 @@ around the `require' calls (*note Eval During Compile::.). If ARG is non-`nil', the result is inserted in the current buffer after the form; otherwise, it is printed in the minibuffer. - - Command: byte-compile-file FILENAME &optional LOAD + - Command: byte-compile-file filename &optional load This function compiles a file of Lisp code named FILENAME into a file of byte-code. The output file's name is made by appending `c' to the end of FILENAME. @@ -640,7 +640,7 @@ around the `require' calls (*note Eval During Compile::.). -rw-r--r-- 1 lewis 791 Oct 5 20:31 push.el -rw-r--r-- 1 lewis 638 Oct 8 20:25 push.elc - - Command: byte-recompile-directory DIRECTORY &optional FLAG + - Command: byte-recompile-directory directory &optional flag This function recompiles every `.el' file in DIRECTORY that needs recompilation. A file needs recompilation if a `.elc' file exists but is older than the `.el' file. @@ -672,7 +672,7 @@ around the `require' calls (*note Eval During Compile::.). normally `nil', but is bound to `t' by `batch-byte-recompile-directory'. - - Function: byte-code INSTRUCTIONS CONSTANTS STACK-SIZE + - Function: byte-code instructions constants stack-size This function actually interprets byte-code. Don't call this function yourself. Only the byte compiler knows how to generate valid calls to this function. @@ -786,7 +786,7 @@ files with file-local variable bindings, like this: If this is non-`nil', the byte compiler generates compiled files that are set up for dynamic function loading. - - Function: fetch-bytecode FUNCTION + - Function: fetch-bytecode function This immediately finishes loading the definition of FUNCTION from its byte-compiled file, if it is not fully loaded already. The argument FUNCTION may be a compiled-function object or a function @@ -801,7 +801,7 @@ Evaluation During Compilation These features permit you to write code to be evaluated during compilation of a program. - - Special Form: eval-and-compile BODY + - Special Form: eval-and-compile body This form marks BODY to be evaluated both when you compile the containing code and when you run it (whether compiled or not). @@ -810,7 +810,7 @@ compilation of a program. preferable if there is a substantial amount of code to be executed in this way. - - Special Form: eval-when-compile BODY + - Special Form: eval-when-compile body This form marks BODY to be evaluated at compile time and not when the compiled program is loaded. The result of evaluation by the compiler becomes a constant which appears in the compiled program. @@ -862,7 +862,7 @@ DOC-STRING The documentation string (if any); otherwise, `nil'. The value may be a number or a list, in case the documentation string is stored in a file. Use the function `documentation' to get the real - documentation string (*note Accessing Documentation::.). + documentation string (*note Accessing Documentation::). INTERACTIVE The interactive spec (if any). This can be a string or a Lisp @@ -886,13 +886,13 @@ representation. It is the definition of the command `backward-sexp'. The primitive way to create a compiled-function object is with `make-byte-code': - - Function: make-byte-code ARGLIST INSTRUCTIONS CONSTANTS STACK-SIZE - &optional DOC-STRING INTERACTIVE + - Function: make-byte-code arglist instructions constants stack-size + &optional doc-string interactive This function constructs and returns a compiled-function object with the specified attributes. - *Please note:* Unlike all other Emacs-lisp functions, calling this - with five arguments is *not* the same as calling it with six + _Please note:_ Unlike all other Emacs-lisp functions, calling this + with five arguments is _not_ the same as calling it with six arguments, the last of which is `nil'. If the INTERACTIVE arg is specified as `nil', then that means that this function was defined with `(interactive)'. If the arg is not specified, then that means @@ -909,34 +909,34 @@ byte compiler to create these objects; it makes the elements consistent The following primitives are provided for accessing the elements of a compiled-function object. - - Function: compiled-function-arglist FUNCTION + - Function: compiled-function-arglist function This function returns the argument list of compiled-function object FUNCTION. - - Function: compiled-function-instructions FUNCTION + - Function: compiled-function-instructions function This function returns a string describing the byte-code instructions of compiled-function object FUNCTION. - - Function: compiled-function-constants FUNCTION + - Function: compiled-function-constants function This function returns the vector of Lisp objects referenced by compiled-function object FUNCTION. - - Function: compiled-function-stack-size FUNCTION + - Function: compiled-function-stack-size function This function returns the maximum stack size needed by compiled-function object FUNCTION. - - Function: compiled-function-doc-string FUNCTION + - Function: compiled-function-doc-string function This function returns the doc string of compiled-function object FUNCTION, if available. - - Function: compiled-function-interactive FUNCTION + - Function: compiled-function-interactive function This function returns the interactive spec of compiled-function object FUNCTION, if any. The return value is `nil' or a two-element list, the first element of which is the symbol `interactive' and the second element is the interactive spec (a string or Lisp form). - - Function: compiled-function-domain FUNCTION + - Function: compiled-function-domain function This function returns the domain of compiled-function object FUNCTION, if any. The result will be a string or `nil'. *Note Domain Specification::. @@ -961,7 +961,7 @@ returns it as the value of the function. ordinary Lisp variables, by transferring values between variables and the stack. - - Command: disassemble OBJECT &optional STREAM + - Command: disassemble object &optional stream This function prints the disassembled code for OBJECT. If STREAM is supplied, then output goes there. Otherwise, the disassembled code is printed to the stream `standard-output'. The argument diff --git a/info/lispref.info-13 b/info/lispref.info-13 index c94556d..3d16406 100644 --- a/info/lispref.info-13 +++ b/info/lispref.info-13 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -150,7 +150,7 @@ and then step through the function, or you can do this to a function called shortly before the problem, step quickly over the call to that function, and then step through its caller. - - Command: debug-on-entry FUNCTION-NAME + - Command: debug-on-entry function-name This function requests FUNCTION-NAME to invoke the debugger each time it is called. It works by inserting the form `(debug 'debug)' into the function definition as the first form. @@ -197,7 +197,7 @@ function, and then step through its caller. (debug (quote debug)) (if (zerop n) 1 (* n (fact (1- n))))) - - Command: cancel-debug-on-entry FUNCTION-NAME + - Command: cancel-debug-on-entry function-name This function undoes the effect of `debug-on-entry' on FUNCTION-NAME. When called interactively, it prompts for FUNCTION-NAME in the minibuffer. If FUNCTION-NAME is `nil' or the @@ -223,7 +223,7 @@ file! additional form can be evaluated and its value ignored. (If the value of `(debug)' isn't ignored, it will alter the execution of the program!) The most common suitable places are inside a `progn' or an -implicit `progn' (*note Sequencing::.). +implicit `progn' (*note Sequencing::).  File: lispref.info, Node: Using Debugger, Next: Debugger Commands, Prev: Explicit Debug, Up: Debugger @@ -245,7 +245,7 @@ usual XEmacs editing commands are available; thus, you can switch windows to examine the buffer that was being edited at the time of the error, switch buffers, visit files, or do any other sort of editing. However, the debugger is a recursive editing level (*note Recursive -Editing::.) and it is wise to go back to the backtrace buffer and exit +Editing::) and it is wise to go back to the backtrace buffer and exit the debugger (with the `q' command) when you are finished with it. Exiting the debugger gets out of the recursive edit and kills the backtrace buffer. @@ -366,7 +366,7 @@ Invoking the Debugger Here we describe fully the function used to invoke the debugger. - - Function: debug &rest DEBUGGER-ARGS + - Function: debug &rest debugger-args This function enters the debugger. It switches buffers to a buffer named `*Backtrace*' (or `*Backtrace*<2>' if it is the second recursive entry to the debugger, etc.), and fills it with @@ -468,7 +468,7 @@ debugger. was called. The convention for arguments is detailed in the description of `debug'. - - Command: backtrace &optional STREAM DETAILED + - Command: backtrace &optional stream detailed This function prints a trace of Lisp function calls currently active. This is the function used by `debug' to fill up the `*Backtrace*' buffer. It is written in C, since it must have @@ -497,7 +497,7 @@ debugger. (list 'testing (backtrace)))))))) => nil - + ----------- Buffer: backtrace-output ------------ backtrace() (list ...computing arguments...) @@ -523,7 +523,7 @@ debugger. The `d' command in the debugger works by setting this variable. - - Function: backtrace-debug LEVEL FLAG + - Function: backtrace-debug level flag This function sets the debug-on-exit flag of the stack frame LEVEL levels down the stack, giving it the value FLAG. If FLAG is non-`nil', this will cause the debugger to be entered when that @@ -543,7 +543,7 @@ debugger. another global variable is that the data will never carry over to a subsequent command invocation. - - Function: backtrace-frame FRAME-NUMBER + - Function: backtrace-frame frame-number The function `backtrace-frame' is intended for use in Lisp debuggers. It returns information about what computation is happening in the stack frame FRAME-NUMBER levels down. @@ -676,7 +676,7 @@ in `M-x list-buffers'.) This buffer contains the program being compiled, and point shows how far the byte compiler was able to read. If the error was due to invalid Lisp syntax, point shows exactly -where the invalid syntax was *detected*. The cause of the error is not +where the invalid syntax was _detected_. The cause of the error is not necessarily near by! Use the techniques in the previous section to find the error. @@ -721,6 +721,7 @@ provides the following features: * Provide rudimentary coverage testing and display of frequency counts. + The first three sections should tell you enough about Edebug to enable you to use it. @@ -828,14 +829,14 @@ redefined so that when invoked with a prefix argument on a definition, it instruments the definition before evaluating it. (The source code itself is not modified.) If the variable `edebug-all-defs' is non-`nil', that inverts the meaning of the prefix argument: then -`C-M-x' instruments the definition *unless* it has a prefix argument. +`C-M-x' instruments the definition _unless_ it has a prefix argument. The default value of `edebug-all-defs' is `nil'. The command `M-x edebug-all-defs' toggles the value of the variable `edebug-all-defs'. If `edebug-all-defs' is non-`nil', then the commands `eval-region', `eval-current-buffer', and `eval-buffer' also instrument any definitions they evaluate. Similarly, `edebug-all-forms' controls -whether `eval-region' should instrument *any* form, even non-defining +whether `eval-region' should instrument _any_ form, even non-defining forms. This doesn't apply to loading or evaluations in the minibuffer. The command `M-x edebug-all-forms' toggles this option. diff --git a/info/lispref.info-14 b/info/lispref.info-14 index fb2b043..6d73d79 100644 --- a/info/lispref.info-14 +++ b/info/lispref.info-14 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -321,7 +321,7 @@ Tracing ------- In addition to automatic stepping through source code, which is also -called *tracing* (see *Note Edebug Execution Modes::), Edebug can +called _tracing_ (see *Note Edebug Execution Modes::), Edebug can produce a traditional trace listing of execution in a separate buffer, `*edebug-trace*'. @@ -418,7 +418,7 @@ for the evaluation. But Edebug is not completely successful and this section explains precisely how it fails. Edebug operation unavoidably alters some data in XEmacs, and this can interfere with debugging certain programs. Also notice that Edebug's protection against change -of outside data means that any side effects *intended* by the user in +of outside data means that any side effects _intended_ by the user in the course of debugging will be defeated. * Menu: @@ -444,6 +444,7 @@ action, it needs to save and restore certain data. Edebug is active, `executing-macro' is bound to `edebug-continue-kbd-macro'. +  File: lispref.info, Node: Edebug Display Update, Next: Edebug Recursive Edit, Prev: Checking Whether to Stop, Up: The Outside Context @@ -471,7 +472,7 @@ error or quit signal occurs. * The Edebug Display Update, is saved and restored if `edebug-save-windows' is non-`nil'. It is not restored on error - or quit, but the outside selected window *is* reselected even on + or quit, but the outside selected window _is_ reselected even on error or quit in case a `save-excursion' is active. If the value of `edebug-save-windows' is a list, only the listed windows are saved and restored. @@ -490,6 +491,7 @@ error or quit signal occurs. * `cursor-in-echo-area' is locally bound to `nil' so that the cursor shows up in the window. +  File: lispref.info, Node: Edebug Recursive Edit, Prev: Edebug Display Update, Up: The Outside Context @@ -531,6 +533,7 @@ saves (and later restores) these additional data: While Edebug is active, `defining-kbd-macro' is bound to `edebug-continue-kbd-macro'. +  File: lispref.info, Node: Instrumenting Macro Calls, Next: Edebug Options, Prev: The Outside Context, Up: Edebug @@ -545,7 +548,7 @@ the resulting expansion is evaluated, or any time later.) You must explain the format of macro call arguments by using `def-edebug-spec' to define an "Edebug specification" for each macro. - - Macro: def-edebug-spec MACRO SPECIFICATION + - Macro: def-edebug-spec macro specification Specify which expressions of a call to macro MACRO are forms to be evaluated. For simple macros, the SPECIFICATION often looks very similar to the formal argument list of the macro definition, but diff --git a/info/lispref.info-15 b/info/lispref.info-15 index ce05ae6..83f51b4 100644 --- a/info/lispref.info-15 +++ b/info/lispref.info-15 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -203,12 +203,12 @@ value of `standard-input'. An `end-of-file' error is signaled if reading encounters an unterminated list, vector, or string. - - Function: read &optional STREAM + - Function: read &optional stream This function reads one textual Lisp expression from STREAM, returning it as a Lisp object. This is the basic Lisp input function. - - Function: read-from-string STRING &optional START END + - Function: read-from-string string &optional start end This function reads the first textual Lisp expression from the text in STRING. It returns a cons cell whose CAR is that expression, and whose CDR is an integer giving the position of the @@ -336,7 +336,7 @@ of point, shown in the usual fashion, has no effect. Finally, we show the use of a function as an output stream. The function `eat-output' takes each character that it is given and conses -it onto the front of the list `last-output' (*note Building Lists::.). +it onto the front of the list `last-output' (*note Building Lists::). At the end, the list contains all the characters output, but in reverse order. @@ -402,7 +402,7 @@ the current print operation: the previous section for a description of output streams.) If STREAM is `nil' or omitted, it defaults to the value of `standard-output'. - - Function: print OBJECT &optional STREAM + - Function: print object &optional stream The `print' function is a convenient way of printing. It outputs the printed representation of OBJECT to STREAM, printing in addition one newline before OBJECT and another after it. Quoting @@ -420,7 +420,7 @@ is `nil' or omitted, it defaults to the value of `standard-output'. -| => " came back" - - Function: prin1 OBJECT &optional STREAM + - Function: prin1 object &optional stream This function outputs the printed representation of OBJECT to STREAM. It does not print newlines to separate output as `print' does, but it does use quoting characters just like `print'. It @@ -432,7 +432,7 @@ is `nil' or omitted, it defaults to the value of `standard-output'. -| The\ cat\ in"the hat"" came back" => " came back" - - Function: princ OBJECT &optional STREAM + - Function: princ object &optional stream This function outputs the printed representation of OBJECT to STREAM. It returns OBJECT. @@ -447,14 +447,14 @@ is `nil' or omitted, it defaults to the value of `standard-output'. -| The cat in the "hat" => " in the \"hat\"" - - Function: terpri &optional STREAM + - Function: terpri &optional stream This function outputs a newline to STREAM. The name stands for "terminate print". - - Function: write-char CHARACTER &optional STREAM + - Function: write-char character &optional stream This function outputs CHARACTER to STREAM. It returns CHARACTER. - - Function: prin1-to-string OBJECT &optional NOESCAPE + - Function: prin1-to-string object &optional noescape This function returns a string containing the text that `prin1' would have printed for the same argument. @@ -517,7 +517,7 @@ Variables Affecting Output objects will be written in `#[...]' form instead of in `#' form, and two-element lists of the form `(quote object)' will be written as the equivalent `'object'. - Do not *set* this variable; bind it instead. + Do not _set_ this variable; bind it instead. - Variable: print-length The value of this variable is the maximum number of elements of a @@ -622,7 +622,7 @@ Introduction to Minibuffers =========================== In most ways, a minibuffer is a normal XEmacs buffer. Most -operations *within* a buffer, such as editing commands, work normally +operations _within_ a buffer, such as editing commands, work normally in a minibuffer. However, many operations for managing buffers do not apply to minibuffers. The name of a minibuffer always has the form ` *Minibuf-NUMBER', and it cannot be changed. Minibuffers are @@ -649,8 +649,8 @@ forbid recursive minibuffers by setting the variable `enable-recursive-minibuffers'. Like other buffers, a minibuffer may use any of several local keymaps -(*note Keymaps::.); these contain various exit commands and in some -cases completion commands (*note Completion::.). +(*note Keymaps::); these contain various exit commands and in some cases +completion commands (*note Completion::). * `minibuffer-local-map' is for ordinary input (no completion). @@ -678,12 +678,12 @@ middle of a Lisp function. Instead, do all minibuffer input as part of reading the arguments for a command, in the `interactive' spec. *Note Defining Commands::. - - Function: read-from-minibuffer PROMPT-STRING &optional - INITIAL-CONTENTS KEYMAP READ HIST + - Function: read-from-minibuffer prompt-string &optional + initial-contents keymap read hist This function is the most general way to get input through the minibuffer. By default, it accepts arbitrary text and returns it as a string; however, if READ is non-`nil', then it uses `read' to - convert the text into a Lisp object (*note Input Functions::.). + convert the text into a Lisp object (*note Input Functions::). The first thing this function does is to activate a minibuffer and display it with PROMPT-STRING as the prompt. This value must be a @@ -715,7 +715,7 @@ Defining Commands::. reads the text and returns the resulting Lisp object, unevaluated. (*Note Input Functions::, for information about reading.) - - Function: read-string PROMPT &optional INITIAL + - Function: read-string prompt &optional initial This function reads a string from the minibuffer and returns it. The arguments PROMPT and INITIAL are used as in `read-from-minibuffer'. The keymap used is `minibuffer-local-map'. @@ -752,7 +752,7 @@ Defining Commands::. `M-s' `previous-matching-history-element' - - Function: read-no-blanks-input PROMPT &optional INITIAL + - Function: read-no-blanks-input prompt &optional initial This function reads a string from the minibuffer, but does not allow whitespace characters as part of the input: instead, those characters terminate the input. The arguments PROMPT and INITIAL @@ -761,7 +761,7 @@ Defining Commands::. This is a simplified interface to the `read-from-minibuffer' function, and passes the value of the `minibuffer-local-ns-map' keymap as the KEYMAP argument for that function. Since the keymap - `minibuffer-local-ns-map' does not rebind `C-q', it *is* possible + `minibuffer-local-ns-map' does not rebind `C-q', it _is_ possible to put a space into the string, by quoting it. (read-no-blanks-input PROMPT INITIAL) @@ -792,7 +792,7 @@ Reading Lisp Objects with the Minibuffer This section describes functions for reading Lisp objects with the minibuffer. - - Function: read-minibuffer PROMPT &optional INITIAL + - Function: read-minibuffer prompt &optional initial This function reads a Lisp object in the minibuffer and returns it, without evaluating it. The arguments PROMPT and INITIAL are used as in `read-from-minibuffer'. @@ -811,7 +811,7 @@ minibuffer. "Enter an expression: " (format "%s" '(testing))) ;; Here is how the minibuffer is displayed: - + ---------- Buffer: Minibuffer ---------- Enter an expression: (testing)-!- ---------- Buffer: Minibuffer ---------- @@ -819,7 +819,7 @@ minibuffer. The user can type immediately to use the initial input as a default, or can edit the input. - - Function: eval-minibuffer PROMPT &optional INITIAL + - Function: eval-minibuffer prompt &optional initial This function reads a Lisp expression in the minibuffer, evaluates it, then returns the result. The arguments PROMPT and INITIAL are used as in `read-from-minibuffer'. @@ -831,7 +831,7 @@ minibuffer. == (eval (read-minibuffer PROMPT INITIAL)) - - Function: edit-and-eval-command PROMPT FORM + - Function: edit-and-eval-command prompt form This function reads a Lisp expression in the minibuffer, and then evaluates it. The difference between this command and `eval-minibuffer' is that here the initial FORM is not optional @@ -854,7 +854,7 @@ minibuffer. ;; After evaluation of the preceding expression, ;; the following appears in the minibuffer: - + ---------- Buffer: Minibuffer ---------- Please edit: (forward-word 1)-!- ---------- Buffer: Minibuffer ---------- @@ -989,7 +989,7 @@ nothing in themselves to do with minibuffers. We describe them in this chapter so as to keep them near the higher-level completion features that do use the minibuffer. - - Function: try-completion STRING COLLECTION &optional PREDICATE + - Function: try-completion string collection &optional predicate This function returns the longest common substring of all possible completions of STRING in COLLECTION. The value of COLLECTION must be an alist, an obarray, or a function that implements a virtual @@ -1004,10 +1004,10 @@ that do use the minibuffer. longest initial sequence common to all the permissible completions that match. - If COLLECTION is an alist (*note Association Lists::.), the CARs - of the alist elements form the set of permissible completions. + If COLLECTION is an alist (*note Association Lists::), the CARs of + the alist elements form the set of permissible completions. - If COLLECTION is an obarray (*note Creating Symbols::.), the names + If COLLECTION is an obarray (*note Creating Symbols::), the names of all symbols in the obarray form the set of permissible completions. The global variable `obarray' holds an obarray containing the names of all interned Lisp symbols. @@ -1020,7 +1020,7 @@ that do use the minibuffer. of one argument. It is used to test each possible match, and the match is accepted only if PREDICATE returns non-`nil'. The argument given to PREDICATE is either a cons cell from the alist - (the CAR of which is a string) or else it is a symbol (*not* a + (the CAR of which is a string) or else it is a symbol (_not_ a symbol name) from the obarray. You can also use a symbol that is a function as COLLECTION. Then @@ -1041,7 +1041,7 @@ that do use the minibuffer. "foo" '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))) => "fooba" - + (try-completion "foo" '(("barfoo" 2) ("foo" 3))) => t @@ -1060,15 +1060,14 @@ that do use the minibuffer. (defun test (s) (> (length (car s)) 6)) => test - (try-completion "foo" '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)) 'test) => "foobar" - - Function: all-completions STRING COLLECTION &optional PREDICATE - NOSPACE + - Function: all-completions string collection &optional predicate + nospace This function returns a list of all possible completions of STRING. The parameters to this function are the same as to `try-completion'. @@ -1086,7 +1085,7 @@ that do use the minibuffer. (defun test (s) (> (length (car s)) 6)) => test - + (all-completions "foo" '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)) @@ -1106,8 +1105,8 @@ Completion and the Minibuffer This section describes the basic interface for reading from the minibuffer with completion. - - Function: completing-read PROMPT COLLECTION &optional PREDICATE - REQUIRE-MATCH INITIAL HIST + - Function: completing-read prompt collection &optional predicate + require-match initial hist This function reads a string in the minibuffer, assisting the user by providing completion. It activates the minibuffer with prompt PROMPT, which must be a string. If INITIAL is non-`nil', @@ -1151,7 +1150,7 @@ minibuffer with completion. "Complete a foo: " '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)) nil t "fo") - + ;; After evaluation of the preceding expression, ;; the following appears in the minibuffer: @@ -1193,7 +1192,7 @@ the minibuffer to do completion. `minibuffer-complete' with other characters bound as in `minibuffer-local-map' (*note - Text from Minibuffer::.). + Text from Minibuffer::). - Variable: minibuffer-local-must-match-map `completing-read' uses this value as the local keymap when an @@ -1245,7 +1244,7 @@ the minibuffer to do completion. This function completes the minibuffer contents, and exits if confirmation is not required, i.e., if `minibuffer-completion-confirm' is non-`nil'. If confirmation - *is* required, it is given by repeating this command + _is_ required, it is given by repeating this command immediately--the command is programmed to work without confirmation when run twice in succession. @@ -1264,7 +1263,7 @@ the minibuffer to do completion. list of completions is displayed as text in a buffer named `*Completions*'. - - Function: display-completion-list COMPLETIONS + - Function: display-completion-list completions This function displays COMPLETIONS to the stream in `standard-output', usually a buffer. (*Note Read and Print::, for more information about streams.) The argument COMPLETIONS is diff --git a/info/lispref.info-16 b/info/lispref.info-16 index b61a7d9..cea78a6 100644 --- a/info/lispref.info-16 +++ b/info/lispref.info-16 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -63,7 +63,7 @@ Lisp function. When possible, do all minibuffer input as part of reading the arguments for a command, in the `interactive' spec. *Note Defining Commands::. - - Function: read-buffer PROMPT &optional DEFAULT EXISTING + - Function: read-buffer prompt &optional default existing This function reads the name of a buffer and returns it as a string. The argument DEFAULT is the default name to use, the value to return if the user exits with an empty minibuffer. If @@ -94,7 +94,7 @@ Defining Commands::. ;; The user types `minibuffer.t '. => "minibuffer.texi" - - Function: read-command PROMPT + - Function: read-command prompt This function reads the name of a command and returns it as a Lisp symbol. The argument PROMPT is used as in `read-from-minibuffer'. Recall that a command is anything for which `commandp' returns @@ -123,7 +123,7 @@ Defining Commands::. (intern (completing-read PROMPT obarray 'commandp t nil)) - - Function: read-variable PROMPT + - Function: read-variable prompt This function reads the name of a user variable and returns it as a symbol. @@ -159,8 +159,8 @@ Reading File Names a file name. It provides special features including automatic insertion of the default directory. - - Function: read-file-name PROMPT &optional DIRECTORY DEFAULT EXISTING - INITIAL + - Function: read-file-name prompt &optional directory default existing + initial This function reads a file name in the minibuffer, prompting with PROMPT and providing completion. If DEFAULT is non-`nil', then the function returns DEFAULT if the user just types . @@ -309,7 +309,7 @@ question. Otherwise, it uses keyboard input. Strictly speaking, `yes-or-no-p' uses the minibuffer and `y-or-n-p' does not; but it seems best to describe them together. - - Function: y-or-n-p PROMPT + - Function: y-or-n-p prompt This function asks the user a question, expecting input in the echo area. It returns `t' if the user types `y', `nil' if the user types `n'. This function also accepts to mean yes and @@ -327,7 +327,7 @@ does not; but it seems best to describe them together. This function does not actually use the minibuffer, since it does not allow editing of the answer. It actually uses the echo area - (*note The Echo Area::.), which uses the same screen space as the + (*note The Echo Area::), which uses the same screen space as the minibuffer. The cursor moves to the echo area while the question is being asked. @@ -342,18 +342,20 @@ does not; but it seems best to describe them together. ;; After evaluation of the preceding expression, ;; the following prompt appears in the echo area: - + ---------- Echo area ---------- Do you need a lift? (y or n) ---------- Echo area ---------- ;; If the user then types `q', the following appears: + ---------- Echo area ---------- Please answer y or n. Do you need a lift? (y or n) ---------- Echo area ---------- ;; When the user types a valid answer, ;; it is displayed after the question: + ---------- Echo area ---------- Do you need a lift? (y or n) y ---------- Echo area ---------- @@ -361,7 +363,7 @@ does not; but it seems best to describe them together. We show successive lines of echo area messages, but only one actually appears on the screen at a time. - - Function: yes-or-no-p PROMPT + - Function: yes-or-no-p prompt This function asks the user a question, expecting input in the minibuffer. It returns `t' if the user enters `yes', `nil' if the user types `no'. The user must type to finalize the @@ -382,7 +384,7 @@ does not; but it seems best to describe them together. ;; After evaluation of the preceding expression, ;; the following prompt appears, ;; with an empty minibuffer: - + ---------- Buffer: minibuffer ---------- Do you really want to remove everything? (yes or no) ---------- Buffer: minibuffer ---------- @@ -396,7 +398,7 @@ does not; but it seems best to describe them together. Do you really want to remove everything? (yes or no) ---------- Buffer: minibuffer ---------- - - Function: yes-or-no-p-dialog-box PROMPT + - Function: yes-or-no-p-dialog-box prompt This function asks the user a "y or n" question with a popup dialog box. It returns `t' if the answer is "yes". PROMPT is the string to display to ask the question. @@ -408,11 +410,11 @@ running on a window system, the functions `y-or-n-p' and `yes-or-no-p' are replaced with the following functions, so that menu items bring up dialog boxes instead of minibuffer questions. - - Function: y-or-n-p-maybe-dialog-box PROMPT + - Function: y-or-n-p-maybe-dialog-box prompt This function asks user a "y or n" question, using either a dialog box or the minibuffer, as appropriate. - - Function: yes-or-no-p-maybe-dialog-box PROMPT + - Function: yes-or-no-p-maybe-dialog-box prompt This function asks user a "yes or no" question, using either a dialog box or the minibuffer, as appropriate. @@ -428,8 +430,8 @@ want to save this buffer" for each buffer in turn, you should use each question individually. This gives the user certain convenient facilities such as the ability to answer the whole series at once. - - Function: map-y-or-n-p PROMPTER ACTOR LIST &optional HELP - ACTION-ALIST + - Function: map-y-or-n-p prompter actor list &optional help + action-alist This function, new in Emacs 19, asks the user a series of questions, reading a single-character answer in the echo area for each one. @@ -494,7 +496,7 @@ facilities such as the ability to answer the whole series at once. If `map-y-or-n-p' is called in a command that was invoked using the mouse--more precisely, if `last-nonmenu-event' (*note Command Loop - Info::.) is either `nil' or a list--then it uses a dialog box or + Info::) is either `nil' or a list--then it uses a dialog box or pop-up menu to ask the question. In this case, it does not use keyboard input or the echo area. You can force use of the mouse or use of keyboard input by binding `last-nonmenu-event' to a @@ -519,22 +521,22 @@ minibuffers. - Command: self-insert-and-exit This command exits the active minibuffer after inserting the last character typed on the keyboard (found in `last-command-char'; - *note Command Loop Info::.). + *note Command Loop Info::). - - Command: previous-history-element N + - Command: previous-history-element n This command replaces the minibuffer contents with the value of the Nth previous (older) history element. - - Command: next-history-element N + - Command: next-history-element n This command replaces the minibuffer contents with the value of the Nth more recent history element. - - Command: previous-matching-history-element PATTERN + - Command: previous-matching-history-element pattern This command replaces the minibuffer contents with the value of the previous (older) history element that matches PATTERN (a regular expression). - - Command: next-matching-history-element PATTERN + - Command: next-matching-history-element pattern This command replaces the minibuffer contents with the value of the next (newer) history element that matches PATTERN (a regular expression). @@ -558,20 +560,20 @@ minibuffers. - Variable: minibuffer-help-form The current value of this variable is used to rebind `help-form' - locally inside the minibuffer (*note Help Functions::.). + locally inside the minibuffer (*note Help Functions::). - Function: active-minibuffer-window This function returns the currently active minibuffer window, or `nil' if none is currently active. - - Function: minibuffer-window &optional FRAME + - Function: minibuffer-window &optional frame This function returns the minibuffer window used for frame FRAME. If FRAME is `nil', that stands for the current frame. Note that the minibuffer window used by a frame need not be part of that frame--a frame that has no minibuffer of its own necessarily uses some other frame's minibuffer window. - - Function: window-minibuffer-p WINDOW + - Function: window-minibuffer-p window This function returns non-`nil' if WINDOW is a minibuffer window. It is not correct to determine whether a given window is a @@ -579,7 +581,7 @@ minibuffer by comparing it with the result of `(minibuffer-window)', because there can be more than one minibuffer window if there is more than one frame. - - Function: minibuffer-window-active-p WINDOW + - Function: minibuffer-window-active-p window This function returns non-`nil' if WINDOW, assumed to be a minibuffer window, is currently active. @@ -589,7 +591,7 @@ than one frame. minibuffer, it scrolls this window. Finally, some functions and variables deal with recursive minibuffers -(*note Recursive Editing::.): +(*note Recursive Editing::): - Function: minibuffer-depth This function returns the current depth of activations of the @@ -641,7 +643,7 @@ are done, and the subroutines that allow Lisp programs to do them. * Events:: What input looks like when you read it. * Reading Input:: How to read input events from the keyboard or mouse. * Waiting:: Waiting for user input or elapsed time. -* Quitting:: How `C-g' works. How to catch or defer quitting. +* Quitting:: How C-g works. How to catch or defer quitting. * Prefix Command Arguments:: How the commands to set prefix args work. * Recursive Editing:: Entering a recursive edit, and why you usually shouldn't. @@ -675,14 +677,14 @@ Key Lookup::, for information on how this is done. The result of the translation should be a keyboard macro or an interactively callable function. If the key is `M-x', then it reads the name of another command, which it then calls. This is done by the command -`execute-extended-command' (*note Interactive Call::.). +`execute-extended-command' (*note Interactive Call::). To execute a command requires first reading the arguments for it. -This is done by calling `command-execute' (*note Interactive Call::.). +This is done by calling `command-execute' (*note Interactive Call::). For commands written in Lisp, the `interactive' specification says how to read the arguments. This may use the prefix argument (*note Prefix -Command Arguments::.) or may read with prompting in the minibuffer -(*note Minibuffers::.). For example, the command `find-file' has an +Command Arguments::) or may read with prompting in the minibuffer +(*note Minibuffers::). For example, the command `find-file' has an `interactive' specification which says to read a file name using the minibuffer. The command's function body does not use the minibuffer; if you call this command from Lisp code as a function, you must supply @@ -690,10 +692,10 @@ the file name string as an ordinary Lisp function argument. If the command is a string or vector (i.e., a keyboard macro) then `execute-kbd-macro' is used to execute it. You can call this function -yourself (*note Keyboard Macros::.). +yourself (*note Keyboard Macros::). To terminate the execution of a running command, type `C-g'. This -character causes "quitting" (*note Quitting::.). +character causes "quitting" (*note Quitting::). - Variable: pre-command-hook The editor command loop runs this normal hook before each command. @@ -740,7 +742,7 @@ Using `interactive' This section describes how to write the `interactive' form that makes a Lisp function an interactively-callable command. - - Special Form: interactive ARG-DESCRIPTOR + - Special Form: interactive arg-descriptor This special form declares that the function in which it appears is a command, and that it may therefore be called interactively (via `M-x' or by entering a key sequence bound to it). The @@ -775,7 +777,7 @@ makes a Lisp function an interactively-callable command. output; if subprocess output arrives while the command is waiting for input, it could relocate point and the mark. - Here's an example of what *not* to do: + Here's an example of what _not_ to do: (interactive (list (region-beginning) (region-end) @@ -807,8 +809,8 @@ makes a Lisp function an interactively-callable command. The prompt string can use `%' to include previous argument values (starting with the first argument) in the prompt. This is done - using `format' (*note Formatting Strings::.). For example, here - is how you could read the name of an existing buffer followed by a + using `format' (*note Formatting Strings::). For example, here is + how you could read the name of an existing buffer followed by a new name to give to that buffer: (interactive "bBuffer to rename: \nsRename buffer %s to: ") @@ -831,7 +833,7 @@ makes a Lisp function an interactively-callable command. prompt string (starting with the first character that is not `*', `@', or `_'). - - Function: function-interactive FUNCTION + - Function: function-interactive function This function retrieves the interactive specification of FUNCTION, which may be any funcallable object. The specification will be returned as the list of the symbol `interactive' and the specs. If @@ -849,8 +851,7 @@ defined here as follows: Completion Provide completion. , , and perform name completion because the argument is read using `completing-read' - (*note Completion::.). `?' displays a list of possible - completions. + (*note Completion::). `?' displays a list of possible completions. Existing Require the name of an existing object. An invalid name is not @@ -898,7 +899,7 @@ Special `b' The name of an existing buffer. By default, uses the name of the - current buffer (*note Buffers::.). Existing, Completion, Default, + current buffer (*note Buffers::). Existing, Completion, Default, Prompt. `B' @@ -914,12 +915,12 @@ Special Completion, Prompt. `d' - The position of point, as an integer (*note Point::.). No I/O. + The position of point, as an integer (*note Point::). No I/O. `D' A directory name. The default is the current default directory of the current buffer, `default-directory' (*note System - Environment::.). Existing, Completion, Default, Prompt. + Environment::). Existing, Completion, Default, Prompt. `e' The last mouse-button or misc-user event in the key sequence that @@ -931,7 +932,7 @@ Special such event. `f' - A file name of an existing file (*note File Names::.). The default + A file name of an existing file (*note File Names::). The default directory is `default-directory'. Existing, Completion, Default, Prompt. @@ -940,7 +941,7 @@ Special Prompt. `k' - A key sequence (*note Keymap Terminology::.). This keeps reading + A key sequence (*note Keymap Terminology::). This keeps reading events until a command (or undefined command) is found in the current key maps. The key sequence argument is represented as a vector of events. The cursor does not move into the echo area. @@ -983,7 +984,7 @@ Special `s' Arbitrary text, read in the minibuffer and returned as a string - (*note Text from Minibuffer::.). Terminate the input with either + (*note Text from Minibuffer::). Terminate the input with either or . (`C-q' may be used to include either of these characters in the input.) Prompt. @@ -1059,7 +1060,7 @@ definition, it invokes that definition using the function `command-execute' calls `call-interactively', which reads the arguments and calls the command. You can also call these functions yourself. - - Function: commandp OBJECT + - Function: commandp object Returns `t' if OBJECT is suitable for calling interactively; that is, if OBJECT is a command. Otherwise, returns `nil'. @@ -1073,12 +1074,12 @@ and calls the command. You can also call these functions yourself. A symbol is `commandp' if its function definition is `commandp'. Keys and keymaps are not commands. Rather, they are used to look - up commands (*note Keymaps::.). + up commands (*note Keymaps::). See `documentation' in *Note Accessing Documentation::, for a realistic example of using `commandp'. - - Function: call-interactively COMMAND &optional RECORD-FLAG + - Function: call-interactively command &optional record-flag This function calls the interactively callable function COMMAND, reading arguments according to its interactive calling specifications. An error is signaled if COMMAND is not a function @@ -1096,7 +1097,7 @@ and calls the command. You can also call these functions yourself. the command is added only if it uses the minibuffer to read an argument. *Note Command History::. - - Function: command-execute COMMAND &optional RECORD-FLAG + - Function: command-execute command &optional record-flag This function executes COMMAND as an editing command. The argument COMMAND must satisfy the `commandp' predicate; i.e., it must be an interactively callable function or a keyboard macro. @@ -1111,9 +1112,9 @@ and calls the command. You can also call these functions yourself. Such a definition is handled by loading the specified library and then rechecking the definition of the symbol. - - Command: execute-extended-command PREFIX-ARGUMENT + - Command: execute-extended-command prefix-argument This function reads a command name from the minibuffer using - `completing-read' (*note Completion::.). Then it uses + `completing-read' (*note Completion::). Then it uses `command-execute' to call the specified command. Whatever that command returns becomes the value of `execute-extended-command'. diff --git a/info/lispref.info-17 b/info/lispref.info-17 index 15f004a..994f550 100644 --- a/info/lispref.info-17 +++ b/info/lispref.info-17 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -134,7 +134,7 @@ value at the end, like this: is the nearest character equivalent to it (or `nil' if there is no character equivalent). `last-command-char' is the character that `self-insert-command' will insert in the buffer. Remember that - there is *not* a one-to-one mapping between keyboard events and + there is _not_ a one-to-one mapping between keyboard events and XEmacs characters: many keyboard events have no corresponding character, and when the Mule feature is available, most characters can not be input on standard keyboards, except possibly with help @@ -184,7 +184,7 @@ command binding of the key sequence. For information about how exactly the XEmacs command loop works, *Note Reading Input::. - - Function: eventp OBJECT + - Function: eventp object This function returns non-`nil' if EVENT is an input event. * Menu: @@ -305,7 +305,7 @@ button-release event modifiers Which modifier keys were pressed. The special business - mentioned above for the shift key does *not* apply to mouse + mentioned above for the shift key does _not_ apply to mouse events. x @@ -325,7 +325,7 @@ pointer-motion event modifiers Which modifier keys were pressed. The special business - mentioned above for the shift key does *not* apply to mouse + mentioned above for the shift key does _not_ apply to mouse events. misc-user event @@ -346,7 +346,7 @@ misc-user event modifiers Which modifier keys were pressed. The special business - mentioned above for the shift key does *not* apply to mouse + mentioned above for the shift key does _not_ apply to mouse events. x @@ -390,7 +390,7 @@ eval event The object to pass to the function. The function and object are set when the event is created. - - Function: event-type EVENT + - Function: event-type event Return the type of EVENT. This will be a symbol; one of @@ -432,39 +432,39 @@ Event Predicates The following predicates return whether an object is an event of a particular type. - - Function: key-press-event-p OBJECT + - Function: key-press-event-p object This is true if OBJECT is a key-press event. - - Function: button-event-p OBJECT OBJECT + - Function: button-event-p object object This is true if OBJECT is a mouse button-press or button-release event. - - Function: button-press-event-p OBJECT + - Function: button-press-event-p object This is true if OBJECT is a mouse button-press event. - - Function: button-release-event-p OBJECT + - Function: button-release-event-p object This is true if OBJECT is a mouse button-release event. - - Function: motion-event-p OBJECT + - Function: motion-event-p object This is true if OBJECT is a mouse motion event. - - Function: mouse-event-p OBJECT + - Function: mouse-event-p object This is true if OBJECT is a mouse button-press, button-release or motion event. - - Function: eval-event-p OBJECT + - Function: eval-event-p object This is true if OBJECT is an eval event. - - Function: misc-user-event-p OBJECT + - Function: misc-user-event-p object This is true if OBJECT is a misc-user event. - - Function: process-event-p OBJECT + - Function: process-event-p object This is true if OBJECT is a process event. - - Function: timeout-event-p OBJECT + - Function: timeout-event-p object This is true if OBJECT is a timeout event. - - Function: event-live-p OBJECT + - Function: event-live-p object This is true if OBJECT is any event that has not been deallocated.  @@ -497,18 +497,18 @@ Frame-Level Event Position Info The following functions return frame-level information about where a mouse event occurred. - - Function: event-frame EVENT + - Function: event-frame event This function returns the "channel" or frame that the given mouse motion, button press, button release, or misc-user event occurred in. This will be `nil' for non-mouse events. - - Function: event-x-pixel EVENT + - Function: event-x-pixel event This function returns the X position in pixels of the given mouse event. The value returned is relative to the frame the event occurred in. This will signal an error if the event is not a mouse event. - - Function: event-y-pixel EVENT + - Function: event-y-pixel event This function returns the Y position in pixels of the given mouse event. The value returned is relative to the frame the event occurred in. This will signal an error if the event is not a @@ -523,14 +523,14 @@ Window-Level Event Position Info The following functions return window-level information about where a mouse event occurred. - - Function: event-window EVENT + - Function: event-window event Given a mouse motion, button press, button release, or misc-user event, compute and return the window on which that event occurred. This may be `nil' if the event occurred in the border or over a toolbar. The modeline is considered to be within the window it describes. - - Function: event-buffer EVENT + - Function: event-buffer event Given a mouse motion, button press, button release, or misc-user event, compute and return the buffer of the window on which that event occurred. This may be `nil' if the event occurred in the @@ -539,13 +539,13 @@ a mouse event occurred. `event-window' and then calling `window-buffer' on the result if it is a window. - - Function: event-window-x-pixel EVENT + - Function: event-window-x-pixel event This function returns the X position in pixels of the given mouse event. The value returned is relative to the window the event occurred in. This will signal an error if the event is not a mouse-motion, button-press, button-release, or misc-user event. - - Function: event-window-y-pixel EVENT + - Function: event-window-y-pixel event This function returns the Y position in pixels of the given mouse event. The value returned is relative to the window the event occurred in. This will signal an error if the event is not a @@ -560,35 +560,35 @@ Event Text Position Info The following functions return information about the text (including the modeline) that a mouse event occurred over or near. - - Function: event-over-text-area-p EVENT + - Function: event-over-text-area-p event Given a mouse-motion, button-press, button-release, or misc-user event, this function returns `t' if the event is over the text area of a window. Otherwise, `nil' is returned. The modeline is not considered to be part of the text area. - - Function: event-over-modeline-p EVENT + - Function: event-over-modeline-p event Given a mouse-motion, button-press, button-release, or misc-user event, this function returns `t' if the event is over the modeline of a window. Otherwise, `nil' is returned. - - Function: event-x EVENT + - Function: event-x event This function returns the X position of the given mouse-motion, button-press, button-release, or misc-user event in characters. This is relative to the window the event occurred over. - - Function: event-y EVENT + - Function: event-y event This function returns the Y position of the given mouse-motion, button-press, button-release, or misc-user event in characters. This is relative to the window the event occurred over. - - Function: event-point EVENT + - Function: event-point event This function returns the character position of the given mouse-motion, button-press, button-release, or misc-user event. If the event did not occur over a window, or did not occur over text, then this returns `nil'. Otherwise, it returns an index into the buffer visible in the event's window. - - Function: event-closest-point EVENT + - Function: event-closest-point event This function returns the character position of the given mouse-motion, button-press, button-release, or misc-user event. If the event did not occur over a window or over text, it returns @@ -611,23 +611,23 @@ Event Glyph Position Info The following functions return information about the glyph (if any) that a mouse event occurred over. - - Function: event-over-glyph-p EVENT + - Function: event-over-glyph-p event Given a mouse-motion, button-press, button-release, or misc-user event, this function returns `t' if the event is over a glyph. Otherwise, `nil' is returned. - - Function: event-glyph-extent EVENT + - Function: event-glyph-extent event If the given mouse-motion, button-press, button-release, or misc-user event happened on top of a glyph, this returns its extent; else `nil' is returned. - - Function: event-glyph-x-pixel EVENT + - Function: event-glyph-x-pixel event Given a mouse-motion, button-press, button-release, or misc-user event over a glyph, this function returns the X position of the pointer relative to the upper left of the glyph. If the event is not over a glyph, it returns `nil'. - - Function: event-glyph-y-pixel EVENT + - Function: event-glyph-y-pixel event Given a mouse-motion, button-press, button-release, or misc-user event over a glyph, this function returns the Y position of the pointer relative to the upper left of the glyph. If the event is @@ -639,12 +639,12 @@ File: lispref.info, Node: Event Toolbar Position Info, Next: Other Event Posit Event Toolbar Position Info ........................... - - Function: event-over-toolbar-p EVENT + - Function: event-over-toolbar-p event Given a mouse-motion, button-press, button-release, or misc-user event, this function returns `t' if the event is over a toolbar. Otherwise, `nil' is returned. - - Function: event-toolbar-button EVENT + - Function: event-toolbar-button event If the given mouse-motion, button-press, button-release, or misc-user event happened on top of a toolbar button, this function returns the button. Otherwise, `nil' is returned. @@ -655,7 +655,7 @@ File: lispref.info, Node: Other Event Position Info, Prev: Event Toolbar Posit Other Event Position Info ......................... - - Function: event-over-border-p EVENT + - Function: event-over-border-p event Given a mouse-motion, button-press, button-release, or misc-user event, this function returns `t' if the event is over an internal toolbar. Otherwise, `nil' is returned. @@ -669,39 +669,39 @@ Accessing the Other Contents of Events The following functions allow access to the contents of events other than the position info described in the previous section. - - Function: event-timestamp EVENT + - Function: event-timestamp event This function returns the timestamp of the given event object. - - Function: event-device EVENT + - Function: event-device event This function returns the device that the given event occurred on. - - Function: event-key EVENT + - Function: event-key event This function returns the Keysym of the given key-press event. This will be the ASCII code of a printing character, or a symbol. - - Function: event-button EVENT + - Function: event-button event This function returns the button-number of the given button-press or button-release event. - - Function: event-modifiers EVENT + - Function: event-modifiers event This function returns a list of symbols, the names of the modifier keys which were down when the given mouse or keyboard event was produced. - - Function: event-modifier-bits EVENT + - Function: event-modifier-bits event This function returns a number representing the modifier keys which were down when the given mouse or keyboard event was produced. - - Function: event-function EVENT + - Function: event-function event This function returns the callback function of the given timeout, misc-user, or eval event. - - Function: event-object EVENT + - Function: event-object event This function returns the callback function argument of the given timeout, misc-user, or eval event. - - Function: event-process EVENT + - Function: event-process event This function returns the process of the given process event.  @@ -716,7 +716,7 @@ as an argument and fill in the fields of this event; or they make accept either an event object or `nil', creating the event object first in the latter case. - - Function: make-event &optional TYPE PLIST + - Function: make-event &optional type plist This function creates a new event structure. If no arguments are specified, the created event will be empty. To specify the event type, use the TYPE argument. The allowed types are `empty', @@ -770,7 +770,7 @@ latter case. The event timestamp, a non-negative integer. Allowed for all types of events. - *WARNING*: the event object returned by this function may be a + _WARNING_: the event object returned by this function may be a reused one; see the function `deallocate-event'. The events created by `make-event' can be used as non-interactive @@ -782,28 +782,28 @@ latter case. ;; Create an empty event. (make-event) => # - + ;; Try creating a key-press event. (make-event 'key-press) error--> Undefined key for keypress event - + ;; Creating a key-press event, try 2 (make-event 'key-press '(key home)) => # - + ;; Create a key-press event of dubious fame. (make-event 'key-press '(key escape modifiers (meta alt control shift))) => # - + ;; Create a M-button1 event at coordinates defined by variables ;; X and Y. (make-event 'button-press `(button 1 modifiers (meta) x ,x y ,y)) => # - + ;; Create a similar button-release event. (make-event 'button-release `(button 1 modifiers (meta) x ,x y ,x)) => # - + ;; Create a mouse-motion event. (make-event 'motion '(x 20 y 30)) => # @@ -831,13 +831,13 @@ latter case. (append '(modifiers nil) (event-properties EVENT))) - - Function: copy-event EVENT1 &optional EVENT2 + - Function: copy-event event1 &optional event2 This function makes a copy of the given event object. If a second argument is given, the first event is copied into the second and the second is returned. If the second argument is not supplied (or is `nil') then a new event will be made. - - Function: deallocate-event EVENT + - Function: deallocate-event event This function allows the given event structure to be reused. You *MUST NOT* use this event object after calling this function with it. You will lose. It is not necessary to call this function, as @@ -855,7 +855,7 @@ Converting Events events and other ways of representing keys. These are useful when working with ASCII strings and with keymaps. - - Function: character-to-event CH &optional EVENT DEVICE + - Function: character-to-event ch &optional event device This function converts a numeric ASCII value to an event structure, replete with modifier bits. CH is the character to convert, and EVENT is the event object to fill in. This function contains @@ -878,8 +878,8 @@ working with ASCII strings and with keymaps. strictly inverse functions, since events contain much more information than the ASCII character set can encode. - - Function: event-to-character EVENT &optional ALLOW-EXTRA-MODIFIERS - ALLOW-META ALLOW-NON-ASCII + - Function: event-to-character event &optional allow-extra-modifiers + allow-meta allow-non-ascii This function returns the closest ASCII approximation to EVENT. If the event isn't a keypress, this returns `nil'. @@ -904,7 +904,7 @@ working with ASCII strings and with keymaps. ambiguous, as both use the high bit; and will be indistinguishable. - - Function: events-to-keys EVENTS &optional NO-MICE + - Function: events-to-keys events &optional no-mice Given a vector of event objects, this function returns a vector of key descriptors, or a string (if they all fit in the ASCII range). Optional arg NO-MICE means that button events are not allowed. @@ -944,7 +944,7 @@ Key Sequence Input `read-key-sequence'; for example, `describe-key' uses it to read the key to describe. - - Function: read-key-sequence PROMPT + - Function: read-key-sequence prompt This function reads a sequence of keystrokes or mouse clicks and returns it as a vector of events. It keeps reading events until it has accumulated a full key sequence; that is, enough to specify @@ -994,7 +994,7 @@ single event. These functions often make a distinction between actions), and other events, which serve as communication between XEmacs and the window system. - - Function: next-event &optional EVENT PROMPT + - Function: next-event &optional event prompt This function reads and returns the next available event from the window system or terminal driver, waiting if necessary until an event is available. Pass this object to `dispatch-event' to @@ -1007,7 +1007,7 @@ and the window system. In most cases, the function `next-command-event' is more appropriate. - - Function: next-command-event &optional EVENT + - Function: next-command-event &optional event This function returns the next available "user" event from the window system or terminal driver. Pass this object to `dispatch-event' to handle it. If an event object is supplied, it @@ -1041,7 +1041,7 @@ and the window system. compatibility with Emacs 18, and is most likely the wrong thing for you to be using: consider using `next-command-event' instead. - - Function: enqueue-eval-event FUNCTION OBJECT + - Function: enqueue-eval-event function object This function adds an eval event to the back of the queue. The eval event will be the next event read after all pending events. @@ -1051,7 +1051,7 @@ File: lispref.info, Node: Dispatching an Event, Next: Quoted Character Input, Dispatching an Event -------------------- - - Function: dispatch-event EVENT + - Function: dispatch-event event Given an event object returned by `next-event', this function executes it. This is the basic function that makes XEmacs respond to user input; it also deals with notifications from the window @@ -1068,7 +1068,7 @@ specify a character, and allow the user to specify a control or meta character conveniently, either literally or as an octal character code. The command `quoted-insert' uses this function. - - Function: read-quoted-char &optional PROMPT + - Function: read-quoted-char &optional prompt This function is like `read-char', except that if the first character read is an octal digit (0-7), it reads up to two more octal digits (but stopping if a non-octal digit is found) and @@ -1163,7 +1163,7 @@ input. - Variable: last-input-char If the value of `last-input-event' is a keyboard event, then this is the nearest ASCII equivalent to it. Remember that there is - *not* a 1:1 mapping between keyboard events and ASCII characters: + _not_ a 1:1 mapping between keyboard events and ASCII characters: the set of keyboard events is much larger, so writing code that examines this variable to determine what key has been typed is bad practice, unless you are certain that it will be one of a small @@ -1201,7 +1201,7 @@ input comes in, while `sleep-for' pauses without updating the screen. two arguments to specify the time (one integer and one float value), instead of a single argument that can be either an integer or a float. - - Function: sit-for SECONDS &optional NODISP + - Function: sit-for seconds &optional nodisp This function performs redisplay (provided there is no pending input from the user), then waits SECONDS seconds, or until input is available. The result is `t' if `sit-for' waited the full time @@ -1224,7 +1224,7 @@ instead of a single argument that can be either an integer or a float. The usual purpose of `sit-for' is to give the user time to read text that you display. - - Function: sleep-for SECONDS + - Function: sleep-for seconds This function simply pauses for SECONDS seconds without updating the display. This function pays no attention to available input. It returns `nil'. diff --git a/info/lispref.info-18 b/info/lispref.info-18 index 937c3df..7d8b054 100644 --- a/info/lispref.info-18 +++ b/info/lispref.info-18 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -69,7 +69,7 @@ effect is to cancel the prefix key as well as any prefix argument. In the minibuffer, `C-g' has a different definition: it aborts out of the minibuffer. This means, in effect, that it exits the minibuffer and then quits. (Simply quitting would return to the command loop -*within* the minibuffer.) The reason why `C-g' does not quit directly +_within_ the minibuffer.) The reason why `C-g' does not quit directly when the command reader is reading input is so that its meaning can be redefined in the minibuffer in this way. `C-g' following a prefix key is not redefined in the minibuffer, and it has its normal effect of @@ -225,7 +225,7 @@ argument, either numeric or raw, in the `interactive' declaration. value of the prefix argument directly in the variable `current-prefix-arg', but this is less clean. - - Function: prefix-numeric-value ARG + - Function: prefix-numeric-value arg This function returns the numeric meaning of a valid raw prefix argument value, ARG. The argument may be a symbol, a number, or a list. If it is `nil', the value 1 is returned; if it is `-', the @@ -234,32 +234,32 @@ value of the prefix argument directly in the variable returned. - Variable: current-prefix-arg - This variable holds the raw prefix argument for the *current* + This variable holds the raw prefix argument for the _current_ command. Commands may examine it directly, but the usual way to access it is with `(interactive "P")'. - Variable: prefix-arg The value of this variable is the raw prefix argument for the - *next* editing command. Commands that specify prefix arguments for + _next_ editing command. Commands that specify prefix arguments for the following command work by setting this variable. Do not call the functions `universal-argument', `digit-argument', or `negative-argument' unless you intend to let the user enter the prefix -argument for the *next* command. +argument for the _next_ command. - Command: universal-argument This command reads input and specifies a prefix argument for the following command. Don't call this command yourself unless you know what you are doing. - - Command: digit-argument ARG + - Command: digit-argument arg This command adds to the prefix argument for the following command. The argument ARG is the raw prefix argument as it was before this command; it is used to compute the updated prefix argument. Don't call this command yourself unless you know what you are doing. - - Command: negative-argument ARG + - Command: negative-argument arg This command adds to the numeric argument for the next command. The argument ARG is the raw prefix argument as it was before this command; its value is negated to form the new prefix argument. @@ -302,7 +302,7 @@ commands. `recursive-edit'. This function contains the command loop; it also contains a call to `catch' with tag `exit', which makes it possible to exit the recursive editing level by throwing to `exit' (*note Catch and -Throw::.). If you throw a value other than `t', then `recursive-edit' +Throw::). If you throw a value other than `t', then `recursive-edit' returns normally to the function that called it. The command `C-M-c' (`exit-recursive-edit') does this. Throwing a `t' value causes `recursive-edit' to quit, so that control returns to the command loop @@ -399,12 +399,12 @@ saying the command is disabled includes that string. For example: when a disabled command is invoked interactively. Disabling a command has no effect on calling it as a function from Lisp programs. - - Command: enable-command COMMAND + - Command: enable-command command Allow COMMAND to be executed without special confirmation from now on, and (if the user confirms) alter the user's `.emacs' file so that this will apply to future sessions. - - Command: disable-command COMMAND + - Command: disable-command command Require special confirmation to execute COMMAND from now on, and (if the user confirms) alter the user's `.emacs' file so that this will apply to future sessions. @@ -439,7 +439,7 @@ considered complex. represented as a form to evaluate. It continues to accumulate all complex commands for the duration of the editing session, but all but the first (most recent) thirty elements are deleted when a - garbage collection takes place (*note Garbage Collection::.). + garbage collection takes place (*note Garbage Collection::). command-history => ((switch-to-buffer "chistory.texi") @@ -448,7 +448,7 @@ considered complex. (find-tag "repeat-complex-command")) This history list is actually a special case of minibuffer history -(*note Minibuffer History::.), with one special twist: the elements are +(*note Minibuffer History::), with one special twist: the elements are expressions rather than strings. There are a number of commands devoted to the editing and recall of @@ -467,12 +467,12 @@ Keyboard Macros considered a command and made the definition of a key. The Lisp representation of a keyboard macro is a string or vector containing the events. Don't confuse keyboard macros with Lisp macros (*note -Macros::.). +Macros::). - - Function: execute-kbd-macro MACRO &optional COUNT + - Function: execute-kbd-macro macro &optional count This function executes MACRO as a sequence of events. If MACRO is a string or vector, then the events in it are executed exactly as - if they had been input by the user. The sequence is *not* + if they had been input by the user. The sequence is _not_ expected to be a single key sequence; normally a keyboard macro definition consists of several key sequences concatenated. @@ -549,7 +549,7 @@ be any Lisp objects, though only certain types are meaningful for execution by the command loop). Given an event (or an event type) and a keymap, XEmacs can get the event's definition. Events mapped in keymaps include keypresses, button presses, and button releases (*note -Events::.). +Events::). A sequence of input events that form a unit is called a "key sequence", or "key" for short. A sequence of one event is always a key @@ -604,7 +604,7 @@ Format of Keymaps bindings. Note that this is different from Emacs 18 and FSF Emacs, where keymaps are lists. - - Function: keymapp OBJECT + - Function: keymapp object This function returns `t' if OBJECT is a keymap, `nil' otherwise.  @@ -615,7 +615,7 @@ Creating Keymaps Here we describe the functions for creating keymaps. - - Function: make-keymap &optional NAME + - Function: make-keymap &optional name This function constructs and returns a new keymap object. All entries in it are `nil', meaning "command undefined". @@ -623,7 +623,7 @@ Creating Keymaps as in `set-keymap-name'. This name is only a debugging convenience; it is not used except when printing the keymap. - - Function: make-sparse-keymap &optional NAME + - Function: make-sparse-keymap &optional name This function constructs and returns a new keymap object. All entries in it are `nil', meaning "command undefined". The only difference between this function and `make-keymap' is that this @@ -635,16 +635,16 @@ Creating Keymaps as in `set-keymap-name'. This name is only a debugging convenience; it is not used except when printing the keymap. - - Function: set-keymap-name KEYMAP NEW-NAME + - Function: set-keymap-name keymap new-name This function assigns a "name" to a keymap. The name is only a debugging convenience; it is not used except when printing the keymap. - - Function: keymap-name KEYMAP + - Function: keymap-name keymap This function returns the "name" of a keymap, as assigned using `set-keymap-name'. - - Function: copy-keymap KEYMAP + - Function: copy-keymap keymap This function returns a copy of KEYMAP. Any keymaps that appear directly as bindings in KEYMAP are also copied recursively, and so on to any number of levels. However, recursive copying does not @@ -678,7 +678,7 @@ depth-first search of all the ancestors of the keymap is conducted. `(current-global-map)' is the default parent of all keymaps. - - Function: set-keymap-parents KEYMAP PARENTS + - Function: set-keymap-parents keymap parents This function sets the parent keymaps of KEYMAP to the list PARENTS. @@ -689,7 +689,7 @@ depth-first search of all the ancestors of the keymap is conducted. `define-key' to change KEYMAP, that affects the bindings in that map, but has no effect on any of the keymaps in PARENTS. - - Function: keymap-parents KEYMAP + - Function: keymap-parents keymap This function returns the list of parent keymaps of KEYMAP, or `nil' if KEYMAP has no parents. @@ -701,11 +701,11 @@ format. Note that if you specify a default binding for a keymap, neither the keymap's parents nor the current global map are searched for key bindings. - - Function: set-keymap-default-binding KEYMAP COMMAND + - Function: set-keymap-default-binding keymap command This function sets the default binding of KEYMAP to COMMAND, or `nil' if no default is desired. - - Function: keymap-default-binding KEYMAP + - Function: keymap-default-binding keymap This function returns the default binding of KEYMAP, or `nil' if it has none. @@ -740,7 +740,7 @@ and `(control 98)'. A keystroke may also be represented by an event object, as returned by the `next-command-event' and `read-key-sequence' functions. - Note that in this context, the keystroke `control-b' is *not* + Note that in this context, the keystroke `control-b' is _not_ represented by the number 2 (the ASCII code for `^B') or the character `?\^B'. See below. @@ -807,7 +807,7 @@ it is possible to redefine only one of those sequences like so: system. If you're talking to XEmacs through a TTY connection, you don't get any of these features. - - Function: event-matches-key-specifier-p EVENT KEY-SPECIFIER + - Function: event-matches-key-specifier-p event key-specifier This function returns non-`nil' if EVENT matches KEY-SPECIFIER, which can be any valid form representing a key sequence. This can be useful, e.g., to determine if the user pressed `help-char' or @@ -845,7 +845,7 @@ their keymaps: * `esc-map' is an evil hack that is present for compatibility purposes with Emacs 18. Defining a key in `esc-map' is equivalent to defining the same key in `global-map' but with the - prefix added. You should *not* use this in your code. (This map is + prefix added. You should _not_ use this in your code. (This map is also the function definition of `ESC-prefix'.) The binding of a prefix key is the keymap to use for looking up the @@ -882,7 +882,7 @@ The key sequence `C-p 6' is not found in any active keymap. (key-binding "\C-p6") => nil - - Function: define-prefix-command SYMBOL &optional MAPVAR + - Function: define-prefix-command symbol &optional mapvar This function defines SYMBOL as a prefix command: it creates a keymap and stores it as SYMBOL's function definition. Storing the symbol as the binding of a key makes the key a prefix key that has @@ -962,7 +962,7 @@ the maps. * the current global map. Note that if `overriding-local-map' or -`overriding-terminal-local-map' is non-`nil', *only* those two maps and +`overriding-terminal-local-map' is non-`nil', _only_ those two maps and the current global map are searched. The procedure for searching a single keymap is called "key lookup"; @@ -985,7 +985,7 @@ completion and exit commands. *Note Intro to Minibuffers::. *Note Standard Keymaps::, for a list of standard keymaps. - - Function: current-keymaps &optional EVENT-OR-KEYS + - Function: current-keymaps &optional event-or-keys This function returns a list of the current keymaps that will be searched for bindings. This lists keymaps such as the current local map and the minor-mode maps, but does not list the parents @@ -1040,13 +1040,13 @@ completion and exit commands. *Note Intro to Minibuffers::. This function returns a list of the keymaps of currently enabled minor modes. - - Function: use-global-map KEYMAP + - Function: use-global-map keymap This function makes KEYMAP the new current global keymap. It returns `nil'. It is very unusual to change the global keymap. - - Function: use-local-map KEYMAP &optional BUFFER + - Function: use-local-map keymap &optional buffer This function makes KEYMAP the new local keymap of BUFFER. BUFFER defaults to the current buffer. If KEYMAP is `nil', then the buffer has no local keymap. `use-local-map' returns `nil'. Most @@ -1097,7 +1097,7 @@ completion and exit commands. *Note Intro to Minibuffers::. normal mechanism if there is no binding for that click. This buffer's value of `mode-motion-hook' will be consulted instead of the `mode-motion-hook' of the buffer of the window under the mouse. - You should *bind* this, not set it. + You should _bind_ this, not set it. - Variable: overriding-local-map If non-`nil', this variable holds a keymap to use instead of the diff --git a/info/lispref.info-19 b/info/lispref.info-19 index 6a53c4d..946587f 100644 --- a/info/lispref.info-19 +++ b/info/lispref.info-19 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -141,7 +141,7 @@ SYMBOL its function definition is invalid as a function. It is, however, valid as a key binding. If the definition is a keyboard macro, then the symbol is also valid as an argument to `command-execute' - (*note Interactive Call::.). + (*note Interactive Call::). The symbol `undefined' is worth special mention: it means to treat the key as undefined. Strictly speaking, the key is defined, and @@ -170,7 +170,7 @@ Functions for Key Lookup Here are the functions and variables pertaining to key lookup. - - Function: lookup-key KEYMAP KEY &optional ACCEPT-DEFAULTS + - Function: lookup-key keymap key &optional accept-defaults This function returns the definition of KEY in KEYMAP. If the string or vector KEY is not a valid key sequence according to the prefix keys specified in KEYMAP (which means it is "too long" and @@ -203,7 +203,7 @@ Functions for Key Lookup Unlike `read-key-sequence', this function does not modify the specified events in ways that discard information (*note Key - Sequence Input::.). In particular, it does not convert letters to + Sequence Input::). In particular, it does not convert letters to lower case. - Command: undefined @@ -211,7 +211,7 @@ Functions for Key Lookup this, invoking this key sequence causes a "key undefined" error, just as if the key sequence had no binding. - - Function: key-binding KEY &optional ACCEPT-DEFAULTS + - Function: key-binding key &optional accept-defaults This function returns the binding for KEY in the current keymaps, trying all the active keymaps. The result is `nil' if KEY is undefined in the keymaps. @@ -226,21 +226,21 @@ Functions for Key Lookup (key-binding [escape escape escape]) => keyboard-escape-quit - - Function: local-key-binding KEY &optional ACCEPT-DEFAULTS + - Function: local-key-binding key &optional accept-defaults This function returns the binding for KEY in the current local keymap, or `nil' if it is undefined there. The argument ACCEPT-DEFAULTS controls checking for default bindings, as in `lookup-key' (above). - - Function: global-key-binding KEY &optional ACCEPT-DEFAULTS + - Function: global-key-binding key &optional accept-defaults This function returns the binding for command KEY in the current global keymap, or `nil' if it is undefined there. The argument ACCEPT-DEFAULTS controls checking for default bindings, as in `lookup-key' (above). - - Function: minor-mode-key-binding KEY &optional ACCEPT-DEFAULTS + - Function: minor-mode-key-binding key &optional accept-defaults This function returns a list of all the active minor mode bindings of KEY. More precisely, it returns an alist of pairs `(MODENAME . BINDING)', where MODENAME is the variable that enables the minor @@ -259,9 +259,9 @@ Functions for Key Lookup This variable is the meta-prefix character code. It is used when translating a two-character sequence to a meta character so it can be looked up in a keymap. For useful results, the value should be - a prefix event (*note Prefix Keys::.). The default value is - `?\^[' (integer 27), which is the ASCII character usually produced - by the key. + a prefix event (*note Prefix Keys::). The default value is `?\^[' + (integer 27), which is the ASCII character usually produced by the + key. As long as the value of `meta-prefix-char' remains `?\^[', key lookup translates ` b' into `M-b', which is normally defined @@ -274,18 +274,14 @@ Functions for Key Lookup meta-prefix-char ; The default value. => ?\^[ ; Under XEmacs 20. => 27 ; Under XEmacs 19. - (key-binding "\eb") => backward-word - ?\C-x ; The print representation ; of a character. => ?\^X ; Under XEmacs 20. => 24 ; Under XEmacs 19. - (setq meta-prefix-char 24) => 24 - (key-binding "\C-xb") => backward-word ; Now, typing `C-x b' is ; like typing `M-b'. @@ -307,19 +303,19 @@ buffers (though it has no direct effect in buffers that shadow the global binding with a local one). If you change the current buffer's local map, that usually affects all buffers using the same major mode. The `global-set-key' and `local-set-key' functions are convenient -interfaces for these operations (*note Key Binding Commands::.). You +interfaces for these operations (*note Key Binding Commands::). You can also use `define-key', a more general function; then you must specify explicitly the map to change. The way to specify the key sequence that you want to rebind is -described above (*note Key Sequences::.). +described above (*note Key Sequences::). For the functions below, an error is signaled if KEYMAP is not a keymap or if KEY is not a string or vector representing a key sequence. You can use event types (symbols) as shorthand for events that are lists. - - Function: define-key KEYMAP KEY BINDING + - Function: define-key keymap key binding This function sets the binding for KEY in KEYMAP. (If KEY is more than one event long, the change is actually made in another keymap reached from KEYMAP.) The argument BINDING can be any Lisp @@ -339,20 +335,17 @@ bindings in it: (setq map (make-sparse-keymap)) => # - (define-key map "\C-f" 'forward-char) => forward-char - map => # (describe-bindings-internal map) => ; (Inserted in buffer) C-f forward-char - + ;; Build sparse submap for `C-x' and bind `f' in that. (define-key map "\C-xf" 'forward-word) => forward-word - map => # (describe-bindings-internal map) @@ -361,16 +354,15 @@ bindings in it: C-x << Prefix Command >> C-x f forward-word - + ;; Bind `C-p' to the `ctl-x-map'. (define-key map "\C-p" ctl-x-map) ;; `ctl-x-map' => # - + ;; Bind `C-f' to `foo' in the `ctl-x-map'. (define-key map "\C-p\C-f" 'foo) => foo - map => # (describe-bindings-internal map) @@ -409,8 +401,8 @@ Note that storing a new binding for `C-p C-f' actually works by changing an entry in `ctl-x-map', and this has the effect of changing the bindings of both `C-p C-f' and `C-x C-f' in the default global map. - - Function: substitute-key-definition OLDDEF NEWDEF KEYMAP &optional - OLDMAP + - Function: substitute-key-definition olddef newdef keymap &optional + oldmap This function replaces OLDDEF with NEWDEF for any keys in KEYMAP that were bound to OLDDEF. In other words, OLDDEF is replaced with NEWDEF wherever it appears. The function returns `nil'. @@ -434,7 +426,7 @@ the bindings of both `C-p C-f' and `C-x C-f' in the default global map. are globally bound to the standard deletion command. - - Function: suppress-keymap KEYMAP &optional NODIGITS + - Function: suppress-keymap keymap &optional nodigits This function changes the contents of the full keymap KEYMAP by making all the printing characters undefined. More precisely, it binds them to the command `undefined'. This makes ordinary @@ -447,7 +439,7 @@ the bindings of both `C-p C-f' and `C-x C-f' in the default global map. The `suppress-keymap' function does not make it impossible to modify a buffer, as it does not suppress commands such as `yank' and `quoted-insert'. To prevent any modification of a buffer, make - it read-only (*note Read Only Buffers::.). + it read-only (*note Read Only Buffers::). Since this function modifies KEYMAP, you would normally use it on a newly created keymap. Operating on an existing keymap that is @@ -461,7 +453,7 @@ the bindings of both `C-p C-f' and `C-x C-f' in the default global map. from the file `emacs/lisp/dired.el', showing how the local keymap for Dired mode is set up: - ... + ... (setq dired-mode-map (make-keymap)) (suppress-keymap dired-mode-map) (define-key dired-mode-map "r" 'dired-rename-file) @@ -501,7 +493,7 @@ redefines `C-x C-\' to move down a line. redefines the first (leftmost) mouse button, typed with the Meta key, to set point where you click. - - Command: global-set-key KEY DEFINITION + - Command: global-set-key key definition This function sets the binding of KEY in the current global map to DEFINITION. @@ -509,7 +501,7 @@ set point where you click. == (define-key (current-global-map) KEY DEFINITION) - - Command: global-unset-key KEY + - Command: global-unset-key key This function removes the binding of KEY from the current global map. @@ -519,7 +511,6 @@ set point where you click. (global-unset-key "\C-l") => nil - (global-set-key "\C-l\C-l" 'redraw-display) => nil @@ -529,7 +520,7 @@ set point where you click. == (define-key (current-global-map) KEY nil) - - Command: local-set-key KEY DEFINITION + - Command: local-set-key key definition This function sets the binding of KEY in the current local keymap to DEFINITION. @@ -537,7 +528,7 @@ set point where you click. == (define-key (current-local-map) KEY DEFINITION) - - Command: local-unset-key KEY + - Command: local-unset-key key This function removes the binding of KEY from the current local map. @@ -555,7 +546,7 @@ Scanning Keymaps keymaps, or all keys within a keymap, for the sake of printing help information. - - Function: accessible-keymaps KEYMAP &optional PREFIX + - Function: accessible-keymaps keymap &optional prefix This function returns a list of all the keymaps that can be accessed (via prefix keys) from KEYMAP. The value is an association list with elements of the form `(KEY . MAP)', where @@ -622,7 +613,7 @@ information. 8 entries 0x3ef>) 2 entries 0x3f5>)) - - Function: map-keymap FUNCTION KEYMAP &optional SORT-FIRST + - Function: map-keymap function keymap &optional sort-first This function applies FUNCTION to each element of `KEYMAP'. FUNCTION will be called with two arguments: a key-description list, and the binding. The order in which the elements of the @@ -632,7 +623,7 @@ information. the function more than once. The function will not be called on elements of this keymap's - parents (*note Inheritance and Keymaps::.) or upon keymaps which + parents (*note Inheritance and Keymaps::) or upon keymaps which are contained within this keymap (multi-character definitions). It will be called on characters since they are not really two-character sequences. @@ -642,11 +633,11 @@ information. canonical order. Otherwise, they will be passed in hash (that is, random) order, which is faster. - - Function: keymap-fullness KEYMAP + - Function: keymap-fullness keymap This function returns the number of bindings in the keymap. - - Function: where-is-internal DEFINITION &optional KEYMAPS FIRSTONLY - NOINDIRECT EVENT-OR-KEYS + - Function: where-is-internal definition &optional keymaps firstonly + noindirect event-or-keys This function returns a list of key sequences (of any length) that are bound to DEFINITION in a set of keymaps. @@ -678,8 +669,8 @@ information. (where-is-internal 'describe-function) => ([(control h) d] [(control h) f] [f1 d] [f1 f]) - - Function: describe-bindings-internal MAP &optional ALL SHADOW PREFIX - MOUSE-ONLY-P + - Function: describe-bindings-internal map &optional all shadow prefix + mouse-only-p This function inserts (into the current buffer) a list of all defined keys and their definitions in MAP. Optional second argument ALL says whether to include even "uninteresting" @@ -694,7 +685,7 @@ information. `describe-bindings-internal' is used to implement the help command `describe-bindings'. - - Command: describe-bindings PREFIX MOUSE-ONLY-P + - Command: describe-bindings prefix mouse-only-p This function creates a listing of all defined keys and their definitions. It writes the listing in a buffer named `*Help*' and displays it in a window. @@ -721,13 +712,13 @@ File: lispref.info, Node: Other Keymap Functions, Prev: Scanning Keymaps, Up: Other Keymap Functions ====================== - - Function: set-keymap-prompt KEYMAP NEW-PROMPT + - Function: set-keymap-prompt keymap new-prompt This function sets the "prompt" of KEYMAP to string NEW-PROMPT, or `nil' if no prompt is desired. The prompt is shown in the echo-area when reading a key-sequence to be looked-up in this keymap. - - Function: keymap-prompt KEYMAP &optional USE-INHERITED + - Function: keymap-prompt keymap &optional use-inherited This function returns the "prompt" of the given keymap. If USE-INHERITED is non-`nil', any parent keymaps will also be searched for a prompt. @@ -1023,12 +1014,12 @@ menubar. They are equivalent to doing the appropriate action to change `current-menubar', and then calling `set-menubar-dirty-flag'. Note that these functions copy their argument using `copy-sequence'. - - Function: set-menubar MENUBAR + - Function: set-menubar menubar This function sets the default menubar to be MENUBAR (*note Menu - Format::.). This is the menubar that will be visible in buffers + Format::). This is the menubar that will be visible in buffers that have not defined their own, buffer-local menubar. - - Function: set-buffer-menubar MENUBAR + - Function: set-buffer-menubar menubar This function sets the buffer-local menubar to be MENUBAR. This does not change the menubar in any buffers other than the current one. @@ -1087,7 +1078,7 @@ also specifies a particular item to be modified. For example, `("File" menu. `("Menu" "Foo" "Item")' means the menu item called "Item" under the "Foo" submenu of "Menu". - - Function: add-submenu MENU-PATH SUBMENU &optional BEFORE + - Function: add-submenu menu-path submenu &optional before This function adds a menu to the menubar or one of its submenus. If the named menu exists already, it is changed. @@ -1095,13 +1086,13 @@ the "Foo" submenu of "Menu". inserted. If MENU-PATH is `nil', then the menu will be added to the menubar itself. - SUBMENU is the new menu to add (*note Menu Format::.). + SUBMENU is the new menu to add (*note Menu Format::). BEFORE, if provided, is the name of a menu before which this menu should be added, if this menu is not on its parent already. If the menu is already present, it will not be moved. - - Function: add-menu-button MENU-PATH MENU-LEAF &optional BEFORE + - Function: add-menu-button menu-path menu-leaf &optional before This function adds a menu item to some menu, creating the menu first if necessary. If the named item exists already, it is changed. @@ -1109,25 +1100,25 @@ the "Foo" submenu of "Menu". MENU-PATH identifies the menu under which the new menu item should be inserted. - MENU-LEAF is a menubar leaf node (*note Menu Format::.). + MENU-LEAF is a menubar leaf node (*note Menu Format::). BEFORE, if provided, is the name of a menu before which this item should be added, if this item is not on the menu already. If the item is already present, it will not be moved. - - Function: delete-menu-item MENU-ITEM-PATH + - Function: delete-menu-item menu-item-path This function removes the menu item specified by MENU-ITEM-PATH from the menu hierarchy. - - Function: enable-menu-item MENU-ITEM-PATH + - Function: enable-menu-item menu-item-path This function makes the menu item specified by MENU-ITEM-PATH be selectable. - - Function: disable-menu-item MENU-ITEM-PATH + - Function: disable-menu-item menu-item-path This function makes the menu item specified by MENU-ITEM-PATH be unselectable. - - Function: relabel-menu-item MENU-ITEM-PATH NEW-NAME + - Function: relabel-menu-item menu-item-path new-name This function changes the string of the menu item specified by MENU-ITEM-PATH. NEW-NAME is the string that the menu item will be printed as from now on. @@ -1135,7 +1126,7 @@ the "Foo" submenu of "Menu". The following function can be used to search for a particular item in a menubar specification, given a path to the item. - - Function: find-menu-item MENUBAR MENU-ITEM-PATH &optional PARENT + - Function: find-menu-item menubar menu-item-path &optional parent This function searches MENUBAR for the item given by MENU-ITEM-PATH starting from PARENT (`nil' means start at the top of MENUBAR). This function returns `(ITEM . PARENT)', where @@ -1149,7 +1140,7 @@ a menubar specification, given a path to the item. existing code can be understood. You should not use these functions in new code. - - Function: add-menu MENU-PATH MENU-NAME MENU-ITEMS &optional BEFORE + - Function: add-menu menu-path menu-name menu-items &optional before This function adds a menu to the menubar or one of its submenus. If the named menu exists already, it is changed. This is obsolete; use `add-submenu' instead. @@ -1161,14 +1152,14 @@ new code. MENU-NAME is the string naming the menu to be added; MENU-ITEMS is a list of menu items, strings, and submenus. These two arguments are the same as the first and following elements of a menu - description (*note Menu Format::.). + description (*note Menu Format::). BEFORE, if provided, is the name of a menu before which this menu should be added, if this menu is not on its parent already. If the menu is already present, it will not be moved. - - Function: add-menu-item MENU-PATH ITEM-NAME FUNCTION ENABLED-P - &optional BEFORE + - Function: add-menu-item menu-path item-name function enabled-p + &optional before This function adds a menu item to some menu, creating the menu first if necessary. If the named item exists already, it is changed. This is obsolete; use `add-menu-button' instead. @@ -1176,7 +1167,7 @@ new code. MENU-PATH identifies the menu under which the new menu item should be inserted. ITEM-NAME, FUNCTION, and ENABLED-P are the first, second, and third elements of a menu item vector (*note Menu - Format::.). + Format::). BEFORE, if provided, is the name of a menu item before which this item should be added, if this item is not on the menu already. If @@ -1192,7 +1183,7 @@ Menu Filters `default-menubar'. You may want to use them in your own menubar description. - - Function: file-menu-filter MENU-ITEMS + - Function: file-menu-filter menu-items This function changes the arguments and sensitivity of these File menu items: @@ -1216,7 +1207,7 @@ description. `Delete Frame' Sensitive only when there is more than one visible frame. - - Function: edit-menu-filter MENU-ITEMS + - Function: edit-menu-filter menu-items This function changes the arguments and sensitivity of these Edit menu items: @@ -1239,7 +1230,7 @@ description. Sensitive only when there is undo information. While in the midst of an undo, this is changed to `Undo More'. - - Function: buffers-menu-filter MENU-ITEMS + - Function: buffers-menu-filter menu-items This function sets up the Buffers menu. *Note Buffers Menu::, for more information. diff --git a/info/lispref.info-2 b/info/lispref.info-2 index 291dd3e..671fdba 100644 --- a/info/lispref.info-2 +++ b/info/lispref.info-2 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -477,7 +477,7 @@ function or variable name, as appropriate. Also state the number of the edition which you are criticizing. This manual was originally written for FSF Emacs 19 and was updated -by Ben Wing (wing@666.com) for Lucid Emacs 19.10 and later for XEmacs +by Ben Wing (ben@xemacs.org) for Lucid Emacs 19.10 and later for XEmacs 19.12, 19.13, 19.14, and 20.0. It was further updated by the XEmacs Development Team for 19.15 and 20.1. Please send comments and corrections relating to XEmacs-specific portions of this manual to @@ -667,7 +667,7 @@ and "after" versions of the text. These examples show the contents of the buffer in question between two lines of dashes containing the buffer name. In addition, `-!-' indicates the location of point. (The symbol for point, of course, is not part of the text in the buffer; it -indicates the place *between* two characters where point is located.) +indicates the place _between_ two characters where point is located.) ---------- Buffer: foo ---------- This is the -!-contents of foo. @@ -723,7 +723,7 @@ Do not write `&rest' when you call the function. Here is a description of an imaginary function `foo': - - Function: foo INTEGER1 &optional INTEGER2 &rest INTEGERS + - Function: foo integer1 &optional integer2 &rest integers The function `foo' subtracts INTEGER1 from INTEGER2, then adds all the rest of the arguments to the result. If INTEGER2 is not supplied, then the number 19 is used by default. @@ -939,7 +939,7 @@ signals the error `invalid-read-syntax' whenever it encounters `#<'. When you evaluate an expression interactively, the Lisp interpreter first reads the textual representation of it, producing a Lisp object, -and then evaluates that object (*note Evaluation::.). However, +and then evaluates that object (*note Evaluation::). However, evaluation and reading are separate activities. Reading returns the Lisp object represented by the text that is read; the object may or may not be evaluated later. *Note Input Functions::, for a description of @@ -962,7 +962,7 @@ system. The `#@COUNT' construct, which skips the next COUNT characters, is useful for program-generated comments containing binary data. The XEmacs Lisp byte compiler uses this in its output files (*note Byte -Compilation::.). It isn't meant for source files, however. +Compilation::). It isn't meant for source files, however. *Note Comment Tips::, for conventions for formatting comments. @@ -1138,7 +1138,7 @@ Integer Type machines, in particular 64-bit machines such as the DEC Alpha, may provide a wider range.) It is important to note that the XEmacs Lisp arithmetic functions do not check for overflow. Thus `(1+ 134217727)' -is -134217728 on most machines. (However, you *will* get an error if +is -134217728 on most machines. (However, you _will_ get an error if you attempt to read an out-of-range number using the Lisp reader.) The read syntax for integers is a sequence of (base ten) digits with diff --git a/info/lispref.info-20 b/info/lispref.info-20 index b30dff0..1be9fa5 100644 --- a/info/lispref.info-20 +++ b/info/lispref.info-20 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -55,9 +55,9 @@ File: lispref.info, Node: Pop-Up Menus, Next: Menu Filters, Prev: Modifying M Pop-Up Menus ============ - - Function: popup-menu MENU-DESC + - Function: popup-menu menu-desc This function pops up a menu specified by MENU-DESC, which is a - menu description (*note Menu Format::.). The menu is displayed at + menu description (*note Menu Format::). The menu is displayed at the current mouse position. - Function: popup-menu-up-p @@ -100,11 +100,11 @@ the binding for button3. The following convenience functions are provided for displaying pop-up menus. - - Function: popup-buffer-menu EVENT + - Function: popup-buffer-menu event This function pops up a copy of the `Buffers' menu (from the menubar) where the mouse is clicked. - - Function: popup-menubar-menu EVENT + - Function: popup-menubar-menu event This function pops up a copy of menu that also appears in the menubar. @@ -263,7 +263,7 @@ existence, and is updated dynamically. then all buffers will be shown. Setting this to a large number or `nil' will slow down menu responsiveness. - - Function: format-buffers-menu-line BUFFER + - Function: format-buffers-menu-line buffer This function returns a string to represent BUFFER in the `Buffers' menu. `nil' means the buffer shouldn't be listed. You can redefine this. @@ -334,9 +334,9 @@ File: lispref.info, Node: Dialog Box Functions, Prev: Dialog Box Format, Up: Dialog Box Functions ==================== - - Function: popup-dialog-box DBOX-DESC + - Function: popup-dialog-box dbox-desc This function pops up a dialog box. DBOX-DESC describes how the - dialog box will appear (*note Dialog Box Format::.). + dialog box will appear (*note Dialog Box Format::). *Note Yes-or-No Queries::, for functions to ask a yes/no question using a dialog box. @@ -372,7 +372,7 @@ the minibuffer when the mouse is over the button. the frame, and two or more different edges can be displaying toolbars simultaneously. The contents, thickness, and visibility of the toolbars can be controlled separately, and the values can be -per-buffer, per-frame, etc., using specifiers (*note Specifiers::.). +per-buffer, per-frame, etc., using specifiers (*note Specifiers::). Normally, there is one toolbar displayed in a frame. Usually, this is the standard toolbar, but certain modes will override this and @@ -483,15 +483,15 @@ others specify blank areas in the toolbar. area. If omitted, it defaults to a device-specific value (8 pixels for X devices). - - Function: toolbar-make-button-list UP &optional DOWN DISABLED CAP-UP - CAP-DOWN CAP-DISABLED + - Function: toolbar-make-button-list up &optional down disabled cap-up + cap-down cap-disabled This function calls `make-glyph' on each arg and returns a list of the results. This is useful for setting the first argument of a toolbar button descriptor (typically, the result of this function is assigned to a symbol, which is specified as the first argument of the toolbar button descriptor). - - Function: check-toolbar-button-syntax BUTTON &optional NOERROR + - Function: check-toolbar-button-syntax button &optional noerror Verify the syntax of entry BUTTON in a toolbar description list. If you want to verify the syntax of a toolbar description list as a whole, use `check-valid-instantiator' with a specifier type of @@ -531,9 +531,9 @@ thickness is controlled by the specifiers `top-toolbar-height', `right-toolbar-width', and the visibility status is controlled by the specifiers `top-toolbar-visible-p', `bottom-toolbar-visible-p', `left-toolbar-visible-p', and `right-toolbar-visible-p' (*note Other -Toolbar Variables::.). +Toolbar Variables::). - - Function: set-default-toolbar-position POSITION + - Function: set-default-toolbar-position position This function sets the position that the `default-toolbar' will be displayed at. Valid positions are the symbols `top', `bottom', `left' and `right'. What this actually does is set the fallback @@ -543,7 +543,7 @@ Toolbar Variables::.). same thing for the position-specific thickness and visibility specifiers, which inherit from one of `default-toolbar-height' or `default-toolbar-width', and from `default-toolbar-visible-p', - respectively (*note Other Toolbar Variables::.). + respectively (*note Other Toolbar Variables::). - Function: default-toolbar-position This function returns the position that the `default-toolbar' will @@ -568,11 +568,11 @@ this position. - Specifier: right-toolbar Specifier for the toolbar at the right edge of the frame. - - Function: toolbar-specifier-p OBJECT + - Function: toolbar-specifier-p object This function returns non-nil if OBJECT is a toolbar specifier. Toolbar specifiers are the actual objects contained in the toolbar variables described above, and their valid instantiators are - toolbar descriptors (*note Toolbar Descriptor Format::.). + toolbar descriptors (*note Toolbar Descriptor Format::).  File: lispref.info, Node: Other Toolbar Variables, Prev: Specifying the Toolbar, Up: Toolbar @@ -688,7 +688,7 @@ File: lispref.info, Node: Drag and Drop, Next: Modes, Prev: Scrollbars, Up: Drag and Drop ************* - *WARNING*: the Drag'n'Drop API is still under development and the + _WARNING_: the Drag'n'Drop API is still under development and the interface may change! The current implementation is considered experimental. @@ -732,7 +732,7 @@ File: lispref.info, Node: OffiX DND, Next: CDE dt, Up: Supported Protocols OffiX DND --------- - *WARNING*: If you compile in OffiX, you may not be able to use + _WARNING_: If you compile in OffiX, you may not be able to use multiple X displays successfully. If the two servers are from different vendors, the results may be unpredictable. @@ -873,7 +873,7 @@ writing a minor mode, which is often difficult). modify the old one to serve two purposes, since it may become harder to use and maintain. Instead, copy and rename an existing major mode definition and alter the copy--or define a "derived mode" (*note -Derived Modes::.). For example, Rmail Edit mode, which is in +Derived Modes::). For example, Rmail Edit mode, which is in `emacs/lisp/rmailedit.el', is a major mode that is very similar to Text mode except that it provides three additional commands. Its definition is distinct from that of Text mode, but was derived from it. @@ -1044,18 +1044,18 @@ conventions listed above: ;; Create mode-specific tables. (defvar text-mode-syntax-table nil "Syntax table used while in text mode.") - + (if text-mode-syntax-table () ; Do not change the table if it is already set up. (setq text-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?\" ". " text-mode-syntax-table) (modify-syntax-entry ?\\ ". " text-mode-syntax-table) (modify-syntax-entry ?' "w " text-mode-syntax-table)) - + (defvar text-mode-abbrev-table nil "Abbrev table used while in text mode.") (define-abbrev-table 'text-mode-abbrev-table ()) - + (defvar text-mode-map nil) ; Create a mode-specific keymap. (if text-mode-map @@ -1070,12 +1070,10 @@ conventions listed above: (defun text-mode () "Major mode for editing text intended for humans to read. Special commands: \\{text-mode-map} - Turning on text-mode runs the hook `text-mode-hook'." (interactive) (kill-all-local-variables) - - (use-local-map text-mode-map) ; This provides the local keymap. + (use-local-map text-mode-map) ; This provides the local keymap. (setq mode-name "Text") ; This name goes into the modeline. (setq major-mode 'text-mode) ; This is how `describe-mode' ; finds the doc string to print. @@ -1093,26 +1091,24 @@ correspondingly more complicated. Here are excerpts from (defvar lisp-mode-syntax-table nil "") (defvar emacs-lisp-mode-syntax-table nil "") (defvar lisp-mode-abbrev-table nil "") - + (if (not emacs-lisp-mode-syntax-table) ; Do not change the table ; if it is already set. (let ((i 0)) (setq emacs-lisp-mode-syntax-table (make-syntax-table)) - - ;; Set syntax of chars up to 0 to class of chars that are + + ;; Set syntax of chars up to 0 to class of chars that are ;; part of symbol names but not words. ;; (The number 0 is `48' in the ASCII character set.) (while (< i ?0) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) ... - - ;; Set the syntax for other characters. + ;; Set the syntax for other characters. (modify-syntax-entry ? " " emacs-lisp-mode-syntax-table) (modify-syntax-entry ?\t " " emacs-lisp-mode-syntax-table) ... - - (modify-syntax-entry ?\( "() " emacs-lisp-mode-syntax-table) + (modify-syntax-entry ?\( "() " emacs-lisp-mode-syntax-table) (modify-syntax-entry ?\) ")( " emacs-lisp-mode-syntax-table) ...)) ;; Create an abbrev table for lisp-mode. @@ -1130,8 +1126,7 @@ mode functions: ;; The Emacs Lisp mode syntax table always exists, but ;; the Lisp Mode syntax table is created the first time a ;; mode that needs it is called. This is to save space. - - (progn (setq lisp-mode-syntax-table + (progn (setq lisp-mode-syntax-table (copy-syntax-table emacs-lisp-mode-syntax-table)) ;; Change some entries for Lisp mode. (modify-syntax-entry ?\| "\" " @@ -1140,8 +1135,7 @@ mode functions: lisp-mode-syntax-table) (modify-syntax-entry ?\] "_ " lisp-mode-syntax-table))) - - (set-syntax-table lisp-mode-syntax-table))) + (set-syntax-table lisp-mode-syntax-table))) (setq local-abbrev-table lisp-mode-abbrev-table) ...) @@ -1153,13 +1147,12 @@ and the Lisp modes need their own mode-specific `comment-indent-function'. The code to set these variables is the rest of `lisp-mode-variables'. - (make-local-variable 'paragraph-start) + (make-local-variable 'paragraph-start) ;; Having `^' is not clean, but `page-delimiter' ;; has them too, and removing those is a pain. (setq paragraph-start (concat "^$\\|" page-delimiter)) ... - - (make-local-variable 'comment-indent-function) + (make-local-variable 'comment-indent-function) (setq comment-indent-function 'lisp-comment-indent)) Each of the different Lisp modes has a slightly different keymap. @@ -1198,14 +1191,12 @@ Emacs Lisp mode. Delete converts tabs to spaces as it moves back. Blank lines separate paragraphs. Semicolons start comments. \\{emacs-lisp-mode-map} - Entry to this mode runs the hook `emacs-lisp-mode-hook'." (interactive) (kill-all-local-variables) (use-local-map emacs-lisp-mode-map) ; This provides the local keymap. (set-syntax-table emacs-lisp-mode-syntax-table) - - (setq major-mode 'emacs-lisp-mode) ; This is how `describe-mode' + (setq major-mode 'emacs-lisp-mode) ; This is how `describe-mode' ; finds out what to describe. (setq mode-name "Emacs-Lisp") ; This goes into the modeline. (lisp-mode-variables nil) ; This defines various variables. diff --git a/info/lispref.info-21 b/info/lispref.info-21 index e5391ea..4ade6a9 100644 --- a/info/lispref.info-21 +++ b/info/lispref.info-21 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -64,11 +64,11 @@ visited. anything in particular. Other major modes are defined in effect by comparison with this one--their definitions say what to change, starting from Fundamental mode. The `fundamental-mode' function - does *not* run any hooks; you're not supposed to customize it. + does _not_ run any hooks; you're not supposed to customize it. (If you want Emacs to behave differently in Fundamental mode, - change the *global* state of Emacs.) + change the _global_ state of Emacs.) - - Command: normal-mode &optional FIND-FILE + - Command: normal-mode &optional find-file This function establishes the proper major mode and local variable bindings for the current buffer. First it calls `set-auto-mode', then it runs `hack-local-variables' to parse, and bind or evaluate @@ -131,7 +131,7 @@ visited. property are those such as Dired and Rmail that are useful only with text that has been specially prepared. - - Function: set-buffer-major-mode BUFFER + - Function: set-buffer-major-mode buffer This function sets the major mode of BUFFER to the value of `default-major-mode'. If that variable is `nil', it uses the current buffer's major mode (if that is suitable). @@ -147,7 +147,7 @@ visited. - Variable: auto-mode-alist This variable contains an association list of file name patterns - (regular expressions; *note Regular Expressions::.) and + (regular expressions; *note Regular Expressions::) and corresponding major mode functions. Usually, the file name patterns test for suffixes, such as `.el' and `.c', but this need not be the case. An ordinary element of the alist looks like @@ -158,14 +158,13 @@ visited. (("^/tmp/fol/" . text-mode) ("\\.texinfo\\'" . texinfo-mode) ("\\.texi\\'" . texinfo-mode) - - ("\\.el\\'" . emacs-lisp-mode) + ("\\.el\\'" . emacs-lisp-mode) ("\\.c\\'" . c-mode) ("\\.h\\'" . c-mode) ...) When you visit a file whose expanded file name (*note File Name - Expansion::.) matches a REGEXP, `set-auto-mode' calls the + Expansion::) matches a REGEXP, `set-auto-mode' calls the corresponding MODE-FUNCTION. This feature enables XEmacs to select the proper major mode for most files. @@ -203,7 +202,7 @@ visited. This variable is applicable only when the `auto-mode-alist' does not indicate which major mode to use. - - Function: hack-local-variables &optional FORCE + - Function: hack-local-variables &optional force This function parses, and binds or evaluates as appropriate, any local variables for the current buffer. @@ -246,7 +245,7 @@ Defining Derived Modes It's often useful to define a new major mode in terms of an existing one. An easy way to do this is to use `define-derived-mode'. - - Macro: define-derived-mode VARIANT PARENT NAME DOCSTRING BODY... + - Macro: define-derived-mode variant parent name docstring body... This construct defines VARIANT as a major mode command, using NAME as the string form of the mode name. @@ -373,7 +372,7 @@ minor modes. (> (prefix-numeric-value arg) 0))) * Add an element to `minor-mode-alist' for each minor mode (*note - Modeline Variables::.). This element should be a list of the + Modeline Variables::). This element should be a list of the following form: (MODE-VARIABLE STRING) @@ -433,11 +432,11 @@ appear the same (except for scrolling percentages and line numbers). The modeline of a window is normally updated whenever a different buffer is shown in the window, or when the buffer's modified-status changes from `nil' to `t' or vice-versa. If you modify any of the -variables referenced by `modeline-format' (*note Modeline -Variables::.), you may want to force an update of the modeline so as to -display the new information. +variables referenced by `modeline-format' (*note Modeline Variables::), +you may want to force an update of the modeline so as to display the +new information. - - Function: redraw-modeline &optional ALL + - Function: redraw-modeline &optional all Force redisplay of the current buffer's modeline. If ALL is non-`nil', then force redisplay of all modelines. @@ -461,7 +460,7 @@ strings, symbols, and numbers kept in the buffer-local variable `mode-line-format'. The data structure is called a "modeline construct", and it is built in recursive fashion out of simpler modeline constructs. The same data structure is used for constructing frame -titles (*note Frame Titles::.). +titles (*note Frame Titles::). - Variable: modeline-format The value of this variable is a modeline construct with overall @@ -524,7 +523,7 @@ value is a list, each element may be a list, a symbol, or a string. If you do alter `modeline-format' itself, the new value should use the same variables that appear in the default value (*note Modeline -Variables::.), rather than duplicating their contents or displaying the +Variables::), rather than duplicating their contents or displaying the information in another fashion. This way, customizations made by the user or by Lisp programs (such as `display-time' and major modes) via changes to those variables remain effective. @@ -783,8 +782,8 @@ name ends in `-hook'. The recommended way to add a hook function to a normal hook is by calling `add-hook' (see below). The hook functions may be any of the valid kinds of functions that `funcall' accepts (*note What Is a -Function::.). Most normal hook variables are initially void; -`add-hook' knows how to deal with this. +Function::). Most normal hook variables are initially void; `add-hook' +knows how to deal with this. As for abnormal hooks, those whose names end in `-function' have a value that is a single function. Those whose names end in `-hooks' @@ -799,7 +798,7 @@ hook" as the last step of initialization. This makes it easy for a user to customize the behavior of the mode, by overriding the local variable assignments already made by the mode. But hooks are used in other contexts too. For example, the hook `suspend-hook' runs just before -XEmacs suspends itself (*note Suspending XEmacs::.). +XEmacs suspends itself (*note Suspending XEmacs::). Here's an expression that uses a mode hook to turn on Auto Fill mode when in Lisp Interaction mode: @@ -847,7 +846,7 @@ modified for a particular class of buffers only. particular hooks. This function calls the hook functions you have added with `add-hooks'. - - Function: run-hooks &rest HOOKVAR + - Function: run-hooks &rest hookvar This function takes one or more hook variable names as arguments, and runs each hook in turn. Each HOOKVAR argument should be a symbol that is a hook variable. These arguments are processed in @@ -863,7 +862,7 @@ added with `add-hooks'. (run-hooks 'emacs-lisp-mode-hook) - - Function: add-hook HOOK FUNCTION &optional APPEND LOCAL + - Function: add-hook hook function &optional append local This function is the handy way to add function FUNCTION to hook variable HOOK. The argument FUNCTION may be any valid Lisp function with the proper number of arguments. For example, @@ -892,7 +891,7 @@ added with `add-hooks'. buffer-local, then the value of LOCAL makes no difference--the hook function is always global. - - Function: remove-hook HOOK FUNCTION &optional LOCAL + - Function: remove-hook hook function &optional local This function removes FUNCTION from the hook variable HOOK. If LOCAL is non-`nil', that says to remove FUNCTION from the local @@ -900,7 +899,7 @@ added with `add-hooks'. itself is not buffer-local, then the value of LOCAL makes no difference. - - Function: make-local-hook HOOK + - Function: make-local-hook hook This function makes the hook variable `hook' local to the current buffer. When a hook variable is local, it can have local and global hook functions, and `run-hooks' runs all of them. @@ -979,7 +978,7 @@ rearranges the key bindings. (*Note Accessing Documentation::.) the function or variable that it describes: * The documentation for a function is stored in the function - definition itself (*note Lambda Expressions::.). The function + definition itself (*note Lambda Expressions::). The function `documentation' knows how to extract it. * The documentation for a variable is stored in the variable's @@ -991,7 +990,7 @@ variables (including primitive functions and autoloaded functions) is stored in the "internal doc file" `DOC'. The documentation for functions and variables loaded during the XEmacs session from byte-compiled files is stored in those very same byte-compiled files -(*note Docs and Compilation::.). +(*note Docs and Compilation::). XEmacs does not keep documentation strings in memory unless necessary. Instead, XEmacs maintains, for preloaded symbols, an @@ -1015,7 +1014,7 @@ File: lispref.info, Node: Accessing Documentation, Next: Keys in Documentation Access to Documentation Strings =============================== - - Function: documentation-property SYMBOL PROPERTY &optional VERBATIM + - Function: documentation-property symbol property &optional verbatim This function returns the documentation string that is recorded in SYMBOL's property list under property PROPERTY. It retrieves the text from a file if necessary, and runs `substitute-command-keys' @@ -1026,11 +1025,10 @@ Access to Documentation Strings (documentation-property 'command-line-processed 'variable-documentation) => "t once command line has been processed" - (symbol-plist 'command-line-processed) => (variable-documentation 188902) - - Function: documentation FUNCTION &optional VERBATIM + - Function: documentation function &optional verbatim This function returns the documentation string of FUNCTION. It reads the text from a file if necessary. Then (unless VERBATIM is non-`nil') it calls `substitute-command-keys', to return a value @@ -1053,8 +1051,7 @@ several symbols in a `*Help*' buffer. (let ((describe-func (function (lambda (s) - - ;; Print description of symbol. + ;; Print description of symbol. (if (fboundp s) ; It is a function. (princ (format "%s\t%s\n%s\n\n" s @@ -1067,29 +1064,26 @@ several symbols in a `*Help*' buffer. keys " ")) "Keys: none")) "Function") - - (or (documentation s) + (or (documentation s) "not documented")))) (if (boundp s) ; It is a variable. - - (princ + (princ (format "%s\t%s\n%s\n\n" s (if (user-variable-p s) "Option " "Variable") - - (or (documentation-property + (or (documentation-property s 'variable-documentation) "not documented"))))))) sym-list) - - ;; Build a list of symbols that match pattern. + + ;; Build a list of symbols that match pattern. (mapatoms (function (lambda (sym) (if (string-match pattern (symbol-name sym)) (setq sym-list (cons sym sym-list)))))) - - ;; Display the data. + + ;; Display the data. (with-output-to-temp-buffer "*Help*" (mapcar describe-func (sort sym-list 'string<)) (print-help-return-message)))) @@ -1102,16 +1096,15 @@ more information. ---------- Buffer: *Help* ---------- goal-column Option *Semipermanent goal column for vertical motion, as set by C-x C-n, or nil. - + set-goal-column Command: C-x C-n Set the current horizontal position as a goal for C-n and C-p. - Those commands will move to this position in the line moved to rather than trying to keep the same horizontal position. With a non-nil argument, clears out the goal column so that C-n and C-p resume vertical motion. The goal column is stored in the variable `goal-column'. - + temporary-goal-column Variable Current goal column for vertical motion. It is the column where point was @@ -1119,7 +1112,7 @@ more information. When the `track-eol' feature is doing its job, the value is 9999. ---------- Buffer: *Help* ---------- - - Function: Snarf-documentation FILENAME + - Function: Snarf-documentation filename This function is used only during XEmacs initialization, just before the runnable XEmacs is dumped. It finds the file offsets of the documentation strings stored in the file FILENAME, and diff --git a/info/lispref.info-22 b/info/lispref.info-22 index 4204679..752357b 100644 --- a/info/lispref.info-22 +++ b/info/lispref.info-22 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -84,7 +84,7 @@ also call that function yourself. *Please note:* Each `\' must be doubled when written in a string in XEmacs Lisp. - - Function: substitute-command-keys STRING + - Function: substitute-command-keys string This function scans STRING for the above special sequences and replaces them by what they stand for, returning the result as a string. This permits display of documentation that refers @@ -95,7 +95,7 @@ XEmacs Lisp. (substitute-command-keys "To abort recursive edit, type: \\[abort-recursive-edit]") => "To abort recursive edit, type: C-]" - + (substitute-command-keys "The keys that are defined for the minibuffer here are: \\{minibuffer-local-must-match-map}") @@ -108,11 +108,12 @@ XEmacs Lisp. RET minibuffer-complete-and-exit C-g abort-recursive-edit " + (substitute-command-keys "To abort a recursive edit from the minibuffer, type\ \\\\[abort-recursive-edit].") => "To abort a recursive edit from the minibuffer, type C-g." - + (substitute-command-keys "Substrings of the form \\=\\{MAPVAR} are replaced by summaries \(made by describe-bindings) of the value of MAPVAR, taken as a keymap. @@ -142,14 +143,14 @@ convert non-printing and whitespace characters to sequences of printing characters. The description of a non-whitespace printing character is the character itself. - - Function: key-description SEQUENCE + - Function: key-description sequence This function returns a string containing the XEmacs standard notation for the input events in SEQUENCE. The argument SEQUENCE may be a string, vector or list. *Note Events::, for more information about valid events. See also the examples for `single-key-description', below. - - Function: single-key-description KEY + - Function: single-key-description key This function returns a string describing KEY in the standard XEmacs notation for keyboard input. A normal printing character appears as itself, but a control character turns into a string @@ -160,17 +161,14 @@ the character itself. (single-key-description ?\C-x) => "C-x" - (key-description "\C-x \M-y \n \t \r \f123") => "C-x SPC M-y SPC LFD SPC TAB SPC RET SPC C-l 1 2 3" - (single-key-description 'kp_next) => "kp_next" - (single-key-description '(shift button1)) => "Sh-button1" - - Function: text-char-description CHARACTER + - Function: text-char-description character This function returns a string describing CHARACTER in the standard XEmacs notation for characters that appear in text--like `single-key-description', except that control characters are @@ -179,10 +177,8 @@ the character itself. (text-char-description ?\C-c) => "^C" - (text-char-description ?\M-m) => "M-m" - (text-char-description ?\C-\M-m) => "M-^M" @@ -197,10 +193,10 @@ to the user as subcommands of the prefix `C-h', or on some keyboards, `help'. For more information about them, see *Note Help: (emacs)Help. Here we describe some program-level interfaces to the same information. - - Command: apropos REGEXP &optional DO-ALL PREDICATE + - Command: apropos regexp &optional do-all predicate This function finds all symbols whose names contain a match for the regular expression REGEXP, and returns a list of them (*note - Regular Expressions::.). It also displays the symbols in a buffer + Regular Expressions::). It also displays the symbols in a buffer named `*Help*', each with a one-line description. If DO-ALL is non-`nil', then `apropos' also shows key bindings for @@ -219,7 +215,7 @@ Here we describe some program-level interfaces to the same information. => (Buffer-menu-execute command-execute exec-directory exec-path execute-extended-command execute-kbd-macro executing-kbd-macro executing-macro) - + (apropos "exec" nil 'commandp) => (Buffer-menu-execute execute-extended-command) @@ -244,7 +240,7 @@ Here we describe some program-level interfaces to the same information. (define-key global-map "\C-h" 'help-command) (fset 'help-command help-map) - - Function: print-help-return-message &optional FUNCTION + - Function: print-help-return-message &optional function This function builds a string that explains how to restore the previous state of the windows after a help command. After building the message, it applies FUNCTION to it if FUNCTION is @@ -291,7 +287,7 @@ Here we describe some program-level interfaces to the same information. what the input is for and how to enter it properly. Entry to the minibuffer binds this variable to the value of - `minibuffer-help-form' (*note Minibuffer Misc::.). + `minibuffer-help-form' (*note Minibuffer Misc::). - Variable: prefix-help-command This variable holds a function to print help for a prefix @@ -338,7 +334,7 @@ of that function should be told to use the newer one instead. XEmacs Lisp lets you mark a function or variable as "obsolete", and indicate what should be used instead. - - Function: make-obsolete FUNCTION NEW + - Function: make-obsolete function new This function indicates that FUNCTION is an obsolete function, and the function NEW should be used instead. The byte compiler will issue a warning to this effect when it encounters a usage of the @@ -348,16 +344,16 @@ what should be used instead. should be a descriptive statement, such as "use FOO or BAR instead" or "this function is unnecessary". - - Function: make-obsolete-variable VARIABLE NEW + - Function: make-obsolete-variable variable new This is like `make-obsolete' but is for variables instead of functions. - - Function: define-obsolete-function-alias OLDFUN NEWFUN + - Function: define-obsolete-function-alias oldfun newfun This function combines `make-obsolete' and `define-function', declaring OLDFUN to be an obsolete variant of NEWFUN and defining OLDFUN as an alias for NEWFUN. - - Function: define-obsolete-variable-alias OLDVAR NEWVAR + - Function: define-obsolete-variable-alias oldvar newvar This is like `define-obsolete-function-alias' but for variables. Note that you should not normally put obsoleteness information @@ -373,13 +369,13 @@ the user is told about the obsoleteness and is forced to look at the documentation of the new function, making it more likely that he will use the new function. - - Function: function-obsoleteness-doc FUNCTION + - Function: function-obsoleteness-doc function If FUNCTION is obsolete, this function returns a string describing this. This is the message that is printed out during byte compilation or in the function's documentation. If FUNCTION is not obsolete, `nil' is returned. - - Function: variable-obsoleteness-doc VARIABLE + - Function: variable-obsoleteness-doc variable This is like `function-obsoleteness-doc' but for variables. The obsoleteness information is stored internally by putting a @@ -477,7 +473,7 @@ not alter it, the fastest way is to use `insert-file-contents' in a temporary buffer. Visiting the file is not necessary and takes longer. *Note Reading from Files::. - - Command: find-file FILENAME + - Command: find-file filename This command selects a buffer visiting the file FILENAME, using an existing buffer if there is one, and otherwise creating a new buffer and reading the file into it. It also returns that buffer. @@ -492,7 +488,7 @@ temporary buffer. Visiting the file is not necessary and takes longer. When `find-file' is called interactively, it prompts for FILENAME in the minibuffer. - - Function: find-file-noselect FILENAME &optional NOWARN + - Function: find-file-noselect filename &optional nowarn This function is the guts of all the file-visiting functions. It finds or creates a buffer visiting the file FILENAME, and returns it. It uses an existing buffer if there is one, and otherwise @@ -516,7 +512,7 @@ temporary buffer. Visiting the file is not necessary and takes longer. are suppressed. The `find-file-noselect' function calls `after-find-file' after - reading the file (*note Subroutines of Visiting::.). That function + reading the file (*note Subroutines of Visiting::). That function sets the buffer major mode, parses local variables, warns the user if there exists an auto-save file more recent than the file just visited, and finishes by running the functions in @@ -528,21 +524,21 @@ temporary buffer. Visiting the file is not necessary and takes longer. (find-file-noselect "/etc/fstab") => # - - Command: find-file-other-window FILENAME + - Command: find-file-other-window filename This command selects a buffer visiting the file FILENAME, but does so in a window other than the selected window. It may use another existing window or split a window; see *Note Displaying Buffers::. When this command is called interactively, it prompts for FILENAME. - - Command: find-file-read-only FILENAME + - Command: find-file-read-only filename This command selects a buffer visiting the file FILENAME, like `find-file', but it marks the buffer as read-only. *Note Read Only Buffers::, for related functions and variables. When this command is called interactively, it prompts for FILENAME. - - Command: view-file FILENAME + - Command: view-file filename This command visits FILENAME in View mode, and displays it in a recursive edit, returning to the previous buffer when done. View mode is a mode that allows you to skim rapidly through the file @@ -582,13 +578,13 @@ Subroutines of Visiting `after-find-file' functions as subroutines. Sometimes it is useful to call them directly. - - Function: create-file-buffer FILENAME + - Function: create-file-buffer filename This function creates a suitably named buffer for visiting FILENAME, and returns it. It uses FILENAME (sans directory) as the name if that name is free; otherwise, it appends a string such as `<2>' to get an unused name. See also *Note Creating Buffers::. - *Please note:* `create-file-buffer' does *not* associate the new + *Please note:* `create-file-buffer' does _not_ associate the new buffer with a file and does not select the buffer. It also does not use the default major mode. @@ -600,13 +596,13 @@ call them directly. => #> This function is used by `find-file-noselect'. It uses - `generate-new-buffer' (*note Creating Buffers::.). + `generate-new-buffer' (*note Creating Buffers::). - - Function: after-find-file &optional ERROR WARN NOAUTO + - Function: after-find-file &optional error warn noauto This function sets the buffer major mode, and parses local - variables (*note Auto Major Mode::.). It is called by + variables (*note Auto Major Mode::). It is called by `find-file-noselect' and by the default revert function (*note - Reverting::.). + Reverting::). If reading the file got an error because the file does not exist, but its directory does exist, the caller should pass a non-`nil' @@ -635,7 +631,7 @@ copied into the buffer and the copy is what you edit. Changes to the buffer do not change the file until you "save" the buffer, which means copying the contents of the buffer into the file. - - Command: save-buffer &optional BACKUP-OPTION + - Command: save-buffer &optional backup-option This function saves the contents of the current buffer in its visited file if the buffer has been modified since it was last visited or saved. Otherwise it does nothing. @@ -654,7 +650,7 @@ copying the contents of the buffer into the file. `save-buffer' function unconditionally backs up the previous version of the file before saving it. - - Command: save-some-buffers &optional SAVE-SILENTLY-P EXITING + - Command: save-some-buffers &optional save-silently-p exiting This command saves some modified file-visiting buffers. Normally it asks the user about each buffer. But if SAVE-SILENTLY-P is non-`nil', it saves all the file-visiting buffers without querying @@ -674,7 +670,7 @@ copying the contents of the buffer into the file. variable is automatically local in all buffers. Normally, Mail mode (used for editing outgoing mail) sets this to `t'. - - Command: write-file FILENAME + - Command: write-file filename This function writes the current buffer into file FILENAME, makes the buffer visit that file, and marks it not modified. Then it renames the buffer based on FILENAME, appending a string like `<2>' @@ -741,7 +737,7 @@ copying the contents of the buffer into the file. - User Option: require-final-newline This variable determines whether files may be written out that do - *not* end with a newline. If the value of the variable is `t', + _not_ end with a newline. If the value of the variable is `t', then `save-buffer' silently adds a newline at the end of the file whenever the buffer being saved does not already end in one. If the value of the variable is non-`nil', but not `t', then @@ -762,8 +758,8 @@ Reading from Files the `insert-file-contents' function. Don't use the user-level command `insert-file' in a Lisp program, as that sets the mark. - - Function: insert-file-contents FILENAME &optional VISIT BEG END - REPLACE + - Function: insert-file-contents filename &optional visit beg end + replace This function inserts the contents of file FILENAME into the current buffer after point. It returns a list of the absolute file name and the length of the data inserted. An error is @@ -811,7 +807,7 @@ to a file on disk using the `append-to-file' and `write-region' functions. Don't use these functions to write to files that are being visited; that could cause confusion in the mechanisms for visiting. - - Command: append-to-file START END FILENAME + - Command: append-to-file start end filename This function appends the contents of the region delimited by START and END in the current buffer to the end of file FILENAME. If that file does not exist, it is created. If that file exists @@ -820,7 +816,7 @@ visited; that could cause confusion in the mechanisms for visiting. An error is signaled if FILENAME specifies a nonwritable file, or a nonexistent file in a directory where files cannot be created. - - Command: write-region START END FILENAME &optional APPEND VISIT + - Command: write-region start end filename &optional append visit This function writes the region delimited by START and END in the current buffer into the file specified by FILENAME. @@ -877,7 +873,7 @@ still warn the user who saves second. Also, the detection of modification of a buffer visiting a file changed on disk catches some cases of simultaneous editing; see *Note Modification Time::. - - Function: file-locked-p &optional FILENAME + - Function: file-locked-p &optional filename This function returns `nil' if the file FILENAME is not locked by this XEmacs process. It returns `t' if it is locked by this XEmacs, and it returns the name of the user who has locked it if it @@ -886,7 +882,7 @@ cases of simultaneous editing; see *Note Modification Time::. (file-locked-p "foo") => nil - - Function: lock-buffer &optional FILENAME + - Function: lock-buffer &optional filename This function locks the file FILENAME, if the current buffer is modified. The argument FILENAME defaults to the current buffer's visited file. Nothing is done if the current buffer is not @@ -898,7 +894,7 @@ cases of simultaneous editing; see *Note Modification Time::. the file should not be locked, so this function does nothing. It also does nothing if the current buffer is not visiting a file. - - Function: ask-user-about-lock FILE OTHER-USER + - Function: ask-user-about-lock file other-user This function is called when the user tries to modify FILE, but it is locked by another user named OTHER-USER. The value it returns determines what happens next: @@ -953,7 +949,7 @@ Testing Accessibility These functions test for permission to access a file in specific ways. - - Function: file-exists-p FILENAME + - Function: file-exists-p filename This function returns `t' if a file named FILENAME appears to exist. This does not mean you can necessarily read the file, only that you can find out its attributes. (On Unix, this is true if @@ -964,7 +960,7 @@ ways. prevent you from finding the attributes of the file, this function returns `nil'. - - Function: file-readable-p FILENAME + - Function: file-readable-p filename This function returns `t' if a file named FILENAME exists and you can read it. It returns `nil' otherwise. @@ -975,14 +971,14 @@ ways. (file-readable-p "/usr/spool/mqueue") => nil - - Function: file-executable-p FILENAME + - Function: file-executable-p filename This function returns `t' if a file named FILENAME exists and you can execute it. It returns `nil' otherwise. If the file is a directory, execute permission means you can check the existence and attributes of files inside the directory, and open those files if their modes permit. - - Function: file-writable-p FILENAME + - Function: file-writable-p filename This function returns `t' if the file FILENAME can be written or created by you, and `nil' otherwise. A file is writable if the file exists and you can write it. It is creatable if it does not @@ -1000,7 +996,7 @@ ways. (file-writable-p "~/no-such-dir/foo") => nil - - Function: file-accessible-directory-p DIRNAME + - Function: file-accessible-directory-p dirname This function returns `t' if you have permission to open existing files in the directory whose name as a file is DIRNAME; otherwise (or if there is no such directory), it returns `nil'. The value @@ -1015,11 +1011,11 @@ ways. we can deduce that any attempt to read a file in `/foo/' will give an error. - - Function: file-ownership-preserved-p FILENAME + - Function: file-ownership-preserved-p filename This function returns `t' if deleting the file FILENAME and then creating it anew would keep the file's owner unchanged. - - Function: file-newer-than-file-p FILENAME1 FILENAME2 + - Function: file-newer-than-file-p filename1 filename2 This function returns `t' if the file FILENAME1 is newer than file FILENAME2. If FILENAME1 does not exist, it returns `nil'. If FILENAME2 does not exist, it returns `t'. @@ -1049,7 +1045,7 @@ Distinguishing Kinds of Files This section describes how to distinguish various kinds of files, such as directories, symbolic links, and ordinary files. - - Function: file-symlink-p FILENAME + - Function: file-symlink-p filename If the file FILENAME is a symbolic link, the `file-symlink-p' function returns the file name to which it is linked. This may be the name of a text file, a directory, or even another symbolic @@ -1068,7 +1064,7 @@ such as directories, symbolic links, and ordinary files. => "/pub/bin" - - Function: file-directory-p FILENAME + - Function: file-directory-p filename This function returns `t' if FILENAME is the name of an existing directory, `nil' otherwise. @@ -1084,7 +1080,7 @@ such as directories, symbolic links, and ordinary files. (substitute-in-file-name "$HOME")) => t - - Function: file-regular-p FILENAME + - Function: file-regular-p filename This function returns `t' if the file FILENAME exists and is a regular file (not a directory, symbolic link, named pipe, terminal, or other I/O device). @@ -1096,13 +1092,13 @@ Truenames --------- The "truename" of a file is the name that you get by following -symbolic links until none remain, then expanding to get rid of `.' and +symbolic links until none remain, then expanding to get rid of `.' and `..' as components. Strictly speaking, a file need not have a unique truename; the number of distinct truenames a file has is equal to the number of hard links to the file. However, truenames are useful because they eliminate symbolic links as a cause of name variation. - - Function: file-truename FILENAME &optional DEFAULT + - Function: file-truename filename &optional default The function `file-truename' returns the true name of the file FILENAME. This is the name that you get by following symbolic links until none remain. diff --git a/info/lispref.info-23 b/info/lispref.info-23 index cb2dcee..f3a4258 100644 --- a/info/lispref.info-23 +++ b/info/lispref.info-23 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -61,7 +61,7 @@ mode bits that control access permission, the owner and group numbers, the number of names, the inode number, the size, and the times of access and modification. - - Function: file-modes FILENAME + - Function: file-modes filename This function returns the mode bits of FILENAME, as an integer. The mode bits are also called the file permissions, and they specify access control in the usual Unix fashion. If the @@ -87,7 +87,7 @@ and modification. % ls -l diffs -rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs - - Function: file-nlinks FILENAME + - Function: file-nlinks filename This functions returns the number of names (i.e., hard links) that file FILENAME has. If the file does not exist, then this function returns `nil'. Note that symbolic links have no effect on this @@ -103,7 +103,7 @@ and modification. (file-nlinks "doesnt-exist") => nil - - Function: file-attributes FILENAME + - Function: file-attributes filename This function returns a list of attributes of file FILENAME. If the specified file cannot be opened, it returns `nil'. @@ -115,7 +115,7 @@ and modification. 1. The number of names the file has. Alternate names, also known as hard links, can be created by using the `add-name-to-file' function (*note Changing File - Attributes::.). + Attributes::). 2. The file's UID. @@ -227,8 +227,8 @@ of the argument OK-IF-ALREADY-EXISTS: * Replace the old file without confirmation if OK-IF-ALREADY-EXISTS is any other value. - - Command: add-name-to-file OLDNAME NEWNAME &optional - OK-IF-ALREADY-EXISTS + - Command: add-name-to-file oldname newname &optional + ok-if-already-exists This function gives the file named OLDNAME the additional name NEWNAME. This means that NEWNAME becomes a new "hard link" to OLDNAME. @@ -272,7 +272,7 @@ of the argument OK-IF-ALREADY-EXISTS: See also `file-nlinks' in *Note File Attributes::. - - Command: rename-file FILENAME NEWNAME &optional OK-IF-ALREADY-EXISTS + - Command: rename-file filename newname &optional ok-if-already-exists This command renames the file FILENAME as NEWNAME. If FILENAME has additional names aside from FILENAME, it continues @@ -284,7 +284,7 @@ of the argument OK-IF-ALREADY-EXISTS: NEWNAME in the minibuffer; also, it requests confirmation if NEWNAME already exists. - - Command: copy-file OLDNAME NEWNAME &optional OK-IF-EXISTS TIME + - Command: copy-file oldname newname &optional ok-if-exists time This command copies the file OLDNAME to NEWNAME. An error is signaled if OLDNAME does not exist. @@ -296,7 +296,7 @@ of the argument OK-IF-ALREADY-EXISTS: NEWNAME in the minibuffer; also, it requests confirmation if NEWNAME already exists. - - Command: delete-file FILENAME + - Command: delete-file filename This command deletes the file FILENAME, like the shell command `rm FILENAME'. If the file has multiple names, it continues to exist under the other names. @@ -307,7 +307,7 @@ of the argument OK-IF-ALREADY-EXISTS: See also `delete-directory' in *Note Create/Delete Dirs::. - - Command: make-symbolic-link FILENAME NEWNAME &optional OK-IF-EXISTS + - Command: make-symbolic-link filename newname &optional ok-if-exists This command makes a symbolic link to FILENAME, named NEWNAME. This is like the shell command `ln -s FILENAME NEWNAME'. @@ -315,15 +315,15 @@ of the argument OK-IF-ALREADY-EXISTS: NEWNAME in the minibuffer; also, it requests confirmation if NEWNAME already exists. - - Function: define-logical-name VARNAME STRING + - Function: define-logical-name varname string This function defines the logical name NAME to have the value STRING. It is available only on VMS. - - Function: set-file-modes FILENAME MODE + - Function: set-file-modes filename mode This function sets mode bits of FILENAME to MODE (which must be an integer). Only the low 12 bits of MODE are used. - - Function: set-default-file-modes MODE + - Function: set-default-file-modes mode This function sets the default file protection for new files created by XEmacs and its subprocesses. Every file created with XEmacs initially has this protection. On Unix, the default @@ -404,7 +404,7 @@ number, but most of the time the file name actually used in XEmacs omits the version number. Version numbers are found mostly in directory lists. - - Function: file-name-directory FILENAME + - Function: file-name-directory filename This function returns the directory part of FILENAME (or `nil' if FILENAME does not include a directory part). On Unix, the function returns a string ending in a slash. On VMS, it returns a @@ -417,7 +417,7 @@ directory lists. (file-name-directory "[X]FOO.TMP") ; VMS example => "[X]" - - Function: file-name-nondirectory FILENAME + - Function: file-name-nondirectory filename This function returns the nondirectory part of FILENAME. (file-name-nondirectory "lewis/foo") @@ -428,8 +428,8 @@ directory lists. (file-name-nondirectory "[X]FOO.TMP") => "FOO.TMP" - - Function: file-name-sans-versions FILENAME &optional - KEEP-BACKUP-VERSION + - Function: file-name-sans-versions filename &optional + keep-backup-version This function returns FILENAME without any file version numbers, backup version numbers, or trailing tildes. @@ -446,7 +446,7 @@ directory lists. (file-name-sans-versions "foo;23") => "foo" - - Function: file-name-sans-extension FILENAME + - Function: file-name-sans-extension filename This function returns FILENAME minus its "extension," if any. The extension, in a file name, is the part that starts with the last `.' in the last name component. For example, @@ -479,7 +479,7 @@ acceptable. names. They do nothing special with environment variable substitutions such as `$HOME', and the constructs `~', and `..'. - - Function: file-name-as-directory FILENAME + - Function: file-name-as-directory filename This function returns a string representing FILENAME in a form that the operating system will interpret as the name of a directory. In Unix, this means appending a slash to the string. @@ -489,7 +489,7 @@ such as `$HOME', and the constructs `~', and `..'. (file-name-as-directory "~rms/lewis") => "~rms/lewis/" - - Function: directory-file-name DIRNAME + - Function: directory-file-name dirname This function returns a string representing DIRNAME in a form that the operating system will interpret as the name of a file. On Unix, this means removing a final slash from the string. On VMS, @@ -508,7 +508,7 @@ abbreviation instead. If you wish to convert a directory name to its abbreviation, use this function: - - Function: abbreviate-file-name DIRNAME &optional HACK-HOMEDIR + - Function: abbreviate-file-name dirname &optional hack-homedir This function applies abbreviations from `directory-abbrev-alist' to its argument, and substitutes `~' for the user's home directory. @@ -549,7 +549,7 @@ relative to a default directory; then it is called a "relative" file name. On Unix, an absolute file name starts with a slash or a tilde (`~'), and a relative one does not. The rules on VMS are complicated. - - Function: file-name-absolute-p FILENAME + - Function: file-name-absolute-p filename This function returns `t' if file FILENAME is an absolute file name, `nil' otherwise. On VMS, this function understands both Unix syntax and VMS syntax. @@ -573,7 +573,7 @@ you must specify the default directory name as well as the file name to be expanded. Expansion also simplifies file names by eliminating redundancies such as `./' and `NAME/../'. - - Function: expand-file-name FILENAME &optional DIRECTORY + - Function: expand-file-name filename &optional directory This function converts FILENAME to an absolute file name. If DIRECTORY is supplied, it is the directory to start with if FILENAME is relative. (The value of DIRECTORY should itself be an @@ -599,10 +599,10 @@ redundancies such as `./' and `NAME/../'. `~/' at the beginning is expanded into the user's home directory. A `/' or `~' following a `/'. - Note that `expand-file-name' does *not* expand environment + Note that `expand-file-name' does _not_ expand environment variables; only `substitute-in-file-name' does that. - - Function: file-relative-name FILENAME &optional DIRECTORY + - Function: file-relative-name filename &optional directory This function does the inverse of expansion--it tries to return a relative name that is equivalent to FILENAME when interpreted relative to DIRECTORY. @@ -628,7 +628,7 @@ redundancies such as `./' and `NAME/../'. default-directory => "/user/lewis/manual/" - - Function: substitute-in-file-name FILENAME + - Function: substitute-in-file-name filename This function replaces environment variable references in FILENAME with the environment variable values. Following standard Unix shell syntax, `$' is the prefix to substitute an environment @@ -683,7 +683,7 @@ processes from trying to use the same name. Note that the `temp-directory' function does not exist under FSF Emacs. - - Function: make-temp-name PREFIX + - Function: make-temp-name prefix This function generates a temporary file name starting with PREFIX. The Emacs process number forms part of the result, so there is no danger of generating a name being used by another @@ -708,7 +708,7 @@ File Name Completion This section describes low-level subroutines for completing a file name. For other completion functions, see *Note Completion::. - - Function: file-name-all-completions PARTIAL-FILENAME DIRECTORY + - Function: file-name-all-completions partial-filename directory This function returns a list of all possible completions for a file whose name starts with PARTIAL-FILENAME in directory DIRECTORY. The order of the completions is the order of the files in the @@ -730,7 +730,7 @@ name. For other completion functions, see *Note Completion::. (file-name-all-completions "fo" "") => ("foo") - - Function: file-name-completion FILENAME DIRECTORY + - Function: file-name-completion filename directory This function completes the file name FILENAME in directory DIRECTORY. It returns the longest prefix common to all file names in directory DIRECTORY that start with FILENAME. @@ -775,7 +775,7 @@ User Name Completion This section describes low-level subroutines for completing a user name. For other completion functions, see *Note Completion::. - - Function: user-name-all-completions PARTIAL-USERNAME + - Function: user-name-all-completions partial-username This function returns a list of all possible completions for a user whose name starts with PARTIAL-USERNAME. The order of the completions is unpredictable and conveys no useful information. @@ -783,7 +783,7 @@ name. For other completion functions, see *Note Completion::. The argument PARTIAL-USERNAME must be a partial user name containing no tilde character and no slash. - - Function: user-name-completion USERNAME + - Function: user-name-completion username This function completes the user name USERNAME. It returns the longest prefix common to all user names that start with USERNAME. @@ -791,7 +791,7 @@ name. For other completion functions, see *Note Completion::. function returns `t'. The function returns `nil' if no user name starting with USERNAME exists. - - Function: user-name-completion-1 USERNAME + - Function: user-name-completion-1 username This function completes the user name USERNAME, like `user-name-completion', differing only in the return value. This function returns the cons of the completion returned by @@ -812,8 +812,8 @@ or display the names in a buffer using the `ls' shell command. In the latter case, it can optionally display information about each file, depending on the value of switches passed to the `ls' command. - - Function: directory-files DIRECTORY &optional FULL-NAME MATCH-REGEXP - NOSORT FILES-ONLY + - Function: directory-files directory &optional full-name match-regexp + nosort files-only This function returns a list of the names of the files in the directory DIRECTORY. By default, the list is in alphabetical order. @@ -847,8 +847,8 @@ depending on the value of switches passed to the `ls' command. An error is signaled if DIRECTORY is not the name of a directory that can be read. - - Function: insert-directory FILE SWITCHES &optional WILDCARD - FULL-DIRECTORY-P + - Function: insert-directory file switches &optional wildcard + full-directory-p This function inserts (in the current buffer) a directory listing for directory FILE, formatted with `ls' according to SWITCHES. It leaves point after the inserted text. @@ -883,7 +883,7 @@ files that are directories. For example, you cannot delete a directory with `delete-file'. These special functions exist to create and delete directories. - - Command: make-directory DIRNAME &optional PARENTS + - Command: make-directory dirname &optional parents This function creates a directory named DIRNAME. Interactively, the default choice of directory to create is the current default directory for file names. That is useful when you have visited a @@ -893,7 +893,7 @@ directories. create parent directories if they don't exist. (Interactively, this always happens.) - - Command: delete-directory DIRNAME + - Command: delete-directory dirname This function deletes the directory named DIRNAME. The function `delete-file' does not work for files that are directories; you must use `delete-directory' in that case. @@ -991,14 +991,14 @@ that have two file names that may each have handlers. - Variable: inhibit-file-name-operation The operation for which certain handlers are presently inhibited. - - Function: find-file-name-handler FILE OPERATION + - Function: find-file-name-handler file operation This function returns the handler function for file name FILE, or `nil' if there is none. The argument OPERATION should be the operation to be performed on the file--the value you will pass to the handler as its first argument when you call it. The operation is needed for comparison with `inhibit-file-name-operation'. - - Function: file-local-copy FILENAME + - Function: file-local-copy filename This function copies file FILENAME to an ordinary non-magic file, if it isn't one already. @@ -1009,7 +1009,7 @@ that have two file names that may each have handlers. If FILENAME is an ordinary file name, not magic, then this function does nothing and returns `nil'. - - Function: unhandled-file-name-directory FILENAME + - Function: unhandled-file-name-directory filename This function returns the name of a directory that is not magic. It uses the directory part of FILENAME if that is not magic. Otherwise, it asks the handler what to do. @@ -1062,7 +1062,7 @@ File: lispref.info, Node: Creating a Partial File, Next: Detached Partial File Creating a Partial File ----------------------- - - Function: make-file-part &optional START END NAME BUFFER + - Function: make-file-part &optional start end name buffer Make a file part on buffer BUFFER out of the region. Call it NAME. This command creates a new buffer containing the contents of the region and marks the buffer as referring to the specified @@ -1197,13 +1197,13 @@ buffer-local variable `buffer-file-format'. encoding functions for the formats listed in `buffer-file-format', in the order of appearance in the list. - - Function: format-write-file FILE FORMAT + - Function: format-write-file file format This command writes the current buffer contents into the file FILE in format FORMAT, and makes that format the default for future saves of the buffer. The argument FORMAT is a list of format names. - - Function: format-find-file FILE FORMAT + - Function: format-find-file file format This command finds the file FILE, converting it according to format FORMAT. It also makes FORMAT the default if the buffer is saved later. @@ -1212,11 +1212,11 @@ the order of appearance in the list. `nil', no conversion takes place. Interactively, typing just for FORMAT specifies `nil'. - - Function: format-insert-file FILE FORMAT &optional BEG END + - Function: format-insert-file file format &optional beg end This command inserts the contents of file FILE, converting it according to format FORMAT. If BEG and END are non-`nil', they specify which part of the file to read, as in - `insert-file-contents' (*note Reading from Files::.). + `insert-file-contents' (*note Reading from Files::). The return value is like what `insert-file-contents' returns: a list of the absolute file name and the length of the data inserted @@ -1226,7 +1226,7 @@ the order of appearance in the list. `nil', no conversion takes place. Interactively, typing just for FORMAT specifies `nil'. - - Function: format-find-file FILE FORMAT + - Function: format-find-file file format This command finds the file FILE, converting it according to format FORMAT. It also makes FORMAT the default if the buffer is saved later. @@ -1235,11 +1235,11 @@ the order of appearance in the list. `nil', no conversion takes place. Interactively, typing just for FORMAT specifies `nil'. - - Function: format-insert-file FILE FORMAT &optional BEG END + - Function: format-insert-file file format &optional beg end This command inserts the contents of file FILE, converting it according to format FORMAT. If BEG and END are non-`nil', they specify which part of the file to read, as in - `insert-file-contents' (*note Reading from Files::.). + `insert-file-contents' (*note Reading from Files::). The return value is like what `insert-file-contents' returns: a list of the absolute file name and the length of the data inserted diff --git a/info/lispref.info-24 b/info/lispref.info-24 index 1233bf9..9fe2d94 100644 --- a/info/lispref.info-24 +++ b/info/lispref.info-24 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -72,7 +72,7 @@ visiting a file, and records the decision in the variable file type of the buffer's visited file. The value is `nil' for text, `t' for binary. - - Function: find-buffer-file-type FILENAME + - Function: find-buffer-file-type filename This function determines whether file FILENAME is a text file or a binary file. It returns `nil' for text, `t' for binary. @@ -89,11 +89,11 @@ visiting a file, and records the decision in the variable don't indicate anything in particular. Its value should be `nil' for text, or `t' for binary. - - Command: find-file-text FILENAME + - Command: find-file-text filename Like `find-file', but treat the file as text regardless of its name. - - Command: find-file-binary FILENAME + - Command: find-file-binary filename Like `find-file', but treat the file as binary regardless of its name. @@ -307,7 +307,7 @@ automatically or it can ask the user whether to delete them. variables have the value 2, then the backups numbered 1 and 2 are kept as old versions and those numbered 5 and 7 are kept as new versions; backup version 3 is excess. The function `find-backup-file-name' -(*note Backup Names::.) is responsible for determining which backup +(*note Backup Names::) is responsible for determining which backup versions to delete, but does not delete them itself. - User Option: trim-versions-without-asking @@ -331,14 +331,13 @@ Naming Backup Files customize the naming conventions for backup files by redefining them. If you change one, you probably need to change the rest. - - Function: backup-file-name-p FILENAME + - Function: backup-file-name-p filename This function returns a non-`nil' value if FILENAME is a possible name for a backup file. A file with the name FILENAME need not exist; the function just checks the name. (backup-file-name-p "foo") => nil - (backup-file-name-p "foo~") => 3 @@ -357,7 +356,7 @@ If you change one, you probably need to change the rest. This simple expression is placed in a separate function to make it easy to redefine for customization. - - Function: make-backup-file-name FILENAME + - Function: make-backup-file-name filename This function returns a string that is the name to use for a non-numbered backup file for file FILENAME. On Unix, this is just FILENAME with a tilde appended. @@ -375,11 +374,11 @@ If you change one, you probably need to change the rest. (defun make-backup-file-name (filename) (concat "." filename "~")) - + (make-backup-file-name "backups.texi") => ".backups.texi~" - - Function: find-backup-file-name FILENAME + - Function: find-backup-file-name filename This function computes the file name for a new backup file for FILENAME. It may also propose certain existing backup files for deletion. `find-backup-file-name' returns a list whose CAR is the @@ -398,7 +397,7 @@ If you change one, you probably need to change the rest. (find-backup-file-name "~rms/foo") => ("~rms/foo.~5~" "~rms/foo.~3~") - - Function: file-newest-backup FILENAME + - Function: file-newest-backup filename This function returns the name of the most recent backup file for FILENAME, or `nil' if that file has no backup files. @@ -427,14 +426,14 @@ and the variables that control them. buffer-auto-save-file-name => "/xcssun/users/rms/lewis/#files.texi#" - - Command: auto-save-mode ARG + - Command: auto-save-mode arg When used interactively without an argument, this command is a toggle switch: it turns on auto-saving of the current buffer if it is off, and vice-versa. With an argument ARG, the command turns auto-saving on if the value of ARG is `t', a nonempty list, or a positive integer. Otherwise, it turns auto-saving off. - - Function: auto-save-file-name-p FILENAME + - Function: auto-save-file-name-p filename This function returns a non-`nil' value if FILENAME is a string that could be the name of an auto-save file. It works based on knowledge of the naming convention for auto-save files: a name that @@ -529,7 +528,7 @@ and the variables that control them. If this variable is non-`nil', buffers that are visiting files have auto-saving enabled by default. Otherwise, they do not. - - Command: do-auto-save &optional NO-MESSAGE CURRENT-ONLY + - Command: do-auto-save &optional no-message current-only This function auto-saves all buffers that need to be auto-saved. It saves all buffers for which auto-saving is enabled and that have been changed since the previous auto-save. @@ -599,7 +598,7 @@ mind about them, you can get rid of them by reading in the previous version of the file with the `revert-buffer' command. *Note Reverting a Buffer: (emacs)Reverting. - - Command: revert-buffer &optional CHECK-AUTO-SAVE NOCONFIRM + - Command: revert-buffer &optional check-auto-save noconfirm This command replaces the buffer text with the text of the visited file on disk. This action undoes all changes since the file was visited or saved. @@ -683,7 +682,7 @@ not be displayed in any windows. * Buffer File Name:: The buffer file name indicates which file is visited. * Buffer Modification:: A buffer is "modified" if it needs to be saved. * Modification Time:: Determining whether the visited file was changed - "behind XEmacs's back". + ``behind XEmacs's back''. * Read Only Buffers:: Modifying text is not allowed in a read-only buffer. * The Buffer List:: How to look at all the existing buffers. * Creating Buffers:: Functions that create buffers. @@ -730,7 +729,7 @@ them, see *Note Buffer-Local Variables::. variables related to the display of buffers in windows, see *Note Buffers and Windows::. - - Function: bufferp OBJECT + - Function: bufferp object This function returns `t' if OBJECT is a buffer, `nil' otherwise.  @@ -743,9 +742,9 @@ The Current Buffer time, one of them is designated as the "current buffer". This is the buffer in which most editing takes place, because most of the primitives for examining or changing text in a buffer operate implicitly on the -current buffer (*note Text::.). Normally the buffer that is displayed -on the screen in the selected window is the current buffer, but this is -not always so: a Lisp program can designate any buffer as current +current buffer (*note Text::). Normally the buffer that is displayed on +the screen in the selected window is the current buffer, but this is not +always so: a Lisp program can designate any buffer as current temporarily in order to operate on its contents, without changing what is displayed on the screen. @@ -770,7 +769,7 @@ caller if the subroutine does not change which buffer is current (unless, of course, that is the subroutine's purpose). Therefore, you should normally use `set-buffer' within a `save-excursion' that will restore the current buffer when your function is done (*note -Excursions::.). Here is an example, the code for the command +Excursions::). Here is an example, the code for the command `append-to-buffer' (with the documentation string abridged): (defun append-to-buffer (buffer start end) @@ -806,7 +805,7 @@ unbound. It is not reliable to change the current buffer back with `set-buffer', because that won't do the job if a quit happens while the -wrong buffer is current. Here is what *not* to do: +wrong buffer is current. Here is what _not_ to do: (let (buffer-read-only (obuf (current-buffer))) @@ -828,7 +827,7 @@ Using `save-excursion', as shown below, handles quitting, errors, and (current-buffer) => # - - Function: set-buffer BUFFER-OR-NAME + - Function: set-buffer buffer-or-name This function makes BUFFER-OR-NAME the current buffer. It does not display the buffer in the currently selected window or in any other window, so the user cannot necessarily see the buffer. But @@ -855,7 +854,7 @@ have names starting with a space, so that the `list-buffers' and `buffer-menu' commands don't mention them. A name starting with space also initially disables recording undo information; see *Note Undo::. - - Function: buffer-name &optional BUFFER + - Function: buffer-name &optional buffer This function returns the name of BUFFER as a string. If BUFFER is not supplied, it defaults to the current buffer. @@ -874,7 +873,7 @@ also initially disables recording undo information; see *Note Undo::. foo => # - - Command: rename-buffer NEWNAME &optional UNIQUE + - Command: rename-buffer newname &optional unique This function renames the current buffer to NEWNAME. An error is signaled if NEWNAME is not a string, or if there is already a buffer with that name. The function returns `nil'. @@ -888,7 +887,7 @@ also initially disables recording undo information; see *Note Undo::. to some other name, thus making it possible to create a second shell buffer under the name `*shell*'. - - Function: get-buffer BUFFER-OR-NAME + - Function: get-buffer buffer-or-name This function returns the buffer specified by BUFFER-OR-NAME. If BUFFER-OR-NAME is a string and there is no buffer with that name, the value is `nil'. If BUFFER-OR-NAME is a buffer, it is returned @@ -905,7 +904,7 @@ also initially disables recording undo information; see *Note Undo::. See also the function `get-buffer-create' in *Note Creating Buffers::. - - Function: generate-new-buffer-name STARTING-NAME &optional IGNORE + - Function: generate-new-buffer-name starting-name &optional ignore This function returns a name that would be unique for a new buffer--but does not create the buffer. It starts with STARTING-NAME, and produces a name not currently in use for any @@ -931,7 +930,7 @@ nondirectory part of the buffer file name, but the buffer file name and the buffer name are distinct and can be set independently. *Note Visiting Files::. - - Function: buffer-file-name &optional BUFFER + - Function: buffer-file-name &optional buffer This function returns the absolute file name of the file that BUFFER is visiting. If BUFFER is not visiting any file, `buffer-file-name' returns `nil'. If BUFFER is not supplied, it @@ -972,10 +971,10 @@ Visiting Files::. accessible on the system. See the function `file-attributes', in *Note File Attributes::, for more information about them. - - Function: get-file-buffer FILENAME + - Function: get-file-buffer filename This function returns the buffer visiting file FILENAME. If there is no such buffer, it returns `nil'. The argument FILENAME, which - must be a string, is expanded (*note File Name Expansion::.), then + must be a string, is expanded (*note File Name Expansion::), then compared against the visited file names of all live buffers. (get-file-buffer "buffers.texi") @@ -985,10 +984,10 @@ Visiting Files::. visiting the same file name. In such cases, this function returns the first such buffer in the buffer list. - - Command: set-visited-file-name FILENAME + - Command: set-visited-file-name filename If FILENAME is a non-empty string, this function changes the name of the file visited in current buffer to FILENAME. (If the buffer - had no visited file, this gives it one.) The *next time* the + had no visited file, this gives it one.) The _next time_ the buffer is saved it will go in the newly-specified file. This command marks the buffer as modified, since it does not (as far as XEmacs knows) match the contents of FILENAME, even if it matched @@ -1020,8 +1019,8 @@ record whether you have changed the text of the buffer. This flag is set to `t' whenever you alter the contents of the buffer, and cleared to `nil' when you save it. Thus, the flag shows whether there are unsaved changes. The flag value is normally shown in the modeline -(*note Modeline Variables::.), and controls saving (*note Saving -Buffers::.) and auto-saving (*note Auto-Saving::.). +(*note Modeline Variables::), and controls saving (*note Saving +Buffers::) and auto-saving (*note Auto-Saving::). Some Lisp programs set the flag explicitly. For example, the function `set-visited-file-name' sets the flag to `t', because the text @@ -1031,13 +1030,13 @@ file formerly visited. The functions that modify the contents of buffers are described in *Note Text::. - - Function: buffer-modified-p &optional BUFFER + - Function: buffer-modified-p &optional buffer This function returns `t' if the buffer BUFFER has been modified since it was last read in from a file or saved, or `nil' otherwise. If BUFFER is not supplied, the current buffer is tested. - - Function: set-buffer-modified-p FLAG + - Function: set-buffer-modified-p flag This function marks the current buffer as modified if FLAG is non-`nil', or as unmodified if the flag is `nil'. @@ -1047,14 +1046,14 @@ file formerly visited. (set-buffer-modified-p (buffer-modified-p)) - - Command: not-modified &optional ARG + - Command: not-modified &optional arg This command marks the current buffer as unmodified, and not needing to be saved. (If ARG is non-`nil', the buffer is instead marked as modified.) Don't use this function in programs, since it prints a message in the echo area; use `set-buffer-modified-p' (above) instead. - - Function: buffer-modified-tick &optional BUFFER + - Function: buffer-modified-tick &optional buffer This function returns BUFFER`s modification-count. This is a counter that increments every time the buffer is modified. If BUFFER is `nil' (or omitted), the current buffer is used. @@ -1072,7 +1071,7 @@ be what you want, but usually it would lose valuable information. XEmacs therefore checks the file's modification time using the functions described below before saving the file. - - Function: verify-visited-file-modtime BUFFER + - Function: verify-visited-file-modtime buffer This function compares what BUFFER has recorded for the modification time of its visited file against the actual modification time of the file as recorded by the operating system. @@ -1098,7 +1097,7 @@ described below before saving the file. format that `file-attributes' uses to return time values; see *Note File Attributes::.) - - Function: set-visited-file-modtime &optional TIME + - Function: set-visited-file-modtime &optional time This function updates the buffer's record of the last modification time of the visited file, to the value specified by TIME if TIME is not `nil', and otherwise to the last modification time of the @@ -1112,7 +1111,7 @@ described below before saving the file. normally, or if the file itself has been changed for some known benign reason. - - Function: ask-user-about-supersession-threat FILENAME + - Function: ask-user-about-supersession-threat filename This function is used to ask a user how to proceed after an attempt to modify an obsolete buffer visiting file FILENAME. An "obsolete buffer" is an unmodified buffer for which the associated diff --git a/info/lispref.info-25 b/info/lispref.info-25 index 42513cf..b35c053 100644 --- a/info/lispref.info-25 +++ b/info/lispref.info-25 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -72,7 +72,7 @@ that is independent of the buffer list orders for any particular frame. Note that the different buffer lists all contain the same elements. It is only the order of those elements that is different. - - Function: buffer-list &optional FRAME + - Function: buffer-list &optional frame This function returns a list of all buffers, including those whose names begin with a space. The elements are actual buffers, not their names. The order of the list is specific to FRAME, which @@ -96,7 +96,7 @@ It is only the order of those elements that is different. This list is a copy of a list used inside XEmacs; modifying it has no effect on the buffers. - - Function: other-buffer &optional BUFFER-OR-NAME FRAME VISIBLE-OK + - Function: other-buffer &optional buffer-or-name frame visible-ok This function returns the first buffer in the buffer list other than BUFFER-OR-NAME, in FRAME's ordering for the buffer list. (FRAME defaults to the current frame. If FRAME is `t', then the @@ -128,14 +128,14 @@ It is only the order of those elements that is different. VISIBLE-OK is the second argument instead of the third. FSF Emacs 19. - - Command: list-buffers &optional FILES-ONLY + - Command: list-buffers &optional files-only This function displays a listing of the names of existing buffers. It clears the buffer `*Buffer List*', then inserts the listing into that buffer and displays it in a window. `list-buffers' is intended for interactive use, and is described fully in `The XEmacs Reference Manual'. It returns `nil'. - - Command: bury-buffer &optional BUFFER-OR-NAME + - Command: bury-buffer &optional buffer-or-name This function puts BUFFER-OR-NAME at the end of the buffer list without changing the order of any of the other buffers on the list. This buffer therefore becomes the least desirable candidate for @@ -162,11 +162,11 @@ with the specified name; `generate-new-buffer' always creates a new buffer and gives it a unique name. Other functions you can use to create buffers include -`with-output-to-temp-buffer' (*note Temporary Displays::.) and -`create-file-buffer' (*note Visiting Files::.). Starting a subprocess -can also create a buffer (*note Processes::.). +`with-output-to-temp-buffer' (*note Temporary Displays::) and +`create-file-buffer' (*note Visiting Files::). Starting a subprocess +can also create a buffer (*note Processes::). - - Function: get-buffer-create NAME + - Function: get-buffer-create name This function returns a buffer named NAME. It returns an existing buffer with that name, if one exists; otherwise, it creates a new buffer. The buffer does not become the current buffer--this @@ -181,7 +181,7 @@ can also create a buffer (*note Processes::.). variable `default-major-mode' is handled at a higher level. *Note Auto Major Mode::. - - Function: generate-new-buffer NAME + - Function: generate-new-buffer name This function returns a newly created, empty buffer, but does not make it current. If there is no buffer named NAME, then that is the name of the new buffer. If that name is in use, this function @@ -234,11 +234,11 @@ buffers, the indirect buffers are automatically killed as well. buffer has been killed, you can either use this feature or the function `buffer-live-p'. - - Function: buffer-live-p BUFFER + - Function: buffer-live-p buffer This function returns `nil' if BUFFER is deleted, and `t' otherwise. - - Command: kill-buffer BUFFER-OR-NAME + - Command: kill-buffer buffer-or-name This function kills the buffer BUFFER-OR-NAME, freeing all its memory for use as space for other buffers. (Emacs version 18 and older was unable to return the memory to the operating system.) @@ -320,7 +320,7 @@ base buffer. Killing an indirect buffer has no effect on its base buffer. Killing the base buffer kills all its indirect children. - - Command: make-indirect-buffer BASE-BUFFER NAME + - Command: make-indirect-buffer base-buffer name This creates an indirect buffer named NAME whose base buffer is BASE-BUFFER. The argument BASE-BUFFER may be a buffer or a string. @@ -330,7 +330,7 @@ the base buffer kills all its indirect children. (make-indirect-buffer "*scratch*" "indirect") => # - - Function: buffer-base-buffer &optional BUFFER + - Function: buffer-base-buffer &optional buffer This function returns the base buffer of BUFFER. If BUFFER is not indirect, the value is `nil'. Otherwise, the value is another buffer, which is never an indirect buffer. If BUFFER is not @@ -339,7 +339,7 @@ the base buffer kills all its indirect children. (buffer-base-buffer (get-buffer "indirect")) => # - - Function: buffer-indirect-children &optional BUFFER + - Function: buffer-indirect-children &optional buffer This function returns a list of all indirect buffers whose base buffer is BUFFER. If BUFFER is indirect, the return value will always be nil; see `make-indirect-buffer'. If BUFFER is not @@ -404,8 +404,8 @@ has been used). *Note Current Buffer::. For practical purposes, a window exists only while it is displayed in a frame. Once removed from the frame, the window is effectively deleted -and should not be used, *even though there may still be references to -it* from other Lisp objects. Restoring a saved window configuration is +and should not be used, _even though there may still be references to +it_ from other Lisp objects. Restoring a saved window configuration is the only way for a window no longer on the screen to come back to life. (*Note Deleting Windows::.) @@ -454,7 +454,7 @@ Windows::, and *Note Size of Window::. *Note Display::, for information on how the contents of the window's buffer are displayed in the window. - - Function: windowp OBJECT + - Function: windowp object This function returns `t' if OBJECT is a window.  @@ -466,13 +466,13 @@ Splitting Windows The functions described here are the primitives used to split a window into two windows. Two higher level functions sometimes split a window, but not always: `pop-to-buffer' and `display-buffer' (*note -Displaying Buffers::.). +Displaying Buffers::). The functions described here do not accept a buffer as an argument. The two "halves" of the split window initially display the same buffer previously visible in the window that was split. - - Function: one-window-p &optional NO-MINI ALL-FRAMES + - Function: one-window-p &optional no-mini all-frames This function returns non-`nil' if there is only one window. The argument NO-MINI, if non-`nil', means don't count the minibuffer even if it is active; otherwise, the minibuffer window is @@ -497,7 +497,7 @@ previously visible in the window that was split. WINDOW's frame are counted, excluding the minibuffer in use if it lies in some other frame. - - Command: split-window &optional WINDOW SIZE HORIZONTAL + - Command: split-window &optional window size horizontal This function splits WINDOW into two windows. The original window WINDOW remains the selected window, but occupies only part of its former screen area. The rest is occupied by a newly created @@ -524,21 +524,19 @@ previously visible in the window that was split. => # (window-edges) ; Edges in order: => (0 0 80 50) ; left-top-right-bottom - + ;; Returns window created (setq w2 (split-window w 15)) => # - (window-edges w2) => (0 15 80 50) ; Bottom window; ; top is line 15 - (window-edges w) => (0 0 80 15) ; Top window The frame looks like this: - __________ + __________ | | line 0 | w | |__________| @@ -552,19 +550,16 @@ previously visible in the window that was split. (setq w3 (split-window w 35 t)) => # - (window-edges w3) => (35 0 80 15) ; Left edge at column 35 - (window-edges w) => (0 0 35 15) ; Right edge at column 35 - (window-edges w2) => (0 15 80 50) ; Bottom window unchanged Now, the screen looks like this: - column 35 + column 35 __________ | | | line 0 | w | w3 | @@ -580,7 +575,7 @@ previously visible in the window that was split. or `|' characters. The display table can specify alternative border characters; see *Note Display Tables::. - - Command: split-window-vertically &optional SIZE + - Command: split-window-vertically &optional size This function splits the selected window into two windows, one above the other, leaving the selected window with SIZE lines. @@ -592,7 +587,7 @@ previously visible in the window that was split. (interactive "P") (split-window nil (and arg (prefix-numeric-value arg)))) - - Command: split-window-horizontally &optional SIZE + - Command: split-window-horizontally &optional size This function splits the selected window into two windows side-by-side, leaving the selected window with SIZE columns. @@ -605,7 +600,7 @@ previously visible in the window that was split. (interactive "P") (split-window nil (and arg (prefix-numeric-value arg)) t)) - - Function: one-window-p &optional NO-MINI ALL-FRAMES + - Function: one-window-p &optional no-mini all-frames This function returns non-`nil' if there is only one window. The argument NO-MINI, if non-`nil', means don't count the minibuffer even if it is active; otherwise, the minibuffer window is @@ -643,21 +638,21 @@ calling certain functions that delete windows. A deleted window cannot appear on the screen, but continues to exist as a Lisp object until there are no references to it. There is no way to cancel the deletion of a window aside from restoring a saved window configuration (*note -Window Configurations::.). Restoring a window configuration also +Window Configurations::). Restoring a window configuration also deletes any windows that aren't part of that configuration. When you delete a window, the space it took up is given to one adjacent sibling. (In Emacs version 18, the space was divided evenly among all the siblings.) - - Function: window-live-p WINDOW + - Function: window-live-p window This function returns `nil' if WINDOW is deleted, and `t' otherwise. *Warning:* Erroneous information or fatal errors may result from using a deleted window as if it were live. - - Command: delete-window &optional WINDOW + - Command: delete-window &optional window This function removes WINDOW from the display. If WINDOW is omitted, then the selected window is deleted. An error is signaled if there is only one window when `delete-window' is called. @@ -667,14 +662,14 @@ among all the siblings.) When `delete-window' is called interactively, WINDOW defaults to the selected window. - - Command: delete-other-windows &optional WINDOW + - Command: delete-other-windows &optional window This function makes WINDOW the only window on its frame, by deleting the other windows in that frame. If WINDOW is omitted or `nil', then the selected window is used by default. The result is `nil'. - - Command: delete-windows-on BUFFER &optional FRAME + - Command: delete-windows-on buffer &optional frame This function deletes all windows showing BUFFER. If there are no windows showing BUFFER, it does nothing. @@ -709,7 +704,7 @@ Selecting Windows When a window is selected, the buffer in the window becomes the current buffer, and the cursor will appear in it. - - Function: selected-window &optional DEVICE + - Function: selected-window &optional device This function returns the selected window. This is the window in which the cursor appears and to which many commands apply. Each separate device can have its own selected window, which is @@ -717,7 +712,7 @@ current buffer, and the cursor will appear in it. argument DEVICE specifies which device to return the selected window for, and defaults to the selected device. - - Function: select-window WINDOW &optional NORECORD + - Function: select-window window &optional norecord This function makes WINDOW the selected window. The cursor then appears in WINDOW (on redisplay). The buffer being displayed in WINDOW is immediately designated the current buffer. @@ -732,7 +727,7 @@ current buffer, and the cursor will appear in it. (select-window w) => # - - Macro: save-selected-window FORMS... + - Macro: save-selected-window forms... This macro records the selected window, executes FORMS in sequence, then restores the earlier selected window. It does not save or restore anything about the sizes, arrangement or contents @@ -742,7 +737,7 @@ current buffer, and the cursor will appear in it. The following functions choose one of the windows on the screen, offering various criteria for the choice. - - Function: get-lru-window &optional FRAME + - Function: get-lru-window &optional frame This function returns the window least recently "used" (that is, selected). The selected window is always the most recently used window. @@ -765,7 +760,7 @@ offering various criteria for the choice. * If it is a frame, consider windows on that frame. - - Function: get-largest-window &optional FRAME + - Function: get-largest-window &optional frame This function returns the window with the largest area (height times width). If there are no side-by-side windows, then this is the window with the most lines. A minibuffer window is never a @@ -801,7 +796,7 @@ horizontal, the ordering is top to bottom in the left part, and so on. In general, within each set of siblings at any level in the window tree, the order is left to right, or top to bottom. - - Function: next-window &optional WINDOW MINIBUF ALL-FRAMES + - Function: next-window &optional window minibuf all-frames This function returns the window following WINDOW in the cyclic ordering of windows. This is the window that `C-x o' would select if typed when WINDOW is selected. If WINDOW is the only window @@ -852,12 +847,12 @@ the order is left to right, or top to bottom. (next-window (next-window (selected-window))) => # - - Function: previous-window &optional WINDOW MINIBUF ALL-FRAMES + - Function: previous-window &optional window minibuf all-frames This function returns the window preceding WINDOW in the cyclic ordering of windows. The other arguments specify which windows to include in the cycle, as in `next-window'. - - Command: other-window COUNT &optional FRAME + - Command: other-window count &optional frame This function selects the COUNTth following window in the cyclic order. If count is negative, then it selects the -COUNTth preceding window. It returns `nil'. @@ -881,7 +876,7 @@ the order is left to right, or top to bottom. * If it is any other value, then the behavior is undefined. - - Function: walk-windows PROC &optional MINIBUF ALL-FRAMES + - Function: walk-windows proc &optional minibuf all-frames This function cycles through all windows, calling `proc' once for each window with the window as its sole argument. @@ -902,14 +897,14 @@ and specify a buffer for it. The functions described there are easier to use than these, but they employ heuristics in choosing or creating a window; use these functions when you need complete control. - - Function: set-window-buffer WINDOW BUFFER-OR-NAME + - Function: set-window-buffer window buffer-or-name This function makes WINDOW display BUFFER-OR-NAME as its contents. It returns `nil'. (set-window-buffer (selected-window) "foo") => nil - - Function: window-buffer &optional WINDOW + - Function: window-buffer &optional window This function returns the buffer that WINDOW is displaying. If WINDOW is omitted, this function returns the buffer for the selected window. @@ -917,7 +912,7 @@ window; use these functions when you need complete control. (window-buffer) => # - - Function: get-buffer-window BUFFER-OR-NAME &optional FRAME + - Function: get-buffer-window buffer-or-name &optional frame This function returns a window currently displaying BUFFER-OR-NAME, or `nil' if there is none. If there are several such windows, then the function returns the first one in the @@ -954,11 +949,11 @@ you more precise control. current so that a Lisp program can access or modify it; they are too drastic for that purpose, since they change the display of buffers in windows, which is gratuitous and will surprise the user. Instead, use -`set-buffer' (*note Current Buffer::.) and `save-excursion' (*note -Excursions::.), which designate buffers as current for programmed -access without affecting the display of buffers in windows. +`set-buffer' (*note Current Buffer::) and `save-excursion' (*note +Excursions::), which designate buffers as current for programmed access +without affecting the display of buffers in windows. - - Command: switch-to-buffer BUFFER-OR-NAME &optional NORECORD + - Command: switch-to-buffer buffer-or-name &optional norecord This function makes BUFFER-OR-NAME the current buffer, and also displays the buffer in the selected window. This means that a human can see the buffer and subsequent keyboard commands will @@ -979,7 +974,7 @@ access without affecting the display of buffers in windows. the binding of `C-x b'. It is also used frequently in programs. It always returns `nil'. - - Command: switch-to-buffer-other-window BUFFER-OR-NAME + - Command: switch-to-buffer-other-window buffer-or-name This function makes BUFFER-OR-NAME the current buffer and displays it in a window not currently selected. It then selects that window. The handling of the buffer is the same as in @@ -991,8 +986,8 @@ access without affecting the display of buffers in windows. already displaying the buffer, then it continues to do so, but another window is nonetheless found to display it in as well. - - Function: pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW - ON-FRAME + - Function: pop-to-buffer buffer-or-name &optional other-window + on-frame This function makes BUFFER-OR-NAME the current buffer and switches to it in some window, preferably not the window previously selected. The "popped-to" window becomes the selected window @@ -1034,7 +1029,7 @@ access without affecting the display of buffers in windows. An example use of this function is found at the end of *Note Filter Functions::. - - Command: replace-buffer-in-windows BUFFER + - Command: replace-buffer-in-windows buffer This function replaces BUFFER with some other buffer in all windows displaying it. The other buffer used is chosen with `other-buffer'. In the usual applications of this function, you @@ -1054,7 +1049,7 @@ display a buffer in--`display-buffer'. All the higher-level functions and commands use this subroutine. Here we describe how to use `display-buffer' and how to customize it. - - Command: display-buffer BUFFER-OR-NAME &optional NOT-THIS-WINDOW + - Command: display-buffer buffer-or-name &optional not-this-window This command makes BUFFER-OR-NAME appear in some window, like `pop-to-buffer', but it does not select that window and does not make the buffer current. The identity of the selected window is @@ -1077,11 +1072,11 @@ and commands use this subroutine. Here we describe how to use XEmacs will not automatically change which buffer appears in the window, such as `display-buffer' might normally do. - - Function: window-dedicated-p WINDOW + - Function: window-dedicated-p window This function returns WINDOW's dedicated object, usually `t' or `nil'. - - Function: set-window-buffer-dedicated WINDOW BUFFER + - Function: set-window-buffer-dedicated window buffer This function makes WINDOW display BUFFER and be dedicated to that buffer. Then XEmacs will not automatically change which buffer appears in WINDOW. If BUFFER is `nil', this function makes WINDOW @@ -1168,7 +1163,7 @@ window, such as `display-buffer' might normally do. The default value of this variable is `special-display-popup-frame'. - - Function: special-display-popup-frame BUFFER + - Function: special-display-popup-frame buffer This function makes BUFFER visible in a frame of its own. If BUFFER is already displayed in a window in some frame, it makes the frame visible and raises it, to use that window. Otherwise, it @@ -1209,11 +1204,11 @@ window, such as `display-buffer' might normally do. A window can be marked as "dedicated" to its buffer. Then `display-buffer' does not try to use that window. - - Function: window-dedicated-p WINDOW + - Function: window-dedicated-p window This function returns `t' if WINDOW is marked as dedicated; otherwise `nil'. - - Function: set-window-dedicated-p WINDOW FLAG + - Function: set-window-dedicated-p window flag This function marks WINDOW as dedicated if FLAG is non-`nil', and nondedicated otherwise. diff --git a/info/lispref.info-26 b/info/lispref.info-26 index 544c951..d580a61 100644 --- a/info/lispref.info-26 +++ b/info/lispref.info-26 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -80,7 +80,7 @@ to have multiple windows showing one buffer. when the user switches to another buffer, the cursor jumps to the position of point in that buffer. - - Function: window-point WINDOW + - Function: window-point window This function returns the current position of point in WINDOW. For a nonselected window, this is the value point would have (in that window's buffer) if that window were selected. @@ -93,7 +93,7 @@ position of point in that buffer. "top-level" value of point, outside of any `save-excursion' forms. But that value is hard to find. - - Function: set-window-point WINDOW POSITION + - Function: set-window-point window position This function positions point in WINDOW at position POSITION in WINDOW's buffer. @@ -110,7 +110,7 @@ is called the "display-start" position of the window (or just the the upper left corner of the window. It is usually, but not inevitably, at the beginning of a text line. - - Function: window-start &optional WINDOW + - Function: window-start &optional window This function returns the display-start position of window WINDOW. If WINDOW is `nil', the selected window is used. For example, @@ -124,7 +124,7 @@ inevitably, at the beginning of a text line. For a realistic example, see the description of `count-lines' in *Note Text Lines::. - - Function: window-end &optional WINDOW + - Function: window-end &optional window This function returns the position of the end of the display in window WINDOW. If WINDOW is `nil', the selected window is used. @@ -138,7 +138,7 @@ inevitably, at the beginning of a text line. correct. In a future version, `window-end' will return `nil' in that case. - - Function: set-window-start WINDOW POSITION &optional NOFORCE + - Function: set-window-start window position &optional noforce This function sets the display-start position of WINDOW to POSITION in WINDOW's buffer. It returns POSITION. @@ -189,7 +189,7 @@ inevitably, at the beginning of a text line. at the next redisplay, then redisplay computes a new window-start position that works well with point, and thus POSITION is not used. - - Function: pos-visible-in-window-p &optional POSITION WINDOW + - Function: pos-visible-in-window-p &optional position window This function returns `t' if POSITION is within the range of text currently visible on the screen in WINDOW. It returns `nil' if POSITION is scrolled vertically out of view. The argument @@ -236,7 +236,7 @@ names that fit the user's point of view. unpredictable results if the current buffer is different from the buffer that is displayed in the selected window. *Note Current Buffer::. - - Command: scroll-up &optional COUNT + - Command: scroll-up &optional count This function scrolls the text in the selected window upward COUNT lines. If COUNT is negative, scrolling is actually downward. @@ -246,7 +246,7 @@ that is displayed in the selected window. *Note Current Buffer::. `scroll-up' returns `nil'. - - Command: scroll-down &optional COUNT + - Command: scroll-down &optional count This function scrolls the text in the selected window downward COUNT lines. If COUNT is negative, scrolling is actually upward. @@ -256,7 +256,7 @@ that is displayed in the selected window. *Note Current Buffer::. `scroll-down' returns `nil'. - - Command: scroll-other-window &optional COUNT + - Command: scroll-other-window &optional count This function scrolls the text in another window upward COUNT lines. Negative values of COUNT, or `nil', are handled as in `scroll-up'. @@ -302,7 +302,7 @@ that is displayed in the selected window. *Note Current Buffer::. bottom of the window appear instead at the top. The default value is `2'. - - Command: recenter &optional COUNT + - Command: recenter &optional count This function scrolls the selected window to put the text where point is located at a specified vertical position within the window. @@ -361,14 +361,14 @@ far as to reduce the net horizontal scroll to zero. There is no limit to how far left you can scroll, but eventually all the text will disappear off the left edge. - - Command: scroll-left COUNT + - Command: scroll-left count This function scrolls the selected window COUNT columns to the left (or to the right if COUNT is negative). The return value is the total amount of leftward horizontal scrolling in effect after the change--just like the value returned by `window-hscroll' (below). - - Command: scroll-right COUNT + - Command: scroll-right count This function scrolls the selected window COUNT columns to the right (or to the left if COUNT is negative). The return value is the total amount of leftward horizontal scrolling in effect after @@ -379,7 +379,7 @@ disappear off the left edge. normal position where the total leftward scrolling is zero, attempts to scroll any farther right have no effect. - - Function: window-hscroll &optional WINDOW + - Function: window-hscroll &optional window This function returns the total leftward horizontal scrolling of WINDOW--the number of columns by which the text in WINDOW is scrolled left past the left margin. @@ -396,7 +396,7 @@ disappear off the left edge. (window-hscroll) => 5 - - Function: set-window-hscroll WINDOW COLUMNS + - Function: set-window-hscroll window columns This function sets the number of columns from the left margin that WINDOW is scrolled to the value of COLUMNS. The argument COLUMNS should be zero or positive; if not, it is taken as zero. @@ -439,7 +439,7 @@ or various different fonts in the window. The following functions return size information about a window: - - Function: window-height &optional WINDOW + - Function: window-height &optional window This function returns the number of lines in WINDOW, including its modeline but not including the horizontal scrollbar, if any (this is different from `window-pixel-height'). If WINDOW is `nil', the @@ -452,7 +452,7 @@ or various different fonts in the window. (window-height) => 20 - - Function: window-width &optional WINDOW + - Function: window-width &optional window This function returns the number of columns in WINDOW, not including any left margin, right margin, or vertical scrollbar (this is different from `window-pixel-width'). If WINDOW is @@ -477,7 +477,7 @@ they wrap. This is usually the case for horizontally split windows but not for full-frame windows. You can change this using the variables `truncate-lines' and `truncate-partial-width-windows'.) - - Function: window-pixel-height &optional WINDOW + - Function: window-pixel-height &optional window This function returns the height of WINDOW in pixels, including its modeline and horizontal scrollbar, if any. If WINDOW is `nil', the function uses the selected window. @@ -489,7 +489,7 @@ not for full-frame windows. You can change this using the variables (window-pixel-height) => 300 - - Function: window-pixel-width &optional WINDOW + - Function: window-pixel-width &optional window This function returns the width of WINDOW in pixels, including any left margin, right margin, or vertical scrollbar that may be displayed alongside it. If WINDOW is `nil', the function uses the @@ -506,20 +506,20 @@ not for full-frame windows. You can change this using the variables (window-pixel-height) => 600 - - Function: window-text-area-pixel-height &optional WINDOW + - Function: window-text-area-pixel-height &optional window This function returns the height in pixels of the text displaying portion of WINDOW, which defaults to the selected window. Unlike `window-pixel-height', the space occupied by the modeline and horizontal scrollbar, if any, is not counted. - - Function: window-text-area-pixel-width &optional WINDOW + - Function: window-text-area-pixel-width &optional window This function returns the width in pixels of the text displaying portion of WINDOW, which defaults to the selected window. Unlike `window-pixel-width', the space occupied by the vertical scrollbar and divider, if any, is not counted. - - Function: window-displayed-text-pixel-height &optional WINDOW - NOCLIPPED + - Function: window-displayed-text-pixel-height &optional window + noclipped This function returns the height in pixels of the text displayed in WINDOW, which defaults to the selected window. Unlike `window-text-area-pixel-height', any blank space below the end of @@ -537,7 +537,7 @@ The Position of a Window windows within a frame, and the relative location of a window in comparison to other windows in the same frame. - - Function: window-pixel-edges &optional WINDOW + - Function: window-pixel-edges &optional window This function returns a list of the pixel edge coordinates of WINDOW. If WINDOW is `nil', the selected window is used. @@ -561,15 +561,15 @@ comparison to other windows in the same frame. make sense in a world with variable-width and variable-height lines, as are allowed in XEmacs. - - Function: window-highest-p WINDOW + - Function: window-highest-p window This function returns non-`nil' if WINDOW is along the top of its frame. - - Function: window-lowest-p WINDOW + - Function: window-lowest-p window This function returns non-`nil' if WINDOW is along the bottom of its frame. - - Function: window-text-area-pixel-edges &optional WINDOW + - Function: window-text-area-pixel-edges &optional window This function allows one to determine the location of the text-displaying portion of WINDOW, which defaults to the selected window, with respect to the top left corner of the window. It @@ -588,7 +588,7 @@ that change the size of windows and low-level functions that access window size. XEmacs does not permit overlapping windows or gaps between windows, so resizing one window affects other windows. - - Command: enlarge-window SIZE &optional HORIZONTAL WINDOW + - Command: enlarge-window size &optional horizontal window This function makes the selected window SIZE lines taller, stealing lines from neighboring windows. It takes the lines from one window at a time until that window is used up, then takes from @@ -614,20 +614,20 @@ windows, so resizing one window affects other windows. `enlarge-window' returns `nil'. - - Command: enlarge-window-horizontally COLUMNS + - Command: enlarge-window-horizontally columns This function makes the selected window COLUMNS wider. It could be defined as follows: (defun enlarge-window-horizontally (columns) (enlarge-window columns t)) - - Command: enlarge-window-pixels COUNT &optional SIDE WINDOW + - Command: enlarge-window-pixels count &optional side window This function makes the selected window COUNT pixels larger. When called from Lisp, optional second argument SIDE non-`nil' means to grow sideways COUNT pixels, and optional third argument WINDOW specifies the window to change instead of the selected window. - - Command: shrink-window SIZE &optional HORIZONTAL WINDOW + - Command: shrink-window size &optional horizontal window This function is like `enlarge-window' but negates the argument SIZE, making the selected window smaller by giving lines (or columns) to the other windows. If the window shrinks below @@ -639,14 +639,14 @@ windows, so resizing one window affects other windows. If WINDOW is non-`nil', it specifies a window to change instead of the selected window. - - Command: shrink-window-horizontally COLUMNS + - Command: shrink-window-horizontally columns This function makes the selected window COLUMNS narrower. It could be defined as follows: (defun shrink-window-horizontally (columns) (shrink-window columns t)) - - Command: shrink-window-pixels COUNT &optional SIDE WINDOW + - Command: shrink-window-pixels count &optional side window This function makes the selected window COUNT pixels smaller. When called from Lisp, optional second argument SIDE non-`nil' means to shrink sideways COUNT pixels, and optional third argument @@ -717,7 +717,7 @@ Configurations::. the positions of point and the mark. An exception is made for point in the current buffer, whose value is not saved. - - Function: set-window-configuration CONFIGURATION + - Function: set-window-configuration configuration This function restores the configuration of XEmacs's windows and buffers to the state specified by CONFIGURATION. The argument CONFIGURATION must be a value that was previously returned by @@ -737,7 +737,7 @@ Configurations::. ...) (set-window-configuration config))) - - Special Form: save-window-excursion FORMS... + - Special Form: save-window-excursion forms... This special form records the window configuration, executes FORMS in sequence, then restores the earlier window configuration. The window configuration includes the value of point and the portion @@ -768,7 +768,7 @@ Configurations::. => do-something ;; The frame is now split again. - - Function: window-configuration-p OBJECT + - Function: window-configuration-p object This function returns `t' if OBJECT is a window configuration. Primitives to look inside of window configurations would make sense, @@ -795,7 +795,7 @@ a TTY frame; instead, it starts with a single "X window frame". It can display multiple X window frames at the same time, each in its own X window. - - Function: framep OBJECT + - Function: framep object This predicate returns `t' if OBJECT is a frame, and `nil' otherwise. @@ -826,7 +826,7 @@ Creating Frames To create a new frame, call the function `make-frame'. - - Function: make-frame &optional PROPS DEVICE + - Function: make-frame &optional props device This function creates a new frame on DEVICE, if DEVICE permits creation of frames. (An X server does; an ordinary terminal does not (yet).) DEVICE defaults to the selected device if omitted. @@ -878,19 +878,19 @@ Access to Frame Properties These functions let you read and change the properties of a frame. - - Function: frame-properties &optional FRAME + - Function: frame-properties &optional frame This function returns a plist listing all the properties of FRAME and their values. - - Function: frame-property FRAME PROPERTY &optional DEFAULT + - Function: frame-property frame property &optional default This function returns FRAME's value for the property PROPERTY. - - Function: set-frame-properties FRAME PLIST + - Function: set-frame-properties frame plist This function alters the properties of frame FRAME based on the elements of property list PLIST. If you don't mention a property in PLIST, its value doesn't change. - - Function: set-frame-property FRAME PROP VAL + - Function: set-frame-property frame prop val This function sets the property PROP of frame FRAME to the value VAL. @@ -1001,12 +1001,12 @@ information in non-X frames. then POS is positive! `icon-left' - The screen position of the left edge *of the frame's icon*, in + The screen position of the left edge _of the frame's icon_, in pixels, counting from the left edge of the screen. This takes effect if and when the frame is iconified. `icon-top' - The screen position of the top edge *of the frame's icon*, in + The screen position of the top edge _of the frame's icon_, in pixels, counting from the top edge of the screen. This takes effect if and when the frame is iconified. @@ -1083,24 +1083,24 @@ in its usual fashion. Here are some special features for working with sizes and positions: - - Function: set-frame-position FRAME LEFT TOP + - Function: set-frame-position frame left top This function sets the position of the top left corner of FRAME to LEFT and TOP. These arguments are measured in pixels, and count from the top left corner of the screen. Negative property values count up or rightward from the top left corner of the screen. - - Function: frame-height &optional FRAME - - Function: frame-width &optional FRAME + - Function: frame-height &optional frame + - Function: frame-width &optional frame These functions return the height and width of FRAME, measured in lines and columns. If you don't supply FRAME, they use the selected frame. - - Function: frame-pixel-height &optional FRAME - - Function: frame-pixel-width &optional FRAME + - Function: frame-pixel-height &optional frame + - Function: frame-pixel-width &optional frame These functions return the height and width of FRAME, measured in pixels. If you don't supply FRAME, they use the selected frame. - - Function: set-frame-size FRAME COLS ROWS &optional PRETEND + - Function: set-frame-size frame cols rows &optional pretend This function sets the size of FRAME, measured in characters; COLS and ROWS specify the new width and height. (If PRETEND is non-nil, it means that redisplay should act as if the frame's size @@ -1124,7 +1124,7 @@ of the frame. A frame's name is used to look up its resources and does not normally change over the lifetime of a frame. It is perfectly allowable, and quite common, for multiple frames to have the same name. - - Function: frame-name &optional FRAME + - Function: frame-name &optional frame This function returns the name of FRAME, which defaults to the selected frame if not specified. The name of a frame can also be obtained from the frame's properties. *Note Frame Properties::. @@ -1160,7 +1160,7 @@ variable `frame-title-format'. frame, when you have not explicitly specified the frame title. This title appears in the icon itself. - - Function: x-set-frame-icon-pixmap FRAME PIXMAP &optional MASK + - Function: x-set-frame-icon-pixmap frame pixmap &optional mask This function sets the icon of the given frame to the given image instance, which should be an image instance object (as returned by `make-image-instance'), a glyph object (as returned by @@ -1188,11 +1188,11 @@ Deleting Frames them. A deleted frame cannot appear on the screen, but continues to exist as a Lisp object until there are no references to it. - - Command: delete-frame &optional FRAME + - Command: delete-frame &optional frame This function deletes the frame FRAME. By default, FRAME is the selected frame. - - Function: frame-live-p FRAME + - Function: frame-live-p frame The function `frame-live-p' returns non-`nil' if the frame FRAME has not been deleted. diff --git a/info/lispref.info-27 b/info/lispref.info-27 index fc1d7cc..7d7f70e 100644 --- a/info/lispref.info-27 +++ b/info/lispref.info-27 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -61,18 +61,18 @@ Finding All Frames buffers. The list that you get is newly created, so modifying the list doesn't have any effect on the internals of XEmacs. - - Function: device-frame-list &optional DEVICE + - Function: device-frame-list &optional device This function returns a list of all frames on DEVICE. If DEVICE is `nil', the selected device will be used. - - Function: visible-frame-list &optional DEVICE + - Function: visible-frame-list &optional device This function returns a list of just the currently visible frames. If DEVICE is specified only frames on that device will be returned. *Note Visibility of Frames::. (TTY frames always count as "visible", even though only the selected one is actually displayed.) - - Function: next-frame &optional FRAME MINIBUF + - Function: next-frame &optional frame minibuf The function `next-frame' lets you cycle conveniently through all the frames from an arbitrary starting point. It returns the "next" frame after FRAME in the cycle. If FRAME is omitted or `nil', it @@ -102,7 +102,7 @@ Finding All Frames anything else Consider all frames. - - Function: previous-frame &optional FRAME MINIBUF + - Function: previous-frame &optional frame minibuf Like `next-frame', but cycles through all frames in the opposite direction. @@ -118,11 +118,11 @@ Frames and Windows Each window is part of one and only one frame; you can get the frame with `window-frame'. - - Function: frame-root-window &optional FRAME + - Function: frame-root-window &optional frame This returns the root window of frame FRAME. FRAME defaults to the selected frame if not specified. - - Function: window-frame &optional WINDOW + - Function: window-frame &optional window This function returns the frame that WINDOW is on. WINDOW defaults to the selected window if omitted. @@ -132,7 +132,7 @@ upper left corner, down and to the right, until it reaches the window at the lower right corner (always the minibuffer window, if the frame has one), and then it moves back to the top. - - Function: frame-top-window FRAME + - Function: frame-top-window frame This returns the topmost, leftmost window of frame FRAME. At any time, exactly one window on any frame is "selected within the @@ -140,7 +140,7 @@ frame". The significance of this designation is that selecting the frame also selects this window. You can get the frame's current selected window with `frame-selected-window'. - - Function: frame-selected-window &optional FRAME + - Function: frame-selected-window &optional frame This function returns the window on FRAME that is selected within FRAME. FRAME defaults to the selected frame if not specified. @@ -159,7 +159,7 @@ Minibuffers and Frames Normally, each frame has its own minibuffer window at the bottom, which is used whenever that frame is selected. If the frame has a minibuffer, you can get it with `minibuffer-window' (*note Minibuffer -Misc::.). +Misc::). However, you can also create a frame with no minibuffer. Such a frame must use the minibuffer window of some other frame. When you @@ -184,7 +184,7 @@ selected window always resides on the selected frame. As the focus moves from device to device, the selected frame on each device is remembered and restored when the focus moves back to that device. - - Function: selected-frame &optional DEVICE + - Function: selected-frame &optional device This function returns the selected frame on DEVICE. If DEVICE is not specified, the selected device will be used. If no frames exist on the device, `nil' is returned. @@ -205,9 +205,9 @@ effect lasts until overridden by a subsequent call to `select-frame'. Only the selected terminal frame is actually displayed on the terminal. Each terminal screen except for the initial one has a number, and the number of the selected frame appears in the mode line after the word -`XEmacs' (*note Modeline Variables::.). +`XEmacs' (*note Modeline Variables::). - - Function: select-frame FRAME + - Function: select-frame frame This function selects frame FRAME, temporarily disregarding the focus of the X server if any. The selection of FRAME lasts until the next time the user does something to select a different frame, @@ -224,17 +224,17 @@ number of the selected frame appears in the mode line after the word `set-buffer'. In order to effect a permanent focus change use `focus-frame'. - - Function: focus-frame FRAME + - Function: focus-frame frame This function selects FRAME and gives it the window system focus. The operation of `focus-frame' is not affected by the value of `focus-follows-mouse'. - - Macro: save-selected-frame FORMS... + - Macro: save-selected-frame forms... This macro records the selected frame, executes FORMS in sequence, then restores the earlier selected frame. The value returned is the value of the last form. - - Macro: with-selected-frame FRAME FORMS... + - Macro: with-selected-frame frame forms... This macro records the selected frame, then selects FRAME and executes FORMS in sequence. After the last form is finished, the earlier selected frame is restored. The value returned is the @@ -254,26 +254,26 @@ frame is invisible, it doesn't show on the screen, not even as an icon. Visibility is meaningless for TTY frames, since only the selected one is actually displayed in any case. - - Command: make-frame-visible &optional FRAME + - Command: make-frame-visible &optional frame This function makes frame FRAME visible. If you omit FRAME, it makes the selected frame visible. - - Command: make-frame-invisible &optional FRAME + - Command: make-frame-invisible &optional frame This function makes frame FRAME invisible. - - Command: iconify-frame &optional FRAME + - Command: iconify-frame &optional frame This function iconifies frame FRAME. - - Command: deiconify-frame &optional FRAME + - Command: deiconify-frame &optional frame This function de-iconifies frame FRAME. Under X, this is equivalent to `make-frame-visible'. - - Function: frame-visible-p FRAME + - Function: frame-visible-p frame This returns whether FRAME is currently "visible" (actually in use for display). A frame that is not visible is not updated, and, if it works through a window system, may not show at all. - - Function: frame-iconified-p FRAME + - Function: frame-iconified-p frame This returns whether FRAME is iconified. Not all window managers use icons; some merely unmap the window, so this function is not the inverse of `frame-visible-p'. It is possible for a frame to @@ -282,7 +282,7 @@ one is actually displayed in any case. functionality of this function is obtained through `frame-visible-p'.) - - Function: frame-totally-visible-p FRAME + - Function: frame-totally-visible-p frame This returns whether FRAME is not obscured by any other X windows. On TTY frames, this is the same as `frame-visible-p'. @@ -308,10 +308,10 @@ screen. You can raise and lower XEmacs's X windows with these functions: - - Command: raise-frame &optional FRAME + - Command: raise-frame &optional frame This function raises frame FRAME. - - Command: lower-frame &optional FRAME + - Command: lower-frame &optional frame This function lowers frame FRAME. You can also specify auto-raise (raising automatically when a frame @@ -332,7 +332,7 @@ frame properties.) Auto-raising and auto-lowering is implemented through functions attached to `select-frame-hook' and `deselect-frame-hook' (*note Frame -Hooks::.). Under normal circumstances, you should not call these +Hooks::). Under normal circumstances, you should not call these functions directly. - Function: default-select-frame-hook @@ -356,7 +356,7 @@ all their properties, and the window configuration of each one. This function returns a frame configuration list that describes the current arrangement of frames and their contents. - - Function: set-frame-configuration CONFIGURATION + - Function: set-frame-configuration configuration This function restores the state of frames described in CONFIGURATION. @@ -380,7 +380,7 @@ frame's lifetime. *Note Hooks::. - Variable: select-frame-hook This is a normal hook that is run just after a frame is selected. The function `default-select-frame-hook', which implements - auto-raising (*note Raising and Lowering::.), is normally attached + auto-raising (*note Raising and Lowering::), is normally attached to this hook. Note that calling `select-frame' does not necessarily set the @@ -392,7 +392,7 @@ frame's lifetime. *Note Hooks::. This is a normal hook that is run just before a frame is deselected (and another frame is selected). The function `default-deselect-frame-hook', which implements auto-lowering - (*note Raising and Lowering::.), is normally attached to this hook. + (*note Raising and Lowering::), is normally attached to this hook. - Variable: map-frame-hook This hook is called each time a frame is mapped (i.e. made @@ -449,10 +449,10 @@ example the frame-creation functions) take an optional device argument specifying which device the function pertains to. If the argument is omitted, it defaults to the selected device (see below). - - Function: consolep OBJECT + - Function: consolep object This returns non-`nil' if OBJECT is a console. - - Function: devicep OBJECT + - Function: devicep object This returns non-`nil' if OBJECT is a device. * Menu: @@ -474,7 +474,7 @@ Basic Console Functions - Function: console-list This function returns a list of all existing consoles. - - Function: console-device-list &optional CONSOLE + - Function: console-device-list &optional console This function returns a list of all devices on CONSOLE. If CONSOLE is `nil', the selected console will be used. @@ -487,15 +487,15 @@ Basic Device Functions - Function: device-list This function returns a list of all existing devices. - - Function: device-or-frame-p OBJECT + - Function: device-or-frame-p object This function returns non-`nil' if OBJECT is a device or frame. This function is useful because devices and frames are similar in many respects and many functions can operate on either one. - - Function: device-frame-list DEVICE + - Function: device-frame-list device This function returns a list of all frames on DEVICE. - - Function: frame-device FRAME + - Function: frame-device frame This function returns the device that FRAME is on.  @@ -536,23 +536,23 @@ particular "class", which describes other characteristics of the device `mono' A device that can only display two colors (e.g. black and white). - - Function: device-type DEVICE + - Function: device-type device This function returns the type of DEVICE. This is a symbol whose name is one of the device types mentioned above. - - Function: device-or-frame-type DEVICE-OR-FRAME + - Function: device-or-frame-type device-or-frame This function returns the type of DEVICE-OR-FRAME. - - Function: device-class DEVICE + - Function: device-class device This function returns the class (color behavior) of DEVICE. This is a symbol whose name is one of the device classes mentioned above. - - Function: valid-device-type-p DEVICE-TYPE + - Function: valid-device-type-p device-type This function returns whether DEVICE-TYPE (which should be a symbol) species a valid device type. - - Function: valid-device-class-p DEVICE-CLASS + - Function: valid-device-class-p device-class This function returns whether DEVICE-CLASS (which should be a symbol) species a valid device class. @@ -566,13 +566,13 @@ File: lispref.info, Node: Connecting to a Console or Device, Next: The Selecte Connecting to a Console or Device ================================= - - Function: make-device &optional TYPE DEVICE-DATA + - Function: make-device &optional type device-data This function creates a new device. The following two functions create devices of specific types and are written in terms of `make-device'. - - Function: make-tty-device &optional TTY TERMINAL-TYPE + - Function: make-tty-device &optional tty terminal-type This function creates a new tty device on TTY. This also creates the tty's first frame. TTY should be a string giving the name of a tty device file (e.g. `/dev/ttyp3' under SunOS et al.), as @@ -583,12 +583,12 @@ written in terms of `make-device'. If it is `nil', the terminal type will be inferred from the `TERM' environment variable. - - Function: make-x-device &optional DISPLAY ARGV-LIST + - Function: make-x-device &optional display argv-list This function creates a new device connected to DISPLAY. Optional argument ARGV-LIST is a list of strings describing command line options. - - Function: delete-device DEVICE + - Function: delete-device device This function deletes DEVICE, permanently eliminating it from use. This disconnects XEmacs's connection to the device. @@ -600,15 +600,15 @@ written in terms of `make-device'. This variable, if non-`nil', should contain a list of functions, which are called when a device is deleted. - - Function: console-live-p OBJECT + - Function: console-live-p object This function returns non-`nil' if OBJECT is a console that has not been deleted. - - Function: device-live-p OBJECT + - Function: device-live-p object This function returns non-`nil' if OBJECT is a device that has not been deleted. - - Function: device-x-display DEVICE + - Function: device-x-display device This function returns the X display which DEVICE is connected to, if DEVICE is an X device. @@ -618,7 +618,7 @@ File: lispref.info, Node: The Selected Console and Device, Next: Console and D The Selected Console and Device =============================== - - Function: select-console CONSOLE + - Function: select-console console This function selects the console CONSOLE. Subsequent editing commands apply to its selected device, selected frame, and selected window. The selection of CONSOLE lasts until the next time the @@ -628,10 +628,10 @@ The Selected Console and Device - Function: selected-console This function returns the console which is currently active. - - Function: select-device DEVICE + - Function: select-device device This function selects the device DEVICE. - - Function: selected-device &optional CONSOLE + - Function: selected-device &optional console This function returns the device which is currently active. If optional CONSOLE is non-`nil', this function returns the device that would be currently active if CONSOLE were the selected @@ -643,20 +643,20 @@ File: lispref.info, Node: Console and Device I/O, Prev: The Selected Console a Console and Device I/O ====================== - - Function: console-disable-input CONSOLE + - Function: console-disable-input console This function disables input on console CONSOLE. - - Function: console-enable-input CONSOLE + - Function: console-enable-input console This function enables input on console CONSOLE. Each device has a "baud rate" value associated with it. On most systems, changing this value will affect the amount of padding and other strategic decisions made during redisplay. - - Function: device-baud-rate &optional DEVICE + - Function: device-baud-rate &optional device This function returns the output baud rate of DEVICE. - - Function: set-device-baud-rate DEVICE RATE + - Function: set-device-baud-rate device rate This function sets the output baud rate of DEVICE to RATE.  @@ -702,9 +702,9 @@ the character that immediately follows point; point is actually before the character on which the cursor sits. The value of point is a number between 1 and the buffer size plus 1. -If narrowing is in effect (*note Narrowing::.), then point is -constrained to fall within the accessible portion of the buffer -(possibly at one end of it). +If narrowing is in effect (*note Narrowing::), then point is constrained +to fall within the accessible portion of the buffer (possibly at one end +of it). Each buffer has its own value of point, which is independent of the value of point in other buffers. Each window also has a value of point, @@ -715,35 +715,35 @@ the buffer's point and the window's point normally have the same value, so the distinction is rarely important. *Note Window Point::, for more details. - - Function: point &optional BUFFER + - Function: point &optional buffer This function returns the value of point in BUFFER, as an integer. BUFFER defaults to the current buffer if omitted. (point) => 175 - - Function: point-min &optional BUFFER + - Function: point-min &optional buffer This function returns the minimum accessible value of point in BUFFER. This is normally 1, but if narrowing is in effect, it is the position of the start of the region that you narrowed to. (*Note Narrowing::.) BUFFER defaults to the current buffer if omitted. - - Function: point-max &optional BUFFER + - Function: point-max &optional buffer This function returns the maximum accessible value of point in BUFFER. This is `(1+ (buffer-size buffer))', unless narrowing is in effect, in which case it is the position of the end of the - region that you narrowed to. (*note Narrowing::.). BUFFER - defaults to the current buffer if omitted. + region that you narrowed to. (*note Narrowing::). BUFFER defaults + to the current buffer if omitted. - - Function: buffer-end FLAG &optional BUFFER + - Function: buffer-end flag &optional buffer This function returns `(point-min buffer)' if FLAG is less than 1, `(point-max buffer)' otherwise. The argument FLAG must be a number. BUFFER defaults to the current buffer if omitted. - - Function: buffer-size &optional BUFFER + - Function: buffer-size &optional buffer This function returns the total number of characters in BUFFER. - In the absence of any narrowing (*note Narrowing::.), `point-max' + In the absence of any narrowing (*note Narrowing::), `point-max' returns a value one larger than this. BUFFER defaults to the current buffer if omitted. @@ -786,7 +786,7 @@ Motion by Characters These functions move point based on a count of characters. `goto-char' is the fundamental primitive; the other functions use that. - - Command: goto-char POSITION &optional BUFFER + - Command: goto-char position &optional buffer This function sets point in `buffer' to the value POSITION. If POSITION is less than 1, it moves point to the beginning of the buffer. If POSITION is greater than the length of the buffer, it @@ -804,7 +804,7 @@ Motion by Characters `goto-char' returns POSITION. - - Command: forward-char &optional COUNT BUFFER + - Command: forward-char &optional count buffer This function moves point COUNT characters forward, towards the end of the buffer (or backward, towards the beginning of the buffer, if COUNT is negative). If the function attempts to move @@ -815,7 +815,7 @@ Motion by Characters In an interactive call, COUNT is the numeric prefix argument. - - Command: backward-char &optional COUNT BUFFER + - Command: backward-char &optional count buffer This function moves point COUNT characters backward, towards the beginning of the buffer (or forward, towards the end of the buffer, if COUNT is negative). If the function attempts to move @@ -835,7 +835,7 @@ Motion by Words These functions for parsing words use the syntax table to decide whether a given character is part of a word. *Note Syntax Tables::. - - Command: forward-word COUNT &optional BUFFER + - Command: forward-word count &optional buffer This function moves point forward COUNT words (or backward if COUNT is negative). Normally it returns `t'. If this motion encounters the beginning or end of the buffer, or the limits of the @@ -846,7 +846,7 @@ whether a given character is part of a word. *Note Syntax Tables::. In an interactive call, COUNT is set to the numeric prefix argument. - - Command: backward-word COUNT &optional BUFFER + - Command: backward-word count &optional buffer This function is just like `forward-word', except that it moves backward until encountering the front of a word, rather than forward. BUFFER defaults to the current buffer if omitted. @@ -881,7 +881,7 @@ Likewise, to move to the end of the buffer, use: documented here to warn you not to use them in Lisp programs, because they set the mark and display messages in the echo area. - - Command: beginning-of-buffer &optional N + - Command: beginning-of-buffer &optional n This function moves point to the beginning of the buffer (or the limits of the accessible portion, when narrowing is in effect), setting the mark at the previous position. If N is non-`nil', @@ -893,7 +893,7 @@ they set the mark and display messages in the echo area. Don't use this function in Lisp programs! - - Command: end-of-buffer &optional N + - Command: end-of-buffer &optional n This function moves point to the end of the buffer (or the limits of the accessible portion, when narrowing is in effect), setting the mark at the previous position. If N is non-`nil', then it puts @@ -918,12 +918,12 @@ newline. The division of the buffer into text lines is not affected by the width of the window, by line continuation in display, or by how tabs and control characters are displayed. - - Command: goto-line LINE + - Command: goto-line line This function moves point to the front of the LINEth line, counting from line 1 at beginning of the buffer. If LINE is less than 1, it moves point to the beginning of the buffer. If LINE is greater than the number of lines in the buffer, it moves point to - the end of the buffer--that is, the *end of the last line* of the + the end of the buffer--that is, the _end of the last line_ of the buffer. This is the only case in which `goto-line' does not necessarily move to the beginning of a line. @@ -943,7 +943,7 @@ tabs and control characters are displayed. In an interactive call, LINE is the numeric prefix argument if one has been provided. Otherwise LINE is read in the minibuffer. - - Command: beginning-of-line &optional COUNT BUFFER + - Command: beginning-of-line &optional count buffer This function moves point to the beginning of the current line. With an argument COUNT not `nil' or 1, it moves forward COUNT-1 lines and then to the beginning of the line. BUFFER defaults to @@ -953,7 +953,7 @@ tabs and control characters are displayed. accessible portion, if narrowing is in effect), it positions point there. No error is signaled. - - Command: end-of-line &optional COUNT BUFFER + - Command: end-of-line &optional count buffer This function moves point to the end of the current line. With an argument COUNT not `nil' or 1, it moves forward COUNT-1 lines and then to the end of the line. BUFFER defaults to the current @@ -963,7 +963,7 @@ tabs and control characters are displayed. accessible portion, if narrowing is in effect), it positions point there. No error is signaled. - - Command: forward-line &optional COUNT BUFFER + - Command: forward-line &optional count buffer This function moves point forward COUNT lines, to the beginning of the line. If COUNT is negative, it moves point -COUNT lines backward, to the beginning of a line. If COUNT is zero, it moves @@ -981,7 +981,7 @@ tabs and control characters are displayed. In an interactive call, COUNT is the numeric prefix argument. - - Function: count-lines START END + - Function: count-lines start end This function returns the number of lines between the positions START and END in the current buffer. If START and END are equal, then it returns 0. Otherwise it returns at least 1, even if START @@ -1031,7 +1031,7 @@ thus take time proportional to the distance scanned. If you intend to use them heavily, Emacs provides caches which may improve the performance of your code. *Note cache-long-line-scans: Text Lines. - - Function: vertical-motion COUNT &optional WINDOW PIXELS + - Function: vertical-motion count &optional window pixels This function moves point to the start of the frame line COUNT frame lines down from the frame line containing point. If COUNT is negative, it moves up instead. The optional second argument @@ -1050,7 +1050,7 @@ performance of your code. *Note cache-long-line-scans: Text Lines. WINDOW's point. (This differs from FSF Emacs, which buggily always sets current buffer's point, regardless of WINDOW.) - - Function: vertical-motion-pixels COUNT &optional WINDOW HOW + - Function: vertical-motion-pixels count &optional window how This function moves point to the start of the frame line PIXELS vertical pixels down from the frame line containing point, or up if PIXELS is negative. The optional second argument WINDOW is the @@ -1061,7 +1061,7 @@ performance of your code. *Note cache-long-line-scans: Text Lines. least PIXELS. Any other value indicates that the motion should be as close as possible to PIXELS. - - Command: move-to-window-line COUNT &optional WINDOW + - Command: move-to-window-line count &optional window This function moves point with respect to the text currently displayed in WINDOW, which defaults to the selected window. It moves point to the beginning of the screen line COUNT screen lines @@ -1095,29 +1095,29 @@ Expressions::, for lower-level primitives for scanning sexps or parts of sexps. For user-level commands, see *Note Lists and Sexps: (emacs)Lists and Sexps. - - Command: forward-list &optional ARG + - Command: forward-list &optional arg This function moves forward across ARG balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) ARG defaults to 1 if omitted. If ARG is negative, move backward across that many groups of parentheses. - - Command: backward-list &optional ARG + - Command: backward-list &optional arg This function moves backward across ARG balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) ARG defaults to 1 if omitted. If ARG is negative, move forward across that many groups of parentheses. - - Command: up-list ARG + - Command: up-list arg This function moves forward out of ARG levels of parentheses. A negative argument means move backward but still to a less deep spot. - - Command: down-list ARG + - Command: down-list arg This function moves forward into ARG levels of parentheses. A negative argument means move backward but still go deeper in parentheses (-ARG levels). - - Command: forward-sexp &optional ARG + - Command: forward-sexp &optional arg This function moves forward across ARG balanced expressions. Balanced expressions include both those delimited by parentheses and other kinds, such as words and string constants. ARG defaults @@ -1135,18 +1135,18 @@ sexps. For user-level commands, see *Note Lists and Sexps: (concat "foo " (car x) y-!- z) ---------- Buffer: foo ---------- - - Command: backward-sexp &optional ARG + - Command: backward-sexp &optional arg This function moves backward across ARG balanced expressions. ARG defaults to 1 if omitted. If ARG is negative, move forward across that many balanced expressions. - - Command: beginning-of-defun &optional ARG + - Command: beginning-of-defun &optional arg This function moves back to the ARGth beginning of a defun. If ARG is negative, this actually moves forward, but it still moves to the beginning of a defun, not to the end of one. ARG defaults to 1 if omitted. - - Command: end-of-defun &optional ARG + - Command: end-of-defun &optional arg This function moves forward to the ARGth end of a defun. If ARG is negative, this actually moves backward, but it still moves to the end of a defun, not to the beginning of one. ARG defaults to @@ -1169,7 +1169,7 @@ Skipping Characters characters. For example, they are often used to skip whitespace. For related functions, see *Note Motion and Syntax::. - - Function: skip-chars-forward CHARACTER-SET &optional LIMIT BUFFER + - Function: skip-chars-forward character-set &optional limit buffer This function moves point in BUFFER forward, skipping over a given set of characters. It examines the character following point, then advances point if the character matches CHARACTER-SET. This @@ -1206,7 +1206,7 @@ related functions, see *Note Motion and Syntax::. comes back" twice. ---------- Buffer: foo ---------- - - Function: skip-chars-backward CHARACTER-SET &optional LIMIT BUFFER + - Function: skip-chars-backward character-set &optional limit buffer This function moves point backward, skipping characters that match CHARACTER-SET, until LIMIT. It just like `skip-chars-forward' except for the direction of motion. diff --git a/info/lispref.info-28 b/info/lispref.info-28 index 5fb9228..76b354e 100644 --- a/info/lispref.info-28 +++ b/info/lispref.info-28 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -64,15 +64,15 @@ excursion. The forms for saving and restoring the configuration of windows are described elsewhere (see *Note Window Configurations:: and *note Frame -Configurations::.). +Configurations::). - - Special Form: save-excursion FORMS... + - Special Form: save-excursion forms... The `save-excursion' special form saves the identity of the current buffer and the values of point and the mark in it, evaluates FORMS, and finally restores the buffer and its saved values of point and the mark. All three saved values are restored even in case of an abnormal exit via `throw' or error (*note Nonlocal - Exits::.). + Exits::). The `save-excursion' special form is the standard way to switch buffers or move point within one part of a program and avoid @@ -87,7 +87,7 @@ Configurations::.). correspondences altered by functions such as `switch-to-buffer'. One way to restore these correspondences, and the selected window, is to use `save-window-excursion' inside `save-excursion' (*note - Window Configurations::.). + Window Configurations::). The value returned by `save-excursion' is the result of the last of FORMS, or `nil' if no FORMS are given. @@ -104,21 +104,21 @@ Configurations::.). (goto-char old-pnt) (set-marker (mark-marker) old-mark))) - - Special Form: save-current-buffer FORMS... + - Special Form: save-current-buffer forms... This special form is similar to `save-excursion' but it only saves and restores the current buffer. Beginning with XEmacs 20.3, `save-current-buffer' is a primitive. - - Special Form: with-current-buffer BUFFER FORMS... + - Special Form: with-current-buffer buffer forms... This special form evaluates FORMS with BUFFER as the current buffer. It returns the value of the last form. - - Special Form: with-temp-file FILE FORMS... + - Special Form: with-temp-file file forms... This special form creates a new buffer, evaluates FORMS there, and writes the buffer to FILE. It returns the value of the last form evaluated. - - Special Form: save-selected-window FORMS... + - Special Form: save-selected-window forms... This special form is similar to `save-excursion' but it saves and restores the selected window and nothing else. @@ -146,7 +146,7 @@ which use them refuse to operate on text that is inaccessible. The commands for saving buffers are unaffected by narrowing; they save the entire buffer regardless of any narrowing. - - Command: narrow-to-region START END &optional BUFFER + - Command: narrow-to-region start end &optional buffer This function sets the accessible portion of BUFFER to start at START and end at END. Both arguments should be character positions. BUFFER defaults to the current buffer if omitted. @@ -154,17 +154,17 @@ save the entire buffer regardless of any narrowing. In an interactive call, START and END are set to the bounds of the current region (point and the mark, with the smallest first). - - Command: narrow-to-page &optional MOVE-COUNT + - Command: narrow-to-page &optional move-count This function sets the accessible portion of the current buffer to include just the current page. An optional first argument MOVE-COUNT non-`nil' means to move forward or backward by MOVE-COUNT pages and then narrow. The variable `page-delimiter' - specifies where pages start and end (*note Standard Regexps::.). + specifies where pages start and end (*note Standard Regexps::). In an interactive call, MOVE-COUNT is set to the numeric prefix argument. - - Command: widen &optional BUFFER + - Command: widen &optional buffer This function cancels any narrowing in BUFFER, so that the entire contents are accessible. This is called "widening". It is equivalent to the following expression: @@ -173,13 +173,13 @@ save the entire buffer regardless of any narrowing. BUFFER defaults to the current buffer if omitted. - - Special Form: save-restriction BODY... + - Special Form: save-restriction body... This special form saves the current bounds of the accessible portion, evaluates the BODY forms, and finally restores the saved bounds, thus restoring the same state of narrowing (or absence thereof) formerly in effect. The state of narrowing is restored even in the event of an abnormal exit via `throw' or error (*note - Nonlocal Exits::.). Therefore, this construct is a clean way to + Nonlocal Exits::). Therefore, this construct is a clean way to narrow a buffer temporarily. The value returned by `save-restriction' is that returned by the @@ -194,7 +194,7 @@ save the entire buffer regardless of any narrowing. restrictions it saved from), but it does not restore the identity of the current buffer. - `save-restriction' does *not* restore point and the mark; use + `save-restriction' does _not_ restore point and the mark; use `save-excursion' for that. If you use both `save-restriction' and `save-excursion' together, `save-excursion' should come first (on the outside). Otherwise, the old point value would be restored @@ -262,8 +262,8 @@ deleted, so that it stays with the two characters on either side of it. * Creating Markers:: Making empty markers or markers at certain places. * Information from Markers:: Finding the marker's buffer or character position. * Changing Markers:: Moving the marker to a new buffer or position. -* The Mark:: How "the mark" is implemented with a marker. -* The Region:: How to access "the region". +* The Mark:: How ``the mark'' is implemented with a marker. +* The Region:: How to access ``the region''.  File: lispref.info, Node: Overview of Markers, Next: Predicates on Markers, Up: Markers @@ -289,7 +289,7 @@ buffer. Relocation changes the integer equivalent of the marker. the characters immediately before and after the deleted text. Inserting text at the position of a marker normally leaves the marker in front of the new text--unless it is inserted with `insert-before-markers' (*note -Insertion::.). +Insertion::). Insertion and deletion in a buffer must check all the markers and relocate them if necessary. This slows processing in a buffer with a @@ -386,24 +386,24 @@ is either an integer or a marker or either an integer, a character, or a marker. The latter tests are useful in connection with the arithmetic functions that work with any of markers, integers, or characters. - - Function: markerp OBJECT + - Function: markerp object This function returns `t' if OBJECT is a marker, `nil' otherwise. Note that integers are not markers, even though many functions will accept either a marker or an integer. - - Function: integer-or-marker-p OBJECT + - Function: integer-or-marker-p object This function returns `t' if OBJECT is an integer or a marker, `nil' otherwise. - - Function: integer-char-or-marker-p OBJECT + - Function: integer-char-or-marker-p object This function returns `t' if OBJECT is an integer, a character, or a marker, `nil' otherwise. - - Function: number-or-marker-p OBJECT + - Function: number-or-marker-p object This function returns `t' if OBJECT is a number (either kind) or a marker, `nil' otherwise. - - Function: number-char-or-marker-p OBJECT + - Function: number-char-or-marker-p object This function returns `t' if OBJECT is a number (either kind), a character, or a marker, `nil' otherwise. @@ -425,7 +425,7 @@ marker. (make-marker) => # - - Function: point-marker &optional DONT-COPY-P BUFFER + - Function: point-marker &optional dont-copy-p buffer This function returns a marker that points to the present position of point in BUFFER, which defaults to the current buffer. *Note Point::. For an example, see `copy-marker', below. @@ -437,13 +437,13 @@ marker. modifying the position of this marker will move point. It is illegal to change the buffer of it, or make it point nowhere. - - Function: point-min-marker &optional BUFFER + - Function: point-min-marker &optional buffer This function returns a new marker that points to the beginning of the accessible portion of BUFFER, which defaults to the current buffer. This will be the beginning of the buffer unless narrowing is in effect. *Note Narrowing::. - - Function: point-max-marker &optional BUFFER + - Function: point-max-marker &optional buffer This function returns a new marker that points to the end of the accessible portion of BUFFER, which defaults to the current buffer. This will be the end of the buffer unless narrowing is in @@ -465,7 +465,7 @@ marker. (point-max-marker) => # - - Function: copy-marker MARKER-OR-INTEGER + - Function: copy-marker marker-or-integer If passed a marker as its argument, `copy-marker' returns a new marker that points to the same place and the same buffer as does MARKER-OR-INTEGER. If passed an integer as its argument, @@ -525,11 +525,11 @@ Information from Markers This section describes the functions for accessing the components of a marker object. - - Function: marker-position MARKER + - Function: marker-position marker This function returns the position that MARKER points to, or `nil' if it points nowhere. - - Function: marker-buffer MARKER + - Function: marker-buffer marker This function returns the buffer that MARKER points into, or `nil' if it points nowhere. @@ -563,7 +563,7 @@ outside of your program, and, if so, what effects will result from moving it--otherwise, confusing things may happen in other parts of Emacs. - - Function: set-marker MARKER POSITION &optional BUFFER + - Function: set-marker marker position &optional buffer This function moves MARKER to POSITION in BUFFER. If BUFFER is not provided, it defaults to the current buffer. @@ -584,7 +584,7 @@ Emacs. (set-marker m 0 b) => # - - Function: move-marker MARKER POSITION &optional BUFFER + - Function: move-marker marker position &optional buffer This is another name for `set-marker'.  @@ -647,7 +647,7 @@ mark on the mark ring. The variable `mark-ring-max' specifies the maximum number of entries in the mark ring; once the list becomes this long, adding a new element deletes the last element. - - Function: mark &optional FORCE BUFFER + - Function: mark &optional force buffer This function returns BUFFER's mark position as an integer. BUFFER defaults to the current buffer if omitted. @@ -662,7 +662,7 @@ long, adding a new element deletes the last element. If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark' below. - - Function: mark-marker INACTIVE-P BUFFER + - Function: mark-marker inactive-p buffer This function returns BUFFER's mark. BUFFER defaults to the current buffer if omitted. This is the very marker that records the mark location inside XEmacs, not a copy. Therefore, changing @@ -684,10 +684,10 @@ long, adding a new element deletes the last element. other than the one of which it is the mark. If you do, it will yield perfectly consistent, but rather odd, results. - - Function: set-mark POSITION &optional BUFFER + - Function: set-mark position &optional buffer This function sets `buffer''s mark to POSITION, and activates the mark. BUFFER defaults to the current buffer if omitted. The old - value of the mark is *not* pushed onto the mark ring. + value of the mark is _not_ pushed onto the mark ring. *Please note:* Use this function only if you want the user to see that the mark has moved, and you want the previous mark position to @@ -707,12 +707,12 @@ long, adding a new element deletes the last element. (forward-line 1) (delete-region beg (point))). - - Command: exchange-point-and-mark &optional DONT-ACTIVATE-REGION + - Command: exchange-point-and-mark &optional dont-activate-region This function exchanges the positions of point and the mark. It is intended for interactive use. The mark is also activated unless DONT-ACTIVATE-REGION is non-`nil'. - - Function: push-mark &optional POSITION NOMSG ACTIVATE BUFFER + - Function: push-mark &optional position nomsg activate buffer This function sets BUFFER's mark to POSITION, and pushes a copy of the previous mark onto `mark-ring'. BUFFER defaults to the current buffer if omitted. If POSITION is `nil', then the value @@ -721,7 +721,7 @@ long, adding a new element deletes the last element. If the last global mark pushed was not in BUFFER, also push POSITION on the global mark ring (see below). - The function `push-mark' normally *does not* activate the mark. + The function `push-mark' normally _does not_ activate the mark. To do that, specify `t' for the argument ACTIVATE. A `Mark set' message is displayed unless NOMSG is non-`nil'. @@ -795,7 +795,7 @@ the beginning and end of the region. This lets other Lisp programs specify the bounds explicitly as arguments and automatically respects the user's setting for ZMACS-REGIONS. (*Note Interactive Codes::.) - - Function: region-beginning &optional BUFFER + - Function: region-beginning &optional buffer This function returns the position of the beginning of BUFFER's region (as an integer). This is the position of either point or the mark, whichever is smaller. BUFFER defaults to the current @@ -804,7 +804,7 @@ the user's setting for ZMACS-REGIONS. (*Note Interactive Codes::.) If the mark does not point anywhere, an error is signaled. Note that this function ignores whether the region is active. - - Function: region-end &optional BUFFER + - Function: region-end &optional buffer This function returns the position of the end of BUFFER's region (as an integer). This is the position of either point or the mark, whichever is larger. BUFFER defaults to the current buffer if @@ -872,7 +872,7 @@ the user's setting for ZMACS-REGIONS. (*Note Interactive Codes::.) - Variable: zmacs-deactivate-region-hook This normal hook is called when an active region becomes inactive. (Calling `zmacs-deactivate-region' when the region is inactive will - *not* cause this hook to be called.) If ZMACS-REGIONS is false, + _not_ cause this hook to be called.) If ZMACS-REGIONS is false, this hook will never get called. - Variable: zmacs-update-region-hook @@ -891,12 +891,12 @@ Text buffer. Most examine, insert, or delete text in the current buffer, often in the vicinity of point. Many are interactive. All the functions that change the text provide for undoing the changes (*note -Undo::.). +Undo::). Many text-related functions operate on a region of text defined by two buffer positions passed in arguments named START and END. These -arguments should be either markers (*note Markers::.) or numeric -character positions (*note Positions::.). The order of these arguments +arguments should be either markers (*note Markers::) or numeric +character positions (*note Positions::). The order of these arguments does not matter; it is all right for START to be the end of the region and END the beginning. For example, `(delete-region 1 10)' and `(delete-region 10 1)' are equivalent. An `args-out-of-range' error is @@ -951,7 +951,7 @@ omitted. (In FSF Emacs, and earlier versions of XEmacs, these functions usually did not have these optional BUFFER arguments and always operated on the current buffer.) - - Function: char-after POSITION &optional BUFFER + - Function: char-after position &optional buffer This function returns the character in the buffer at (i.e., immediately after) position POSITION. If POSITION is out of range for this purpose, either before the beginning of the buffer, or at @@ -964,7 +964,7 @@ operated on the current buffer.) (char-to-string (char-after 1)) => "@" - - Function: following-char &optional BUFFER + - Function: following-char &optional buffer This function returns the character following point in the buffer. This is similar to `(char-after (point))'. However, if point is at the end of the buffer, then the result of `following-char' is 0. @@ -988,32 +988,32 @@ operated on the current buffer.) (char-to-string (following-char)) => "c" - - Function: preceding-char &optional BUFFER + - Function: preceding-char &optional buffer This function returns the character preceding point in the buffer. See above, under `following-char', for an example. If point is at the beginning of the buffer, `preceding-char' returns 0. If optional argument BUFFER is `nil', the current buffer is assumed. - - Function: bobp &optional BUFFER + - Function: bobp &optional buffer This function returns `t' if point is at the beginning of the buffer. If narrowing is in effect, this means the beginning of the accessible portion of the text. If optional argument BUFFER is `nil', the current buffer is assumed. See also `point-min' in *Note Point::. - - Function: eobp &optional BUFFER + - Function: eobp &optional buffer This function returns `t' if point is at the end of the buffer. If narrowing is in effect, this means the end of accessible portion of the text. If optional argument BUFFER is `nil', the current buffer is assumed. See also `point-max' in *Note Point::. - - Function: bolp &optional BUFFER + - Function: bolp &optional buffer This function returns `t' if point is at the beginning of a line. If optional argument BUFFER is `nil', the current buffer is assumed. *Note Text Lines::. The beginning of the buffer (or its accessible portion) always counts as the beginning of a line. - - Function: eolp &optional BUFFER + - Function: eolp &optional buffer This function returns `t' if point is at the end of a line. The end of the buffer is always considered the end of a line. If optional argument BUFFER is `nil', the current buffer is assumed. @@ -1029,8 +1029,8 @@ Examining Buffer Contents This section describes two functions that allow a Lisp program to convert any portion of the text in the buffer into a string. - - Function: buffer-substring START END &optional BUFFER - - Function: buffer-string START END &optional BUFFER + - Function: buffer-substring start end &optional buffer + - Function: buffer-string start end &optional buffer These functions are equivalent and return a string containing a copy of the text of the region defined by positions START and END in the buffer. If the arguments are not positions in the @@ -1066,8 +1066,8 @@ Comparing Text This function lets you compare portions of the text in a buffer, without copying them into strings first. - - Function: compare-buffer-substrings BUFFER1 START1 END1 BUFFER2 - START2 END2 + - Function: compare-buffer-substrings buffer1 start1 end1 buffer2 + start2 end2 This function lets you compare two substrings of the same buffer or two different buffers. The first three arguments specify one substring, giving a buffer and two positions within the buffer. @@ -1104,7 +1104,7 @@ after point. Insertion relocates markers that point at positions after the insertion point, so that they stay with the surrounding text (*note -Markers::.). When a marker points at the place of insertion, insertion +Markers::). When a marker points at the place of insertion, insertion normally doesn't relocate the marker, so that it points to the beginning of the inserted text; however, certain special functions such as `insert-before-markers' relocate such markers to point after the @@ -1126,13 +1126,13 @@ properties as the characters they were copied from. By contrast, characters specified as separate arguments, not part of a string or buffer, inherit their text properties from the neighboring text. - - Function: insert &rest ARGS + - Function: insert &rest args This function inserts the strings and/or characters ARGS into the current buffer, at point, moving point forward. In other words, it inserts the text before point. An error is signaled unless all ARGS are either strings or characters. The value is `nil'. - - Function: insert-before-markers &rest ARGS + - Function: insert-before-markers &rest args This function inserts the strings and/or characters ARGS into the current buffer, at point, moving point forward. An error is signaled unless all ARGS are either strings or characters. The @@ -1142,21 +1142,21 @@ buffer, inherit their text properties from the neighboring text. relocates markers initially pointing at the insertion point, to point after the inserted text. - - Function: insert-string STRING &optional BUFFER + - Function: insert-string string &optional buffer This function inserts STRING into BUFFER before point. BUFFER defaults to the current buffer if omitted. This function is chiefly useful if you want to insert a string in a buffer other than the current one (otherwise you could just use `insert'). - - Function: insert-char CHARACTER COUNT &optional BUFFER + - Function: insert-char character count &optional buffer This function inserts COUNT instances of CHARACTER into BUFFER before point. COUNT must be a number, and CHARACTER must be a character. The value is `nil'. If optional argument BUFFER is `nil', the current buffer is assumed. (In FSF Emacs, the third argument is called INHERIT and refers to text properties.) - - Function: insert-buffer-substring FROM-BUFFER-OR-NAME &optional - START END + - Function: insert-buffer-substring from-buffer-or-name &optional + start end This function inserts a portion of buffer FROM-BUFFER-OR-NAME (which must already exist) into the current buffer before point. The text inserted is the region from START and END. (These diff --git a/info/lispref.info-29 b/info/lispref.info-29 index 257c44c..0ea1ef6 100644 --- a/info/lispref.info-29 +++ b/info/lispref.info-29 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -59,12 +59,12 @@ User-Level Insertion Commands commands intended primarily for the user but useful also in Lisp programs. - - Command: insert-buffer FROM-BUFFER-OR-NAME + - Command: insert-buffer from-buffer-or-name This command inserts the entire contents of FROM-BUFFER-OR-NAME (which must exist) into the current buffer after point. It leaves the mark after the inserted text. The value is `nil'. - - Command: self-insert-command COUNT + - Command: self-insert-command count This command inserts the last character typed; it does so COUNT times, before point, and returns `nil'. Most printing characters are bound to this command. In routine use, `self-insert-command' @@ -75,7 +75,7 @@ programs. This command calls `auto-fill-function' whenever that is non-`nil' and the character inserted is a space or a newline (*note Auto - Filling::.). + Filling::). This command performs abbrev expansion if Abbrev mode is enabled and the inserted character does not have word-constituent syntax. @@ -83,9 +83,9 @@ programs. This is also responsible for calling `blink-paren-function' when the inserted character has close parenthesis syntax (*note - Blinking::.). + Blinking::). - - Command: newline &optional NUMBER-OF-NEWLINES + - Command: newline &optional number-of-newlines This command inserts newlines into the current buffer before point. If NUMBER-OF-NEWLINES is supplied, that many newline characters are inserted. @@ -125,15 +125,15 @@ Deleting Text ============= Deletion means removing part of the text in a buffer, without saving -it in the kill ring (*note The Kill Ring::.). Deleted text can't be -yanked, but can be reinserted using the undo mechanism (*note Undo::.). +it in the kill ring (*note The Kill Ring::). Deleted text can't be +yanked, but can be reinserted using the undo mechanism (*note Undo::). Some deletion functions do save text in the kill ring in some special cases. All of the deletion functions operate on the current buffer, and all return a value of `nil'. - - Function: erase-buffer &optional BUFFER + - Function: erase-buffer &optional buffer This function deletes the entire text of BUFFER, leaving it empty. If the buffer is read-only, it signals a `buffer-read-only' error. Otherwise, it deletes the text without asking for any @@ -146,12 +146,12 @@ return a value of `nil'. future text is not really related to the former text, and its size should not be compared with that of the former text. - - Command: delete-region START END &optional BUFFER + - Command: delete-region start end &optional buffer This command deletes the text in BUFFER in the region defined by START and END. The value is `nil'. If optional argument BUFFER is `nil', the current buffer is assumed. - - Command: delete-char COUNT &optional KILLP + - Command: delete-char count &optional killp This command deletes COUNT characters directly after point, or before point if COUNT is negative. If KILLP is non-`nil', then it saves the deleted characters in the kill ring. @@ -164,7 +164,7 @@ return a value of `nil'. The value returned is always `nil'. - - Command: delete-backward-char COUNT &optional KILLP + - Command: delete-backward-char count &optional killp This command deletes COUNT characters directly before point, or after point if COUNT is negative. If KILLP is non-`nil', then it saves the deleted characters in the kill ring. @@ -177,7 +177,7 @@ return a value of `nil'. The value returned is always `nil'. - - Command: backward-delete-char-untabify COUNT &optional KILLP + - Command: backward-delete-char-untabify count &optional killp This command deletes COUNT characters backward, changing tabs into spaces. When the next character to be deleted is a tab, it is first replaced with the proper number of spaces to preserve @@ -232,7 +232,7 @@ programs. You thought ---------- Buffer: foo ---------- - - Command: delete-indentation &optional JOIN-FOLLOWING-P + - Command: delete-indentation &optional join-following-p This function joins the line point is on to the previous line, deleting any whitespace at the join and in some cases replacing it with one space. If JOIN-FOLLOWING-P is non-`nil', @@ -254,6 +254,7 @@ programs. (delete-indentation) => nil + ---------- Buffer: foo ---------- When in the course of human-!- events, it becomes necessary ---------- Buffer: foo ---------- @@ -280,12 +281,12 @@ programs. This has too many -!-spaces This has too many spaces at the start of (-!- this list) ---------- Buffer: foo ---------- - + (fixup-whitespace) => nil (fixup-whitespace) => nil - + ---------- Buffer: foo ---------- This has too many spaces This has too many spaces at the start of (this list) @@ -335,7 +336,7 @@ there are also specialized functions, described in this section, that treat it as a ring. Some people think this use of the word "kill" is unfortunate, since -it refers to operations that specifically *do not* destroy the entities +it refers to operations that specifically _do not_ destroy the entities "killed". This is in sharp contrast to ordinary life, in which death is permanent and "killed" entities do not come back to life. Therefore, other metaphors have been proposed. For example, the term @@ -391,7 +392,7 @@ element. It uses the `last-command' variable to determine whether the previous command was a kill command, and if so appends the killed text to the most recent entry. - - Command: kill-region START END + - Command: kill-region start end This function kills the text in the region defined by START and END. The text is deleted but saved in the kill ring, along with its text properties. The value is always `nil'. @@ -403,7 +404,7 @@ to the most recent entry. This is convenient because it lets the user use all the kill commands to copy text into the kill ring from a read-only buffer. - - Command: copy-region-as-kill START END + - Command: copy-region-as-kill start end This command saves the region defined by START and END on the kill ring (including text properties), but does not delete the text from the buffer. It returns `nil'. It also indicates the extent @@ -427,7 +428,7 @@ Functions for Yanking "Yanking" means reinserting an entry of previously killed text from the kill ring. The text properties are copied too. - - Command: yank &optional ARG + - Command: yank &optional arg This command inserts before point the text in the first entry in the kill ring. It positions the mark at the beginning of that text, and point at the end. @@ -443,7 +444,7 @@ the kill ring. The text properties are copied too. `yank' does not alter the contents of the kill ring or rotate it. It returns `nil'. - - Command: yank-pop ARG + - Command: yank-pop arg This command replaces the just-yanked entry from the kill ring with a different entry from the kill ring. @@ -476,7 +477,7 @@ lower level, but still convenient for use in Lisp programs. They take care of interaction with X Window selections. They do not exist in Emacs version 18. - - Function: current-kill N &optional DO-NOT-MOVE + - Function: current-kill n &optional do-not-move The function `current-kill' rotates the yanking pointer which designates the "front" of the kill ring by N places (from newer kills to older ones), and returns the text at that place in the @@ -490,13 +491,13 @@ Emacs version 18. `current-kill' calls the value of `interprogram-paste-function' (documented below) before consulting the kill ring. - - Function: kill-new STRING + - Function: kill-new string This function puts the text STRING into the kill ring as a new entry at the front of the ring. It discards the oldest entry if appropriate. It also invokes the value of `interprogram-cut-function' (see below). - - Function: kill-append STRING BEFORE-P + - Function: kill-append string before-p This function appends the text STRING to the first entry in the kill ring. Normally STRING goes at the end of the entry, but if BEFORE-P is non-`nil', it goes at the beginning. This function @@ -676,7 +677,7 @@ which is in the variable `buffer-undo-list'. `query-replace' calls `undo-boundary' after each replacement, so that the user can undo individual replacements one by one. - - Function: primitive-undo COUNT LIST + - Function: primitive-undo count list This is the basic function for undoing elements of an undo list. It undoes the first COUNT elements of LIST, returning the rest of LIST. You could write this function in Lisp, but it is convenient @@ -705,7 +706,7 @@ undo recording is initially disabled. You can explicitly enable or disable undo recording with the following two functions, or by setting `buffer-undo-list' yourself. - - Command: buffer-enable-undo &optional BUFFER-OR-NAME + - Command: buffer-enable-undo &optional buffer-or-name This command enables recording undo information for buffer BUFFER-OR-NAME, so that subsequent changes can be undone. If no argument is supplied, then the current buffer is used. This @@ -715,8 +716,8 @@ disable undo recording with the following two functions, or by setting In an interactive call, BUFFER-OR-NAME is the current buffer. You cannot specify any other buffer. - - Function: buffer-disable-undo &optional BUFFER - - Function: buffer-flush-undo &optional BUFFER + - Function: buffer-disable-undo &optional buffer + - Function: buffer-flush-undo &optional buffer This function discards the undo list of BUFFER, and disables further recording of undo information. As a result, it is no longer possible to undo either previous changes or any subsequent @@ -761,14 +762,14 @@ inserting spaces to make the left and/or right margins line up precisely. The width is controlled by the variable `fill-column'. For ease of reading, lines should be no longer than 70 or so columns. - You can use Auto Fill mode (*note Auto Filling::.) to fill text + You can use Auto Fill mode (*note Auto Filling::) to fill text automatically as you insert it, but changes to existing text may leave it improperly filled. Then you must fill the text explicitly. Most of the commands in this section return values that are not meaningful. All the functions that do filling take note of the current left margin, current right margin, and current justification style -(*note Margins::.). If the current justification style is `none', the +(*note Margins::). If the current justification style is `none', the filling functions don't actually do anything. Several of the filling functions have an argument JUSTIFY. If it is @@ -781,21 +782,21 @@ justification style for this part of the text (see When you call the filling functions interactively, using a prefix argument implies the value `full' for JUSTIFY. - - Command: fill-paragraph JUSTIFY + - Command: fill-paragraph justify This command fills the paragraph at or after point. If JUSTIFY is non-`nil', each line is justified as well. It uses the ordinary paragraph motion commands to find paragraph boundaries. *Note Paragraphs: (xemacs)Paragraphs. - - Command: fill-region START END &optional JUSTIFY + - Command: fill-region start end &optional justify This command fills each of the paragraphs in the region from START to END. It justifies as well if JUSTIFY is non-`nil'. The variable `paragraph-separate' controls how to distinguish paragraphs. *Note Standard Regexps::. - - Command: fill-individual-paragraphs START END &optional JUSTIFY - MAIL-FLAG + - Command: fill-individual-paragraphs start end &optional justify + mail-flag This command fills each paragraph in the region according to its individual fill prefix. Thus, if the lines of a paragraph were indented with spaces, the filled paragraph will remain indented in @@ -818,7 +819,7 @@ argument implies the value `full' for JUSTIFY. This variable alters the action of `fill-individual-paragraphs' as described above. - - Command: fill-region-as-paragraph START END &optional JUSTIFY + - Command: fill-region-as-paragraph start end &optional justify This command considers a region of text as a paragraph and fills it. If the region was made up of many paragraphs, the blank lines between paragraphs are removed. This function justifies as well @@ -831,7 +832,7 @@ argument implies the value `full' for JUSTIFY. no fill prefix uses the indentation of the second line of the paragraph as the fill prefix. - - Command: justify-current-line HOW EOP NOSQUEEZE + - Command: justify-current-line how eop nosqueeze This command inserts spaces between the words of the current line so that the line ends exactly at `fill-column'. It returns `nil'. @@ -901,7 +902,7 @@ Margins for Filling lines. Its value should be an integer, which is a number of columns. All the filling, justification and centering commands are affected by this variable, including Auto Fill mode (*note - Auto Filling::.). + Auto Filling::). As a practical matter, if you are writing text for other people to read, you should set `fill-column' to no more than 70. Otherwise @@ -915,12 +916,12 @@ Margins for Filling The default value for `default-fill-column' is 70. - - Command: set-left-margin FROM TO MARGIN + - Command: set-left-margin from to margin This sets the `left-margin' property on the text from FROM to TO to the value MARGIN. If Auto Fill mode is enabled, this command also refills the region to fit the new margin. - - Command: set-right-margin FROM TO MARGIN + - Command: set-right-margin from to margin This sets the `right-margin' property on the text from FROM to TO to the value MARGIN. If Auto Fill mode is enabled, this command also refills the region to fit the new margin. @@ -938,7 +939,7 @@ Margins for Filling `fill-column' variable, minus the value of the `right-margin' property of the character after point. - - Command: move-to-left-margin &optional N FORCE + - Command: move-to-left-margin &optional n force This function moves point to the left margin of the current line. The column moved to is determined by calling the function `current-left-margin'. If the argument N is non-`nil', @@ -947,7 +948,7 @@ Margins for Filling If FORCE is non-`nil', that says to fix the line's indentation if that doesn't match the left margin value. - - Function: delete-to-left-margin FROM TO + - Function: delete-to-left-margin from to This function removes left margin indentation from the text between FROM and TO. The amount of indentation to delete is determined by calling `current-left-margin'. In no case does this diff --git a/info/lispref.info-3 b/info/lispref.info-3 index d59669d..4a04dc2 100644 --- a/info/lispref.info-3 +++ b/info/lispref.info-3 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -83,7 +83,7 @@ integer 65, following the standard ASCII representation of characters. If XEmacs was not compiled with MULE support, the range of this integer will always be 0 to 255 - eight bits, or one byte. (Integers outside this range are accepted but silently truncated; however, you should -most decidedly *not* rely on this, because it will not work under +most decidedly _not_ rely on this, because it will not work under XEmacs with MULE support.) When MULE support is present, the range of character codes is much larger. (Currently, 19 bits are used.) @@ -94,7 +94,7 @@ that does not distinguish between ASCII keys and other keys), so you will never find character codes above 255 in a non-MULE XEmacs. Individual characters are not often used in programs. It is far more -common to work with *strings*, which are sequences composed of +common to work with _strings_, which are sequences composed of characters. *Note String Type::. The read syntax for characters begins with a question mark, followed @@ -104,7 +104,7 @@ print representation. In XEmacs 19, however, where characters are really integers, the printed representation of a character is a decimal number. This is also a possible read syntax for a character, but writing characters that way in Lisp programs is a very bad idea. You -should *always* use the special read syntax formats that XEmacs Lisp +should _always_ use the special read syntax formats that XEmacs Lisp provides for characters. The usual read syntax for alphanumeric characters is a question mark @@ -122,7 +122,7 @@ the character `B', and `?a' for the character `a'. You can use the same syntax for punctuation characters, but it is often a good idea to add a `\' so that the Emacs commands for editing Lisp code don't get confused. For example, `?\ ' is the way to write -the space character. If the character is `\', you *must* use a second +the space character. If the character is `\', you _must_ use a second `\' to quote it: `?\\'. XEmacs 20 always prints punctuation characters with a `\' in front of them, to avoid confusion. @@ -177,7 +177,7 @@ example, both `?\^I' and `?\^i' are valid read syntax for the character There is also a character read syntax beginning with `\M-'. This sets the high bit of the character code (same as adding 128 to the character code). For example, `?\M-A' stands for the character with -character code 193, or 128 plus 65. You should *not* use this syntax +character code 193, or 128 plus 65. You should _not_ use this syntax in your programs. It is a holdover of yet another confoundance disease from earlier Emacsen. (This was used to represent keyboard input with the key set, thus the `M'; however, it conflicts with the @@ -276,8 +276,8 @@ considered a sequence. Arrays are further subdivided into strings, vectors, and bit vectors. Vectors can hold elements of any type, but string elements must be characters, and bit vector elements must be either 0 or 1. However, the -characters in a string can have extents (*note Extents::.) and text -properties (*note Text Properties::.) like characters in a buffer; +characters in a string can have extents (*note Extents::) and text +properties (*note Text Properties::) like characters in a buffer; vectors do not support extents or text properties even when their elements happen to be characters. @@ -357,7 +357,7 @@ cell refers to `nil'. Here is another diagram of the same list, `(rose violet buttercup)', sketched in a different manner: - --------------- ---------------- ------------------- + --------------- ---------------- ------------------- | car | cdr | | car | cdr | | car | cdr | | rose | o-------->| violet | o-------->| buttercup | nil | | | | | | | | | | @@ -614,13 +614,13 @@ Function Type functions in Lisp are primarily Lisp objects, and only secondarily the text which represents them. These Lisp objects are lambda expressions: lists whose first element is the symbol `lambda' (*note Lambda -Expressions::.). +Expressions::). In most programming languages, it is impossible to have a function without a name. In Lisp, a function has no intrinsic name. A lambda expression is also called an "anonymous function" (*note Anonymous -Functions::.). A named function in Lisp is actually a symbol with a -valid function in its function cell (*note Defining Functions::.). +Functions::). A named function in Lisp is actually a symbol with a +valid function in its function cell (*note Defining Functions::). Most of the time, functions are called when their names are written in Lisp expressions in Lisp programs. However, you can construct or @@ -655,7 +655,7 @@ in the C programming language. Primitive functions are also called "subrs" or "built-in functions". (The word "subr" is derived from "subroutine".) Most primitive functions evaluate all their arguments when they are called. A primitive function that does not evaluate all -its arguments is called a "special form" (*note Special Forms::.). +its arguments is called a "special form" (*note Special Forms::). It does not matter to the caller of a function whether the function is primitive. However, this does matter if you try to substitute a @@ -825,10 +825,10 @@ Buffer Type ----------- A "buffer" is an object that holds text that can be edited (*note -Buffers::.). Most buffers hold the contents of a disk file (*note -Files::.) so they can be edited, but some are used for other purposes. +Buffers::). Most buffers hold the contents of a disk file (*note +Files::) so they can be edited, but some are used for other purposes. Most buffers are also meant to be seen by the user, and therefore -displayed, at some time, in a window (*note Windows::.). But a buffer +displayed, at some time, in a window (*note Windows::). But a buffer need not be displayed in any window. The contents of a buffer are much like a string, but buffers are not @@ -839,21 +839,21 @@ concatenating substrings, and the result is an entirely new string object. Each buffer has a designated position called "point" (*note -Positions::.). At any time, one buffer is the "current buffer". Most +Positions::). At any time, one buffer is the "current buffer". Most editing commands act on the contents of the current buffer in the neighborhood of point. Many of the standard Emacs functions manipulate or test the characters in the current buffer; a whole chapter in this -manual is devoted to describing these functions (*note Text::.). +manual is devoted to describing these functions (*note Text::). Several other data structures are associated with each buffer: - * a local syntax table (*note Syntax Tables::.); + * a local syntax table (*note Syntax Tables::); - * a local keymap (*note Keymaps::.); + * a local keymap (*note Keymaps::); - * a local variable binding list (*note Buffer-Local Variables::.); + * a local variable binding list (*note Buffer-Local Variables::); - * a list of extents (*note Extents::.); + * a list of extents (*note Extents::); * and various other related properties. @@ -1104,8 +1104,8 @@ streams (character sinks) send characters to a buffer, such as a The object `nil', in addition to its other meanings, may be used as a stream. It stands for the value of the variable `standard-input' or `standard-output'. Also, the object `t' as a stream specifies input -using the minibuffer (*note Minibuffers::.) or output in the echo area -(*note The Echo Area::.). +using the minibuffer (*note Minibuffers::) or output in the echo area +(*note The Echo Area::). Streams have no special printed representation or read syntax, and print as whatever primitive type they are. @@ -1137,7 +1137,7 @@ Syntax Table Type Under XEmacs 20, a "syntax table" is a particular type of char table. Under XEmacs 19, a syntax table a vector of 256 integers. In both cases, each element defines how one character is interpreted when -it appears in a buffer. For example, in C mode (*note Major Modes::.), +it appears in a buffer. For example, in C mode (*note Major Modes::), the `+' character is punctuation, but in Lisp mode it is a valid character in a symbol. These modes specify different interpretations by changing the syntax table entry for `+'. diff --git a/info/lispref.info-30 b/info/lispref.info-30 index 1d25d6a..308e0ad 100644 --- a/info/lispref.info-30 +++ b/info/lispref.info-30 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -57,11 +57,11 @@ Sorting Text The sorting functions described in this section all rearrange text in a buffer. This is in contrast to the function `sort', which rearranges -the order of the elements of a list (*note Rearrangement::.). The +the order of the elements of a list (*note Rearrangement::). The values returned by these functions are not meaningful. - - Function: sort-subr REVERSE NEXTRECFUN ENDRECFUN &optional - STARTKEYFUN ENDKEYFUN + - Function: sort-subr reverse nextrecfun endrecfun &optional + startkeyfun endkeyfun This function is the general text-sorting routine that divides a buffer into records and sorts them. Most of the commands in this section use this function. @@ -143,8 +143,8 @@ values returned by these functions are not meaningful. (skip-chars-forward "\n \t\f"))) 'forward-paragraph) - - Command: sort-regexp-fields REVERSE RECORD-REGEXP KEY-REGEXP START - END + - Command: sort-regexp-fields reverse record-regexp key-regexp start + end This command sorts the region between START and END alphabetically as specified by RECORD-REGEXP and KEY-REGEXP. If REVERSE is a negative integer, then sorting is in reverse order. @@ -206,29 +206,29 @@ values returned by these functions are not meaningful. If you call `sort-regexp-fields' interactively, it prompts for RECORD-REGEXP and KEY-REGEXP in the minibuffer. - - Command: sort-lines REVERSE START END + - Command: sort-lines reverse start end This command alphabetically sorts lines in the region between START and END. If REVERSE is non-`nil', the sort is in reverse order. - - Command: sort-paragraphs REVERSE START END + - Command: sort-paragraphs reverse start end This command alphabetically sorts paragraphs in the region between START and END. If REVERSE is non-`nil', the sort is in reverse order. - - Command: sort-pages REVERSE START END + - Command: sort-pages reverse start end This command alphabetically sorts pages in the region between START and END. If REVERSE is non-`nil', the sort is in reverse order. - - Command: sort-fields FIELD START END + - Command: sort-fields field start end This command sorts lines in the region between START and END, comparing them alphabetically by the FIELDth field of each line. Fields are separated by whitespace and numbered starting from 1. If FIELD is negative, sorting is by the -FIELDth field from the end of the line. This command is useful for sorting tables. - - Command: sort-numeric-fields FIELD START END + - Command: sort-numeric-fields field start end This command sorts lines in the region between START and END, comparing them numerically by the FIELDth field of each line. The specified field must contain a number in each line of the region. @@ -236,7 +236,7 @@ values returned by these functions are not meaningful. If FIELD is negative, sorting is by the -FIELDth field from the end of the line. This command is useful for sorting tables. - - Command: sort-columns REVERSE &optional BEG END + - Command: sort-columns reverse &optional beg end This command sorts the lines in the region between BEG and END, comparing them alphabetically by a certain range of columns. The column positions of BEG and END bound the range of columns to sort @@ -281,7 +281,7 @@ arbitrarily high. The first (or leftmost) column is numbered 0. For an example of using `current-column', see the description of `count-lines' in *Note Text Lines::. - - Function: move-to-column COLUMN &optional FORCE + - Function: move-to-column column &optional force This function moves point to COLUMN in the current line. The calculation of COLUMN takes into account the widths of the displayed representations of the characters between the start of @@ -343,7 +343,7 @@ primitives. contents are entirely blank, then this is the horizontal position of the end of the line. - - Command: indent-to COLUMN &optional MINIMUM + - Command: indent-to column &optional minimum This function indents from point with tabs and spaces until COLUMN is reached. If MINIMUM is specified and non-`nil', then at least that many spaces are inserted even if this requires going beyond @@ -421,7 +421,7 @@ Indenting an Entire Region This section describes commands that indent all the lines in the region. They return unpredictable values. - - Command: indent-region START END TO-COLUMN + - Command: indent-region start end to-column This command indents each nonblank line starting between START (inclusive) and END (exclusive). If TO-COLUMN is `nil', `indent-region' indents each nonblank line by calling the current @@ -455,7 +455,7 @@ region. They return unpredictable values. `indent-region' with a non-`nil' argument TO-COLUMN has a different meaning and does not use this variable. - - Command: indent-rigidly START END COUNT + - Command: indent-rigidly start end count This command indents all lines starting between START (inclusive) and END (exclusive) sideways by COUNT columns. This "preserves the shape" of the affected region, moving it as a rigid unit. @@ -470,8 +470,8 @@ region. They return unpredictable values. `indent-rigidly' to indent the text copied from the message being replied to. - - Function: indent-code-rigidly START END COLUMNS &optional - NOCHANGE-REGEXP + - Function: indent-code-rigidly start end columns &optional + nochange-regexp This is like `indent-rigidly', except that it doesn't alter lines that start within strings or comments. @@ -487,7 +487,7 @@ Indentation Relative to Previous Lines This section describes two commands that indent the current line based on the contents of previous lines. - - Command: indent-relative &optional UNINDENTED-OK + - Command: indent-relative &optional unindented-ok This command inserts whitespace at point, extending to the same column as the next "indent point" of the previous nonblank line. An indent point is a non-whitespace character following @@ -548,7 +548,7 @@ because the feature is similar to that of the tab stops on a typewriter. The feature works by inserting an appropriate number of spaces and tab characters to reach the next tab stop column; it does not affect the display of tab characters in the buffer (*note Usual -Display::.). Note that the character as input uses this tab stop +Display::). Note that the character as input uses this tab stop feature only in a few major modes, such as Text mode. - Command: tab-to-tab-stop @@ -580,11 +580,11 @@ indentation in the text. the current line (which is the line in which point is located). It returns `nil'. - - Command: backward-to-indentation ARG + - Command: backward-to-indentation arg This command moves point backward ARG lines and then to the first nonblank character on that line. It returns `nil'. - - Command: forward-to-indentation ARG + - Command: forward-to-indentation arg This command moves point forward ARG lines and then to the first nonblank character on that line. It returns `nil'. @@ -599,7 +599,7 @@ buffer. *Note Character Case::, for case conversion commands that work on strings and characters. *Note Case Tables::, for how to customize which characters are upper or lower case and how to convert them. - - Command: capitalize-region START END + - Command: capitalize-region start end This function capitalizes all words in the region defined by START and END. To capitalize means to convert each word's first character to upper case and convert the rest of each word to lower @@ -622,21 +622,21 @@ which characters are upper or lower case and how to convert them. This Is The Contents Of The 5th Foo. ---------- Buffer: foo ---------- - - Command: downcase-region START END + - Command: downcase-region start end This function converts all of the letters in the region defined by START and END to lower case. The function returns `nil'. When `downcase-region' is called interactively, START and END are point and the mark, with the smallest first. - - Command: upcase-region START END + - Command: upcase-region start end This function converts all of the letters in the region defined by START and END to upper case. The function returns `nil'. When `upcase-region' is called interactively, START and END are point and the mark, with the smallest first. - - Command: capitalize-word COUNT + - Command: capitalize-word count This function capitalizes COUNT words after point, moving point over as it does. To capitalize means to convert each word's first character to upper case and convert the rest of each word to lower @@ -650,7 +650,7 @@ which characters are upper or lower case and how to convert them. When `capitalize-word' is called interactively, COUNT is set to the numeric prefix argument. - - Command: downcase-word COUNT + - Command: downcase-word count This function converts the COUNT words after point to all lower case, moving point over as it does. If COUNT is negative, it converts the -COUNT previous words but does not move point. The @@ -659,7 +659,7 @@ which characters are upper or lower case and how to convert them. When `downcase-word' is called interactively, COUNT is set to the numeric prefix argument. - - Command: upcase-word COUNT + - Command: upcase-word count This function converts the COUNT words after point to all upper case, moving point over as it does. If COUNT is negative, it converts the -COUNT previous words but does not move point. The @@ -675,14 +675,14 @@ Text Properties =============== Text properties are an alternative interface to extents (*note -Extents::.), and are built on top of them. They are useful when you +Extents::), and are built on top of them. They are useful when you want to view textual properties as being attached to the characters themselves rather than to intervals of characters. The text property interface is compatible with FSF Emacs. Each character position in a buffer or a string can have a "text property list", much like the property list of a symbol (*note Property -Lists::.). The properties belong to a particular character at a +Lists::). The properties belong to a particular character at a particular place, such as, the letter `T' at the beginning of this sentence or the first `o' in `foo'--if the same character occurs in two different places, the two occurrences generally have different @@ -724,17 +724,17 @@ to examine the properties of a number of characters at once. positions in a string start from 0, whereas positions in a buffer start from 1.) - - Function: get-text-property POS PROP &optional OBJECT + - Function: get-text-property pos prop &optional object This function returns the value of the PROP property of the character after position POS in OBJECT (a buffer or string). The argument OBJECT is optional and defaults to the current buffer. - - Function: get-char-property POS PROP &optional OBJECT + - Function: get-char-property pos prop &optional object This function is like `get-text-property', except that it checks all extents, not just text-property extents. - - Function: text-properties-at POSITION &optional OBJECT + - Function: text-properties-at position &optional object This function returns the entire property list of the character at POSITION in the string or buffer OBJECT. If OBJECT is `nil', it defaults to the current buffer. @@ -767,20 +767,20 @@ name. Since text properties are considered part of the buffer's contents, and can affect how the buffer looks on the screen, any change in the text properties is considered a buffer modification. Buffer text -property changes are undoable (*note Undo::.). +property changes are undoable (*note Undo::). - - Function: put-text-property START END PROP VALUE &optional OBJECT + - Function: put-text-property start end prop value &optional object This function sets the PROP property to VALUE for the text between START and END in the string or buffer OBJECT. If OBJECT is `nil', it defaults to the current buffer. - - Function: add-text-properties START END PROPS &optional OBJECT + - Function: add-text-properties start end props &optional object This function modifies the text properties for the text between START and END in the string or buffer OBJECT. If OBJECT is `nil', it defaults to the current buffer. The argument PROPS specifies which properties to change. It - should have the form of a property list (*note Property Lists::.): + should have the form of a property list (*note Property Lists::): a list whose elements include the property names followed alternately by the corresponding values. @@ -794,13 +794,13 @@ property changes are undoable (*note Undo::.). (add-text-properties START END '(comment t face highlight)) - - Function: remove-text-properties START END PROPS &optional OBJECT + - Function: remove-text-properties start end props &optional object This function deletes specified text properties from the text between START and END in the string or buffer OBJECT. If OBJECT is `nil', it defaults to the current buffer. The argument PROPS specifies which properties to delete. It - should have the form of a property list (*note Property Lists::.): + should have the form of a property list (*note Property Lists::): a list whose elements are property names alternating with corresponding values. But only the names matter--the values that accompany them are ignored. For example, here's how to remove the @@ -812,7 +812,7 @@ property changes are undoable (*note Undo::.). property's value; `nil' otherwise (if PROPS is `nil' or if no character in the specified text had any of those properties). - - Function: set-text-properties START END PROPS &optional OBJECT + - Function: set-text-properties start end props &optional object This function completely replaces the text property list for the text between START and END in the string or buffer OBJECT. If OBJECT is `nil', it defaults to the current buffer. @@ -830,7 +830,7 @@ property changes are undoable (*note Undo::.). (set-text-properties START END nil) See also the function `buffer-substring-without-properties' (*note -Buffer Contents::.) which copies text from the buffer but does not copy +Buffer Contents::) which copies text from the buffer but does not copy its properties.  @@ -857,7 +857,7 @@ the buffer, if the property you are interested in does not change. position returned by these functions is between two characters with different properties. - - Function: next-property-change POS &optional OBJECT LIMIT + - Function: next-property-change pos &optional object limit The function scans the text forward from position POS in the string or buffer OBJECT till it finds a change in some text property, then returns the position of the change. In other @@ -885,7 +885,7 @@ different properties. Process text from point to NEXT-CHANGE... (goto-char next-change))) - - Function: next-single-property-change POS PROP &optional OBJECT LIMIT + - Function: next-single-property-change pos prop &optional object limit The function scans the text forward from position POS in the string or buffer OBJECT till it finds a change in the PROP property, then returns the position of the change. In other @@ -902,19 +902,19 @@ different properties. it is a position greater than or equal to POS; it equals POS only if LIMIT equals POS. - - Function: previous-property-change POS &optional OBJECT LIMIT + - Function: previous-property-change pos &optional object limit This is like `next-property-change', but scans back from POS instead of forward. If the value is non-`nil', it is a position less than or equal to POS; it equals POS only if LIMIT equals POS. - - Function: previous-single-property-change POS PROP &optional OBJECT - LIMIT + - Function: previous-single-property-change pos prop &optional object + limit This is like `next-single-property-change', but scans back from POS instead of forward. If the value is non-`nil', it is a position less than or equal to POS; it equals POS only if LIMIT equals POS. - - Function: text-property-any START END PROP VALUE &optional OBJECT + - Function: text-property-any start end prop value &optional object This function returns non-`nil' if at least one character between START and END has a property PROP whose value is VALUE. More precisely, it returns the position of the first such character. @@ -924,7 +924,7 @@ different properties. buffer to scan. Positions are relative to OBJECT. The default for OBJECT is the current buffer. - - Function: text-property-not-all START END PROP VALUE &optional OBJECT + - Function: text-property-not-all start end prop value &optional object This function returns non-`nil' if at least one character between START and END has a property PROP whose value differs from VALUE. More precisely, it returns the position of the first such @@ -1019,8 +1019,8 @@ Substituting for a Character Code The following functions replace characters within a specified region based on their character codes. - - Function: subst-char-in-region START END OLD-CHAR NEW-CHAR &optional - NOUNDO + - Function: subst-char-in-region start end old-char new-char &optional + noundo This function replaces all occurrences of the character OLD-CHAR with the character NEW-CHAR in the region of the current buffer defined by START and END. @@ -1028,7 +1028,7 @@ based on their character codes. If NOUNDO is non-`nil', then `subst-char-in-region' does not record the change for undo and does not mark the buffer as modified. This feature is used for controlling selective display - (*note Selective Display::.). + (*note Selective Display::). `subst-char-in-region' does not move point and returns `nil'. @@ -1043,7 +1043,7 @@ based on their character codes. ThXs Xs the contents of the buffer before. ---------- Buffer: foo ---------- - - Function: translate-region START END TABLE + - Function: translate-region start end table This function applies a translation table to the characters in the buffer between positions START and END. The translation table TABLE can be either a string, a vector, or a char-table. @@ -1121,19 +1121,19 @@ otherwise stated. represents a rectangle; its elements are strings, one per line of the rectangle. - - Function: get-register REG + - Function: get-register reg This function returns the contents of the register REG, or `nil' if it has no contents. - - Function: set-register REG VALUE + - Function: set-register reg value This function sets the contents of register REG to VALUE. A register can be set to any value, but the other register functions expect only certain data types. The return value is VALUE. - - Command: view-register REG + - Command: view-register reg This command displays what is contained in register REG. - - Command: insert-register REG &optional BEFOREP + - Command: insert-register reg &optional beforep This command inserts contents of register REG into the current buffer. @@ -1160,8 +1160,8 @@ Transposition of Text This subroutine is used by the transposition commands. - - Function: transpose-regions START1 END1 START2 END2 &optional - LEAVE-MARKERS + - Function: transpose-regions start1 end1 start2 end2 &optional + leave-markers This function exchanges two nonoverlapping portions of the buffer. Arguments START1 and END1 specify the bounds of one portion and arguments START2 and END2 specify the bounds of the other portion. diff --git a/info/lispref.info-31 b/info/lispref.info-31 index fdf8edd..6924c2f 100644 --- a/info/lispref.info-31 +++ b/info/lispref.info-31 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -118,7 +118,7 @@ target digest. MD5 is used heavily by various authentication schemes. Emacs Lisp interface to MD5 consists of a single function `md5': - - Function: md5 OBJECT &optional START END + - Function: md5 object &optional start end This function returns the MD5 message digest of OBJECT, a buffer or string. @@ -146,7 +146,7 @@ binary bodies, and to encode binary characters in message headers. The Lisp interface to base64 consists of four functions: - - Function: base64-encode-region BEG END &optional NO-LINE-BREAK + - Function: base64-encode-region beg end &optional no-line-break This function encodes the region between BEG and END of the current buffer to base64 format. This means that the original region is deleted, and replaced with its base64 equivalent. @@ -169,7 +169,7 @@ binary bodies, and to encode binary characters in message headers. The function can also be used interactively, in which case it works on the currently active region. - - Function: base64-encode-string STRING + - Function: base64-encode-string string This function encodes STRING to base64, and returns the encoded string. @@ -179,7 +179,7 @@ binary bodies, and to encode binary characters in message headers. (base64-encode-string "fubar") => "ZnViYXI=" - - Function: base64-decode-region BEG END + - Function: base64-decode-region beg end This function decodes the region between BEG and END of the current buffer. The region should be in base64 encoding. @@ -190,7 +190,7 @@ binary bodies, and to encode binary characters in message headers. ;; Decode a base64 buffer, and replace it with the decoded version (base64-decode-region (point-min) (point-max)) - - Function: base64-decode-string STRING + - Function: base64-decode-string string This function decodes STRING to base64, and returns the decoded string. STRING should be valid base64-encoded text. @@ -240,7 +240,7 @@ buffer. They are meant for use in programs, but you may call them interactively. If you do so, they prompt for the search string; LIMIT and NOERROR are set to `nil', and REPEAT is set to 1. - - Command: search-forward STRING &optional LIMIT NOERROR REPEAT + - Command: search-forward string &optional limit noerror repeat This function searches forward from point for an exact match for STRING. If successful, it sets point to the end of the occurrence found, and returns the new value of point. If no match is found, @@ -281,12 +281,12 @@ and NOERROR are set to `nil', and REPEAT is set to 1. succeed, the function succeeds, moving point and returning its new value. Otherwise the search fails. - - Command: search-backward STRING &optional LIMIT NOERROR REPEAT + - Command: search-backward string &optional limit noerror repeat This function searches backward from point for STRING. It is just like `search-forward' except that it searches backwards and leaves point at the beginning of the match. - - Command: word-search-forward STRING &optional LIMIT NOERROR REPEAT + - Command: word-search-forward string &optional limit noerror repeat This function searches forward from point for a "word" match for STRING. If it finds a match, it sets point to the end of the match found, and returns the new value of point. @@ -327,7 +327,7 @@ and NOERROR are set to `nil', and REPEAT is set to 1. If REPEAT is non-`nil', then the search is repeated that many times. Point is positioned at the end of the last match. - - Command: word-search-backward STRING &optional LIMIT NOERROR REPEAT + - Command: word-search-backward string &optional limit noerror repeat This function searches backward from point for a word match to STRING. This function is just like `word-search-forward' except that it searches backward and normally leaves point at the @@ -379,7 +379,7 @@ unless a `\' precedes it. For example, `f' is not a special character, so it is ordinary, and therefore `f' is a regular expression that matches the string `f' and -no other string. (It does *not* match the string `ff'.) Likewise, `o' +no other string. (It does _not_ match the string `ff'.) Likewise, `o' is a regular expression that matches only `o'. Any two regular expressions A and B can be concatenated. The result @@ -404,7 +404,7 @@ to use one of the special characters. Here is a list of them: matches one `f' followed by any number of `o's. The case of zero `o's is allowed: `fo*' does match `f'. - `*' always applies to the *smallest* possible preceding + `*' always applies to the _smallest_ possible preceding expression. Thus, `fo*' has a repeating `o', not a repeating `fo'. The matcher processes a `*' construct by matching, immediately, as @@ -493,7 +493,7 @@ to use one of the special characters. Here is a list of them: `[^ ... ]' `[^' begins a "complement character set", which matches any character except the ones specified. Thus, `[^a-z0-9A-Z]' matches - all characters *except* letters and digits. + all characters _except_ letters and digits. `^' is not special in a character set unless it is the first character. The character following the `^' is treated as if it @@ -527,7 +527,7 @@ to use one of the special characters. Here is a list of them: that matches only `[', and so on. Note that `\' also has special meaning in the read syntax of Lisp - strings (*note String Type::.), and must be quoted with `\'. For + strings (*note String Type::), and must be quoted with `\'. For example, the regular expression that matches the `\' character is `\\'. To write a Lisp string that contains the characters `\\', Lisp syntax requires you to quote each `\' with another `\'. @@ -660,7 +660,7 @@ match depends on the context. separate word. `\B' - matches the empty string, but *not* at the beginning or end of a + matches the empty string, but _not_ at the beginning or end of a word. `\<' @@ -675,7 +675,7 @@ exceptions, such as `[]]'), and so is a string that ends with a single `\'. If an invalid regular expression is passed to any of the search functions, an `invalid-regexp' error is signaled. - - Function: regexp-quote STRING + - Function: regexp-quote string This function returns a regular expression string that matches exactly STRING and nothing else. This allows you to request an exact string match when calling a function that wants a regular @@ -760,7 +760,7 @@ incrementally or not. Incremental search commands are described in the (emacs)Regexp Search. Here we describe only the search functions useful in programs. The principal one is `re-search-forward'. - - Command: re-search-forward REGEXP &optional LIMIT NOERROR REPEAT + - Command: re-search-forward regexp &optional limit noerror repeat This function searches forward in the current buffer for a string of text that is matched by the regular expression REGEXP. The function skips over any amount of text that is not matched by @@ -801,7 +801,7 @@ useful in programs. The principal one is `re-search-forward'. comes back" twice. ---------- Buffer: foo ---------- - - Command: re-search-backward REGEXP &optional LIMIT NOERROR REPEAT + - Command: re-search-backward regexp &optional limit noerror repeat This function searches backward in the current buffer for a string of text that is matched by the regular expression REGEXP, leaving point at the beginning of the first text found. @@ -820,7 +820,7 @@ useful in programs. The principal one is `re-search-forward'. feature for matching regexps from end to beginning. It's not worth the trouble of implementing that. - - Function: string-match REGEXP STRING &optional START + - Function: string-match regexp string &optional start This function returns the index of the start of the first match for the regular expression REGEXP in STRING, or `nil' if there is no match. If START is non-`nil', the search starts at that index in @@ -849,7 +849,7 @@ useful in programs. The principal one is `re-search-forward'. (match-end 0) => 32 - - Function: split-string STRING &optional PATTERN + - Function: split-string string &optional pattern This function splits STRING to substrings delimited by PATTERN, and returns a list of substrings. If PATTERN is omitted, it defaults to `[ \f\t\n\r\v]+', which means that it splits STRING by @@ -867,13 +867,13 @@ useful in programs. The principal one is `re-search-forward'. (split-string ":a::b:c" ":") => ("" "a" "" "b" "c") - - Function: split-path PATH + - Function: split-path path This function splits a search path into a list of strings. The path components are separated with the characters specified with `path-separator'. Under Unix, `path-separator' will normally be `:', while under Windows, it will be `;'. - - Function: looking-at REGEXP + - Function: looking-at regexp This function determines whether the text in the current buffer directly following point matches the regular expression REGEXP. "Directly following" means precisely that: the search is @@ -904,7 +904,7 @@ POSIX Regular Expression Searching The usual regular expression functions do backtracking when necessary to handle the `\|' and repetition constructs, but they continue this -only until they find *some* match. Then they succeed and report the +only until they find _some_ match. Then they succeed and report the first match found. This section describes alternative search functions which perform the @@ -917,22 +917,22 @@ functions only when you really need the longest match. In Emacs versions prior to 19.29, these functions did not exist, and the functions described above implemented full POSIX backtracking. - - Function: posix-search-forward REGEXP &optional LIMIT NOERROR REPEAT + - Function: posix-search-forward regexp &optional limit noerror repeat This is like `re-search-forward' except that it performs the full backtracking specified by the POSIX standard for regular expression matching. - - Function: posix-search-backward REGEXP &optional LIMIT NOERROR REPEAT + - Function: posix-search-backward regexp &optional limit noerror repeat This is like `re-search-backward' except that it performs the full backtracking specified by the POSIX standard for regular expression matching. - - Function: posix-looking-at REGEXP + - Function: posix-looking-at regexp This is like `looking-at' except that it performs the full backtracking specified by the POSIX standard for regular expression matching. - - Function: posix-string-match REGEXP STRING &optional START + - Function: posix-string-match regexp string &optional start This is like `string-match' except that it performs the full backtracking specified by the POSIX standard for regular expression matching. @@ -943,8 +943,8 @@ File: lispref.info, Node: Search and Replace, Next: Match Data, Prev: POSIX R Search and Replace ================== - - Function: perform-replace FROM-STRING REPLACEMENTS QUERY-FLAG - REGEXP-FLAG DELIMITED-FLAG &optional REPEAT-COUNT MAP + - Function: perform-replace from-string replacements query-flag + regexp-flag delimited-flag &optional repeat-count map This function is the guts of `query-replace' and related commands. It searches for occurrences of FROM-STRING and replaces some or all of them. If QUERY-FLAG is `nil', it replaces all occurrences; @@ -1075,7 +1075,7 @@ numbered 1, the second 2, and so on. Only regular expressions can have subexpressions--after a simple string search, the only information available is about the entire match. - - Function: match-string COUNT &optional IN-STRING + - Function: match-string count &optional in-string This function returns, as a string, the text matched in the last search or match operation. It returns the entire text if COUNT is zero, or just the portion corresponding to the COUNTth @@ -1090,7 +1090,7 @@ available is about the entire match. make sure that the current buffer when you call `match-string' is the one in which you did the searching or matching. - - Function: match-beginning COUNT + - Function: match-beginning count This function returns the position of the start of text matched by the last regular expression searched for, or a subexpression of it. @@ -1102,7 +1102,7 @@ available is about the entire match. The value is `nil' for a subexpression inside a `\|' alternative that wasn't used in the match. - - Function: match-end COUNT + - Function: match-end count This function is like `match-beginning' except that it returns the position of the end of the match, rather than the position of the beginning. @@ -1164,8 +1164,8 @@ Replacing the Text That Matched This function replaces the text matched by the last search with REPLACEMENT. - - Function: replace-match REPLACEMENT &optional FIXEDCASE LITERAL - STRING + - Function: replace-match replacement &optional fixedcase literal + string This function replaces the text in the buffer (or in STRING) that was matched by the last search. It replaces that text with REPLACEMENT. diff --git a/info/lispref.info-32 b/info/lispref.info-32 index 78abfe7..731b5f1 100644 --- a/info/lispref.info-32 +++ b/info/lispref.info-32 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -85,7 +85,7 @@ entire match data, all at once. # #) - - Function: set-match-data MATCH-LIST + - Function: set-match-data match-list This function sets the match data from the elements of MATCH-LIST, which should be a list that was the value of a previous call to `match-data'. @@ -116,7 +116,7 @@ that shows the problem that arises if you fail to save the match data: You can save and restore the match data with `save-match-data': - - Macro: save-match-data BODY... + - Macro: save-match-data body... This special form executes BODY, saving and restoring the match data around it. @@ -130,8 +130,8 @@ writing code that can run in Emacs 18. Here is how: (set-match-data data))) Emacs automatically saves and restores the match data when it runs -process filter functions (*note Filter Functions::.) and process -sentinels (*note Sentinels::.). +process filter functions (*note Filter Functions::) and process +sentinels (*note Sentinels::).  File: lispref.info, Node: Searching and Case, Next: Standard Regexps, Prev: Match Data, Up: Searching and Matching @@ -190,7 +190,7 @@ used for certain purposes in editing: The default value is `"^\014"' (i.e., `"^^L"' or `"^\C-l"'); this matches a line that starts with a formfeed character. - The following two regular expressions should *not* assume the match + The following two regular expressions should _not_ assume the match always starts at the beginning of a line; they should not use `^' to anchor the match. Most often, the paragraph commands do check for a match only at the beginning of a line, which means that `^' would be @@ -208,7 +208,7 @@ never used. - Variable: paragraph-start This is the regular expression for recognizing the beginning of a - line that starts *or* separates paragraphs. The default value is + line that starts _or_ separates paragraphs. The default value is `"[ \t\n\f]"', which matches a line starting with a space, tab, newline, or form feed (after its left margin). @@ -236,8 +236,8 @@ Syntax Tables character. This information is used by the parsing commands, the complex movement commands, and others to determine where words, symbols, and other syntactic constructs begin and end. The current syntax table -controls the meaning of the word motion functions (*note Word Motion::.) -and the list motion functions (*note List Motion::.) as well as the +controls the meaning of the word motion functions (*note Word Motion::) +and the list motion functions (*note List Motion::) as well as the functions in this chapter. * Menu: @@ -262,12 +262,12 @@ the syntactic use of each character in a buffer. This information is used by the parsing commands, the complex movement commands, and others to determine where words, symbols, and other syntactic constructs begin and end. The current syntax table controls the meaning of the word -motion functions (*note Word Motion::.) and the list motion functions -(*note List Motion::.) as well as the functions in this chapter. +motion functions (*note Word Motion::) and the list motion functions +(*note List Motion::) as well as the functions in this chapter. Under XEmacs 20, a syntax table is a particular subtype of the -primitive char table type (*note Char Tables::.), and each element of -the char table is an integer that encodes the syntax of the character in +primitive char table type (*note Char Tables::), and each element of the +char table is an integer that encodes the syntax of the character in question, or a cons of such an integer and a matching character (for characters with parenthesis syntax). @@ -301,7 +301,7 @@ useful with character sets such as ISO Latin-1 that have additional alphabetic characters in the range 128 to 255. Just changing the standard syntax for these characters affects all major modes. - - Function: syntax-table-p OBJECT + - Function: syntax-table-p object This function returns `t' if OBJECT is a vector of length 256 elements. This means that the vector may be a syntax table. However, according to this test, any vector of length 256 is @@ -488,11 +488,11 @@ characters `1', `2', `3', `4', `b' and `p'. All the flags except `p' are used to describe multi-character comment delimiters. The digit flags indicate that a character can -*also* be part of a comment sequence, in addition to the syntactic +_also_ be part of a comment sequence, in addition to the syntactic properties associated with its character class. The flags are independent of the class and each other for the sake of characters such -as `*' in C mode, which is a punctuation character, *and* the second -character of a start-of-comment sequence (`/*'), *and* the first +as `*' in C mode, which is a punctuation character, _and_ the second +character of a start-of-comment sequence (`/*'), _and_ the first character of an end-of-comment sequence (`*/'). The flags for a character C are: @@ -571,7 +571,7 @@ Syntax Table Functions In this section we describe functions for creating, accessing and altering syntax tables. - - Function: make-syntax-table &optional TABLE + - Function: make-syntax-table &optional table This function creates a new syntax table. Character codes 0 through 31 and 128 through 255 are set up to inherit from the standard syntax table. The other character codes are set up by @@ -579,13 +579,13 @@ altering syntax tables. Most major mode syntax tables are created in this way. - - Function: copy-syntax-table &optional TABLE + - Function: copy-syntax-table &optional table This function constructs a copy of TABLE and returns it. If TABLE is not supplied (or is `nil'), it returns a copy of the current syntax table. Otherwise, an error is signaled if TABLE is not a syntax table. - - Command: modify-syntax-entry CHAR SYNTAX-DESCRIPTOR &optional TABLE + - Command: modify-syntax-entry char syntax-descriptor &optional table This function sets the syntax entry for CHAR according to SYNTAX-DESCRIPTOR. The syntax is changed only for TABLE, which defaults to the current buffer's syntax table, and not in any @@ -624,9 +624,9 @@ altering syntax tables. (modify-syntax-entry ?/ ". 14") => nil - - Function: char-syntax CHARACTER + - Function: char-syntax character This function returns the syntax class of CHARACTER, represented - by its mnemonic designator character. This *only* returns the + by its mnemonic designator character. This _only_ returns the class, not any matching parenthesis or flags. An error is signaled if CHAR is not a character. @@ -648,11 +648,11 @@ altering syntax tables. (char-to-string (char-syntax ?\()) => "(" - - Function: set-syntax-table TABLE &optional BUFFER + - Function: set-syntax-table table &optional buffer This function makes TABLE the syntax table for BUFFER, which defaults to the current buffer if omitted. It returns TABLE. - - Function: syntax-table &optional BUFFER + - Function: syntax-table &optional buffer This function returns the syntax table for BUFFER, which defaults to the current buffer if omitted. @@ -666,14 +666,14 @@ Motion and Syntax certain syntax classes. None of these functions exists in Emacs version 18 or earlier. - - Function: skip-syntax-forward SYNTAXES &optional LIMIT BUFFER + - Function: skip-syntax-forward syntaxes &optional limit buffer This function moves point forward across characters having syntax classes mentioned in SYNTAXES. It stops when it encounters the end of the buffer, or position LIMIT (if specified), or a character it is not supposed to skip. Optional argument BUFFER defaults to the current buffer if omitted. - - Function: skip-syntax-backward SYNTAXES &optional LIMIT BUFFER + - Function: skip-syntax-backward syntaxes &optional limit buffer This function moves point backward across characters whose syntax classes are mentioned in SYNTAXES. It stops when it encounters the beginning of the buffer, or position LIMIT (if specified), or a @@ -681,7 +681,7 @@ version 18 or earlier. defaults to the current buffer if omitted. - - Function: backward-prefix-chars &optional BUFFER + - Function: backward-prefix-chars &optional buffer This function moves point backward over any number of characters with expression prefix syntax. This includes both characters in the expression prefix syntax class, and characters with the `p' @@ -701,8 +701,8 @@ these functions can be used for Lisp expressions when in Lisp mode and for C expressions when in C mode. *Note List Motion::, for convenient higher-level functions for moving over balanced expressions. - - Function: parse-partial-sexp START LIMIT &optional TARGET-DEPTH - STOP-BEFORE STATE STOP-COMMENT BUFFER + - Function: parse-partial-sexp start limit &optional target-depth + stop-before state stop-comment buffer This function parses a sexp in the current buffer starting at START, not scanning past LIMIT. It stops at position LIMIT or when certain criteria described below are met, and sets point to @@ -757,7 +757,7 @@ higher-level functions for moving over balanced expressions. This function is most often used to compute indentation for languages that have nested parentheses. - - Function: scan-lists FROM COUNT DEPTH &optional BUFFER NOERROR + - Function: scan-lists from count depth &optional buffer noerror This function scans forward COUNT balanced parenthetical groupings from character number FROM. It returns the character position where the scan stops. @@ -782,7 +782,7 @@ higher-level functions for moving over balanced expressions. If optional arg NOERROR is non-`nil', `scan-lists' will return `nil' instead of signalling an error. - - Function: scan-sexps FROM COUNT &optional BUFFER NOERROR + - Function: scan-sexps from count &optional buffer noerror This function scans forward COUNT sexps from character position FROM. It returns the character position where the scan stops. @@ -813,7 +813,7 @@ higher-level functions for moving over balanced expressions. You can use `forward-comment' to move forward or backward over one comment or several comments. - - Function: forward-comment COUNT &optional BUFFER + - Function: forward-comment count &optional buffer This function moves point forward across COUNT comments (backward, if COUNT is negative). If it finds anything other than a comment or whitespace, it stops, leaving point at the place where it @@ -860,7 +860,7 @@ Syntax Table Internals of one character: the syntax class, possible matching character, and flags. Lisp programs don't usually work with the elements directly; the Lisp-level syntax table functions usually work with syntax descriptors -(*note Syntax Descriptors::.). +(*note Syntax Descriptors::). The low 8 bits of each element of a syntax table indicate the syntax class. @@ -933,7 +933,7 @@ abbrev table. Normally both are used. An abbrev table is represented as an obarray containing a symbol for each abbreviation. The symbol's name is the abbreviation; its value is the expansion; its function definition is the hook function to do the -expansion (*note Defining Abbrevs::.); its property list cell contains +expansion (*note Defining Abbrevs::); its property list cell contains the use count, the number of times the abbreviation has been expanded. Because these symbols are not interned in the usual obarray, they will never appear as the result of reading a Lisp expression; in fact, @@ -986,11 +986,11 @@ Abbrev Tables This function creates and returns a new, empty abbrev table--an obarray containing no symbols. It is a vector filled with zeros. - - Function: clear-abbrev-table TABLE + - Function: clear-abbrev-table table This function undefines all the abbrevs in abbrev table TABLE, leaving it empty. The function returns `nil'. - - Function: define-abbrev-table TABNAME DEFINITIONS + - Function: define-abbrev-table tabname definitions This function defines TABNAME (a symbol) as an abbrev table name, i.e., as a variable whose value is an abbrev table. It defines abbrevs in the table according to DEFINITIONS, a list of elements @@ -1001,7 +1001,7 @@ Abbrev Tables This is a list of symbols whose values are abbrev tables. `define-abbrev-table' adds the new abbrev table name to this list. - - Function: insert-abbrev-table-description NAME &optional HUMAN + - Function: insert-abbrev-table-description name &optional human This function inserts before point a description of the abbrev table named NAME. The argument NAME is a symbol whose value is an abbrev table. The value is always `nil'. @@ -1021,7 +1021,7 @@ Defining Abbrevs `define-abbrev' is the low-level basic function, while `add-abbrev' is used by commands that ask for information from the user. - - Function: add-abbrev TABLE TYPE ARG + - Function: add-abbrev table type arg This function adds an abbreviation to abbrev table TABLE based on information from the user. The argument TYPE is a string describing in English the kind of abbrev this will be (typically, @@ -1032,7 +1032,7 @@ used by commands that ask for information from the user. abbrev, or `nil' if the user declines to confirm redefining an existing abbrev. - - Function: define-abbrev TABLE NAME EXPANSION HOOK + - Function: define-abbrev table name expansion hook This function defines an abbrev in TABLE named NAME, to expand to EXPANSION, and call HOOK. The return value is an uninterned symbol that represents the abbrev inside XEmacs; its name is NAME. @@ -1063,7 +1063,7 @@ Saving Abbrevs in Files A file of saved abbrev definitions is actually a file of Lisp code. The abbrevs are saved in the form of a Lisp program to define the same abbrev tables with the same contents. Therefore, you can load the file -with `load' (*note How Programs Do Loading::.). However, the function +with `load' (*note How Programs Do Loading::). However, the function `quietly-read-abbrev-file' is provided as a more convenient interface. User-level facilities such as `save-some-buffers' can save abbrevs @@ -1072,7 +1072,7 @@ in a file automatically, under the control of variables described here. - User Option: abbrev-file-name This is the default file name for reading and saving abbrevs. - - Function: quietly-read-abbrev-file FILENAME + - Function: quietly-read-abbrev-file filename This function reads abbrev definitions from a file named FILENAME, previously written with `write-abbrev-file'. If FILENAME is `nil', the file specified in `abbrev-file-name' is used. @@ -1090,7 +1090,7 @@ in a file automatically, under the control of variables described here. abbrevs. This serves as a flag for various XEmacs commands to offer to save your abbrevs. - - Command: write-abbrev-file FILENAME + - Command: write-abbrev-file filename Save all abbrev definitions, in all abbrev tables, in the file FILENAME, in the form of a Lisp program that when loaded will define the same abbrevs. This function returns `nil'. @@ -1106,7 +1106,7 @@ including `self-insert-command'. This section describes the subroutines used in writing such functions, as well as the variables they use for communication. - - Function: abbrev-symbol ABBREV &optional TABLE + - Function: abbrev-symbol abbrev &optional table This function returns the symbol representing the abbrev named ABBREV. The value returned is `nil' if that abbrev is not defined. The optional second argument TABLE is the abbrev table @@ -1114,7 +1114,7 @@ they use for communication. the current buffer's local abbrev table, and second the global abbrev table. - - Function: abbrev-expansion ABBREV &optional TABLE + - Function: abbrev-expansion abbrev &optional table This function returns the string that ABBREV would expand into (as defined by the abbrev tables used for the current buffer). The optional argument TABLE specifies the abbrev table to use, as in @@ -1125,7 +1125,7 @@ they use for communication. does not follow an abbrev, this command does nothing. The command returns `t' if it did expansion, `nil' otherwise. - - Command: abbrev-prefix-mark &optional ARG + - Command: abbrev-prefix-mark &optional arg Mark current point as the beginning of an abbrev. The next call to `expand-abbrev' will use the text from here to point (where it is then) as the abbrev to expand, rather than using the previous word diff --git a/info/lispref.info-33 b/info/lispref.info-33 index a4d32e0..a7cb988 100644 --- a/info/lispref.info-33 +++ b/info/lispref.info-33 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -61,7 +61,7 @@ other properties such as being read-only. Extents can overlap each other. XEmacs efficiently handles buffers with large numbers of extents in them. - - Function: extentp OBJECT + - Function: extentp object This returns `t' if OBJECT is an extent. * Menu: @@ -92,7 +92,7 @@ Extents can freely overlap each other in a buffer or string. Extents are invisible to functions that merely examine the text of a buffer or string. - *Please note:* An alternative way to add properties to a buffer or + _Please note:_ An alternative way to add properties to a buffer or string is to use text properties. *Note Text Properties::. An extent is logically a Lisp object consisting of a start position, @@ -158,30 +158,30 @@ File: lispref.info, Node: Creating and Modifying Extents, Next: Extent Endpoin Creating and Modifying Extents ============================== - - Function: make-extent FROM TO &optional OBJECT + - Function: make-extent from to &optional object This function makes an extent for the range [FROM, TO) in OBJECT (a buffer or string). OBJECT defaults to the current buffer. Insertions at point TO will be outside of the extent; insertions at FROM will be inside the extent, causing the extent to grow - (*note Extent Endpoints::.). This is the same way that markers + (*note Extent Endpoints::). This is the same way that markers behave. The extent is initially detached if both FROM and TO are `nil', and in this case OBJECT defaults to `nil', meaning the - extent is in no buffer or string (*note Detached Extents::.). + extent is in no buffer or string (*note Detached Extents::). - - Function: delete-extent EXTENT + - Function: delete-extent extent This function removes EXTENT from its buffer and destroys it. This does not modify the buffer's text, only its display properties. The extent cannot be used thereafter. To remove an extent in such a way that it can be re-inserted later, use `detach-extent'. *Note Detached Extents::. - - Function: extent-object EXTENT + - Function: extent-object extent This function returns the buffer or string that EXTENT is in. If the return value is `nil', this means that the extent is detached; however, a detached extent will not necessarily return a value of `nil'. - - Function: extent-live-p EXTENT + - Function: extent-live-p extent This function returns `nil' if EXTENT is deleted, and `t' otherwise. @@ -210,10 +210,10 @@ equivalent to `start-open' and `end-open' with the opposite sense. Both endpoints can be equal, in which case the extent includes no characters but still exists in the buffer or string. Zero-length -extents are used to represent annotations (*note Annotations::.) and can +extents are used to represent annotations (*note Annotations::) and can be used as a more powerful form of a marker. Deletion of all the characters in an extent may or may not result in a zero-length extent; -this depends on the `detachable' property (*note Detached Extents::.). +this depends on the `detachable' property (*note Detached Extents::). Insertion at the position of a zero-length extent expands the extent if both endpoints are closed; goes before the extent if it has the `start-open' property; and goes after the extent if it has the @@ -228,20 +228,20 @@ open, the extent remains in the buffer, moving as necessary. position, and then by decreasing end position (this is called the "display order"). - - Function: extent-start-position EXTENT + - Function: extent-start-position extent This function returns the start position of EXTENT. - - Function: extent-end-position EXTENT + - Function: extent-end-position extent This function returns the end position of EXTENT. - - Function: extent-length EXTENT + - Function: extent-length extent This function returns the length of EXTENT in characters. If the extent is detached, this returns `0'. If the extent is not detached, this is equivalent to (- (extent-end-position EXTENT) (extent-start-position EXTENT)) - - Function: set-extent-endpoints EXTENT START END &optional - BUFFER-OR-STRING + - Function: set-extent-endpoints extent start end &optional + buffer-or-string This function sets the start and end position of EXTENT to START and END. If both are `nil', this is equivalent to `detach-extent'. @@ -262,11 +262,11 @@ Finding Extents The following functions provide a simple way of determining the extents in a buffer or string. A number of more sophisticated primitives for mapping over the extents in a range of a buffer or string -are also provided (*note Mapping Over Extents::.). When reading through +are also provided (*note Mapping Over Extents::). When reading through this section, keep in mind the way that extents are ordered (*note -Extent Endpoints::.). +Extent Endpoints::). - - Function: extent-list &optional BUFFER-OR-STRING FROM TO FLAGS + - Function: extent-list &optional buffer-or-string from to flags This function returns a list of the extents in BUFFER-OR-STRING. BUFFER-OR-STRING defaults to the current buffer if omitted. FROM and TO can be used to limit the range over which extents are @@ -287,7 +287,7 @@ functions. To deal with this, functions typically mark their own extents by setting a particular property on them. The following function makes it easier to locate those extents. - - Function: extent-at POS &optional OBJECT PROPERTY BEFORE AT-FLAG + - Function: extent-at pos &optional object property before at-flag This function finds the "smallest" extent (i.e., the last one in the display order) at (i.e., overlapping) POS in OBJECT (a buffer or string) having PROPERTY set. OBJECT defaults to the current @@ -325,12 +325,12 @@ operation, you should probably use `mapcar-extents' or `map-extents', or loop using the BEFORE argument to `extent-at', rather than creating a loop using `next-extent'. - - Function: next-extent EXTENT + - Function: next-extent extent Given an extent EXTENT, this function returns the next extent in the buffer or string's display order. If EXTENT is a buffer or string, this returns the first extent in the buffer or string. - - Function: previous-extent EXTENT + - Function: previous-extent extent Given an extent EXTENT, this function returns the previous extent in the buffer or string's display order. If EXTENT is a buffer or string, this returns the last extent in the buffer or string. @@ -346,10 +346,10 @@ called `map-extents'. You should read through the definition of this function to familiarize yourself with the concepts and optional arguments involved. However, in practice you may find it more convenient to use the function `mapcar-extents' or to create a loop -using the `before' argument to `extent-at' (*note Finding Extents::.). +using the `before' argument to `extent-at' (*note Finding Extents::). - - Function: map-extents FUNCTION &optional OBJECT FROM TO MAPARG FLAGS - PROPERTY VALUE + - Function: map-extents function &optional object from to maparg flags + property value This function maps FUNCTION over the extents which overlap a region in OBJECT. OBJECT is normally a buffer or string but could be an extent (see below). The region is normally bounded by @@ -426,7 +426,7 @@ using the `before' argument to `extent-at' (*note Finding Extents::.). region. `negate-in-region' - The condition specified by a `*-in-region' flag must *not* + The condition specified by a `*-in-region' flag must _not_ hold for the extent to be considered. At most one of `all-extents-closed', `all-extents-open', @@ -445,8 +445,8 @@ using the `before' argument to `extent-at' (*note Finding Extents::.). If you want to map over extents and accumulate a list of results, the following function may be more convenient than `map-extents'. - - Function: mapcar-extents FUNCTION &optional PREDICATE - BUFFER-OR-STRING FROM TO FLAGS PROPERTY VALUE + - Function: mapcar-extents function &optional predicate + buffer-or-string from to flags property value This function applies FUNCTION to all extents which overlap a region in BUFFER-OR-STRING. The region is delimited by FROM and TO. FUNCTION is called with one argument, the extent. A list of @@ -456,8 +456,8 @@ the following function may be more convenient than `map-extents'. VALUE may also be used to control the extents passed to PREDICATE or FUNCTION, and have the same meaning as in `map-extents'. - - Function: map-extent-children FUNCTION &optional OBJECT FROM TO - MAPARG FLAGS PROPERTY VALUE + - Function: map-extent-children function &optional object from to + maparg flags property value This function is similar to `map-extents', but differs in that: * It only visits extents which start in the given region. @@ -470,7 +470,7 @@ the following function may be more convenient than `map-extents'. (defun walk-extents (buffer &optional ignore) (map-extent-children 'walk-extents buffer)) - - Function: extent-in-region-p EXTENT &optional FROM TO FLAGS + - Function: extent-in-region-p extent &optional from to flags This function returns T if `map-extents' would visit EXTENT if called with the given arguments. @@ -497,21 +497,21 @@ from that parent (or from the root ancestor if the parent in turn has a parent), and setting a property of the extent actually sets that property on the parent. *Note Extent Parents::. - - Function: extent-property EXTENT PROPERTY + - Function: extent-property extent property This function returns the value of PROPERTY in EXTENT. If PROPERTY is undefined, `nil' is returned. - - Function: extent-properties EXTENT + - Function: extent-properties extent This function returns a list of all of EXTENT's properties that do not have the value of `nil' (or the default value, for properties with predefined meanings). - - Function: set-extent-property EXTENT PROPERTY VALUE + - Function: set-extent-property extent property value This function sets PROPERTY to VALUE in EXTENT. (If PROPERTY has a predefined meaning, only certain values are allowed, and some values may be converted to others before being stored.) - - Function: set-extent-properties EXTENT PLIST + - Function: set-extent-properties extent plist Change some properties of EXTENT. PLIST is a property list. This is useful to change many extent properties at once. @@ -638,7 +638,7 @@ along with their allowable values. The following convenience functions are provided for accessing particular properties of an extent. - - Function: extent-face EXTENT + - Function: extent-face extent This function returns the `face' property of EXTENT. This might also return a list of face names. Do not modify this list directly! Instead, use `set-extent-face'. @@ -649,7 +649,7 @@ particular properties of an extent. the return value of `extent-face' on the two extents will return the identical list. - - Function: extent-mouse-face EXTENT + - Function: extent-mouse-face extent This function returns the `mouse-face' property of EXTENT. This might also return a list of face names. Do not modify this list directly! Instead, use `set-extent-mouse-face'. @@ -657,26 +657,26 @@ particular properties of an extent. Note that you can use `eq' to compare lists of faces as returned by `extent-mouse-face', just like for `extent-face'. - - Function: extent-priority EXTENT + - Function: extent-priority extent This function returns the `priority' property of EXTENT. - - Function: extent-keymap EXTENT + - Function: extent-keymap extent This function returns the `keymap' property of EXTENT. - - Function: extent-begin-glyph-layout EXTENT + - Function: extent-begin-glyph-layout extent This function returns the `begin-glyph-layout' property of EXTENT, i.e. the layout policy associated with the EXTENT's begin glyph. - - Function: extent-end-glyph-layout EXTENT + - Function: extent-end-glyph-layout extent This function returns the `end-glyph-layout' property of EXTENT, i.e. the layout policy associated with the EXTENT's end glyph. - - Function: extent-begin-glyph EXTENT + - Function: extent-begin-glyph extent This function returns the `begin-glyph' property of EXTENT, i.e. the glyph object displayed at the beginning of EXTENT. If there is none, `nil' is returned. - - Function: extent-end-glyph EXTENT + - Function: extent-end-glyph extent This function returns the `end-glyph' property of EXTENT, i.e. the glyph object displayed at the end of EXTENT. If there is none, `nil' is returned. @@ -684,38 +684,38 @@ particular properties of an extent. The following convenience functions are provided for setting particular properties of an extent. - - Function: set-extent-priority EXTENT PRI + - Function: set-extent-priority extent pri This function sets the `priority' property of EXTENT to PRI. - - Function: set-extent-face EXTENT FACE + - Function: set-extent-face extent face This function sets the `face' property of EXTENT to FACE. - - Function: set-extent-mouse-face EXTENT FACE + - Function: set-extent-mouse-face extent face This function sets the `mouse-face' property of EXTENT to FACE. - - Function: set-extent-keymap EXTENT KEYMAP + - Function: set-extent-keymap extent keymap This function sets the `keymap' property of EXTENT to KEYMAP. KEYMAP must be either a keymap object, or `nil'. - - Function: set-extent-begin-glyph-layout EXTENT LAYOUT + - Function: set-extent-begin-glyph-layout extent layout This function sets the `begin-glyph-layout' property of EXTENT to LAYOUT. - - Function: set-extent-end-glyph-layout EXTENT LAYOUT + - Function: set-extent-end-glyph-layout extent layout This function sets the `end-glyph-layout' property of EXTENT to LAYOUT. - - Function: set-extent-begin-glyph EXTENT BEGIN-GLYPH &optional LAYOUT + - Function: set-extent-begin-glyph extent begin-glyph &optional layout This function sets the `begin-glyph' and `glyph-layout' properties of EXTENT to BEGIN-GLYPH and LAYOUT, respectively. (LAYOUT defaults to `text' if not specified.) - - Function: set-extent-end-glyph EXTENT END-GLYPH &optional LAYOUT + - Function: set-extent-end-glyph extent end-glyph &optional layout This function sets the `end-glyph' and `glyph-layout' properties of EXTENT to END-GLYPH and LAYOUT, respectively. (LAYOUT defaults to `text' if not specified.) - - Function: set-extent-initial-redisplay-function EXTENT FUNCTION + - Function: set-extent-initial-redisplay-function extent function This function sets the `initial-redisplay-function' property of the extent to FUNCTION. @@ -734,21 +734,21 @@ this property is not set, the extent becomes a zero-length extent. (Zero-length extents with the `detachable' property set behave specially. *Note zero-length extents: Extent Endpoints.) - - Function: detach-extent EXTENT + - Function: detach-extent extent This function detaches EXTENT from its buffer or string. If EXTENT has the `duplicable' property, its detachment is tracked by the undo mechanism. *Note Duplicable Extents::. - - Function: extent-detached-p EXTENT + - Function: extent-detached-p extent This function returns `nil' if EXTENT is detached, and `t' otherwise. - - Function: copy-extent EXTENT &optional OBJECT + - Function: copy-extent extent &optional object This function makes a copy of EXTENT. It is initially detached. Optional argument OBJECT defaults to EXTENT's object (normally a buffer or string, but could be `nil'). - - Function: insert-extent EXTENT &optional START END NO-HOOKS OBJECT + - Function: insert-extent extent &optional start end no-hooks object This function inserts EXTENT from START to END in OBJECT (a buffer or string). If EXTENT is detached from a different buffer or string, or in most cases when EXTENT is already attached, the @@ -779,20 +779,20 @@ you cannot create an inheritance loop - this is explicitly disallowed. Parent extents are used to implement the extents over the modeline. - - Function: set-extent-parent EXTENT PARENT + - Function: set-extent-parent extent parent This function sets the parent of EXTENT to PARENT. If PARENT is `nil', the extent is set to have no parent. - - Function: extent-parent EXTENT + - Function: extent-parent extent This function return the parents (if any) of EXTENT, or `nil'. - - Function: extent-children EXTENT + - Function: extent-children extent This function returns a list of the children (if any) of EXTENT. The children of an extent are all those extents whose parent is that extent. This function does not recursively trace children of children. - - Function: extent-descendants EXTENT + - Function: extent-descendants extent This function returns a list of all descendants of EXTENT, including EXTENT. This recursively applies `extent-children' to any children of EXTENT, until no more children can be found. @@ -811,12 +811,12 @@ strings, so that kill, yank, and undo commands will restore or copy it. * When a string is created using `buffer-substring' or `buffer-string', any duplicable extents in the region corresponding to the string will be copied into the string (*note Buffer - Contents::.). When the string in inserted into a buffer using + Contents::). When the string in inserted into a buffer using `insert', `insert-before-markers', `insert-buffer' or `insert-buffer-substring', the extents in the string will be copied - back into the buffer (*note Insertion::.). The extents in a - string can, of course, be retrieved explicitly using the standard - extent primitives over the string. + back into the buffer (*note Insertion::). The extents in a string + can, of course, be retrieved explicitly using the standard extent + primitives over the string. * Similarly, when text is copied or cut into the kill ring, any duplicable extents will be remembered and reinserted later when @@ -874,7 +874,7 @@ highlighted when the mouse passes over it. Highlighting is accomplished by merging the extent's face with the face or faces specified by the `mouse-face' property. The effect is as if a pseudo-extent with the `mouse-face' face were inserted after the extent in the display order -(*note Extent Endpoints::., display order). +(*note Extent Endpoints::, display order). - Variable: mouse-highlight-priority This variable holds the priority to use when merging in the @@ -887,13 +887,13 @@ by merging the extent's face with the face or faces specified by the extent at a time can be highlighted in this fashion, and any other highlighted extent will be de-highlighted. - - Function: highlight-extent EXTENT &optional HIGHLIGHT-P + - Function: highlight-extent extent &optional highlight-p This function highlights (if HIGHLIGHT-P is non-`nil') or de-highlights (if HIGHLIGHT-P is `nil') EXTENT, if EXTENT has the `mouse-face' property. (Nothing happens if EXTENT does not have the `mouse-face' property.) - - Function: force-highlight-extent EXTENT &optional HIGHLIGHT-P + - Function: force-highlight-extent extent &optional highlight-p This function is similar to `highlight-extent' but highlights or de-highlights the extent regardless of whether it has the `mouse-face' property. @@ -931,7 +931,7 @@ and `top-toolbar-height', is actually a specifier object. The specifier object, in turn, is "instanced" in a particular situation to yield the real value of the property in that situation. - - Function: specifierp OBJECT + - Function: specifierp object This function returns non-`nil' if OBJECT is a specifier. * Menu: @@ -941,10 +941,10 @@ yield the real value of the property in that situation. (under user control) in a wide variety of contexts. * Specifiers In-Depth:: Gory details about specifier innards. -* Specifier Instancing:: Instancing means obtaining the "value" of +* Specifier Instancing:: Instancing means obtaining the ``value'' of a specifier in a particular context. * Specifier Types:: Specifiers come in different flavors. -* Adding Specifications:: Specifications control a specifier's "value" +* Adding Specifications:: Specifications control a specifier's ``value'' by giving conditions under which a particular value is valid. * Retrieving Specifications:: Querying a specifier's specifications. @@ -1058,10 +1058,10 @@ instantiable over that device. (A null tag set is perfectly valid.) The valid device types (normally `x', `tty', and `stream') and device classes (normally `color', `grayscale', and `mono') can always be used as tags, and match devices of the associated type or class -(*note Consoles and Devices::.). User-defined tags may be defined, -with an optional predicate specified. An application can create its -own tag, use it to mark all its instantiators, and be fairly confident -that it will not interfere with other applications that modify the same +(*note Consoles and Devices::). User-defined tags may be defined, with +an optional predicate specified. An application can create its own +tag, use it to mark all its instantiators, and be fairly confident that +it will not interfere with other applications that modify the same specifier - Functions that add a specification to a specifier usually only overwrite existing inst-pairs with the same tag set as was given, and a particular tag or tag set can be specified when removing diff --git a/info/lispref.info-34 b/info/lispref.info-34 index bda5825..e47b116 100644 --- a/info/lispref.info-34 +++ b/info/lispref.info-34 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -195,7 +195,7 @@ fonts, colors, and face-boolean specifiers. *Note Glyphs::, for more information about image specifiers. *Note Toolbar::, for more information on toolbar specifiers. - - Function: specifier-type SPECIFIER + - Function: specifier-type specifier This function returns the type of SPECIFIER. The returned value will be a symbol: one of `integer', `boolean', etc., as listed in the above table. @@ -203,32 +203,32 @@ information on toolbar specifiers. Functions are also provided to query whether an object is a particular kind of specifier: - - Function: boolean-specifier-p OBJECT + - Function: boolean-specifier-p object This function returns non-`nil' if OBJECT is a boolean specifier. - - Function: integer-specifier-p OBJECT + - Function: integer-specifier-p object This function returns non-`nil' if OBJECT is an integer specifier. - - Function: natnum-specifier-p OBJECT + - Function: natnum-specifier-p object This function returns non-`nil' if OBJECT is a natnum specifier. - - Function: generic-specifier-p OBJECT + - Function: generic-specifier-p object This function returns non-`nil' if OBJECT is a generic specifier. - - Function: face-boolean-specifier-p OBJECT + - Function: face-boolean-specifier-p object This function returns non-`nil' if OBJECT is a face-boolean specifier. - - Function: toolbar-specifier-p OBJECT + - Function: toolbar-specifier-p object This function returns non-`nil' if OBJECT is a toolbar specifier. - - Function: font-specifier-p OBJECT + - Function: font-specifier-p object This function returns non-`nil' if OBJECT is a font specifier. - - Function: color-specifier-p OBJECT + - Function: color-specifier-p object This function returns non-`nil' if OBJECT is a color specifier. - - Function: image-specifier-p OBJECT + - Function: image-specifier-p object This function returns non-`nil' if OBJECT is an image specifier.  @@ -237,8 +237,8 @@ File: lispref.info, Node: Adding Specifications, Next: Retrieving Specificatio Adding specifications to a Specifier ==================================== - - Function: add-spec-to-specifier SPECIFIER INSTANTIATOR &optional - LOCALE TAG-SET HOW-TO-ADD + - Function: add-spec-to-specifier specifier instantiator &optional + locale tag-set how-to-add This function adds a specification to SPECIFIER. The specification maps from LOCALE (which should be a window, buffer, frame, device, or the symbol `global', and defaults to `global') @@ -290,8 +290,8 @@ Adding specifications to a Specifier locale type with the function `specifier-spec-list' or `specifier-specs'. - - Function: add-spec-list-to-specifier SPECIFIER SPEC-LIST &optional - HOW-TO-ADD + - Function: add-spec-list-to-specifier specifier spec-list &optional + how-to-add This function adds a "spec-list" (a list of specifications) to SPECIFIER. The format of a spec-list is @@ -304,7 +304,7 @@ Adding specifications to a Specifier * TAG-SET := an unordered list of zero or more TAGS, each of which is a symbol - * TAG := a device class (*note Consoles and Devices::.), a + * TAG := a device class (*note Consoles and Devices::), a device type, or a tag defined with `define-specifier-tag' * INSTANTIATOR := format determined by the type of specifier @@ -321,7 +321,7 @@ Adding specifications to a Specifier In many circumstances, the higher-level function `set-specifier' is more convenient and should be used instead. - - Macro: let-specifier SPECIFIER-LIST &rest BODY + - Macro: let-specifier specifier-list &rest body This special form temporarily adds specifications to specifiers, evaluates forms in BODY and restores the specifiers to their previous states. The specifiers and their temporary @@ -355,7 +355,7 @@ Adding specifications to a Specifier (let-specifier ((modeline-shadow-thickness 0 (selected-window))) (sit-for 1)) - - Function: set-specifier SPECIFIER VALUE &optional HOW-TO-ADD + - Function: set-specifier specifier value &optional how-to-add This function adds some specifications to SPECIFIER. VALUE can be a single instantiator or tagged instantiator (added as a global specification), a list of tagged and/or untagged instantiators @@ -382,8 +382,8 @@ Adding specifications to a Specifier functions always work with fully-qualified spec-lists; thus, there is no ambiguity. - - Function: canonicalize-inst-pair INST-PAIR SPECIFIER-TYPE &optional - NOERROR + - Function: canonicalize-inst-pair inst-pair specifier-type &optional + noerror This function canonicalizes the given INST-PAIR. SPECIFIER-TYPE specifies the type of specifier that this SPEC-LIST @@ -397,8 +397,8 @@ Adding specifications to a Specifier If NOERROR is non-`nil', signal an error if the inst-pair is invalid; otherwise return `t'. - - Function: canonicalize-inst-list INST-LIST SPECIFIER-TYPE &optional - NOERROR + - Function: canonicalize-inst-list inst-list specifier-type &optional + noerror This function canonicalizes the given INST-LIST (a list of inst-pairs). @@ -413,7 +413,7 @@ Adding specifications to a Specifier If NOERROR is non-`nil', signal an error if the inst-list is invalid; otherwise return `t'. - - Function: canonicalize-spec SPEC SPECIFIER-TYPE &optional NOERROR + - Function: canonicalize-spec spec specifier-type &optional noerror This function canonicalizes the given SPEC (a specification). SPECIFIER-TYPE specifies the type of specifier that this SPEC-LIST @@ -427,8 +427,8 @@ Adding specifications to a Specifier If NOERROR is `nil', signal an error if the specification is invalid; otherwise return `t'. - - Function: canonicalize-spec-list SPEC-LIST SPECIFIER-TYPE &optional - NOERROR + - Function: canonicalize-spec-list spec-list specifier-type &optional + noerror This function canonicalizes the given SPEC-LIST (a list of specifications). @@ -455,8 +455,8 @@ File: lispref.info, Node: Retrieving Specifications, Next: Specifier Tag Funct Retrieving the Specifications from a Specifier ============================================== - - Function: specifier-spec-list SPECIFIER &optional LOCALE TAG-SET - EXACT-P + - Function: specifier-spec-list specifier &optional locale tag-set + exact-p This function returns the spec-list of specifications for SPECIFIER in LOCALE. @@ -482,7 +482,7 @@ Retrieving the Specifications from a Specifier is non-`nil', however, TAG-SET must be equal to an instantiator's tag set for the instantiator to be returned. - - Function: specifier-specs SPECIFIER &optional LOCALE TAG-SET EXACT-P + - Function: specifier-specs specifier &optional locale tag-set exact-p This function returns the specification(s) for SPECIFIER in LOCALE. If LOCALE is a single locale or is a list of one element @@ -507,7 +507,7 @@ Retrieving the Specifications from a Specifier from there being no instantiators at all. - - Function: specifier-fallback SPECIFIER + - Function: specifier-fallback specifier This function returns the fallback value for SPECIFIER. Fallback values are provided by the C code for certain built-in specifiers to make sure that instancing won't fail even if all specs are @@ -556,25 +556,25 @@ all tags in the tag set attached to that instantiator. Most of the time, a tag set is not specified, and the instantiator gets a null tag set, which matches all devices. - - Function: valid-specifier-tag-p TAG + - Function: valid-specifier-tag-p tag This function returns non-`nil' if TAG is a valid specifier tag. - - Function: valid-specifier-tag-set-p TAG-SET + - Function: valid-specifier-tag-set-p tag-set This function returns non-`nil' if TAG-SET is a valid specifier tag set. - - Function: canonicalize-tag-set TAG-SET + - Function: canonicalize-tag-set tag-set This function canonicalizes the given tag set. Two canonicalized tag sets can be compared with `equal' to see if they represent the same tag set. (Specifically, canonicalizing involves sorting by symbol name and removing duplicates.) - - Function: device-matches-specifier-tag-set-p DEVICE TAG-SET + - Function: device-matches-specifier-tag-set-p device tag-set This function returns non-`nil' if DEVICE matches specifier tag set TAG-SET. This means that DEVICE matches each tag in the tag set. - - Function: define-specifier-tag TAG &optional PREDICATE + - Function: define-specifier-tag tag &optional predicate This function defines a new specifier tag. If PREDICATE is specified, it should be a function of one argument (a device) that specifies whether the tag matches that particular device. If @@ -584,7 +584,7 @@ gets a null tag set, which matches all devices. you cannot redefine the built-in specifier tags (the device types and classes) or the symbols `nil', `t', `all', or `global'. - - Function: device-matching-specifier-tag-list &optional DEVICE + - Function: device-matching-specifier-tag-list &optional device This function returns a list of all specifier tags matching DEVICE. DEVICE defaults to the selected device if omitted. @@ -593,7 +593,7 @@ gets a null tag set, which matches all devices. tags. This includes the built-in ones (the device types and classes). - - Function: specifier-tag-predicate TAG + - Function: specifier-tag-predicate tag This function returns the predicate for the given specifier tag.  @@ -602,8 +602,8 @@ File: lispref.info, Node: Specifier Instancing Functions, Next: Specifier Exam Functions for Instancing a Specifier ==================================== - - Function: specifier-instance SPECIFIER &optional DOMAIN DEFAULT - NO-FALLBACK + - Function: specifier-instance specifier &optional domain default + no-fallback This function instantiates SPECIFIER (return its value) in DOMAIN. If no instance can be generated for this domain, return DEFAULT. @@ -655,8 +655,8 @@ Functions for Instancing a Specifier function), the returned value will be a font-instance object. For images, the returned value will be a string, pixmap, or subwindow. - - Function: specifier-instance-from-inst-list SPECIFIER DOMAIN - INST-LIST &optional DEFAULT + - Function: specifier-instance-from-inst-list specifier domain + inst-list &optional default This function attempts to convert a particular inst-list into an instance. This attempts to instantiate INST-LIST in the given DOMAIN, as if INST-LIST existed in a specification in SPECIFIER. @@ -738,7 +738,7 @@ File: lispref.info, Node: Creating Specifiers, Next: Specifier Validation Func Creating New Specifier Objects ============================== - - Function: make-specifier TYPE + - Function: make-specifier type This function creates a new specifier. A specifier is an object that can be used to keep track of a @@ -763,8 +763,8 @@ Creating New Specifier Objects `font-specifier-p', `image-specifier-p', `face-boolean-specifier-p', and `toolbar-specifier-p'. - - Function: make-specifier-and-init TYPE SPEC-LIST &optional - DONT-CANONICALIZE + - Function: make-specifier-and-init type spec-list &optional + dont-canonicalize This function creates and initialize a new specifier. This is a front-end onto `make-specifier' that allows you to create @@ -783,53 +783,53 @@ File: lispref.info, Node: Specifier Validation Functions, Next: Other Specific Functions for Checking the Validity of Specifier Components =========================================================== - - Function: valid-specifier-domain-p DOMAIN + - Function: valid-specifier-domain-p domain This function returns non-`nil' if DOMAIN is a valid specifier domain. A domain is used to instance a specifier (i.e. determine the specifier's value in that domain). Valid domains are a window, frame, or device. (`nil' is not valid.) - - Function: valid-specifier-locale-p LOCALE + - Function: valid-specifier-locale-p locale This function returns non-`nil' if LOCALE is a valid specifier locale. Valid locales are a device, a frame, a window, a buffer, and `global'. (`nil' is not valid.) - - Function: valid-specifier-locale-type-p LOCALE-TYPE + - Function: valid-specifier-locale-type-p locale-type Given a specifier LOCALE-TYPE, this function returns non-nil if it is valid. Valid locale types are the symbols `global', `device', `frame', `window', and `buffer'. (Note, however, that in functions that accept either a locale or a locale type, `global' is considered an individual locale.) - - Function: valid-specifier-type-p SPECIFIER-TYPE + - Function: valid-specifier-type-p specifier-type Given a SPECIFIER-TYPE, this function returns non-`nil' if it is valid. Valid types are `generic', `integer', `boolean', `color', `font', `image', `face-boolean', and `toolbar'. - - Function: valid-specifier-tag-p TAG + - Function: valid-specifier-tag-p tag This function returns non-`nil' if TAG is a valid specifier tag. - - Function: valid-instantiator-p INSTANTIATOR SPECIFIER-TYPE + - Function: valid-instantiator-p instantiator specifier-type This function returns non-`nil' if INSTANTIATOR is valid for SPECIFIER-TYPE. - - Function: valid-inst-list-p INST-LIST TYPE + - Function: valid-inst-list-p inst-list type This function returns non-`nil' if INST-LIST is valid for specifier type TYPE. - - Function: valid-spec-list-p SPEC-LIST TYPE + - Function: valid-spec-list-p spec-list type This function returns non-`nil' if SPEC-LIST is valid for specifier type TYPE. - - Function: check-valid-instantiator INSTANTIATOR SPECIFIER-TYPE + - Function: check-valid-instantiator instantiator specifier-type This function signals an error if INSTANTIATOR is invalid for SPECIFIER-TYPE. - - Function: check-valid-inst-list INST-LIST TYPE + - Function: check-valid-inst-list inst-list type This function signals an error if INST-LIST is invalid for specifier type TYPE. - - Function: check-valid-spec-list SPEC-LIST TYPE + - Function: check-valid-spec-list spec-list type This function signals an error if SPEC-LIST is invalid for specifier type TYPE. @@ -839,8 +839,8 @@ File: lispref.info, Node: Other Specification Functions, Prev: Specifier Valid Other Functions for Working with Specifications in a Specifier ============================================================== - - Function: copy-specifier SPECIFIER &optional DEST LOCALE TAG-SET - EXACT-P HOW-TO-ADD + - Function: copy-specifier specifier &optional dest locale tag-set + exact-p how-to-add This function copies SPECIFIER to DEST, or creates a new one if DEST is `nil'. @@ -869,7 +869,7 @@ Other Functions for Working with Specifications in a Specifier types are copied will first be completely erased in DEST. Otherwise, it is the same as in `add-spec-to-specifier'. - - Function: remove-specifier SPECIFIER &optional LOCALE TAG-SET EXACT-P + - Function: remove-specifier specifier &optional locale tag-set exact-p This function removes specification(s) for SPECIFIER. If LOCALE is a particular locale (a buffer, window, frame, device, @@ -894,7 +894,7 @@ Other Functions for Working with Specifications in a Specifier is non-`nil', however, TAG-SET must be equal to an instantiator's tag set for the instantiator to be removed. - - Function: map-specifier SPECIFIER FUNC &optional LOCALE MAPARG + - Function: map-specifier specifier func &optional locale maparg This function applies FUNC to the specification(s) for LOCALE in SPECIFIER. @@ -909,7 +909,7 @@ Other Functions for Working with Specifications in a Specifier will stop and the returned value becomes the value returned from `map-specifier'. Otherwise, `map-specifier' returns `nil'. - - Function: specifier-locale-type-from-locale LOCALE + - Function: specifier-locale-type-from-locale locale Given a specifier LOCALE, this function returns its type.  @@ -945,11 +945,11 @@ for more information. The face named `default' is used for ordinary text. The face named `modeline' is used for displaying the modeline. The face named -`highlight' is used for highlighted extents (*note Extents::.). The +`highlight' is used for highlighted extents (*note Extents::). The faces named `left-margin' and `right-margin' are used for the left and -right margin areas, respectively (*note Annotations::.). The face -named `zmacs-region' is used for the highlighted region between point -and mark. +right margin areas, respectively (*note Annotations::). The face named +`zmacs-region' is used for the highlighted region between point and +mark. * Menu: @@ -1019,7 +1019,7 @@ the corresponding property of the `default' face. Here are the basic primitives for working with faces. - - Function: make-face NAME &optional DOC-STRING TEMPORARY + - Function: make-face name &optional doc-string temporary This function defines and returns a new face named NAME, initially with all properties unspecified. It does nothing if there is already a face named NAME. Optional argument DOC-STRING specifies @@ -1029,20 +1029,20 @@ the corresponding property of the `default' face. or Lisp code (otherwise, the face will continue to exist indefinitely even if it is not used). - - Function: face-list &optional TEMPORARY + - Function: face-list &optional temporary This function returns a list of the names of all defined faces. If TEMPORARY is `nil', only the permanent faces are included. If it is `t', only the temporary faces are included. If it is any other non-`nil' value both permanent and temporary are included. - - Function: facep OBJECT + - Function: facep object This function returns whether the given object is a face. - - Function: copy-face OLD-FACE NEW-NAME &optional LOCALE HOW-TO-ADD + - Function: copy-face old-face new-name &optional locale how-to-add This function defines a new face named NEW-NAME which is a copy of the existing face named OLD-FACE. If there is already a face named NEW-NAME, then it alters the face to have the same properties as OLD-FACE. LOCALE and HOW-TO-ADD let you copy just parts of the old face rather than the whole face, and are as in - `copy-specifier' (*note Specifiers::.). + `copy-specifier' (*note Specifiers::). diff --git a/info/lispref.info-35 b/info/lispref.info-35 index 75149c3..6c3b144 100644 --- a/info/lispref.info-35 +++ b/info/lispref.info-35 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -100,8 +100,8 @@ the following functions. specifier, unlike all the other built-in properties, and cannot contain locale-specific values. - - Function: set-face-property FACE PROPERTY VALUE &optional LOCALE TAG - HOW-TO-ADD + - Function: set-face-property face property value &optional locale tag + how-to-add This function changes a property of a FACE. For built-in properties, the actual value of the property is a @@ -159,7 +159,7 @@ the following functions. If the value of the property is not a specifier, it will automatically be converted into a `generic' specifier. - - Function: face-property FACE PROPERTY &optional LOCALE + - Function: face-property face property &optional locale This function returns FACE's value of the given PROPERTY. If LOCALE is omitted, the FACE's actual value for PROPERTY will be @@ -204,8 +204,8 @@ the following functions. `face-property-instance' actually does all this, and is used to determine how to display the face. - - Function: face-property-instance FACE PROPERTY &optional DOMAIN - DEFAULT NO-FALLBACK + - Function: face-property-instance face property &optional domain + default no-fallback This function returns the instance of FACE's PROPERTY in the specified DOMAIN. @@ -254,69 +254,69 @@ File: lispref.info, Node: Face Convenience Functions, Next: Other Face Display Face Convenience Functions -------------------------- - - Function: set-face-foreground FACE COLOR &optional LOCALE TAG - HOW-TO-ADD - - Function: set-face-background FACE COLOR &optional LOCALE TAG - HOW-TO-ADD + - Function: set-face-foreground face color &optional locale tag + how-to-add + - Function: set-face-background face color &optional locale tag + how-to-add These functions set the foreground (respectively, background) color of face FACE to COLOR. The argument COLOR should be a string (the name of a color) or a color object as returned by - `make-color' (*note Colors::.). + `make-color' (*note Colors::). - - Function: set-face-background-pixmap FACE PIXMAP &optional LOCALE - TAG HOW-TO-ADD + - Function: set-face-background-pixmap face pixmap &optional locale + tag how-to-add This function sets the background pixmap of face FACE to PIXMAP. The argument PIXMAP should be a string (the name of a bitmap or pixmap file; the directories listed in the variable `x-bitmap-file-path' will be searched) or a glyph object as - returned by `make-glyph' (*note Glyphs::.). The argument may also + returned by `make-glyph' (*note Glyphs::). The argument may also be a list of the form `(WIDTH HEIGHT DATA)' where WIDTH and HEIGHT are the size in pixels, and DATA is a string, containing the raw bits of the bitmap. - - Function: set-face-font FACE FONT &optional LOCALE TAG HOW-TO-ADD + - Function: set-face-font face font &optional locale tag how-to-add This function sets the font of face FACE. The argument FONT should be a string or a font object as returned by `make-font' - (*note Fonts::.). + (*note Fonts::). - - Function: set-face-underline-p FACE UNDERLINE-P &optional LOCALE TAG - HOW-TO-ADD + - Function: set-face-underline-p face underline-p &optional locale tag + how-to-add This function sets the underline property of face FACE. - - Function: face-foreground FACE &optional LOCALE - - Function: face-background FACE &optional LOCALE + - Function: face-foreground face &optional locale + - Function: face-background face &optional locale These functions return the foreground (respectively, background) color specifier of face FACE. *Note Colors::. - - Function: face-background-pixmap FACE &optional LOCALE + - Function: face-background-pixmap face &optional locale This function return the background-pixmap glyph object of face FACE. - - Function: face-font FACE &optional LOCALE + - Function: face-font face &optional locale This function returns the font specifier of face FACE. (Note: This is not the same as the function `face-font' in FSF Emacs.) *Note Fonts::. - - Function: face-font-name FACE &optional DOMAIN + - Function: face-font-name face &optional domain This function returns the name of the font of face FACE, or `nil' if it is unspecified. This is basically equivalent to `(font-name (face-font FACE) DOMAIN)' except that it does not cause an error if FACE's font is `nil'. (This function is named `face-font' in FSF Emacs.) - - Function: face-underline-p FACE &optional LOCALE + - Function: face-underline-p face &optional locale This function returns the underline property of face FACE. - - Function: face-foreground-instance FACE &optional DOMAIN - - Function: face-background-instance FACE &optional DOMAIN + - Function: face-foreground-instance face &optional domain + - Function: face-background-instance face &optional domain These functions return the foreground (respectively, background) color specifier of face FACE. *Note Colors::. - - Function: face-background-pixmap-instance FACE &optional DOMAIN + - Function: face-background-pixmap-instance face &optional domain This function return the background-pixmap glyph object of face FACE. - - Function: face-font-instance FACE &optional DOMAIN + - Function: face-font-instance face &optional domain This function returns the font specifier of face FACE. *Note Fonts::. @@ -326,17 +326,17 @@ File: lispref.info, Node: Other Face Display Functions, Prev: Face Convenience Other Face Display Functions ---------------------------- - - Function: invert-face FACE &optional LOCALE + - Function: invert-face face &optional locale Swap the foreground and background colors of face FACE. If the face doesn't specify both foreground and background, then its foreground and background are set to the default background and foreground. - - Function: face-equal FACE1 FACE2 &optional DOMAIN + - Function: face-equal face1 face2 &optional domain This returns `t' if the faces FACE1 and FACE2 will display in the same way. DOMAIN is as in `face-property-instance'. - - Function: face-differs-from-default-p FACE &optional DOMAIN + - Function: face-differs-from-default-p face &optional domain This returns `t' if the face FACE displays differently from the default face. DOMAIN is as in `face-property-instance'. @@ -366,7 +366,7 @@ File: lispref.info, Node: Font Specifiers, Next: Font Instances, Up: Fonts Font Specifiers --------------- - - Function: font-specifier-p OBJECT + - Function: font-specifier-p object This predicate returns `t' if OBJECT is a font specifier, and `nil' otherwise. @@ -376,11 +376,11 @@ File: lispref.info, Node: Font Instances, Next: Font Instance Names, Prev: Fo Font Instances -------------- - - Function: font-instance-p OBJECT + - Function: font-instance-p object This predicate returns `t' if OBJECT is a font instance, and `nil' otherwise. - - Function: make-font-instance NAME &optional DEVICE NOERROR + - Function: make-font-instance name &optional device noerror This function creates a new font-instance object of the specified name. DEVICE specifies the device this object applies to and defaults to the selected device. An error is signalled if the @@ -399,15 +399,15 @@ File: lispref.info, Node: Font Instance Names, Next: Font Instance Size, Prev Font Instance Names ------------------- - - Function: list-fonts PATTERN &optional DEVICE + - Function: list-fonts pattern &optional device This function returns a list of font names matching the given pattern. DEVICE specifies which device to search for names, and defaults to the currently selected device. - - Function: font-instance-name FONT-INSTANCE + - Function: font-instance-name font-instance This function returns the name used to allocate FONT-INSTANCE. - - Function: font-instance-truename FONT-INSTANCE + - Function: font-instance-truename font-instance This function returns the canonical name of the given font instance. Font names are patterns which may match any number of fonts, of which the first found is used. This returns an @@ -420,21 +420,21 @@ File: lispref.info, Node: Font Instance Size, Next: Font Instance Characterist Font Instance Size ------------------ - - Function: x-font-size FONT + - Function: x-font-size font This function returns the nominal size of the given font. This is done by parsing its name, so it's likely to lose. X fonts can be specified (by the user) in either pixels or 10ths of points, and this returns the first one it finds, so you have to decide which units the returned value is measured in yourself ... - - Function: x-find-larger-font FONT &optional DEVICE + - Function: x-find-larger-font font &optional device This function loads a new, slightly larger version of the given font (or font name). Returns the font if it succeeds, `nil' otherwise. If scalable fonts are available, this returns a font which is 1 point larger. Otherwise, it returns the next larger version of this font that is defined. - - Function: x-find-smaller-font FONT &optional DEVICE + - Function: x-find-smaller-font font &optional device This function loads a new, slightly smaller version of the given font (or font name). Returns the font if it succeeds, `nil' otherwise. If scalable fonts are available, this returns a font @@ -447,27 +447,27 @@ File: lispref.info, Node: Font Instance Characteristics, Next: Font Convenienc Font Instance Characteristics ----------------------------- - - Function: font-instance-properties FONT + - Function: font-instance-properties font This function returns the properties (an alist or `nil') of FONT-INSTANCE. - - Function: x-make-font-bold FONT &optional DEVICE + - Function: x-make-font-bold font &optional device Given an X font specification, this attempts to make a "bold" font. If it fails, it returns `nil'. - - Function: x-make-font-unbold FONT &optional DEVICE + - Function: x-make-font-unbold font &optional device Given an X font specification, this attempts to make a non-bold font. If it fails, it returns `nil'. - - Function: x-make-font-italic FONT &optional DEVICE + - Function: x-make-font-italic font &optional device Given an X font specification, this attempts to make an "italic" font. If it fails, it returns `nil'. - - Function: x-make-font-unitalic FONT &optional DEVICE + - Function: x-make-font-unitalic font &optional device Given an X font specification, this attempts to make a non-italic font. If it fails, it returns `nil'. - - Function: x-make-font-bold-italic FONT &optional DEVICE + - Function: x-make-font-bold-italic font &optional device Given an X font specification, this attempts to make a "bold-italic" font. If it fails, it returns `nil'. @@ -477,21 +477,21 @@ File: lispref.info, Node: Font Convenience Functions, Prev: Font Instance Char Font Convenience Functions -------------------------- - - Function: font-name FONT &optional DOMAIN + - Function: font-name font &optional domain This function returns the name of the FONT in the specified DOMAIN, if any. FONT should be a font specifier object and DOMAIN is normally a window and defaults to the selected window if omitted. This is equivalent to using `specifier-instance' and applying `font-instance-name' to the result. - - Function: font-truename FONT &optional DOMAIN + - Function: font-truename font &optional domain This function returns the truename of the FONT in the specified DOMAIN, if any. FONT should be a font specifier object and DOMAIN is normally a window and defaults to the selected window if omitted. This is equivalent to using `specifier-instance' and applying `font-instance-truename' to the result. - - Function: font-properties FONT &optional DOMAIN + - Function: font-properties font &optional domain This function returns the properties of the FONT in the specified DOMAIN, if any. FONT should be a font specifier object and DOMAIN is normally a window and defaults to the selected window if @@ -519,7 +519,7 @@ File: lispref.info, Node: Color Specifiers, Next: Color Instances, Up: Colors Color Specifiers ---------------- - - Function: color-specifier-p OBJECT + - Function: color-specifier-p object This function returns non-`nil' if OBJECT is a color specifier.  @@ -539,7 +539,7 @@ specifier is instanced in a particular domain. Functions such as color of the `default' face is displayed in the next window after the selected one. - - Function: color-instance-p OBJECT + - Function: color-instance-p object This function returns non-`nil' if OBJECT is a color-instance.  @@ -548,10 +548,10 @@ File: lispref.info, Node: Color Instance Properties, Next: Color Convenience F Color Instance Properties ------------------------- - - Function: color-instance-name COLOR-INSTANCE + - Function: color-instance-name color-instance This function returns the name used to allocate COLOR-INSTANCE. - - Function: color-instance-rgb-components COLOR-INSTANCE + - Function: color-instance-rgb-components color-instance This function returns a three element list containing the red, green, and blue color components of COLOR-INSTANCE. @@ -565,14 +565,14 @@ File: lispref.info, Node: Color Convenience Functions, Prev: Color Instance Pr Color Convenience Functions --------------------------- - - Function: color-name COLOR &optional DOMAIN + - Function: color-name color &optional domain This function returns the name of the COLOR in the specified DOMAIN, if any. COLOR should be a color specifier object and DOMAIN is normally a window and defaults to the selected window if omitted. This is equivalent to using `specifier-instance' and applying `color-instance-name' to the result. - - Function: color-rgb-components COLOR &optional DOMAIN + - Function: color-rgb-components color &optional domain This function returns the RGB components of the COLOR in the specified DOMAIN, if any. COLOR should be a color specifier object and DOMAIN is normally a window and defaults to the @@ -606,7 +606,7 @@ 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. - - Function: glyphp OBJECT + - Function: glyphp object This function returns `t' if OBJECT is a glyph. * Menu: @@ -640,7 +640,7 @@ File: lispref.info, Node: Creating Glyphs, Next: Glyph Properties, Up: Glyph Creating Glyphs --------------- - - Function: make-glyph &optional SPEC-LIST TYPE + - Function: make-glyph &optional spec-list type This function creates a new glyph object of type TYPE. SPEC-LIST is used to initialize the glyph's image. It is @@ -660,14 +660,14 @@ Creating Glyphs for the mouse-pointer), or `icon' (used for a frame's icon), and defaults to `buffer'. *Note Glyph Types::. - - Function: make-glyph-internal &optional TYPE + - Function: make-glyph-internal &optional type This function creates a new, uninitialized glyph of type TYPE. - - Function: make-pointer-glyph &optional SPEC-LIST + - Function: make-pointer-glyph &optional spec-list This function is equivalent to calling `make-glyph' with a TYPE of `pointer'. - - Function: make-icon-glyph &optional SPEC-LIST + - Function: make-icon-glyph &optional spec-list This function is equivalent to calling `make-glyph' with a TYPE of `icon'. @@ -693,10 +693,10 @@ predefined meanings: Only for glyphs displayed inside of a buffer. `face' - Face of this glyph (*not* a specifier). + Face of this glyph (_not_ a specifier). - - Function: set-glyph-property GLYPH PROPERTY VALUE &optional LOCALE - TAG-SET HOW-TO-ADD + - Function: set-glyph-property glyph property value &optional locale + tag-set how-to-add This function changes a property of a GLYPH. For built-in properties, the actual value of the property is a @@ -754,7 +754,7 @@ predefined meanings: If the value of the property is not a specifier, it will automatically be converted into a `generic' specifier. - - Function: glyph-property GLYPH PROPERTY &optional LOCALE + - Function: glyph-property glyph property &optional locale This function returns GLYPH's value of the given PROPERTY. If LOCALE is omitted, the GLYPH's actual value for PROPERTY will @@ -799,8 +799,8 @@ predefined meanings: `glyph-property-instance' actually does all this, and is used to determine how to display the glyph. - - Function: glyph-property-instance GLYPH PROPERTY &optional DOMAIN - DEFAULT NO-FALLBACK + - Function: glyph-property-instance glyph property &optional domain + default no-fallback This function returns the instance of GLYPH's PROPERTY in the specified DOMAIN. @@ -842,8 +842,8 @@ predefined meanings: Optional arguments DEFAULT and NO-FALLBACK are the same as in `specifier-instance'. *Note Specifiers::. - - Function: remove-glyph-property GLYPH PROPERTY &optional LOCALE - TAG-SET EXACT-P + - Function: 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 `remove-specifier'. *Note remove-specifier-p: Specifiers, for the meaning of the LOCALE, @@ -867,19 +867,19 @@ height, use `glyph-contrib-p-instance', not `glyph-contrib-p'. (The latter will return a boolean specifier or a list of specifications, and you probably aren't concerned with these.) - - Function: glyph-image GLYPH &optional LOCALE + - Function: glyph-image glyph &optional locale This function is equivalent to calling `glyph-property' with a property of `image'. The return value will be an image specifier if LOCALE is `nil' or omitted; otherwise, it will be a specification or list of specifications. - - Function: set-glyph-image GLYPH SPEC &optional LOCALE TAG-SET - HOW-TO-ADD + - Function: set-glyph-image glyph spec &optional locale tag-set + how-to-add This function is equivalent to calling `set-glyph-property' with a property of `image'. - - Function: glyph-image-instance GLYPH &optional DOMAIN DEFAULT - NO-FALLBACK + - Function: glyph-image-instance glyph &optional domain default + no-fallback This function returns the instance of GLYPH's image in the given DOMAIN, and is equivalent to calling `glyph-property-instance' with a property of `image'. The return value will be an image @@ -889,38 +889,38 @@ you probably aren't concerned with these.) window), and an instance object describing how the image appears in that particular window and buffer will be returned. - - Function: glyph-contrib-p GLYPH &optional LOCALE + - Function: glyph-contrib-p glyph &optional locale This function is equivalent to calling `glyph-property' with a property of `contrib-p'. The return value will be a boolean specifier if LOCALE is `nil' or omitted; otherwise, it will be a specification or list of specifications. - - Function: set-glyph-contrib-p GLYPH SPEC &optional LOCALE TAG-SET - HOW-TO-ADD + - Function: set-glyph-contrib-p glyph spec &optional locale tag-set + how-to-add This function is equivalent to calling `set-glyph-property' with a property of `contrib-p'. - - Function: glyph-contrib-p-instance GLYPH &optional DOMAIN DEFAULT - NO-FALLBACK + - Function: glyph-contrib-p-instance glyph &optional domain default + no-fallback This function returns whether the glyph contributes to its line height in the given DOMAIN, and is equivalent to calling `glyph-property-instance' with a property of `contrib-p'. The return value will be either `nil' or `t'. (Normally DOMAIN will be a window or `nil', meaning the selected window.) - - Function: glyph-baseline GLYPH &optional LOCALE + - Function: glyph-baseline glyph &optional locale This function is equivalent to calling `glyph-property' with a property of `baseline'. The return value will be a specifier if LOCALE is `nil' or omitted; otherwise, it will be a specification or list of specifications. - - Function: set-glyph-baseline GLYPH SPEC &optional LOCALE TAG-SET - HOW-TO-ADD + - Function: set-glyph-baseline glyph spec &optional locale tag-set + how-to-add This function is equivalent to calling `set-glyph-property' with a property of `baseline'. - - Function: glyph-baseline-instance GLYPH &optional DOMAIN DEFAULT - NO-FALLBACK + - Function: glyph-baseline-instance glyph &optional domain default + no-fallback This function returns the instance of GLYPH's baseline value in the given DOMAIN, and is equivalent to calling `glyph-property-instance' with a property of `baseline'. The @@ -930,11 +930,11 @@ you probably aren't concerned with these.) window), and an instance object describing the baseline value appears in that particular window and buffer will be returned. - - Function: glyph-face GLYPH + - Function: glyph-face glyph This function returns the face of GLYPH. (Remember, this is not a specifier, but a simple property.) - - Function: set-glyph-face GLYPH FACE + - Function: set-glyph-face glyph face This function changes the face of GLYPH to FACE.  @@ -943,22 +943,22 @@ File: lispref.info, Node: Glyph Dimensions, Prev: Glyph Convenience Functions, Glyph Dimensions ---------------- - - Function: glyph-width GLYPH &optional WINDOW + - Function: glyph-width glyph &optional window This function returns the width of GLYPH on WINDOW. This may not be exact as it does not take into account all of the context that redisplay will. - - Function: glyph-ascent GLYPH &optional WINDOW + - Function: glyph-ascent glyph &optional window This function returns the ascent value of GLYPH on WINDOW. This may not be exact as it does not take into account all of the context that redisplay will. - - Function: glyph-descent GLYPH &optional WINDOW + - Function: glyph-descent glyph &optional window This function returns the descent value of GLYPH on WINDOW. This may not be exact as it does not take into account all of the context that redisplay will. - - Function: glyph-height GLYPH &optional WINDOW + - Function: glyph-height glyph &optional window This function returns the height of GLYPH on 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 diff --git a/info/lispref.info-36 b/info/lispref.info-36 index d389b0b..ff77d12 100644 --- a/info/lispref.info-36 +++ b/info/lispref.info-36 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -56,22 +56,22 @@ Image Specifiers ---------------- An image specifier is used to describe the actual image of a glyph. -It works like other specifiers (*note Specifiers::.), in that it -contains a number of specifications describing how the image should -appear in a variety of circumstances. These specifications are called -"image instantiators". When XEmacs wants to display the image, it -instantiates the image into an "image instance". Image instances are -their own primitive object type (similar to font instances and color -instances), describing how the image appears in a particular domain. -(On the other hand, image instantiators, which are just descriptions of -how the image should appear, are represented using strings or vectors.) - - - Function: image-specifier-p OBJECT +It works like other specifiers (*note Specifiers::), in that it contains +a number of specifications describing how the image should appear in a +variety of circumstances. These specifications are called "image +instantiators". When XEmacs wants to display the image, it instantiates +the image into an "image instance". Image instances are their own +primitive object type (similar to font instances and color instances), +describing how the image appears in a particular domain. (On the other +hand, image instantiators, which are just descriptions of how the image +should appear, are represented using strings or vectors.) + + - Function: image-specifier-p object This function returns non-`nil' if OBJECT is an image specifier. Usually, an image specifier results from calling `glyph-image' on a glyph. - - Function: make-image-specifier SPEC-LIST + - Function: make-image-specifier spec-list This function creates a new image specifier object and initializes it according to SPEC-LIST. It is unlikely that you will ever want to do this, but this function is provided for completeness and for @@ -262,7 +262,7 @@ implies that the file must exist when the instantiator is added to the image, but does not need to exist at any other time (e.g. it may safely be a temporary file). - - Function: valid-image-instantiator-format-p FORMAT + - Function: valid-image-instantiator-format-p format This function returns non-`nil' if FORMAT is a valid image instantiator format. Note that the return value for many formats listed above depends on whether XEmacs was compiled with support @@ -277,7 +277,7 @@ be a temporary file). `(COLOR-NAME FORM-TO-EVALUATE)'. The COLOR-NAME should be a string, which is the name of the color to define; the FORM-TO-EVALUATE should evaluate to a color specifier object, or a - string to be passed to `make-color-instance' (*note Colors::.). If + string to be passed to `make-color-instance' (*note Colors::). If a loaded XPM file references a symbolic color called COLOR-NAME, it will display as the computed color instead. @@ -298,7 +298,7 @@ File: lispref.info, Node: Image Instantiator Conversion, Next: Image Instances Image Instantiator Conversion ----------------------------- - - Function: set-console-type-image-conversion-list CONSOLE-TYPE LIST + - Function: set-console-type-image-conversion-list console-type list This function sets the image-conversion-list for consoles of the given CONSOLE-TYPE. The image-conversion-list specifies how image instantiators that are strings should be interpreted. Each @@ -315,7 +315,7 @@ Image Instantiator Conversion affects newly-added instantiators. Existing instantiators in glyphs and image specifiers will not be affected. - - Function: console-type-image-conversion-list CONSOLE-TYPE + - Function: console-type-image-conversion-list console-type This function returns the image-conversion-list for consoles of the given CONSOLE-TYPE. @@ -333,7 +333,7 @@ instances; use a glyph instead. However, it may occasionally be useful to explicitly create image instances, if you want more control over the instantiation process. - - Function: image-instance-p OBJECT + - Function: image-instance-p object This function returns non-`nil' if OBJECT is an image instance. * Menu: @@ -381,39 +381,39 @@ string, a mono pixmap, a color pixmap, etc. another program to be responsible for drawing into the window. Not currently implemented. - - Function: valid-image-instance-type-p TYPE + - Function: valid-image-instance-type-p type This function returns non-`nil' if TYPE is a valid image instance type. - Function: image-instance-type-list This function returns a list of the valid image instance types. - - Function: image-instance-type IMAGE-INSTANCE + - Function: image-instance-type image-instance This function returns the type of the given image instance. The return value will be one of `nothing', `text', `mono-pixmap', `color-pixmap', `pointer', or `subwindow'. - - Function: text-image-instance-p OBJECT + - Function: text-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `text'. - - Function: mono-pixmap-image-instance-p OBJECT + - Function: mono-pixmap-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `mono-pixmap'. - - Function: color-pixmap-image-instance-p OBJECT + - Function: color-pixmap-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `color-pixmap'. - - Function: pointer-image-instance-p OBJECT + - Function: pointer-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `pointer'. - - Function: subwindow-image-instance-p OBJECT + - Function: subwindow-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `subwindow'. - - Function: nothing-image-instance-p OBJECT + - Function: nothing-image-instance-p object This function returns non-`nil' if OBJECT is an image instance of type `nothing'. @@ -423,12 +423,12 @@ File: lispref.info, Node: Image Instance Functions, Prev: Image Instance Types Image Instance Functions ........................ - - Function: make-image-instance DATA &optional DEVICE DEST-TYPES - NO-ERROR + - Function: make-image-instance data &optional device dest-types + no-error This function creates a new image-instance object. DATA is an image instantiator, which describes the image (*note - Image Specifiers::.). + Image Specifiers::). DEST-TYPES should be a list of allowed image instance types that can be generated. The DEST-TYPES list is unordered. If multiple @@ -454,8 +454,8 @@ Image Instance Functions generated and this function returns NIL. If anything else, a warning message is generated and this function returns NIL. - - Function: colorize-image-instance IMAGE-INSTANCE FOREGROUND - BACKGROUND + - Function: colorize-image-instance image-instance foreground + background This function makes the image instance be displayed in the given colors. Image instances come in two varieties: bitmaps, which are 1 bit deep which are rendered in the prevailing foreground and @@ -465,32 +465,32 @@ Image Instance Functions instance was a pixmap already, nothing is done (and `nil' is returned). Otherwise `t' is returned. - - Function: image-instance-name IMAGE-INSTANCE + - Function: image-instance-name image-instance This function returns the name of the given image instance. - - Function: image-instance-string IMAGE-INSTANCE + - Function: image-instance-string image-instance This function returns the string of the given image instance. This will only be non-`nil' for text image instances. - - Function: image-instance-file-name IMAGE-INSTANCE + - Function: image-instance-file-name image-instance This function returns the file name from which IMAGE-INSTANCE was read, if known. - - Function: image-instance-mask-file-name IMAGE-INSTANCE + - Function: image-instance-mask-file-name image-instance This function returns the file name from which IMAGE-INSTANCE's mask was read, if known. - - Function: image-instance-depth IMAGE-INSTANCE + - Function: image-instance-depth image-instance This function returns the depth of the image instance. This is 0 for a mono pixmap, or a positive integer for a color pixmap. - - Function: image-instance-height IMAGE-INSTANCE + - Function: image-instance-height image-instance This function returns the height of the image instance, in pixels. - - Function: image-instance-width IMAGE-INSTANCE + - Function: image-instance-width image-instance This function returns the width of the image instance, in pixels. - - Function: image-instance-hotspot-x IMAGE-INSTANCE + - Function: image-instance-hotspot-x image-instance This function returns the X coordinate of the image instance's hotspot, if known. This is a point relative to the origin of the pixmap. When an image is used as a mouse pointer, the hotspot is @@ -500,16 +500,16 @@ Image Instance Functions This will always be `nil' for a non-pointer image instance. - - Function: image-instance-hotspot-y IMAGE-INSTANCE + - Function: image-instance-hotspot-y image-instance This function returns the Y coordinate of the image instance's hotspot, if known. - - Function: image-instance-foreground IMAGE-INSTANCE + - Function: image-instance-foreground image-instance This function returns the foreground color of IMAGE-INSTANCE, if applicable. This will be a color instance or `nil'. (It will only be non-`nil' for colorized mono pixmaps and for pointers.) - - Function: image-instance-background IMAGE-INSTANCE + - Function: image-instance-background image-instance This function returns the background color of IMAGE-INSTANCE, if applicable. This will be a color instance or `nil'. (It will only be non-`nil' for colorized mono pixmaps and for pointers.) @@ -540,25 +540,25 @@ glyph's type. iconified. Their image can be instantiated as `mono-pixmap' and `color-pixmap'. - - Function: glyph-type GLYPH + - Function: glyph-type glyph This function returns the type of the given glyph. The return value will be a symbol, one of `buffer', `pointer', or `icon'. - - Function: valid-glyph-type-p GLYPH-TYPE + - Function: valid-glyph-type-p glyph-type Given a GLYPH-TYPE, this function returns non-`nil' if it is valid. - Function: glyph-type-list This function returns a list of valid glyph types. - - Function: buffer-glyph-p OBJECT + - Function: buffer-glyph-p object This function returns non-`nil' if OBJECT is a glyph of type `buffer'. - - Function: icon-glyph-p OBJECT + - Function: icon-glyph-p object This function returns non-`nil' if OBJECT is a glyph of type `icon'. - - Function: pointer-glyph-p OBJECT + - Function: pointer-glyph-p object This function returns non-`nil' if OBJECT is a glyph of type `pointer'. @@ -574,7 +574,7 @@ a glyph is a specifier, it can be controlled on a per-buffer, per-frame, per-window, or per-device basis. You should use `set-glyph-image' to set the following variables, -*not* `setq'. +_not_ `setq'. - Glyph: text-pointer-glyph This variable specifies the shape of the mouse pointer when over @@ -629,7 +629,7 @@ per-frame, per-window, or per-device basis. mouse moves. That function calls `set-frame-pointer', which sets the current mouse pointer for a frame. - - Function: set-frame-pointer FRAME IMAGE-INSTANCE + - Function: set-frame-pointer frame image-instance This function sets the mouse pointer of FRAME to the given pointer image instance. You should not call this function directly. (If you do, the pointer will change again the next time the mouse @@ -676,7 +676,7 @@ Subwindows Subwindows are not currently implemented. - - Function: subwindowp OBJECT + - Function: subwindowp object This function returns non-`nil' if OBJECT is a subwindow.  @@ -690,7 +690,7 @@ text but is displayed next to a particular location in a buffer. Annotations can be displayed intermixed with text, in any whitespace at the beginning or end of a line, or in a special area at the left or right side of the frame called a "margin", whose size is controllable. -Annotations are implemented using extents (*note Extents::.); but you +Annotations are implemented using extents (*note Extents::); but you can work with annotations without knowing how extents work. * Menu: @@ -802,8 +802,8 @@ File: lispref.info, Node: Annotation Primitives, Next: Annotation Properties, Annotation Primitives ===================== - - Function: make-annotation GLYPH &optional POSITION LAYOUT BUFFER - WITH-EVENT D-GLYPH RIGHTP + - Function: make-annotation glyph &optional position layout buffer + with-event d-glyph rightp This function creates a marginal annotation at position POS in BUFFER. The annotation is displayed using GLYPH, which should be a glyph object or a string, and is positioned using layout policy @@ -820,11 +820,11 @@ Annotation Primitives The newly created annotation is returned. - - Function: delete-annotation ANNOTATION + - Function: delete-annotation annotation This function removes ANNOTATION from its buffer. This does not modify the buffer text. - - Function: annotationp ANNOTATION + - Function: annotationp annotation This function returns `t' if ANNOTATION is an annotation, `nil' otherwise. @@ -834,74 +834,74 @@ File: lispref.info, Node: Annotation Properties, Next: Margin Primitives, Pre Annotation Properties ===================== - - Function: annotation-glyph ANNOTATION + - Function: annotation-glyph annotation This function returns the glyph object used to display ANNOTATION. - - Function: set-annotation-glyph ANNOTATION GLYPH &optional LAYOUT SIDE + - Function: set-annotation-glyph annotation glyph &optional layout side This function sets the glyph of ANNOTATION to GLYPH, which should be a glyph object. If LAYOUT is non-`nil', set the layout policy of ANNOTATION to LAYOUT. If SIDE is `left' or `right', change the side of the buffer at which the annotation is displayed to the given side. The new value of `annotation-glyph' is returned. - - Function: annotation-down-glyph ANNOTATION + - Function: annotation-down-glyph annotation This function returns the glyph used to display ANNOTATION when the left mouse button is depressed on the annotation. - - Function: set-annotation-down-glyph ANNOTATION GLYPH + - Function: set-annotation-down-glyph annotation glyph This function returns the glyph used to display ANNOTATION when the left mouse button is depressed on the annotation to GLYPH, which should be a glyph object. - - Function: annotation-face ANNOTATION + - Function: annotation-face annotation This function returns the face associated with ANNOTATION. - - Function: set-annotation-face ANNOTATION FACE + - Function: set-annotation-face annotation face This function sets the face associated with ANNOTATION to FACE. - - Function: annotation-layout ANNOTATION + - Function: annotation-layout annotation This function returns the layout policy of ANNOTATION. - - Function: set-annotation-layout ANNOTATION LAYOUT + - Function: set-annotation-layout annotation layout This function sets the layout policy of ANNOTATION to LAYOUT. - - Function: annotation-side ANNOTATION + - Function: annotation-side annotation This function returns the side of the buffer that ANNOTATION is displayed on. Return value is a symbol, either `left' or `right'. - - Function: annotation-data ANNOTATION + - Function: annotation-data annotation This function returns the data associated with ANNOTATION. - - Function: set-annotation-data ANNOTATION DATA + - Function: set-annotation-data annotation data This function sets the data field of ANNOTATION to DATA. DATA is returned. - - Function: annotation-action ANNOTATION + - Function: annotation-action annotation This function returns the action associated with ANNOTATION. - - Function: set-annotation-action ANNOTATION ACTION + - Function: set-annotation-action annotation action This function sets the action field of ANNOTATION to ACTION. ACTION is returned.. - - Function: annotation-menu ANNOTATION + - Function: annotation-menu annotation This function returns the menu associated with ANNOTATION. - - Function: set-annotation-menu ANNOTATION MENU + - Function: set-annotation-menu annotation menu This function sets the menu associated with ANNOTATION to MENU. This menu will be displayed when the right mouse button is pressed over the annotation. - - Function: annotation-visible ANNOTATION + - Function: annotation-visible annotation This function returns `t' if there is enough available space to display ANNOTATION, `nil' otherwise. - - Function: annotation-width ANNOTATION + - Function: annotation-width annotation This function returns the width of ANNOTATION in pixels. - - Function: hide-annotation ANNOTATION + - Function: hide-annotation annotation This function removes ANNOTATION's glyph, making it invisible. - - Function: reveal-annotation ANNOTATION + - Function: reveal-annotation annotation This function restores ANNOTATION's glyph, making it visible.  @@ -910,16 +910,16 @@ File: lispref.info, Node: Locating Annotations, Next: Annotation Hooks, Prev: Locating Annotations ==================== - - Function: annotations-in-region START END BUFFER + - Function: annotations-in-region start end buffer This function returns a list of all annotations in BUFFER which are between START and END inclusively. - - Function: annotations-at &optional POSITION BUFFER + - Function: annotations-at &optional position buffer This function returns a list of all annotations at POSITION in BUFFER. If POSITION is `nil' point is used. If BUFFER is `nil' the current buffer is used. - - Function: annotation-list &optional BUFFER + - Function: annotation-list &optional buffer This function returns a list of all annotations in BUFFER. If BUFFER is `nil', the current buffer is used. @@ -959,12 +959,12 @@ of specifiers. *Note Specifiers::. to `nil'. This is a specifier variable; use `set-specifier' to change its value. - - Function: window-left-margin-pixel-width &optional WINDOW + - Function: window-left-margin-pixel-width &optional window This function returns the width in pixels of the left outside margin of WINDOW. If WINDOW is `nil', the selected window is assumed. - - Function: window-right-margin-pixel-width &optional WINDOW + - Function: window-right-margin-pixel-width &optional window This function returns the width in pixels of the right outside margin of WINDOW. If WINDOW is `nil', the selected window is assumed. @@ -1028,12 +1028,12 @@ Refreshing the Screen The function `redraw-frame' redisplays the entire contents of a given frame. *Note Frames::. - - Function: redraw-frame FRAME + - Function: redraw-frame frame This function clears and redisplays frame FRAME. Even more powerful is `redraw-display': - - Command: redraw-display &optional DEVICE + - Command: redraw-display &optional device This function redraws all frames on DEVICE marked as having their image garbled. DEVICE defaults to the selected device. If DEVICE is `t', all devices will have their frames checked. @@ -1108,12 +1108,12 @@ Filling::. - User Option: truncate-partial-width-windows This variable controls display of lines that extend beyond the right edge of the window, in side-by-side windows (*note Splitting - Windows::.). If it is non-`nil', these lines are truncated; + Windows::). If it is non-`nil', these lines are truncated; otherwise, `truncate-lines' says what to do with them. The backslash and curved arrow used to indicate truncated or continued lines are only defaults, and can be changed. These images -are actually glyphs (*note Glyphs::.). XEmacs provides a great deal of +are actually glyphs (*note Glyphs::). XEmacs provides a great deal of flexibility in how glyphs can be controlled. (This differs from FSF Emacs, which uses display tables to control these images.) diff --git a/info/lispref.info-37 b/info/lispref.info-37 index 81d60dd..d15f1e0 100644 --- a/info/lispref.info-37 +++ b/info/lispref.info-37 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -65,10 +65,10 @@ The Minibuffer: (emacs)Minibuffer.). Error messages appear in the echo area; see *Note Errors::. You can write output in the echo area by using the Lisp printing -functions with `t' as the stream (*note Output Functions::.), or as +functions with `t' as the stream (*note Output Functions::), or as follows: - - Function: message STRING &rest ARGUMENTS + - Function: message string &rest arguments This function displays a one-line message in the echo area. The argument STRING is similar to a C language `printf' control string. See `format' in *Note String Conversion::, for the details @@ -115,7 +115,7 @@ standard labels are: programs may access these messages, or remove them as appropriate, via the message stack. - - Function: display-message LABEL MESSAGE &optional FRAME STDOUT-P + - Function: display-message label message &optional frame stdout-p This function displays MESSAGE (a string) labeled as LABEL, as described above. @@ -125,7 +125,7 @@ the message stack. (display-message 'command "Mark set") - - Function: lmessage LABEL STRING &rest ARGUMENTS + - Function: lmessage label string &rest arguments This function displays a message STRING with label LABEL. It is similar to `message' in that it accepts a `printf'-like strings and any number of arguments. @@ -139,7 +139,7 @@ the message stack. ;; Display a message that should not be logged. (lmessage 'no-log "Done") - - Function: clear-message &optional LABEL FRAME STDOUT-P NO-RESTORE + - Function: clear-message &optional label frame stdout-p no-restore This function remove any message with the given LABEL from the message-stack, erasing it from the echo area if it's currently displayed there. @@ -166,7 +166,7 @@ the message stack. Unless you need the return value or you need to specify a label, you should just use `(message nil)'. - - Function: current-message &optional FRAME + - Function: current-message &optional frame This function returns the current message in the echo area, or `nil'. The FRAME argument is currently unused. @@ -245,7 +245,7 @@ The recognized warning levels, in increased order of priority, are: `debug', `info', `notice', `warning', `error', `critical', `alert' and `emergency'. - - Function: display-warning CLASS MESSAGE &optional LEVEL + - Function: display-warning class message &optional level This function displays a warning message MESSAGE (a string). CLASS should be a warning class symbol, as described above, or a list of such symbols. LEVEL describes the warning priority level. @@ -270,7 +270,7 @@ The recognized warning levels, in increased order of priority, are: you use the specifier and/or `set-face-*' functions. ---------- Warning buffer ---------- - - Function: lwarn CLASS LEVEL MESSAGE &rest ARGS + - Function: lwarn class level message &rest args This function displays a formatted labeled warning message. As above, CLASS should be the warning class symbol, or a list of such symbols, and LEVEL should specify the warning priority level @@ -325,7 +325,7 @@ property or a property of an overlay. character invisible. This is the default case--if you don't alter the default value of `buffer-invisibility-spec', this is how the `invisibility' property works. This feature is much like selective -display (*note Selective Display::.), but more general and cleaner. +display (*note Selective Display::), but more general and cleaner. More generally, you can use the variable `buffer-invisibility-spec' to control which values of the `invisible' property make text @@ -383,8 +383,7 @@ the screen. a Lisp program. The program controls which lines are hidden by altering the text. Outline mode has traditionally used this variant. It has been partially replaced by the invisible text feature (*note Invisible -Text::.); there is a new version of Outline mode which uses that -instead. +Text::); there is a new version of Outline mode which uses that instead. In the second variant, the choice of lines to hide is made automatically based on indentation. This variant is designed to be a @@ -428,9 +427,9 @@ effect is seen only within XEmacs. not skip the invisible portion, and it is possible (if tricky) to insert or delete text in an invisible portion. - In the examples below, we show the *display appearance* of the + In the examples below, we show the _display appearance_ of the buffer `foo', which changes with the value of `selective-display'. - The *contents* of the buffer do not change. + The _contents_ of the buffer do not change. (setq selective-display nil) => nil @@ -487,7 +486,7 @@ about to be executed. This variable holds the string to display to call attention to a particular line, or `nil' if the arrow feature is not in use. Despite its name, the value of this variable can be either a string - or a glyph (*note Glyphs::.). + or a glyph (*note Glyphs::). - Variable: overlay-arrow-position This variable holds a marker that indicates where to display the @@ -514,7 +513,7 @@ Temporary Displays and then present it to the user for perusal rather than for editing. Many of the help commands use this feature. - - Special Form: with-output-to-temp-buffer BUFFER-NAME FORMS... + - Special Form: with-output-to-temp-buffer buffer-name forms... This function executes FORMS while arranging to insert any output they print into the buffer named BUFFER-NAME. The buffer is then shown in some window for viewing, displayed but not selected. @@ -557,8 +556,8 @@ Many of the help commands use this feature. In Emacs versions 18 and earlier, this variable was called `temp-buffer-show-hook'. - - Function: momentary-string-display STRING POSITION &optional CHAR - MESSAGE + - Function: momentary-string-display string position &optional char + message This function momentarily displays STRING in the current buffer at POSITION. It has no effect on the undo list or on the buffer's modification status. @@ -654,8 +653,7 @@ open parenthesis when the user inserts a close parenthesis. (defun interactive-blink-matching-open () "Indicate momentarily the start of sexp before point." (interactive) - - (let ((blink-matching-paren-distance + (let ((blink-matching-paren-distance (buffer-size)) (blink-matching-paren t)) (blink-matching-open))) @@ -668,7 +666,7 @@ Usual Display Conventions The usual display conventions define how to display each character code. You can override these conventions by setting up a display table -(*note Display Tables::.). Here are the usual display conventions: +(*note Display Tables::). Here are the usual display conventions: * Character codes 32 through 126 map to glyph codes 32 through 126. Normally this means they display as themselves. @@ -758,9 +756,9 @@ used. *Note Truncation::.) The 256 elements correspond to character codes; the Nth element says how to display the character code N. The value should be `nil', a string, a glyph, or a vector of strings and glyphs (*note Character -Descriptors::.). If an element is `nil', it says to display that +Descriptors::). If an element is `nil', it says to display that character according to the usual display conventions (*note Usual -Display::.). +Display::). If you use the display table to change the display of newline characters, the whole buffer will be displayed as one long "line." @@ -826,7 +824,7 @@ a vector `nil' Display according to the standard interpretation (*note Usual - Display::.). + Display::).  File: lispref.info, Node: Beeping, Prev: Display Tables, Up: Display @@ -839,7 +837,7 @@ attract the user's attention. Be conservative about how often you do this; frequent bells can become irritating. Also be careful not to use beeping alone when signaling an error is appropriate. (*Note Errors::.) - - Function: ding &optional DONT-TERMINATE SOUND DEVICE + - Function: ding &optional dont-terminate sound device This function beeps, or flashes the screen (see `visible-bell' below). It also terminates any keyboard macro currently executing unless DONT-TERMINATE is non-`nil'. If SOUND is specified, it @@ -851,7 +849,7 @@ beeping alone when signaling an error is appropriate. (*Note Errors::.) specifies what device to make the sound on, and defaults to the selected device. - - Function: beep &optional DONT-TERMINATE SOUND DEVICE + - Function: beep &optional dont-terminate sound device This is a synonym for `ding'. - User Option: visible-bell @@ -936,21 +934,21 @@ beeping alone when signaling an error is appropriate. (*Note Errors::.) - Command: load-default-sounds This function loads and installs some sound files as beep-types. - - Command: load-sound-file FILENAME SOUND-NAME &optional VOLUME + - Command: load-sound-file filename sound-name &optional volume This function reads in an audio file and adds it to `sound-alist'. The sound file must be in the Sun/NeXT U-LAW format. SOUND-NAME should be a symbol, specifying the name of the sound. If VOLUME is specified, the sound will be played at that volume; otherwise, the value of BELL-VOLUME will be used. - - Function: play-sound SOUND &optional VOLUME DEVICE + - Function: play-sound sound &optional volume device This function plays sound SOUND, which should be a symbol mentioned in `sound-alist'. If VOLUME is specified, it overrides the value (if any) specified in `sound-alist'. DEVICE specifies the device to play the sound on, and defaults to the selected device. - - Command: play-sound-file FILE &optional VOLUME DEVICE + - Command: play-sound-file file &optional volume device This function plays the named sound file at volume VOLUME, which defaults to `bell-volume'. DEVICE specifies the device to play the sound on, and defaults to the selected device. @@ -961,7 +959,7 @@ File: lispref.info, Node: Hash Tables, Next: Range Tables, Prev: Display, Up Hash Tables *********** - - Function: hash-table-p OBJECT + - Function: hash-table-p object This function returns `t' if OBJECT is a hash table, else `nil'. * Menu: @@ -984,7 +982,7 @@ arbitrary Lisp objects called "keys" to other arbitrary Lisp objects called "values". A key/value pair is sometimes called an "entry" in the hash table. There are many ways other than hash tables of implementing the same sort of mapping, e.g. association lists (*note -Association Lists::.) and property lists (*note Property Lists::.), but +Association Lists::) and property lists (*note Property Lists::), but hash tables provide much faster lookup when there are many entries in the mapping. Hash tables are an implementation of the abstract data type "dictionary", also known as "associative array". @@ -1067,33 +1065,33 @@ which specifies the initial hash table contents. remain in the hash table if the value is pointed to by something other than a weak hash table, even if the key is not. - - Function: copy-hash-table HASH-TABLE + - Function: copy-hash-table hash-table This function returns a new hash table which contains the same keys and values as HASH-TABLE. The keys and values will not themselves be copied. - - Function: hash-table-count HASH-TABLE + - Function: hash-table-count hash-table This function returns the number of entries in HASH-TABLE. - - Function: hash-table-test HASH-TABLE + - Function: hash-table-test hash-table This function returns the test function of HASH-TABLE. This can be one of `eq', `eql' or `equal'. - - Function: hash-table-size HASH-TABLE + - Function: hash-table-size hash-table This function returns the current number of slots in HASH-TABLE, whether occupied or not. - - Function: hash-table-rehash-size HASH-TABLE + - Function: hash-table-rehash-size hash-table This function returns the current rehash size of HASH-TABLE. This is a float greater than 1.0; the factor by which HASH-TABLE is enlarged when the rehash threshold is exceeded. - - Function: hash-table-rehash-threshold HASH-TABLE + - Function: hash-table-rehash-threshold hash-table This function returns the current rehash threshold of HASH-TABLE. This is a float between 0.0 and 1.0; the maximum "load factor" of HASH-TABLE, beyond which the HASH-TABLE is enlarged by rehashing. - - Function: hash-table-weakness HASH-TABLE + - Function: hash-table-weakness hash-table This function returns the weakness of HASH-TABLE. This can be one of `nil', `t', `key' or `value'. @@ -1103,23 +1101,23 @@ File: lispref.info, Node: Working With Hash Tables, Next: Weak Hash Tables, P Working With Hash Tables ======================== - - Function: puthash KEY VALUE HASH-TABLE + - Function: puthash key value hash-table This function hashes KEY to VALUE in HASH-TABLE. - - Function: gethash KEY HASH-TABLE &optional DEFAULT + - Function: gethash key hash-table &optional default This function finds the hash value for KEY in HASH-TABLE. If there is no entry for KEY in HASH-TABLE, DEFAULT is returned (which in turn defaults to `nil'). - - Function: remhash KEY HASH-TABLE + - Function: remhash key hash-table This function removes the entry for KEY from HASH-TABLE. Does nothing if there is no entry for KEY in HASH-TABLE. - - Function: clrhash HASH-TABLE + - Function: clrhash hash-table This function removes all entries from HASH-TABLE, leaving it empty. - - Function: maphash FUNCTION HASH-TABLE + - Function: maphash function hash-table This function maps FUNCTION over entries in HASH-TABLE, calling it with two args, each key and value in the hash table. @@ -1187,7 +1185,7 @@ ranges of integers. This maps integers in the range (-3, 2) to `foo' and integers in the range (5, 20) to `bar'. - - Function: range-table-p OBJECT + - Function: range-table-p object Return non-`nil' if OBJECT is a range table. * Menu: @@ -1205,7 +1203,7 @@ Introduction to Range Tables - Function: make-range-table Make a new, empty range table. - - Function: copy-range-table OLD-TABLE + - Function: copy-range-table old-table Make a new range table which contains the same values for the same ranges as the given table. The values will not themselves be copied. @@ -1216,21 +1214,21 @@ File: lispref.info, Node: Working With Range Tables, Prev: Introduction to Ran Working With Range Tables ========================= - - Function: get-range-table POS TABLE &optional DEFAULT + - Function: get-range-table pos table &optional default This function finds value for position POS in TABLE. If there is no corresponding value, return DEFAULT (defaults to `nil'). - - Function: put-range-table START END VAL TABLE + - Function: put-range-table start end val table This function sets the value for range (START, END) to be VAL in TABLE. - - Function: remove-range-table START END TABLE + - Function: remove-range-table start end table This function removes the value for range (START, END) in TABLE. - - Function: clear-range-table TABLE + - Function: clear-range-table table This function flushes TABLE. - - Function: map-range-table FUNCTION TABLE + - Function: map-range-table function table This function maps FUNCTION over entries in TABLE, calling it with three args, the beginning and end of the range and the corresponding value. @@ -1241,7 +1239,7 @@ File: lispref.info, Node: Databases, Next: Processes, Prev: Range Tables, Up Databases ********* - - Function: databasep OBJECT + - Function: databasep object This function returns non-`nil' if OBJECT is a database. * Menu: @@ -1256,7 +1254,7 @@ File: lispref.info, Node: Connecting to a Database, Next: Working With a Datab Connecting to a Database ======================== - - Function: open-database FILE &optional TYPE SUBTYPE ACCESS MODE + - Function: open-database file &optional type subtype access mode This function opens database FILE, using database method TYPE and SUBTYPE, with access rights ACCESS and permissions MODE. ACCESS can be any combination of `r' `w' and `+', for read, write, and @@ -1273,10 +1271,10 @@ Connecting to a Database available: `'hash', `'btree', and `'recno'. See the manpages for the Berkeley DB functions to more information about these types. - - Function: close-database OBJ + - Function: close-database obj This function closes database OBJ. - - Function: database-live-p OBJ + - Function: database-live-p obj This function returns `t' iff OBJ is an active database, else `nil'. diff --git a/info/lispref.info-38 b/info/lispref.info-38 index 2a2a68e..55418af 100644 --- a/info/lispref.info-38 +++ b/info/lispref.info-38 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -55,21 +55,21 @@ File: lispref.info, Node: Working With a Database, Next: Other Database Functi Working With a Database ======================= - - Function: get-database KEY DBASE &optional DEFAULT + - Function: get-database key dbase &optional default This function finds the value for KEY in DATABASE. If there is no corresponding value, DEFAULT is returned (`nil' if DEFAULT is omitted). - - Function: map-database FUNCTION DBASE + - Function: map-database function dbase This function maps FUNCTION over entries in DATABASE, calling it with two args, each key and value in the database. - - Function: put-database KEY VAL DBASE &optional REPLACE + - Function: put-database key val dbase &optional replace This function stores KEY and VAL in DATABASE. If optional fourth arg REPLACE is non-`nil', replace any existing entry in the database. - - Function: remove-database KEY DBASE + - Function: remove-database key dbase This function removes KEY from DATABASE.  @@ -78,17 +78,17 @@ File: lispref.info, Node: Other Database Functions, Prev: Working With a Datab Other Database Functions ======================== - - Function: database-file-name OBJ + - Function: database-file-name obj This function returns the filename associated with the database OBJ. - - Function: database-last-error &optional OBJ + - Function: database-last-error &optional obj This function returns the last error associated with database OBJ. - - Function: database-subtype OBJ + - Function: database-subtype obj This function returns the subtype of database OBJ, if any. - - Function: database-type OBJ + - Function: database-type obj This function returns the type of database OBJ.  @@ -114,7 +114,7 @@ with the subprocess or to control it. For example, you can send signals, obtain status information, receive output from the process, or send input to it. - - Function: processp OBJECT + - Function: processp object This function returns `t' if OBJECT is a process, `nil' otherwise. * Menu: @@ -143,10 +143,10 @@ Functions that Create Subprocesses There are three functions that create a new subprocess in which to run a program. One of them, `start-process', creates an asynchronous -process and returns a process object (*note Asynchronous Processes::.). +process and returns a process object (*note Asynchronous Processes::). The other two, `call-process' and `call-process-region', create a synchronous process and do not return a process object (*note -Synchronous Processes::.). +Synchronous Processes::). Synchronous and asynchronous processes are explained in following sections. Since the three functions are all called in a similar @@ -160,8 +160,7 @@ contains a list of directories to search. Emacs initializes variable `PATH'. The standard file name constructs, `~', `.', and `..', are interpreted as usual in `exec-path', but environment variable substitutions (`$HOME', etc.) are not recognized; use -`substitute-in-file-name' to perform them (*note File Name -Expansion::.). +`substitute-in-file-name' to perform them (*note File Name Expansion::). Each of the subprocess-creating functions has a BUFFER-OR-NAME argument which specifies where the standard output from the program will @@ -182,7 +181,7 @@ program; it may not contain any command-line arguments. You must use ARGS to provide those. The subprocess gets its current directory from the value of -`default-directory' (*note File Name Expansion::.). +`default-directory' (*note File Name Expansion::). The subprocess inherits its environment from XEmacs; but you can specify overrides for it with `process-environment'. *Note System @@ -228,8 +227,8 @@ and quits immediately. *Note Quitting::. The synchronous subprocess functions returned `nil' in version 18. In version 19, they return an indication of how the process terminated. - - Function: call-process PROGRAM &optional INFILE DESTINATION DISPLAY - &rest ARGS + - Function: call-process program &optional infile destination display + &rest args This function calls PROGRAM in a separate process and waits for it to finish. @@ -297,7 +296,7 @@ In version 19, they return an indication of how the process terminated. ---------- Buffer: foo ---------- /usr/user/lewis/manual ---------- Buffer: foo ---------- - + (call-process "grep" nil "bar" nil "lewis" "/etc/passwd") => nil @@ -314,8 +313,8 @@ In version 19, they return an indication of how the process terminated. (concat (file-name-as-directory file) ".") file)) - - Function: call-process-region START END PROGRAM &optional DELETE - DESTINATION DISPLAY &rest ARGS + - Function: call-process-region start end program &optional delete + destination display &rest args This function sends the text between START to END as standard input to a process running PROGRAM. It deletes the text sent if DELETE is non-`nil'; this is useful when BUFFER is `t', to insert @@ -345,7 +344,7 @@ In version 19, they return an indication of how the process terminated. ---------- Buffer: foo ---------- input-!- ---------- Buffer: foo ---------- - + (call-process-region 1 6 "cat" nil t) => nil @@ -403,7 +402,7 @@ run in parallel with Emacs, and the two may communicate with each other using the functions described in following sections. Here we describe how to create an asynchronous process with `start-process'. - - Function: start-process NAME BUFFER-OR-NAME PROGRAM &rest ARGS + - Function: start-process name buffer-or-name program &rest args This function creates a new asynchronous subprocess and starts the program PROGRAM running in it. It returns a process object that stands for the new subprocess in Lisp. The argument NAME @@ -426,7 +425,7 @@ how to create an asynchronous process with `start-process'. (start-process "my-process" "foo" "sleep" "100") => # - + (start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin") => #> @@ -440,8 +439,8 @@ how to create an asynchronous process with `start-process'. Process my-process finished ---------- Buffer: foo ---------- - - Function: start-process-shell-command NAME BUFFER-OR-NAME COMMAND - &rest COMMAND-ARGS + - Function: start-process-shell-command name buffer-or-name command + &rest command-args This function is like `start-process' except that it uses a shell to execute the specified command. The argument COMMAND is a shell command name, and COMMAND-ARGS are the arguments for the shell @@ -470,7 +469,7 @@ how to create an asynchronous process with `start-process'. To determine whether a given subprocess actually got a pipe or a PTY, use the function `process-tty-name' (*note Process - Information::.). + Information::).  File: lispref.info, Node: Deleting Processes, Next: Process Information, Prev: Asynchronous Processes, Up: Processes @@ -496,7 +495,7 @@ deleted automatically, no harm results. `list-processes'. Otherwise, they are deleted immediately after they exit. - - Function: delete-process NAME + - Function: delete-process name This function deletes the process associated with NAME, killing it with a `SIGHUP' signal. The argument NAME may be a process, the name of a process, a buffer, or the name of a buffer. @@ -504,12 +503,12 @@ deleted automatically, no harm results. (delete-process "*shell*") => nil - - Function: process-kill-without-query PROCESS &optional - REQUIRE-QUERY-P + - Function: process-kill-without-query process &optional + require-query-p This function declares that XEmacs need not query the user if PROCESS is still running when XEmacs is exited. The process will be deleted silently. If REQUIRE-QUERY-P is non-`nil', then XEmacs - *will* query the user (this is the default). The return value is + _will_ query the user (this is the default). The return value is `t' if a query was formerly required, and `nil' otherwise. (process-kill-without-query (get-process "shell")) @@ -536,14 +535,14 @@ Process Information (process-list) => (# #) - - Function: get-process NAME + - Function: get-process name This function returns the process named NAME, or `nil' if there is none. An error is signaled if NAME is not a string. (get-process "shell") => # - - Function: process-command PROCESS + - Function: process-command process This function returns the command that was executed to start PROCESS. This is a list of strings, the first string being the program executed and the rest of the strings being the arguments @@ -552,17 +551,17 @@ Process Information (process-command (get-process "shell")) => ("/bin/csh" "-i") - - Function: process-id PROCESS + - Function: process-id process This function returns the PID of PROCESS. This is an integer that distinguishes the process PROCESS from all other processes running on the same computer at the current time. The PID of a process is chosen by the operating system kernel when the process is started and remains constant as long as the process exists. - - Function: process-name PROCESS + - Function: process-name process This function returns the name of PROCESS. - - Function: process-status PROCESS-NAME + - Function: process-status process-name This function returns the status of PROCESS-NAME as a symbol. The argument PROCESS-NAME must be a process, a buffer, a process name (string) or a buffer name (string). @@ -594,10 +593,8 @@ Process Information (process-status "shell") => run - (process-status (get-buffer "*shell*")) => run - x => #> (process-status x) @@ -610,18 +607,18 @@ Process Information In earlier Emacs versions (prior to version 19), the status of a network connection was `run' if open, and `exit' if closed. - - Function: process-kill-without-query-p PROCESS + - Function: process-kill-without-query-p process This function returns whether PROCESS will be killed without querying the user, if it is running when XEmacs is exited. The default value is `nil'. - - Function: process-exit-status PROCESS + - Function: process-exit-status process This function returns the exit status of PROCESS or the signal number that killed it. (Use the result of `process-status' to determine which of those it is.) If PROCESS has not yet terminated, the value is 0. - - Function: process-tty-name PROCESS + - Function: process-tty-name process This function returns the terminal name that PROCESS is using for its communication with Emacs--or `nil' if it is using pipes instead of a terminal (see `process-connection-type' in *Note @@ -643,7 +640,7 @@ PTY. On these systems, Emacs sends an EOF periodically amidst the other characters, to force them through. For most programs, these EOFs do no harm. - - Function: process-send-string PROCESS-NAME STRING + - Function: process-send-string process-name string This function sends PROCESS-NAME the contents of STRING as standard input. The argument PROCESS-NAME must be a process or the name of a process. If it is `nil', the current buffer's @@ -653,7 +650,8 @@ do no harm. (process-send-string "shell<1>" "ls\n") => nil - + + ---------- Buffer: *shell* ---------- ... introduction.texi syntax-tables.texi~ @@ -662,7 +660,7 @@ do no harm. ... ---------- Buffer: *shell* ---------- - - Command: process-send-region PROCESS-NAME START END + - Command: process-send-region process-name start end This function sends the text in the region defined by START and END as standard input to PROCESS-NAME, which is a process or a process name. (If it is `nil', the current buffer's process is @@ -672,7 +670,7 @@ do no harm. markers that indicate positions in the current buffer. (It is unimportant which number is larger.) - - Function: process-send-eof &optional PROCESS-NAME + - Function: process-send-eof &optional process-name This function makes PROCESS-NAME see an end-of-file in its input. The EOF comes after any text already sent to it. @@ -736,7 +734,7 @@ support the distinction in the case of pipes. For the same reason, job-control shells won't work when a pipe is used. See `process-connection-type' in *Note Asynchronous Processes::. - - Function: interrupt-process &optional PROCESS-NAME CURRENT-GROUP + - Function: interrupt-process &optional process-name current-group This function interrupts the process PROCESS-NAME by sending the signal `SIGINT'. Outside of XEmacs, typing the "interrupt character" (normally `C-c' on some systems, and `DEL' on others) @@ -744,17 +742,17 @@ job-control shells won't work when a pipe is used. See you can think of this function as "typing `C-c'" on the terminal by which XEmacs talks to the subprocess. - - Function: kill-process &optional PROCESS-NAME CURRENT-GROUP + - Function: kill-process &optional process-name current-group This function kills the process PROCESS-NAME by sending the signal `SIGKILL'. This signal kills the subprocess immediately, and cannot be handled by the subprocess. - - Function: quit-process &optional PROCESS-NAME CURRENT-GROUP + - Function: quit-process &optional process-name current-group This function sends the signal `SIGQUIT' to the process PROCESS-NAME. This signal is the one sent by the "quit character" (usually `C-b' or `C-\') when you are not inside XEmacs. - - Function: stop-process &optional PROCESS-NAME CURRENT-GROUP + - Function: stop-process &optional process-name current-group This function stops the process PROCESS-NAME by sending the signal `SIGTSTP'. Use `continue-process' to resume its execution. @@ -763,12 +761,12 @@ job-control shells won't work when a pipe is used. See non-`nil', you can think of this function as "typing `C-z'" on the terminal XEmacs uses to communicate with the subprocess. - - Function: continue-process &optional PROCESS-NAME CURRENT-GROUP + - Function: continue-process &optional process-name current-group This function resumes execution of the process PROCESS by sending it the signal `SIGCONT'. This presumes that PROCESS-NAME was stopped previously. - - Function: signal-process PID SIGNAL + - Function: signal-process pid signal This function sends a signal to process PID, which need not be a child of XEmacs. The argument SIGNAL specifies which signal to send; it should be an integer. @@ -807,19 +805,19 @@ normal practice only one process is associated with any given buffer. Many applications of processes also use the buffer for editing input to be sent to the process, but this is not built into XEmacs Lisp. - Unless the process has a filter function (*note Filter Functions::.), + Unless the process has a filter function (*note Filter Functions::), its output is inserted in the associated buffer. The position to insert the output is determined by the `process-mark', which is then updated to point to the end of the text just inserted. Usually, but not always, the `process-mark' is at the end of the buffer. - - Function: process-buffer PROCESS + - Function: process-buffer process This function returns the associated buffer of the process PROCESS. (process-buffer (get-process "shell")) => # - - Function: process-mark PROCESS + - Function: process-mark process This function returns the process marker for PROCESS, which is the marker that says where to insert output from the process. @@ -840,11 +838,11 @@ always, the `process-mark' is at the end of the buffer. transmission to the process, the process marker is useful for distinguishing the new input from previous output. - - Function: set-process-buffer PROCESS BUFFER + - Function: set-process-buffer process buffer This function sets the buffer associated with PROCESS to BUFFER. If BUFFER is `nil', the process becomes associated with no buffer. - - Function: get-buffer-process BUFFER-OR-NAME + - Function: get-buffer-process buffer-or-name This function returns the process associated with BUFFER-OR-NAME. If there are several processes associated with it, then one is chosen. (Presently, the one chosen is the one most recently @@ -855,7 +853,7 @@ always, the `process-mark' is at the end of the buffer. => # Killing the process's buffer deletes the process, which kills the - subprocess with a `SIGHUP' signal (*note Signals to Processes::.). + subprocess with a `SIGHUP' signal (*note Signals to Processes::).  File: lispref.info, Node: Filter Functions, Next: Accepting Output, Prev: Process Buffers, Up: Output from Processes @@ -865,7 +863,7 @@ Process Filter Functions A process "filter function" is a function that receives the standard output from the associated process. If a process has a filter, then -*all* output from that process is passed to the filter. The process +_all_ output from that process is passed to the filter. The process buffer is used directly for output from the process only when there is no filter. @@ -878,9 +876,9 @@ terminal input, or for time to elapse, or for process output). This avoids the timing errors that could result from running filters at random places in the middle of other Lisp programs. You may explicitly cause Emacs to wait, so that filter functions will run, by calling -`sit-for' or `sleep-for' (*note Waiting::.), or `accept-process-output' -(*note Accepting Output::.). Emacs is also waiting when the command -loop is reading input. +`sit-for' or `sleep-for' (*note Waiting::), or `accept-process-output' +(*note Accepting Output::). Emacs is also waiting when the command loop +is reading input. Quitting is normally inhibited within a filter function--otherwise, the effect of typing `C-g' at command level or to quit a user command @@ -909,8 +907,7 @@ Here is how to do these things: (let (moving) (set-buffer (process-buffer proc)) (setq moving (= (point) (process-mark proc))) - - (save-excursion + (save-excursion ;; Insert the text, moving the process-marker. (goto-char (process-mark proc)) (insert string) @@ -946,7 +943,7 @@ insert into a dead buffer, it will get an error. If the buffer is dead, that produces the same output twice in a row may send it as one batch of 200 characters one time, and five batches of 40 characters the next. - - Function: set-process-filter PROCESS FILTER + - Function: set-process-filter process filter This function gives PROCESS the filter function FILTER. If FILTER is `nil', then the process will have no filter. If FILTER is `t', then no output from the process will be accepted until the filter @@ -954,7 +951,7 @@ of 200 characters one time, and five batches of 40 characters the next. but is queued, and will be processed as soon as the filter is changed.) - - Function: process-filter PROCESS + - Function: process-filter process This function returns the filter function of PROCESS, or `nil' if it has none. `t' means that output processing has been stopped. @@ -963,18 +960,14 @@ of 200 characters one time, and five batches of 40 characters the next. (defun keep-output (process output) (setq kept (cons output kept))) => keep-output - (setq kept nil) => nil - (set-process-filter (get-process "shell") 'keep-output) => keep-output - (process-send-string "shell" "ls ~/other\n") => nil kept => ("lewis@slug[8] % " - "FINAL-W87-SHORT.MSS backup.otl kolstad.mss~ address.txt backup.psf kolstad.psf backup.bib~ david.mss resume-Dec-86.mss~ @@ -996,7 +989,7 @@ or terminal input. Occasionally it is useful in a Lisp program to explicitly permit output to arrive at a specific point, or even to wait until output arrives from a process. - - Function: accept-process-output &optional PROCESS SECONDS MILLISEC + - Function: accept-process-output &optional process seconds millisec This function allows XEmacs to read pending output from processes. The output is inserted in the associated buffers or given to their filter functions. If PROCESS is non-`nil' then this @@ -1045,7 +1038,7 @@ input, or for time to elapse, or for process output). This avoids the timing errors that could result from running them at random places in the middle of other Lisp programs. A program can wait, so that sentinels will run, by calling `sit-for' or `sleep-for' (*note -Waiting::.), or `accept-process-output' (*note Accepting Output::.). +Waiting::), or `accept-process-output' (*note Accepting Output::). Emacs is also waiting when the command loop is reading input. Quitting is normally inhibited within a sentinel--otherwise, the @@ -1070,7 +1063,7 @@ or matching had to explicitly save and restore the match data. Now Emacs does this automatically; sentinels never need to do it explicitly. *Note Match Data::. - - Function: set-process-sentinel PROCESS SENTINEL + - Function: set-process-sentinel process sentinel This function associates SENTINEL with PROCESS. If SENTINEL is `nil', then the process will have no sentinel. The default behavior when there is no sentinel is to insert a message in the @@ -1081,12 +1074,11 @@ Emacs does this automatically; sentinels never need to do it explicitly. (format "Process: %s had the event `%s'" process event))) (set-process-sentinel (get-process "shell") 'msg-me) => msg-me - (kill-process (get-process "shell")) -| Process: # had the event `killed' => # - - Function: process-sentinel PROCESS + - Function: process-sentinel process This function returns the sentinel of PROCESS, or `nil' if it has none. @@ -1102,7 +1094,7 @@ File: lispref.info, Node: Process Window Size, Next: Transaction Queues, Prev Process Window Size =================== - - Function: set-process-window-size PROCESS HEIGHT WIDTH + - Function: set-process-window-size process height width This function tells PROCESS that its logical window size is HEIGHT by WIDTH characters. This is principally useful with pty's. @@ -1117,14 +1109,14 @@ with subprocesses using transactions. First use `tq-create' to create a transaction queue communicating with a specified process. Then you can call `tq-enqueue' to send a transaction. - - Function: tq-create PROCESS + - Function: tq-create process This function creates and returns a transaction queue communicating with PROCESS. The argument PROCESS should be a subprocess capable of sending and receiving streams of bytes. It may be a child process, or it may be a TCP connection to a server, possibly on another machine. - - Function: tq-enqueue QUEUE QUESTION REGEXP CLOSURE FN + - Function: tq-enqueue queue question regexp closure fn This function sends a transaction to queue QUEUE. Specifying the queue has the effect of specifying the subprocess to talk to. @@ -1139,7 +1131,7 @@ can call `tq-enqueue' to send a transaction. The return value of `tq-enqueue' itself is not meaningful. - - Function: tq-close QUEUE + - Function: tq-close queue Shut down transaction queue QUEUE, waiting for all pending transactions to complete, and then terminate the connection or child process. @@ -1168,7 +1160,7 @@ function. It always returns either `open' or `closed' for a network connection, and it never returns either of those values for a real subprocess. *Note Process Information::. - - Function: open-network-stream NAME BUFFER-OR-NAME HOST SERVICE + - Function: open-network-stream name buffer-or-name host service This function opens a TCP connection for a service to a host. It returns a process object to represent the connection. diff --git a/info/lispref.info-39 b/info/lispref.info-39 index 0227dd0..b4f7bd5 100644 --- a/info/lispref.info-39 +++ b/info/lispref.info-39 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -199,7 +199,7 @@ file instead of yours. *Note Entering XEmacs: (xemacs)Entering XEmacs. A site may have a "default init file", which is the library named `default.el'. XEmacs finds the `default.el' file through the standard -search path for libraries (*note How Programs Do Loading::.). The +search path for libraries (*note How Programs Do Loading::). The XEmacs distribution does not come with this file; sites may provide one for local customizations. If the default init file exists, it is loaded whenever you start Emacs, except in batch mode or if `-q' is @@ -208,7 +208,7 @@ it sets `inhibit-default-init' to a non-`nil' value, then XEmacs does not subsequently load the `default.el' file. Another file for site-customization is `site-start.el'. Emacs loads -this *before* the user's init file. You can inhibit the loading of +this _before_ the user's init file. You can inhibit the loading of this file with the option `-no-site-file'. - Variable: site-run-file @@ -217,8 +217,8 @@ this file with the option `-no-site-file'. If there is a great deal of code in your `.emacs' file, you should move it into another file named `SOMETHING.el', byte-compile it (*note -Byte Compilation::.), and make your `.emacs' file load the other file -using `load' (*note Loading::.). +Byte Compilation::), and make your `.emacs' file load the other file +using `load' (*note Loading::). *Note Init File Examples: (xemacs)Init File Examples, for examples of how to make various commonly desired customizations in your `.emacs' @@ -415,7 +415,7 @@ Killing XEmacs parent process normally resumes control. The low-level primitive for killing XEmacs is `kill-emacs'. - - Function: kill-emacs &optional EXIT-DATA + - Function: kill-emacs &optional exit-data This function exits the XEmacs process and kills it. If EXIT-DATA is an integer, then it is used as the exit status of @@ -469,7 +469,7 @@ case you can give input to some other job such as a shell merely by moving to a different window. Therefore, suspending is not allowed when XEmacs is an X client. - - Function: suspend-emacs STRING + - Function: suspend-emacs string This function stops XEmacs and returns control to the superior process. If and when the superior process resumes XEmacs, `suspend-emacs' returns `nil' to its caller in Lisp. @@ -490,14 +490,14 @@ when XEmacs is an X client. The next redisplay after resumption will redraw the entire screen, unless the variable `no-redraw-on-reenter' is non-`nil' (*note - Refresh Screen::.). + Refresh Screen::). In the following example, note that `pwd' is not echoed after XEmacs is suspended. But it is read and executed by the shell. (suspend-emacs) => nil - + (add-hook 'suspend-hook (function (lambda () (or (y-or-n-p @@ -506,22 +506,19 @@ when XEmacs is an X client. => (lambda nil (or (y-or-n-p "Really suspend? ") (error "Suspend cancelled"))) - (add-hook 'suspend-resume-hook (function (lambda () (message "Resumed!")))) => (lambda nil (message "Resumed!")) - (suspend-emacs "pwd") => nil - ---------- Buffer: Minibuffer ---------- Really suspend? y ---------- Buffer: Minibuffer ---------- - + ---------- Parent Shell ---------- lewis@slug[23] % /user/lewis/manual lewis@slug[24] % fg - + ---------- Echo Area ---------- Resumed! @@ -611,7 +608,7 @@ name of the system, the user's UID, and so on. fact, the function returns whatever value the variable `system-name' currently holds. Thus, you can set the variable `system-name' in case Emacs is confused about the name of your system. The variable is also -useful for constructing frame titles (*note Frame Titles::.). +useful for constructing frame titles (*note Frame Titles::). - Variable: mail-host-address If this variable is non-`nil', it is used instead of `system-name' @@ -621,7 +618,7 @@ useful for constructing frame titles (*note Frame Titles::.). starts up, the value actually used is the one saved when XEmacs was dumped. *Note Building XEmacs::.) - - Function: getenv VAR + - Function: getenv var This function returns the value of the environment variable VAR, as a string. Within XEmacs, the environment variable values are kept in the Lisp variable `process-environment'. @@ -636,7 +633,7 @@ useful for constructing frame titles (*note Frame Titles::.). SHELL=/bin/csh HOME=/user/lewis - - Command: setenv VARIABLE VALUE + - Command: setenv variable value This command sets the value of the environment variable named VARIABLE to VALUE. Both arguments should be strings. This function works by modifying `process-environment'; binding that @@ -651,8 +648,7 @@ useful for constructing frame titles (*note Frame Titles::.). => ("l=/usr/stanford/lib/gnuemacs/lisp" "PATH=.:/user/lewis/bin:/usr/class:/nfsusr/local/bin" "USER=lewis" - - "TERM=ibmapa16" + "TERM=ibmapa16" "SHELL=/bin/csh" "HOME=/user/lewis") @@ -679,7 +675,7 @@ useful for constructing frame titles (*note Frame Titles::.). locations, but can find them in a directory related somehow to the one containing the Emacs executable. - - Function: load-average &optional USE-FLOATS + - Function: load-average &optional use-floats This function returns a list of the current 1-minute, 5-minute and 15-minute load averages. The values are integers that are 100 times the system load averages. (The load averages indicate the @@ -708,7 +704,7 @@ useful for constructing frame titles (*note Frame Titles::.). - Function: emacs-pid This function returns the process ID of the Emacs process. - - Function: setprv PRIVILEGE-NAME &optional SETP GETPRV + - Function: setprv privilege-name &optional setp getprv This function sets or resets a VMS privilege. (It does not exist on Unix.) The first arg is the privilege name, as a string. The second argument, SETP, is `t' or `nil', indicating whether the @@ -731,7 +727,7 @@ User Identification usually right, but users often set this themselves when the default value is not right. - - Function: user-login-name &optional UID + - Function: user-login-name &optional uid If you don't specify UID, this function returns the name under which the user is logged in. If the environment variable `LOGNAME' is set, that value is used. Otherwise, if the environment variable @@ -755,7 +751,7 @@ User Identification variable. You can change the value of this variable to alter the result of the `user-full-name' function. - - Function: user-full-name &optional USER + - Function: user-full-name &optional user This function returns the full name of USER. If USER is `nil', it defaults to the user running this Emacs. In that case, the value of `user-full-name' variable, if non-`nil', will be used. @@ -776,7 +772,7 @@ User Identification return the same values that the variables hold. These variables allow you to "fake out" Emacs by telling the functions what to return. The variables are also useful for constructing frame titles (*note Frame -Titles::.). +Titles::). - Function: user-real-uid This function returns the real UID of the user. @@ -819,7 +815,7 @@ Time of Day This section explains how to determine the current time and the time zone. - - Function: current-time-string &optional TIME-VALUE + - Function: current-time-string &optional time-value This function returns the current time and date as a humanly-readable string. The format of the string is unvarying; the number of characters used for each part is always the same, so @@ -832,7 +828,7 @@ zone. instead of the current time. The argument should be a list whose first two elements are integers. Thus, you can use times obtained from `current-time' (see below) and from `file-attributes' (*note - File Attributes::.). + File Attributes::). (current-time-string) => "Wed Oct 14 22:21:05 1987" @@ -851,7 +847,7 @@ zone. as you get with the function `file-attributes'. *Note File Attributes::. - - Function: current-time-zone &optional TIME-VALUE + - Function: current-time-zone &optional time-value This function returns a list describing the time zone that the user is in. @@ -871,7 +867,7 @@ zone. instead of the current time. The argument should be a cons cell containing two integers, or a list whose first two elements are integers. Thus, you can use times obtained from `current-time' - (see above) and from `file-attributes' (*note File Attributes::.). + (see above) and from `file-attributes' (*note File Attributes::).  File: lispref.info, Node: Time Conversion, Next: Timers, Prev: Time of Day, Up: System Interface @@ -882,10 +878,10 @@ Time Conversion These functions convert time values (lists of two or three integers) to strings or to calendrical information. There is also a function to convert calendrical information to a time value. You can get time -values from the functions `current-time' (*note Time of Day::.) and -`file-attributes' (*note File Attributes::.). +values from the functions `current-time' (*note Time of Day::) and +`file-attributes' (*note File Attributes::). - - Function: format-time-string FORMAT-STRING &optional TIME + - Function: format-time-string format-string &optional time This function converts TIME to a string according to FORMAT-STRING. If TIME is omitted, it defaults to the current time. The argument FORMAT-STRING may contain `%'-sequences which @@ -994,7 +990,7 @@ values from the functions `current-time' (*note Time of Day::.) and `%Z' This stands for the time zone abbreviation. - - Function: decode-time TIME + - Function: decode-time time This function converts a time value into calendrical information. The return value is a list of nine elements, as follows: @@ -1035,8 +1031,8 @@ values from the functions `current-time' (*note Time of Day::.) and Note that Common Lisp has different meanings for DOW and ZONE. - - Function: encode-time SECONDS MINUTES HOUR DAY MONTH YEAR &optional - ZONE + - Function: encode-time seconds minutes hour day month year &optional + zone This function is the inverse of `decode-time'. It converts seven items of calendrical data into a time value. For the meanings of the arguments, see the table above under `decode-time'. @@ -1059,7 +1055,7 @@ Timers for Delayed Execution You can set up a timer to call a function at a specified future time. - - Function: add-timeout SECS FUNCTION OBJECT &optional RESIGNAL + - Function: add-timeout secs function object &optional resignal This function adds a timeout, to be signaled after the timeout period has elapsed. SECS is a number of seconds, expressed as an integer or a float. FUNCTION will be called after that many @@ -1091,7 +1087,7 @@ Timers for Delayed Execution (NOTE: In FSF Emacs, this function is called `run-at-time' and has different semantics.) - - Function: disable-timeout ID + - Function: disable-timeout id Cancel the requested action for ID, which should be a value previously returned by `add-timeout'. This cancels the effect of that call to `add-timeout'; the arrival of the specified time will @@ -1121,7 +1117,7 @@ File: lispref.info, Node: Input Modes, Next: Translating Input, Up: Terminal Input Modes ----------- - - Function: set-input-mode INTERRUPT FLOW META QUIT-CHAR + - Function: set-input-mode interrupt flow meta quit-char This function sets the mode for reading keyboard input. If INTERRUPT is non-null, then XEmacs uses input interrupts. If it is `nil', then it uses CBREAK mode. When XEmacs communicates @@ -1189,7 +1185,7 @@ other input events before they become part of key sequences. events. If `function-key-map' "binds" a key sequence K to a vector V, then - when K appears as a subsequence *anywhere* in a key sequence, it + when K appears as a subsequence _anywhere_ in a key sequence, it is replaced with the events in V. For example, VT100 terminals send ` O P' when the keypad PF1 @@ -1274,7 +1270,7 @@ File: lispref.info, Node: Recording Input, Prev: Translating Input, Up: Termi Recording Input --------------- - - Function: recent-keys &optional NUMBER + - Function: recent-keys &optional number This function returns a vector containing recent input events from the keyboard or mouse. By default, 100 events are recorded, which is how many `recent-keys' returns. @@ -1294,7 +1290,7 @@ Recording Input internally. This is also the maximum number of events `recent-keys' can return. By default, 100 events are stored. - - Function: set-recent-keys-ring-size SIZE + - Function: set-recent-keys-ring-size size This function changes the number of events stored by XEmacs and returned by `recent-keys'. @@ -1302,7 +1298,7 @@ Recording Input remember last 250 events and will make `recent-keys' return last 250 events by default. - - Command: open-dribble-file FILENAME + - Command: open-dribble-file filename This function opens a "dribble file" named FILENAME. When a dribble file is open, each input event from the keyboard or mouse (but not those from keyboard macros) is written in that file. A @@ -1318,5 +1314,5 @@ Recording Input (open-dribble-file "~/dribble") => nil - See also the `open-termscript' function (*note Terminal Output::.). + See also the `open-termscript' function (*note Terminal Output::). diff --git a/info/lispref.info-4 b/info/lispref.info-4 index 096f2d3..96b4bfd 100644 --- a/info/lispref.info-4 +++ b/info/lispref.info-4 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -445,10 +445,10 @@ with references to further information. The most general way to check the type of an object is to call the function `type-of'. Recall that each object belongs to one and only one primitive type; `type-of' tells you which one (*note Lisp Data -Types::.). But `type-of' knows nothing about non-primitive types. In +Types::). But `type-of' knows nothing about non-primitive types. In most cases, it is more convenient to use type predicates than `type-of'. - - Function: type-of OBJECT + - Function: type-of object This function returns a symbol naming the primitive type of OBJECT. The value is one of `bit-vector', `buffer', `char-table', `character', `charset', `coding-system', `cons', `color-instance', @@ -480,7 +480,7 @@ objects. Other functions test equality between objects of specific types, e.g., strings. For these predicates, see the appropriate chapter describing the data type. - - Function: eq OBJECT1 OBJECT2 + - Function: eq object1 object2 This function returns `t' if OBJECT1 and OBJECT2 are the same object, `nil' otherwise. The "same object" means that a change in one will be reflected by the same change in the other. @@ -530,12 +530,12 @@ describing the data type. => nil - - Function: old-eq OBJ1 OBJ2 + - Function: old-eq obj1 obj2 This function exists under XEmacs 20 and is exactly like `eq' except that it suffers from the char-int confoundance disease. In other words, it returns `t' if given a character and the equivalent integer, even though the objects are of different types! - You should *not* ever call this function explicitly in your code. + You should _not_ ever call this function explicitly in your code. However, be aware that all calls to `eq' in byte code compiled under version 19 map to `old-eq' in XEmacs 20. (Likewise for `old-equal', `old-memq', `old-member', `old-assq' and @@ -551,7 +551,7 @@ describing the data type. (eq ?A 65) => nil ; We are still healthy. - - Function: equal OBJECT1 OBJECT2 + - Function: equal object1 object2 This function returns `t' if OBJECT1 and OBJECT2 have equal components, `nil' otherwise. Whereas `eq' tests if its arguments are the same object, `equal' looks inside nonidentical arguments @@ -655,7 +655,7 @@ optional initial sign and optional final period. -0 ; The integer 0. To understand how various functions work on integers, especially the -bitwise operators (*note Bitwise Operations::.), it is often helpful to +bitwise operators (*note Bitwise Operations::), it is often helpful to view the numbers in their binary form. In 28-bit binary, the decimal integer 5 looks like this: @@ -727,7 +727,7 @@ NaNs or infinities; perhaps we should create a syntax in the future. You can use `logb' to extract the binary exponent of a floating point number (or estimate the logarithm of an integer): - - Function: logb NUMBER + - Function: logb number This function returns the binary exponent of NUMBER. More precisely, the value is the logarithm of NUMBER base 2, rounded down to an integer. @@ -746,27 +746,27 @@ predicate requires a number as its argument. See also `integer-or-marker-p', `integer-char-or-marker-p', `number-or-marker-p' and `number-char-or-marker-p', in *Note Predicates on Markers::. - - Function: floatp OBJECT + - Function: floatp object This predicate tests whether its argument is a floating point number and returns `t' if so, `nil' otherwise. `floatp' does not exist in Emacs versions 18 and earlier. - - Function: integerp OBJECT + - Function: integerp object This predicate tests whether its argument is an integer, and returns `t' if so, `nil' otherwise. - - Function: numberp OBJECT + - Function: numberp object This predicate tests whether its argument is a number (either integer or floating point), and returns `t' if so, `nil' otherwise. - - Function: natnump OBJECT + - Function: natnump object The `natnump' predicate (whose name comes from the phrase "natural-number-p") tests to see whether its argument is a nonnegative integer, and returns `t' if so, `nil' otherwise. 0 is considered non-negative. - - Function: zerop NUMBER + - Function: zerop number This predicate tests whether its argument is zero, and returns `t' if so, `nil' otherwise. The argument must be a number. @@ -781,7 +781,7 @@ Comparison of Numbers To test numbers for numerical equality, you should normally use `=', not `eq'. There can be many distinct floating point number objects with the same numeric value. If you use `eq' to compare them, then you -test whether two values are the same *object*. By contrast, `=' +test whether two values are the same _object_. By contrast, `=' compares only the numeric values of the objects. At present, each integer value has a unique Lisp object in XEmacs @@ -816,7 +816,7 @@ Here's a function to do this: characters and markers as arguments, and treat them as their number equivalents. - - Function: = NUMBER &rest MORE-NUMBERS + - Function: = number &rest more-numbers This function returns `t' if all of its arguments are numerically equal, `nil' otherwise. @@ -829,7 +829,7 @@ equivalents. (= 5 5 6) => nil - - Function: /= NUMBER &rest MORE-NUMBERS + - Function: /= number &rest more-numbers This function returns `t' if no two arguments are numerically equal, `nil' otherwise. @@ -840,7 +840,7 @@ equivalents. (/= 5 6 1) => t - - Function: < NUMBER &rest MORE-NUMBERS + - Function: < number &rest more-numbers This function returns `t' if the sequence of its arguments is monotonically increasing, `nil' otherwise. @@ -851,7 +851,7 @@ equivalents. (< 5 6 7) => t - - Function: <= NUMBER &rest MORE-NUMBERS + - Function: <= number &rest more-numbers This function returns `t' if the sequence of its arguments is monotonically nondecreasing, `nil' otherwise. @@ -862,15 +862,15 @@ equivalents. (<= 5 6 5) => nil - - Function: > NUMBER &rest MORE-NUMBERS + - Function: > number &rest more-numbers This function returns `t' if the sequence of its arguments is monotonically decreasing, `nil' otherwise. - - Function: >= NUMBER &rest MORE-NUMBERS + - Function: >= number &rest more-numbers This function returns `t' if the sequence of its arguments is monotonically nonincreasing, `nil' otherwise. - - Function: max NUMBER &rest MORE-NUMBERS + - Function: max number &rest more-numbers This function returns the largest of its arguments. (max 20) @@ -880,7 +880,7 @@ equivalents. (max 1 3 2.5) => 3 - - Function: min NUMBER &rest MORE-NUMBERS + - Function: min number &rest more-numbers This function returns the smallest of its arguments. (min -4 1) @@ -894,7 +894,7 @@ Numeric Conversions To convert an integer to floating point, use the function `float'. - - Function: float NUMBER + - Function: float number This returns NUMBER converted to floating point. If NUMBER is already a floating point number, `float' returns it unchanged. @@ -902,11 +902,11 @@ Numeric Conversions integers; they differ in how they round. These functions accept integer arguments also, and return such arguments unchanged. - - Function: truncate NUMBER + - Function: truncate number This returns NUMBER, converted to an integer by rounding towards zero. - - Function: floor NUMBER &optional DIVISOR + - Function: floor number &optional divisor This returns NUMBER, converted to an integer by rounding downward (towards negative infinity). @@ -914,11 +914,11 @@ integer arguments also, and return such arguments unchanged. floor is taken; this is the division operation that corresponds to `mod'. An `arith-error' results if DIVISOR is 0. - - Function: ceiling NUMBER + - Function: ceiling number This returns NUMBER, converted to an integer by rounding upward (towards positive infinity). - - Function: round NUMBER + - Function: round number This returns NUMBER, converted to an integer by rounding towards the nearest integer. Rounding a value equidistant between two integers may choose the integer closer to zero, or it may prefer @@ -943,7 +943,7 @@ any argument is floating. not check for overflow. Thus `(1+ 134217727)' may evaluate to -134217728, depending on your hardware. - - Function: 1+ NUMBER-OR-MARKER + - Function: 1+ number-or-marker This function returns NUMBER-OR-MARKER plus 1. For example, (setq foo 4) @@ -968,13 +968,13 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to more convenient and natural way to increment a variable is `(incf foo)'. - - Function: 1- NUMBER-OR-MARKER + - Function: 1- number-or-marker This function returns NUMBER-OR-MARKER minus 1. - - Function: abs NUMBER + - Function: abs number This returns the absolute value of NUMBER. - - Function: + &rest NUMBERS-OR-MARKERS + - Function: + &rest numbers-or-markers This function adds its arguments together. When given no arguments, `+' returns 0. @@ -985,7 +985,7 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to (+ 1 2 3 4) => 10 - - Function: - &optional NUMBER-OR-MARKER &rest OTHER-NUMBERS-OR-MARKERS + - Function: - &optional number-or-marker &rest other-numbers-or-markers The `-' function serves two purposes: negation and subtraction. When `-' has a single argument, the value is the negative of the argument. When there are multiple arguments, `-' subtracts each of @@ -999,7 +999,7 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to (-) => 0 - - Function: * &rest NUMBERS-OR-MARKERS + - Function: * &rest numbers-or-markers This function multiplies its arguments together, and returns the product. When given no arguments, `*' returns 1. @@ -1010,7 +1010,7 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to (* 1 2 3 4) => 24 - - Function: / DIVIDEND DIVISOR &rest DIVISORS + - Function: / dividend divisor &rest divisors This function divides DIVIDEND by DIVISOR and returns the quotient. If there are additional arguments DIVISORS, then it divides DIVIDEND by each divisor in turn. Each argument may be a @@ -1039,7 +1039,7 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to The result of `(/ -17 6)' could in principle be -3 on some machines. - - Function: % DIVIDEND DIVISOR + - Function: % dividend divisor This function returns the integer remainder after division of DIVIDEND by DIVISOR. The arguments must be integers or markers. @@ -1065,7 +1065,7 @@ not check for overflow. Thus `(1+ 134217727)' may evaluate to always equals DIVIDEND. - - Function: mod DIVIDEND DIVISOR + - Function: mod dividend divisor This function returns the value of DIVIDEND modulo DIVISOR; in other words, the remainder after division of DIVIDEND by DIVISOR, but with the same sign as DIVISOR. The arguments must be numbers @@ -1110,19 +1110,19 @@ is a nearby integer. `ffloor' returns the nearest integer below; `fceiling', the nearest integer above; `ftruncate', the nearest integer in the direction towards zero; `fround', the nearest integer. - - Function: ffloor FLOAT + - Function: ffloor float This function rounds FLOAT to the next lower integral value, and returns that value as a floating point number. - - Function: fceiling FLOAT + - Function: fceiling float This function rounds FLOAT to the next higher integral value, and returns that value as a floating point number. - - Function: ftruncate FLOAT + - Function: ftruncate float This function rounds FLOAT towards zero to an integral value, and returns that value as a floating point number. - - Function: fround FLOAT + - Function: fround float This function rounds FLOAT to the nearest integral value, and returns that value as a floating point number. @@ -1140,7 +1140,7 @@ reproducing the same pattern "moved over". The bitwise operations in XEmacs Lisp apply only to integers. - - Function: lsh INTEGER1 COUNT + - Function: lsh integer1 count `lsh', which is an abbreviation for "logical shift", shifts the bits in INTEGER1 to the left COUNT places, or to the right if COUNT is negative, bringing zeros into the vacated bits. If COUNT @@ -1208,7 +1208,7 @@ reproducing the same pattern "moved over". ;; Decimal -2 1111 1111 1111 1111 1111 1111 1110 - - Function: ash INTEGER1 COUNT + - Function: ash integer1 count `ash' ("arithmetic shift") shifts the bits in INTEGER1 to the left COUNT places, or to the right if COUNT is negative. @@ -1237,31 +1237,26 @@ reproducing the same pattern "moved over". Here are other examples: - ; 28-bit binary values + ; 28-bit binary values (lsh 5 2) ; 5 = 0000 0000 0000 0000 0000 0000 0101 => 20 ; = 0000 0000 0000 0000 0000 0001 0100 - (ash 5 2) => 20 (lsh -5 2) ; -5 = 1111 1111 1111 1111 1111 1111 1011 => -20 ; = 1111 1111 1111 1111 1111 1110 1100 (ash -5 2) => -20 - (lsh 5 -2) ; 5 = 0000 0000 0000 0000 0000 0000 0101 => 1 ; = 0000 0000 0000 0000 0000 0000 0001 - (ash 5 -2) => 1 - (lsh -5 -2) ; -5 = 1111 1111 1111 1111 1111 1111 1011 => 4194302 ; = 0011 1111 1111 1111 1111 1111 1110 - (ash -5 -2) ; -5 = 1111 1111 1111 1111 1111 1111 1011 => -2 ; = 1111 1111 1111 1111 1111 1111 1110 - - Function: logand &rest INTS-OR-MARKERS + - Function: logand &rest ints-or-markers This function returns the "logical and" of the arguments: the Nth bit is set in the result if, and only if, the Nth bit is set in all the arguments. ("Set" means that the value of the bit is 1 @@ -1285,57 +1280,57 @@ reproducing the same pattern "moved over". representation consists entirely of ones. If `logand' is passed just one argument, it returns that argument. - ; 28-bit binary values + ; 28-bit binary values (logand 14 13) ; 14 = 0000 0000 0000 0000 0000 0000 1110 ; 13 = 0000 0000 0000 0000 0000 0000 1101 => 12 ; 12 = 0000 0000 0000 0000 0000 0000 1100 - + (logand 14 13 4) ; 14 = 0000 0000 0000 0000 0000 0000 1110 ; 13 = 0000 0000 0000 0000 0000 0000 1101 ; 4 = 0000 0000 0000 0000 0000 0000 0100 => 4 ; 4 = 0000 0000 0000 0000 0000 0000 0100 - + (logand) => -1 ; -1 = 1111 1111 1111 1111 1111 1111 1111 - - Function: logior &rest INTS-OR-MARKERS + - Function: logior &rest ints-or-markers This function returns the "inclusive or" of its arguments: the Nth bit is set in the result if, and only if, the Nth bit is set in at least one of the arguments. If there are no arguments, the result is zero, which is an identity element for this operation. If `logior' is passed just one argument, it returns that argument. - ; 28-bit binary values + ; 28-bit binary values (logior 12 5) ; 12 = 0000 0000 0000 0000 0000 0000 1100 ; 5 = 0000 0000 0000 0000 0000 0000 0101 => 13 ; 13 = 0000 0000 0000 0000 0000 0000 1101 - + (logior 12 5 7) ; 12 = 0000 0000 0000 0000 0000 0000 1100 ; 5 = 0000 0000 0000 0000 0000 0000 0101 ; 7 = 0000 0000 0000 0000 0000 0000 0111 => 15 ; 15 = 0000 0000 0000 0000 0000 0000 1111 - - Function: logxor &rest INTS-OR-MARKERS + - Function: logxor &rest ints-or-markers This function returns the "exclusive or" of its arguments: the Nth bit is set in the result if, and only if, the Nth bit is set in an odd number of the arguments. If there are no arguments, the result is 0, which is an identity element for this operation. If `logxor' is passed just one argument, it returns that argument. - ; 28-bit binary values + ; 28-bit binary values (logxor 12 5) ; 12 = 0000 0000 0000 0000 0000 0000 1100 ; 5 = 0000 0000 0000 0000 0000 0000 0101 => 9 ; 9 = 0000 0000 0000 0000 0000 0000 1001 - + (logxor 12 5 7) ; 12 = 0000 0000 0000 0000 0000 0000 1100 ; 5 = 0000 0000 0000 0000 0000 0000 0101 ; 7 = 0000 0000 0000 0000 0000 0000 0111 => 14 ; 14 = 0000 0000 0000 0000 0000 0000 1110 - - Function: lognot INTEGER + - Function: lognot integer This function returns the logical complement of its argument: the Nth bit is one in the result if, and only if, the Nth bit is zero in INTEGER, and vice-versa. @@ -1356,61 +1351,61 @@ Standard Mathematical Functions supported (which is the normal state of affairs). They allow integers as well as floating point numbers as arguments. - - Function: sin ARG - - Function: cos ARG - - Function: tan ARG + - Function: sin arg + - Function: cos arg + - Function: tan arg These are the ordinary trigonometric functions, with argument measured in radians. - - Function: asin ARG + - Function: asin arg The value of `(asin ARG)' is a number between -pi/2 and pi/2 (inclusive) whose sine is ARG; if, however, ARG is out of range (outside [-1, 1]), then the result is a NaN. - - Function: acos ARG + - Function: acos arg The value of `(acos ARG)' is a number between 0 and pi (inclusive) whose cosine is ARG; if, however, ARG is out of range (outside [-1, 1]), then the result is a NaN. - - Function: atan ARG + - Function: atan arg The value of `(atan ARG)' is a number between -pi/2 and pi/2 (exclusive) whose tangent is ARG. - - Function: sinh ARG - - Function: cosh ARG - - Function: tanh ARG + - Function: sinh arg + - Function: cosh arg + - Function: tanh arg These are the ordinary hyperbolic trigonometric functions. - - Function: asinh ARG - - Function: acosh ARG - - Function: atanh ARG + - Function: asinh arg + - Function: acosh arg + - Function: atanh arg These are the inverse hyperbolic trigonometric functions. - - Function: exp ARG + - Function: exp arg This is the exponential function; it returns e to the power ARG. e is a fundamental mathematical constant also called the base of natural logarithms. - - Function: log ARG &optional BASE + - Function: log arg &optional base This function returns the logarithm of ARG, with base BASE. If you don't specify BASE, the base E is used. If ARG is negative, the result is a NaN. - - Function: log10 ARG + - Function: log10 arg This function returns the logarithm of ARG, with base 10. If ARG is negative, the result is a NaN. `(log10 X)' == `(log X 10)', at least approximately. - - Function: expt X Y + - Function: expt x y This function returns X raised to power Y. If both arguments are integers and Y is positive, the result is an integer; in this case, it is truncated to fit the range of possible integer values. - - Function: sqrt ARG + - Function: sqrt arg This returns the square root of ARG. If ARG is negative, the value is a NaN. - - Function: cube-root ARG + - Function: cube-root arg This returns the cube root of ARG.  @@ -1439,7 +1434,7 @@ debugging. t)'. This chooses a new seed based on the current time of day and on XEmacs's process ID number. - - Function: random &optional LIMIT + - Function: random &optional limit This function returns a pseudo-random integer. Repeated calls return a series of pseudo-random integers. diff --git a/info/lispref.info-40 b/info/lispref.info-40 index b79fe21..8eac218 100644 --- a/info/lispref.info-40 +++ b/info/lispref.info-40 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -59,7 +59,7 @@ Terminal Output track of output sent to the terminal. The function `device-baud-rate' tells you what XEmacs thinks is the output speed of the terminal. - - Function: device-baud-rate &optional DEVICE + - Function: device-baud-rate &optional device This function's value is the output speed of the terminal associated with DEVICE, as far as XEmacs knows. DEVICE defaults to the selected device (usually the only device) if omitted. @@ -82,13 +82,13 @@ the proper value, but others do not. If XEmacs has the wrong value, it makes decisions that are less than optimal. To fix the problem, use `set-device-baud-rate'. - - Function: set-device-baud-rate &optional DEVICE + - Function: set-device-baud-rate &optional device This function sets the output speed of DEVICE. See `device-baud-rate'. DEVICE defaults to the selected device (usually the only device) if omitted. - - Function: send-string-to-terminal CHAR-OR-STRING &optional STDOUT-P - DEVICE + - Function: send-string-to-terminal char-or-string &optional stdout-p + device This function sends CHAR-OR-STRING to the terminal without alteration. Control characters in CHAR-OR-STRING have terminal-dependent effects. @@ -107,7 +107,7 @@ makes decisions that are less than optimal. To fix the problem, use (send-string-to-terminal "\eF4\^U\^F") => nil - - Command: open-termscript FILENAME + - Command: open-termscript filename This function is used to open a "termscript file" that will record all the characters sent by XEmacs to the terminal. (If there are multiple tty or stream devices, all characters sent to all such @@ -173,12 +173,12 @@ it: call the function `enable-flow-control'. This function enables use of `C-s' and `C-q' for output flow control, and provides the characters `C-\' and `C-^' as aliases for them using `keyboard-translate-table' (*note Translating - Input::.). + Input::). You can use the function `enable-flow-control-on' in your `.emacs' file to enable flow control automatically on certain terminal types. - - Function: enable-flow-control-on &rest TERMTYPES + - Function: enable-flow-control-on &rest termtypes This function enables flow control, and the aliases `C-\' and `C-^', if the terminal type is one of TERMTYPES. For example: @@ -267,7 +267,7 @@ distinguished by "selection types", represented in XEmacs by symbols. X clients including XEmacs can read or set the selection for any given type. - - Function: x-own-selection DATA &optional TYPE + - Function: x-own-selection data &optional type This function sets a "selection" in the X server. It takes two arguments: a value, DATA, and the selection type TYPE to assign it to. DATA may be a string, a cons of two markers, or an extent. @@ -286,7 +286,7 @@ type. This function accesses selections set up by XEmacs or by other X clients. It returns the value of the current primary selection. - - Function: x-disown-selection &optional SECONDARY-P + - Function: x-disown-selection &optional secondary-p Assuming we own the selection, this function disowns it. If SECONDARY-P is non-`nil', the secondary selection instead of the primary selection is discarded. @@ -296,11 +296,11 @@ store text or other data being moved between applications. Cut buffers are considered obsolete, but XEmacs supports them for the sake of X clients that still use them. - - Function: x-get-cutbuffer &optional N + - Function: x-get-cutbuffer &optional n This function returns the contents of cut buffer number N. (This function is called `x-get-cut-buffer' in FSF Emacs.) - - Function: x-store-cutbuffer STRING + - Function: x-store-cutbuffer string This function stores STRING into the first cut buffer (cut buffer 0), moving the other values down through the series of cut buffers, kill-ring-style. (This function is called `x-set-cut-buffer' in FSF @@ -331,8 +331,8 @@ Resources This function return the default X device for resourcing. This is the first-created X device that still exists. - - Function: x-get-resource NAME CLASS TYPE &optional LOCALE DEVICE - NOERROR + - Function: x-get-resource name class type &optional locale device + noerror This function retrieves a resource value from the X resource manager. @@ -425,7 +425,7 @@ Resources `boolean', then the returned value is the list `(t)' for true, `(nil)' for false, and is `nil' to mean "unspecified". - - Function: x-put-resource RESOURCE-LINE &optional DEVICE + - Function: x-put-resource resource-line &optional device This function adds a resource to the resource database for DEVICE. RESOURCE-LINE specifies the resource to add and should be a standard resource specification. @@ -455,17 +455,17 @@ get information about the capabilities and origin of the X server corresponding to a particular device. The device argument is generally optional and defaults to the selected device. - - Function: x-server-version &optional DEVICE + - Function: x-server-version &optional device This function returns the list of version numbers of the X server DEVICE is on. The returned value is a list of three integers: the major and minor version numbers of the X protocol in use, and the vendor-specific release number. - - Function: x-server-vendor &optional DEVICE + - Function: x-server-vendor &optional device This function returns the vendor supporting the X server DEVICE is on. - - Function: x-display-visual-class &optional DEVICE + - Function: x-display-visual-class &optional device This function returns the visual class of the display DEVICE is on. The value is one of the symbols `static-gray', `gray-scale', `static-color', `pseudo-color', `true-color', and `direct-color'. @@ -478,7 +478,7 @@ File: lispref.info, Node: Grabs, Prev: Server Data, Up: X Server Restricting Access to the Server by Other Apps ---------------------------------------------- - - Function: x-grab-keyboard &optional DEVICE + - Function: x-grab-keyboard &optional device This function grabs the keyboard on the given device (defaulting to the selected one). So long as the keyboard is grabbed, all keyboard events will be delivered to XEmacs - it is not possible @@ -486,10 +486,10 @@ Restricting Access to the Server by Other Apps with `x-ungrab-keyboard' (use an `unwind-protect'). Returns `t' if the grab was successful; `nil' otherwise. - - Function: x-ungrab-keyboard &optional DEVICE + - Function: x-ungrab-keyboard &optional device This function releases a keyboard grab made with `x-grab-keyboard'. - - Function: x-grab-pointer &optional DEVICE CURSOR IGNORE-KEYBOARD + - Function: x-grab-pointer &optional device cursor ignore-keyboard This function grabs the pointer and restricts it to its current window. If optional DEVICE argument is `nil', the selected device will be used. If optional CURSOR argument is non-`nil', change @@ -499,7 +499,7 @@ Restricting Access to the Server by Other Apps all keyboard events during the grab. Returns `t' if the grab is successful, `nil' otherwise. - - Function: x-ungrab-pointer &optional DEVICE + - Function: x-ungrab-pointer &optional device This function releases a pointer grab made with `x-grab-pointer'. If optional first arg DEVICE is `nil' the selected device is used. If it is `t' the pointer will be released on all X devices. @@ -521,13 +521,13 @@ Miscellaneous X Functions and Variables This variable holds the search path used by `read-color' to find `rgb.txt'. - - Function: x-valid-keysym-name-p KEYSYM + - Function: x-valid-keysym-name-p keysym This function returns true if KEYSYM names a keysym that the X library knows about. Valid keysyms are listed in the files `/usr/include/X11/keysymdef.h' and in `/usr/lib/X11/XKeysymDB', or whatever the equivalents are on your system. - - Function: x-window-id &optional FRAME + - Function: x-window-id &optional frame This function returns the ID of the X11 window. This gives us a chance to manipulate the Emacs window from within a different program. Since the ID is an unsigned long, we return it as a @@ -538,7 +538,7 @@ Miscellaneous X Functions and Variables ignored. Beware: allowing XEmacs to process SendEvents opens a big security hole. - - Function: x-debug-mode ARG &optional DEVICE + - Function: x-debug-mode arg &optional device With a true arg, make the connection to the X server synchronous. With false, make it asynchronous. Synchronous connections are much slower, but are useful for debugging. (If you get X errors, @@ -649,7 +649,7 @@ File: lispref.info, Node: Elisp Interface for Sending Messages, Prev: Example Elisp Interface for Sending Messages ------------------------------------ - - Function: make-tooltalk-message ATTRIBUTES + - Function: make-tooltalk-message attributes Create a ToolTalk message and initialize its attributes. The value of ATTRIBUTES must be a list of alternating keyword/values, where keywords are symbols that name valid message attributes. @@ -682,20 +682,20 @@ Elisp Interface for Sending Messages the `ToolTalk Programmer's Guide'. - - Function: send-tooltalk-message MSG + - Function: send-tooltalk-message msg Send the message on its way. Once the message has been sent it's almost always a good idea to get rid of it with `destroy-tooltalk-message'. - - Function: return-tooltalk-message MSG &optional MODE + - Function: return-tooltalk-message msg &optional mode Send a reply to this message. The second argument can be `reply', `reject' or `fail'; the default is `reply'. Before sending a reply, all message arguments whose mode is `TT_INOUT' or `TT_OUT' should have been filled in - see `set-tooltalk-message-attribute'. - - Function: get-tooltalk-message-attribute MSG ATTRIBUTE &optional ARGN + - Function: get-tooltalk-message-attribute msg attribute &optional argn Returns the indicated ToolTalk message attribute. Attributes are identified by symbols with the same name (underscores and all) as the suffix of the ToolTalk `tt_message_' function that @@ -731,8 +731,8 @@ Elisp Interface for Sending Messages `arg_bval' like a string is fine. - - Function: set-tooltalk-message-attribute VALUE MSG ATTRIBUTE - &optional ARGN + - Function: set-tooltalk-message-attribute value msg attribute + &optional argn Initialize one ToolTalk message attribute. Attribute names and values are the same as for @@ -753,7 +753,7 @@ Elisp Interface for Sending Messages with `add-tooltalk-message-arg'. - - Function: add-tooltalk-message-arg MSG MODE TYPE &optional VALUE + - Function: add-tooltalk-message-arg msg mode type &optional value Append one new argument to the message. MODE must be one of `TT_IN', `TT_INOUT', or `TT_OUT', TYPE must be a string, and VALUE can be a string or an integer. ToolTalk doesn't define any @@ -774,7 +774,7 @@ Elisp Interface for Sending Messages initialize a message. - - Function: destroy-tooltalk-message MSG + - Function: destroy-tooltalk-message msg Apply `tt_message_destroy' to the message. It's not necessary to destroy messages after they've been processed by a message or pattern callback, the Lisp/ToolTalk callback machinery does this @@ -820,7 +820,7 @@ File: lispref.info, Node: Elisp Interface for Receiving Messages, Prev: Exampl Elisp Interface for Receiving Messages -------------------------------------- - - Function: make-tooltalk-pattern ATTRIBUTES + - Function: make-tooltalk-pattern attributes Create a ToolTalk pattern and initialize its attributes. The value of attributes must be a list of alternating keyword/values, where keywords are symbols that name valid pattern attributes or @@ -857,13 +857,13 @@ Elisp Interface for Receiving Messages the `ToolTalk Programmer's Guide'. - - Function: register-tooltalk-pattern PAT + - Function: register-tooltalk-pattern pat XEmacs will begin receiving messages that match this pattern. - - Function: unregister-tooltalk-pattern PAT + - Function: unregister-tooltalk-pattern pat XEmacs will stop receiving messages that match this pattern. - - Function: add-tooltalk-pattern-attribute VALUE PAT INDICATOR + - Function: add-tooltalk-pattern-attribute value pat indicator Add one value to the indicated pattern attribute. The names of attributes are the same as the ToolTalk accessors used to set them less the `tooltalk_pattern_' prefix and the `_add' suffix. For @@ -877,7 +877,7 @@ Elisp Interface for Receiving Messages argument. It will be called each time the pattern matches an incoming message. - - Function: add-tooltalk-pattern-arg PAT MODE TYPE VALUE + - Function: add-tooltalk-pattern-arg pat mode type value Add one fully-specified argument to a ToolTalk pattern. MODE must be one of `TT_IN', `TT_INOUT', or `TT_OUT'. TYPE must be a string. VALUE can be an integer, string or `nil'. If VALUE is an @@ -890,11 +890,11 @@ Elisp Interface for Receiving Messages Create a new ToolTalk pattern and initialize its session attribute to be the default session. - - Function: destroy-tooltalk-pattern PAT + - Function: destroy-tooltalk-pattern pat Apply `tt_pattern_destroy' to the pattern. This effectively unregisters the pattern. - - Function: describe-tooltalk-message MSG &optional STREAM + - Function: describe-tooltalk-message msg &optional stream Print the message's attributes and arguments to STREAM. This is often useful for debugging. @@ -924,12 +924,12 @@ Building XEmacs with LDAP support linking to an external LDAP client library. As of 21.2, XEmacs has been successfully built and tested with - * OpenLDAP 1.0.3 (`http://www.openldap.org/') + * OpenLDAP 1.0.3 () * University of Michigan's LDAP 3.3 - (`http://www.umich.edu/~dirsvcs/ldap/') + () - * LDAP SDK 1.0 from Netscape Corp. (`http://developer.netscape.com/') + * LDAP SDK 1.0 from Netscape Corp. () Other libraries conforming to RFC 1823 will probably work also but may require some minor tweaking at C level. @@ -980,7 +980,7 @@ LDAP Variables - Variable: ldap-host-parameters-alist An alist of per host options for LDAP transactions. The list - elements look like `(HOST PROP1 VAL1 PROP2 VAL2 ...)' HOST is the + elements look like `(HOST PROP1 VAL1 PROP2 VAL2 ...)' HOST is the name of an LDAP server. A TCP port number can be appended to that name using a colon as a separator. PROPN and VALN are property/value pairs describing parameters for the server. Valid @@ -1043,16 +1043,15 @@ LDAP searches. Further support is planned in the future. perform LDAP searches. It opens a connection to a host, performs the query and cleanly closes the connection thus insulating the user from all the details of the low-level interface such as LDAP Lisp objects -*note The Low-Level LDAP API::. +*note The Low-Level LDAP API:: - - Function: ldap-search FILTER &optional HOST ATTRIBUTES ATTRSONLY + - Function: ldap-search filter &optional host attributes attrsonly Perform an LDAP search. FILTER is the search filter *note Syntax - of Search Filters::. HOST is the LDAP host on which to perform - the search ATTRIBUTES is the specific attributes to retrieve, - `nil' means retrieve all ATTRSONLY if non-`nil' retrieves the - attributes only without their associated values. Additional - search parameters can be specified through - `ldap-host-parameters-alist'. + of Search Filters:: HOST is the LDAP host on which to perform the + search ATTRIBUTES is the specific attributes to retrieve, `nil' + means retrieve all ATTRSONLY if non-`nil' retrieves the attributes + only without their associated values. Additional search + parameters can be specified through `ldap-host-parameters-alist'.  File: lispref.info, Node: The Low-Level LDAP API, Prev: The High-Level LDAP API, Up: XEmacs LDAP API @@ -1074,13 +1073,13 @@ The LDAP Lisp Object An internal built-in `ldap' lisp object represents a LDAP connection. - - Function: ldapp OBJECT + - Function: ldapp object This function returns non-`nil' if OBJECT is a `ldap' object. - - Function: ldap-host LDAP + - Function: ldap-host ldap Return the server host of the connection represented by LDAP - - Function: ldap-live-p LDAP + - Function: ldap-live-p ldap Return non-`nil' if LDAP is an active LDAP connection  @@ -1089,7 +1088,7 @@ File: lispref.info, Node: Opening and Closing a LDAP Connection, Next: Searchi Opening and Closing a LDAP Connection ..................................... - - Function: ldap-open HOST &optional PLIST + - Function: ldap-open host &optional plist Open a LDAP connection to HOST. PLIST is a property list containing additional parameters for the connection. Valid keys in that list are: @@ -1133,7 +1132,7 @@ Opening and Closing a LDAP Connection The maximum number of matches to return for searches performed on this connection. - - Function: ldap-close LDAP + - Function: ldap-close ldap Close the connection represented by LDAP  @@ -1148,11 +1147,11 @@ thus requiring a preliminary call to `ldap-open'. Multiple searches can be made on the same connection, then the session must be closed with `ldap-close'. - - Function: ldap-search-internal LDAP FILTER BASE SCOPE ATTRS ATTRSONLY + - Function: ldap-search-internal ldap filter base scope attrs attrsonly Perform a search on an open connection LDAP created with `ldap-open'. FILTER is a filter string for the search *note - Syntax of Search Filters::. BASE is the distinguished name at - which to start the search. SCOPE is one of the symbols `base', + Syntax of Search Filters:: BASE is the distinguished name at which + to start the search. SCOPE is one of the symbols `base', `onelevel' or `subtree' indicating the scope of the search limited to a base object, to a single level or to the whole subtree. The default is `subtree'. `attrs' is a list of strings indicating diff --git a/info/lispref.info-41 b/info/lispref.info-41 index 73d9255..971cd08 100644 --- a/info/lispref.info-41 +++ b/info/lispref.info-41 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -55,17 +55,17 @@ File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Primitives ------------------ - - Function: gettext STRING + - Function: gettext string This function looks up STRING in the default message domain and returns its translation. If `I18N3' was not enabled when XEmacs was compiled, it just returns STRING. - - Function: dgettext DOMAIN STRING + - Function: dgettext domain string This function looks up STRING in the specified message domain and returns its translation. If `I18N3' was not enabled when XEmacs was compiled, it just returns STRING. - - Function: bind-text-domain DOMAIN PATHNAME + - Function: bind-text-domain domain pathname This function associates a pathname with a message domain. Here's how the path to message file is constructed under SunOS 5.x: @@ -74,7 +74,7 @@ Level 3 Primitives If `I18N3' was not enabled when XEmacs was compiled, this function does nothing. - - Special Form: domain STRING + - Special Form: domain string This function specifies the text domain used for translating documentation strings and interactive prompts of a function. For example, write: @@ -85,7 +85,7 @@ Level 3 Primitives The "call" to `domain' is actually a declaration rather than a function; when actually called, `domain' just returns `nil'. - - Function: domain-of FUNCTION + - Function: domain-of function This function returns the text domain of FUNCTION; it returns `nil' if it is the default domain. If `I18N3' was not enabled when XEmacs was compiled, it always returns `nil'. @@ -133,11 +133,11 @@ function body, before the `interactive' form. For variables and constants which have documentation strings, specify the domain after the documentation. - - Special Form: defvar SYMBOL [VALUE [DOC-STRING [DOMAIN]]] + - Special Form: defvar symbol [value [doc-string [domain]]] Example: (defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla") - - Special Form: defconst SYMBOL [VALUE [DOC-STRING [DOMAIN]]] + - Special Form: defconst symbol [value [doc-string [domain]]] Example: (defconst limbs 4 "Number of limbs" "emacs-gorilla") @@ -146,8 +146,8 @@ to have a domain specification, because their documentation strings are extracted into the main message base. However, for autoloaded functions which are specified in a separate package, use following syntax: - - Function: autoload SYMBOL FILENAME &optional DOCSTRING INTERACTIVE - MACRO DOMAIN + - Function: autoload symbol filename &optional docstring interactive + macro domain Example: (autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla") @@ -269,7 +269,7 @@ printing characters are considered). JISX0208, i.e. Japanese Kanji, has thousands of characters, and is of dimension two - every character is indexed by two position codes, each in the range 33 through 126. (Note that the choice of the range here is somewhat arbitrary. -Although a character set such as JISX0208 defines an *ordering* of all +Although a character set such as JISX0208 defines an _ordering_ of all its characters, it does not define the actual mapping between numbers and characters. You could just as easily index the characters in JISX0208 using numbers in the range 0 through 93, 1 through 94, 2 @@ -359,7 +359,7 @@ Charsets character set as well as an ordering of those characters. Charsets are permanent objects and are named using symbols, like faces. - - Function: charsetp OBJECT + - Function: charsetp object This function returns non-`nil' if OBJECT is a charset. * Menu: @@ -474,14 +474,14 @@ File: lispref.info, Node: Basic Charset Functions, Next: Charset Property Func Basic Charset Functions ----------------------- - - Function: find-charset CHARSET-OR-NAME + - Function: find-charset charset-or-name This function retrieves the charset of the given name. If CHARSET-OR-NAME is a charset object, it is simply returned. Otherwise, CHARSET-OR-NAME should be a symbol. If there is no such charset, `nil' is returned. Otherwise the associated charset object is returned. - - Function: get-charset NAME + - Function: get-charset name This function retrieves the charset of the given name. Same as `find-charset' except an error is signalled if there is no such charset instead of returning `nil'. @@ -489,7 +489,7 @@ Basic Charset Functions - Function: charset-list This function returns a list of the names of all defined charsets. - - Function: make-charset NAME DOC-STRING PROPS + - Function: make-charset name doc-string props This function defines a new character set. This function is for use with Mule support. NAME is a symbol, the name by which the character set is normally referred. DOC-STRING is a string @@ -499,19 +499,19 @@ Basic Charset Functions `chars', `final', `graphic', `direction', and `ccl-program', as previously described. - - Function: make-reverse-direction-charset CHARSET NEW-NAME + - Function: make-reverse-direction-charset charset new-name This function makes a charset equivalent to CHARSET but which goes in the opposite direction. NEW-NAME is the name of the new charset. The new charset is returned. - - Function: charset-from-attributes DIMENSION CHARS FINAL &optional - DIRECTION + - Function: charset-from-attributes dimension chars final &optional + direction This function returns a charset with the given DIMENSION, CHARS, FINAL, and DIRECTION. If DIRECTION is omitted, both directions will be checked (left-to-right will be returned if character sets exist for both directions). - - Function: charset-reverse-direction-charset CHARSET + - Function: charset-reverse-direction-charset charset This function returns the charset (if any) with the same dimension, number of characters, and final byte as CHARSET, but which is displayed in the opposite direction. @@ -525,54 +525,54 @@ Charset Property Functions All of these functions accept either a charset name or charset object. - - Function: charset-property CHARSET PROP + - Function: charset-property charset prop This function returns property PROP of CHARSET. *Note Charset Properties::. Convenience functions are also provided for retrieving individual properties of a charset. - - Function: charset-name CHARSET + - Function: charset-name charset This function returns the name of CHARSET. This will be a symbol. - - Function: charset-doc-string CHARSET + - Function: charset-doc-string charset This function returns the doc string of CHARSET. - - Function: charset-registry CHARSET + - Function: charset-registry charset This function returns the registry of CHARSET. - - Function: charset-dimension CHARSET + - Function: charset-dimension charset This function returns the dimension of CHARSET. - - Function: charset-chars CHARSET + - Function: charset-chars charset This function returns the number of characters per dimension of CHARSET. - - Function: charset-columns CHARSET + - Function: charset-columns charset This function returns the number of display columns per character (in TTY mode) of CHARSET. - - Function: charset-direction CHARSET + - Function: charset-direction charset This function returns the display direction of CHARSET - either `l2r' or `r2l'. - - Function: charset-final CHARSET + - Function: charset-final charset This function returns the final byte of the ISO 2022 escape sequence designating CHARSET. - - Function: charset-graphic CHARSET + - Function: charset-graphic charset This function returns either 0 or 1, depending on whether the position codes of characters in CHARSET map to the left or right half of their font, respectively. - - Function: charset-ccl-program CHARSET + - Function: charset-ccl-program charset This function returns the CCL program, if any, for converting position codes of characters in CHARSET into font indices. The only property of a charset that can currently be set after the charset has been created is the CCL program. - - Function: set-charset-ccl-program CHARSET CCL-PROGRAM + - Function: set-charset-ccl-program charset ccl-program This function sets the `ccl-program' property of CHARSET to CCL-PROGRAM. @@ -643,22 +643,22 @@ File: lispref.info, Node: MULE Characters, Next: Composite Characters, Prev: MULE Characters =============== - - Function: make-char CHARSET ARG1 &optional ARG2 + - Function: make-char charset arg1 &optional arg2 This function makes a multi-byte character from CHARSET and octets ARG1 and ARG2. - - Function: char-charset CH + - Function: char-charset ch This function returns the character set of char CH. - - Function: char-octet CH &optional N + - Function: char-octet ch &optional n This function returns the octet (i.e. position code) numbered N (should be 0 or 1) of char CH. N defaults to 0 if omitted. - - Function: find-charset-region START END &optional BUFFER + - Function: find-charset-region start end &optional buffer This function returns a list of the charsets in the region between START and END. BUFFER defaults to the current buffer if omitted. - - Function: find-charset-string STRING + - Function: find-charset-string string This function returns a list of the charsets in STRING.  @@ -669,22 +669,22 @@ Composite Characters Composite characters are not yet completely implemented. - - Function: make-composite-char STRING + - Function: make-composite-char string This function converts a string into a single composite character. The character is the result of overstriking all the characters in the string. - - Function: composite-char-string CH + - Function: composite-char-string ch This function returns a string of the characters comprising a composite character. - - Function: compose-region START END &optional BUFFER + - Function: compose-region start end &optional buffer This function composes the characters in the region from START to END in BUFFER into one composite character. The composite character replaces the composed characters. BUFFER defaults to the current buffer if omitted. - - Function: decompose-region START END &optional BUFFER + - Function: decompose-region start end &optional buffer This function decomposes any composite characters in the region from START to END in BUFFER. This converts each composite character into one or more characters, the individual characters @@ -898,7 +898,7 @@ symbol is accepted in place of the actual coding system object whenever a coding system is called for. (This is similar to how faces and charsets work.) - - Function: coding-system-p OBJECT + - Function: coding-system-p object This function returns non-`nil' if OBJECT is a coding system. * Menu: @@ -1107,7 +1107,7 @@ File: lispref.info, Node: Basic Coding System Functions, Next: Coding System P Basic Coding System Functions ----------------------------- - - Function: find-coding-system CODING-SYSTEM-OR-NAME + - Function: find-coding-system coding-system-or-name This function retrieves the coding system of the given name. If CODING-SYSTEM-OR-NAME is a coding-system object, it is simply @@ -1115,7 +1115,7 @@ Basic Coding System Functions If there is no such coding system, `nil' is returned. Otherwise the associated coding system object is returned. - - Function: get-coding-system NAME + - Function: get-coding-system name This function retrieves the coding system of the given name. Same as `find-coding-system' except an error is signalled if there is no such coding system instead of returning `nil'. @@ -1124,10 +1124,10 @@ Basic Coding System Functions This function returns a list of the names of all defined coding systems. - - Function: coding-system-name CODING-SYSTEM + - Function: coding-system-name coding-system This function returns the name of the given coding system. - - Function: make-coding-system NAME TYPE &optional DOC-STRING PROPS + - Function: make-coding-system name type &optional doc-string props This function registers symbol NAME as a coding system. TYPE describes the conversion method used and should be one of the @@ -1139,11 +1139,11 @@ Basic Coding System Functions character set. Recognized properties are as in *Note Coding System Properties::. - - Function: copy-coding-system OLD-CODING-SYSTEM NEW-NAME + - Function: copy-coding-system old-coding-system new-name This function copies OLD-CODING-SYSTEM to NEW-NAME. If NEW-NAME does not name an existing coding system, a new one will be created. - - Function: subsidiary-coding-system CODING-SYSTEM EOL-TYPE + - Function: subsidiary-coding-system coding-system eol-type This function returns the subsidiary coding system of CODING-SYSTEM with eol type EOL-TYPE. @@ -1153,13 +1153,13 @@ File: lispref.info, Node: Coding System Property Functions, Next: Encoding and Coding System Property Functions -------------------------------- - - Function: coding-system-doc-string CODING-SYSTEM + - Function: coding-system-doc-string coding-system This function returns the doc string for CODING-SYSTEM. - - Function: coding-system-type CODING-SYSTEM + - Function: coding-system-type coding-system This function returns the type of CODING-SYSTEM. - - Function: coding-system-property CODING-SYSTEM PROP + - Function: coding-system-property coding-system prop This function returns the PROP property of CODING-SYSTEM.  @@ -1168,8 +1168,8 @@ File: lispref.info, Node: Encoding and Decoding Text, Next: Detection of Textu Encoding and Decoding Text -------------------------- - - Function: decode-coding-region START END CODING-SYSTEM &optional - BUFFER + - Function: decode-coding-region start end coding-system &optional + buffer This function decodes the text between START and END which is encoded in CODING-SYSTEM. This is useful if you've read in encoded text from a file without decoding it (e.g. you read in a @@ -1178,8 +1178,8 @@ Encoding and Decoding Text encoded text is returned. BUFFER defaults to the current buffer if unspecified. - - Function: encode-coding-region START END CODING-SYSTEM &optional - BUFFER + - Function: encode-coding-region start end coding-system &optional + buffer This function encodes the text between START and END using CODING-SYSTEM. This will, for example, convert Japanese characters into stuff such as `^[$B!8', `//', they return parts of their values in `r7'. Y may be an expression, register, or integer, while Z must be a register or an integer. -Name Operator Code C-like Description -CCL_PLUS `+' 0x00 X = Y + Z -CCL_MINUS `-' 0x01 X = Y - Z -CCL_MUL `*' 0x02 X = Y * Z -CCL_DIV `/' 0x03 X = Y / Z -CCL_MOD `%' 0x04 X = Y % Z -CCL_AND `&' 0x05 X = Y & Z -CCL_OR `|' 0x06 X = Y | Z -CCL_XOR `^' 0x07 X = Y ^ Z -CCL_LSH `<<' 0x08 X = Y << Z -CCL_RSH `>>' 0x09 X = Y >> Z -CCL_LSH8 `<8' 0x0A X = (Y << 8) | Z -CCL_RSH8 `>8' 0x0B X = Y >> 8, r[7] = Y & 0xFF -CCL_DIVMOD `//' 0x0C X = Y / Z, r[7] = Y % Z -CCL_LS `<' 0x10 X = (X < Y) -CCL_GT `>' 0x11 X = (X > Y) -CCL_EQ `==' 0x12 X = (X == Y) -CCL_LE `<=' 0x13 X = (X <= Y) -CCL_GE `>=' 0x14 X = (X >= Y) -CCL_NE `!=' 0x15 X = (X != Y) -CCL_ENCODE_SJIS `en-sjis' 0x16 X = HIGHER_BYTE (SJIS (Y, Z)) - r[7] = LOWER_BYTE (SJIS (Y, Z) -CCL_DECODE_SJIS `de-sjis' 0x17 X = HIGHER_BYTE (DE-SJIS (Y, Z)) - r[7] = LOWER_BYTE (DE-SJIS (Y, Z)) +Name Operator Code C-like Description +CCL_PLUS `+' 0x00 X = Y + Z +CCL_MINUS `-' 0x01 X = Y - Z +CCL_MUL `*' 0x02 X = Y * Z +CCL_DIV `/' 0x03 X = Y / Z +CCL_MOD `%' 0x04 X = Y % Z +CCL_AND `&' 0x05 X = Y & Z +CCL_OR `|' 0x06 X = Y | Z +CCL_XOR `^' 0x07 X = Y ^ Z +CCL_LSH `<<' 0x08 X = Y << Z +CCL_RSH `>>' 0x09 X = Y >> Z +CCL_LSH8 `<8' 0x0A X = (Y << 8) | Z +CCL_RSH8 `>8' 0x0B X = Y >> 8, r[7] = Y & 0xFF +CCL_DIVMOD `//' 0x0C X = Y / Z, r[7] = Y % Z +CCL_LS `<' 0x10 X = (X < Y) +CCL_GT `>' 0x11 X = (X > Y) +CCL_EQ `==' 0x12 X = (X == Y) +CCL_LE `<=' 0x13 X = (X <= Y) +CCL_GE `>=' 0x14 X = (X >= Y) +CCL_NE `!=' 0x15 X = (X != Y) +CCL_ENCODE_SJIS `en-sjis' 0x16 X = HIGHER_BYTE (SJIS (Y, Z)) + r[7] = LOWER_BYTE (SJIS (Y, Z) +CCL_DECODE_SJIS `de-sjis' 0x17 X = HIGHER_BYTE (DE-SJIS (Y, Z)) + r[7] = LOWER_BYTE (DE-SJIS (Y, Z)) The CCL operators are as in C, with the addition of CCL_LSH8, CCL_RSH8, CCL_DIVMOD, CCL_ENCODE_SJIS, and CCL_DECODE_SJIS. The @@ -363,10 +363,10 @@ Calling CCL CCL programs are called automatically during Emacs buffer I/O when the external representation has a coding system type of `shift-jis', `big5', or `ccl'. The program is specified by the coding system (*note -Coding Systems::.). You can also call CCL programs from other CCL +Coding Systems::). You can also call CCL programs from other CCL programs, and from Lisp using these functions: - - Function: ccl-execute CCL-PROGRAM STATUS + - Function: ccl-execute ccl-program status Execute CCL-PROGRAM with registers initialized by STATUS. CCL-PROGRAM is a vector of compiled CCL code created by `ccl-compile'. It is an error for the program to try to execute a @@ -379,8 +379,8 @@ programs, and from Lisp using these functions: side-effect) to contain the ending values for the corresponding registers and IC. - - Function: ccl-execute-on-string CCL-PROGRAM STATUS STR &optional - CONTINUE + - Function: ccl-execute-on-string ccl-program status str &optional + continue Execute CCL-PROGRAM with initial STATUS on STRING. CCL-PROGRAM is a vector of compiled CCL code created by `ccl-compile'. STATUS must be a vector of nine values, specifying the initial value for @@ -398,7 +398,7 @@ programs, and from Lisp using these functions: To call a CCL program from another CCL program, it must first be registered: - - Function: register-ccl-program NAME CCL-PROGRAM + - Function: register-ccl-program name ccl-program Register NAME for CCL program PROGRAM in `ccl-program-table'. PROGRAM should be the compiled form of a CCL program, or nil. Return index number of the registered CCL program. @@ -451,10 +451,10 @@ the character is in that category. Special Lisp functions are provided that abstract this, so you do not have to directly manipulate bit vectors. - - Function: category-table-p OBJ + - Function: category-table-p obj This function returns `t' if ARG is a category table. - - Function: category-table &optional BUFFER + - Function: category-table &optional buffer This function returns the current category table. This is the one specified by the current buffer, or by BUFFER if it is non-`nil'. @@ -462,21 +462,21 @@ have to directly manipulate bit vectors. This function returns the standard category table. This is the one used for new buffers. - - Function: copy-category-table &optional TABLE + - Function: copy-category-table &optional table This function constructs a new category table and return it. It is a copy of the TABLE, which defaults to the standard category table. - - Function: set-category-table TABLE &optional BUFFER + - Function: set-category-table table &optional buffer This function selects a new category table for BUFFER. One argument, a category table. BUFFER defaults to the current buffer if omitted. - - Function: category-designator-p OBJ + - Function: category-designator-p obj This function returns `t' if ARG is a category designator (a char in the range `' '' to `'~''). - - Function: category-table-value-p OBJ + - Function: category-table-value-p obj This function returns `t' if ARG is a category table value. Valid values are `nil' or a bit vector of size 95. @@ -553,7 +553,7 @@ intended for widespread use: right. *Note Compiling Macros::. Using `eval-when-compile' avoids loading BAR when the compiled - version of FOO is *used*. + version of FOO is _used_. * If you define a major mode, make sure to run a hook variable using `run-hooks', just as the existing major modes do. *Note Hooks::. @@ -612,7 +612,7 @@ intended for widespread use: * When a package provides a modification of ordinary Emacs behavior, it is good to include a command to enable and disable the feature, Provide a command named `WHATEVER-mode' which turns the feature on - or off, and make it autoload (*note Autoload::.). Design the + or off, and make it autoload (*note Autoload::). Design the package so that simply loading it has no visible effect--that should not enable the feature. Users will request the feature by invoking the command. @@ -734,8 +734,8 @@ programs. the function is handled specially. For example, the following input will show you that `aref' is - compiled specially (*note Array Functions::.) while `elt' is not - (*note Sequence Functions::.): + compiled specially (*note Array Functions::) while `elt' is not + (*note Sequence Functions::): (get 'aref 'byte-compile) => byte-compile-two-args diff --git a/info/lispref.info-43 b/info/lispref.info-43 index 78cbdf4..8ae2af4 100644 --- a/info/lispref.info-43 +++ b/info/lispref.info-43 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -82,7 +82,7 @@ installed. To create `xemacs', use the command `temacs -batch -l loadup dump'. The purpose of `-batch' here is to tell `temacs' to run in -non-interactive, command-line mode. (`temacs' can *only* run in this +non-interactive, command-line mode. (`temacs' can _only_ run in this fashion. Part of the code required to initialize frames and faces is in Lisp, and must be loaded before XEmacs is able to create any frames.) The argument `dump' tells `loadup.el' to dump a new executable named @@ -112,7 +112,7 @@ files even if they exist.) You can specify additional files to preload by writing a library named `site-load.el' that loads them. You may need to increase the value of `PURESIZE', in `src/puresize.h', to make room for the -additional files. You should *not* modify this file directly, however; +additional files. You should _not_ modify this file directly, however; instead, use the `--puresize' configuration option. (If you run out of pure space while dumping `xemacs', you will be told how much pure space you actually will need.) However, the advantage of preloading @@ -129,11 +129,11 @@ override them if they wish. *Note Start-up Summary::. Before `loadup.el' dumps the new executable, it finds the documentation strings for primitive and preloaded functions (and variables) in the file where they are stored, by calling -`Snarf-documentation' (*note Accessing Documentation::.). These -strings were moved out of the `xemacs' executable to make it smaller. -*Note Documentation Basics::. +`Snarf-documentation' (*note Accessing Documentation::). These strings +were moved out of the `xemacs' executable to make it smaller. *Note +Documentation Basics::. - - Function: dump-emacs TO-FILE FROM-FILE + - Function: dump-emacs to-file from-file This function dumps the current state of XEmacs into an executable file TO-FILE. It takes symbols from FROM-FILE (this is normally the executable file `temacs'). @@ -142,10 +142,10 @@ strings were moved out of the `xemacs' executable to make it smaller. must set `command-line-processed' to `nil' first for good results. *Note Command Line Arguments::. - - Function: run-emacs-from-temacs &rest ARGS + - Function: run-emacs-from-temacs &rest args This is the function that implements the `run-temacs' command-line argument. It is called from `loadup.el' as appropriate. You - should most emphatically *not* call this yourself; it will + should most emphatically _not_ call this yourself; it will reinitialize your XEmacs process and you'll be sorry. - Command: emacs-version @@ -208,7 +208,7 @@ must increase the compilation parameter `PURESIZE' using the you try to preload additional libraries or add features to the standard ones. - - Function: purecopy OBJECT + - Function: purecopy object This function makes a copy of OBJECT in pure storage and returns it. It copies strings by simply making a new string with the same characters in pure storage. It recursively copies the contents of @@ -650,143 +650,143 @@ automatically local (when set) in each buffer. Many Lisp packages define such variables for their internal use; we don't list them here. `abbrev-mode' - *note Abbrevs::. + *note Abbrevs:: `auto-fill-function' - *note Auto Filling::. + *note Auto Filling:: `buffer-auto-save-file-name' - *note Auto-Saving::. + *note Auto-Saving:: `buffer-backed-up' - *note Backup Files::. + *note Backup Files:: `buffer-display-table' - *note Display Tables::. + *note Display Tables:: `buffer-file-format' - *note Format Conversion::. + *note Format Conversion:: `buffer-file-name' - *note Buffer File Name::. + *note Buffer File Name:: `buffer-file-number' - *note Buffer File Name::. + *note Buffer File Name:: `buffer-file-truename' - *note Buffer File Name::. + *note Buffer File Name:: `buffer-file-type' - *note Files and MS-DOS::. + *note Files and MS-DOS:: `buffer-invisibility-spec' - *note Invisible Text::. + *note Invisible Text:: `buffer-offer-save' - *note Saving Buffers::. + *note Saving Buffers:: `buffer-read-only' - *note Read Only Buffers::. + *note Read Only Buffers:: `buffer-saved-size' - *note Point::. + *note Point:: `buffer-undo-list' - *note Undo::. + *note Undo:: `cache-long-line-scans' - *note Text Lines::. + *note Text Lines:: `case-fold-search' - *note Searching and Case::. + *note Searching and Case:: `ctl-arrow' - *note Usual Display::. + *note Usual Display:: `comment-column' *note Comments: (emacs)Comments. `default-directory' - *note System Environment::. + *note System Environment:: `defun-prompt-regexp' - *note List Motion::. + *note List Motion:: `fill-column' - *note Auto Filling::. + *note Auto Filling:: `goal-column' *note Moving Point: (emacs)Moving Point. `left-margin' - *note Indentation::. + *note Indentation:: `local-abbrev-table' - *note Abbrevs::. + *note Abbrevs:: `local-write-file-hooks' - *note Saving Buffers::. + *note Saving Buffers:: `major-mode' - *note Mode Help::. + *note Mode Help:: `mark-active' - *note The Mark::. + *note The Mark:: `mark-ring' - *note The Mark::. + *note The Mark:: `minor-modes' - *note Minor Modes::. + *note Minor Modes:: `modeline-format' - *note Modeline Data::. + *note Modeline Data:: `modeline-buffer-identification' - *note Modeline Variables::. + *note Modeline Variables:: `modeline-format' - *note Modeline Data::. + *note Modeline Data:: `modeline-modified' - *note Modeline Variables::. + *note Modeline Variables:: `modeline-process' - *note Modeline Variables::. + *note Modeline Variables:: `mode-name' - *note Modeline Variables::. + *note Modeline Variables:: `overwrite-mode' - *note Insertion::. + *note Insertion:: `paragraph-separate' - *note Standard Regexps::. + *note Standard Regexps:: `paragraph-start' - *note Standard Regexps::. + *note Standard Regexps:: `point-before-scroll' Used for communication between mouse commands and scroll-bar commands. `require-final-newline' - *note Insertion::. + *note Insertion:: `selective-display' - *note Selective Display::. + *note Selective Display:: `selective-display-ellipses' - *note Selective Display::. + *note Selective Display:: `tab-width' - *note Usual Display::. + *note Usual Display:: `truncate-lines' - *note Truncation::. + *note Truncation:: `vc-mode' - *note Modeline Variables::. + *note Modeline Variables::  File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top diff --git a/info/lispref.info-44 b/info/lispref.info-44 index 1c75f09..c4d32ed 100644 --- a/info/lispref.info-44 +++ b/info/lispref.info-44 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -257,8 +257,8 @@ Index * asynchronous subprocess: Asynchronous Processes. * atan: Math Functions. * atanh: Math Functions. -* atom <1>: Cons Cell Type. -* atom: List-related Predicates. +* atom <1>: List-related Predicates. +* atom: Cons Cell Type. * atomic extent: Atomic Extents. * atoms: List-related Predicates. * attributes of text: Text Properties. @@ -413,8 +413,8 @@ Index * buffer-offer-save <1>: Killing Buffers. * buffer-offer-save: Saving Buffers. * buffer-read-only: Read Only Buffers. -* buffer-saved-size <1>: Auto-Saving. -* buffer-saved-size: Point. +* buffer-saved-size <1>: Point. +* buffer-saved-size: Auto-Saving. * buffer-size: Point. * buffer-string: Buffer Contents. * buffer-substring: Buffer Contents. @@ -558,7 +558,6 @@ Index * character descriptor: Character Descriptors. * character insertion: Commands for Insertion. * character printing: Describing Characters. -* character quote: Syntax Class Table. * character set (in regexp): Syntax of Regexps. * character to string: String Conversion. * character-to-event: Converting Events. @@ -566,6 +565,7 @@ Index * characterp: Predicates for Characters. * characters: Strings and Characters. * characters for interactive codes: Interactive Codes. +* character quote: Syntax Class Table. * charset type: Charset Type. * charset-ccl-program: Charset Property Functions. * charset-chars: Charset Property Functions. @@ -590,18 +590,18 @@ Index * check-valid-spec-list: Specifier Validation Functions. * child process: Processes. * children, of extent: Extent Parents. -* CL note---allocate more storage: Garbage Collection. -* CL note---case of letters: Symbol Type. -* CL note---default optional arg: Argument List. -* CL note---integers vrs eq: Comparison of Numbers. -* CL note---lack union, set: Sets And Lists. -* CL note---no continuable errors: Signaling Errors. -* CL note---only throw in Emacs: Catch and Throw. -* CL note---rplaca vrs setcar: Modifying Lists. -* CL note---set local: Setting Variables. -* CL note---special forms compared: Special Forms. -* CL note---special variables: Variable Scoping. -* CL note---symbol in obarrays: Creating Symbols. +* CL note--allocate more storage: Garbage Collection. +* CL note--case of letters: Symbol Type. +* CL note--default optional arg: Argument List. +* CL note--integers vrs eq: Comparison of Numbers. +* CL note--lack union, set: Sets And Lists. +* CL note--no continuable errors: Signaling Errors. +* CL note--only throw in Emacs: Catch and Throw. +* CL note--rplaca vrs setcar: Modifying Lists. +* CL note--set local: Setting Variables. +* CL note--special forms compared: Special Forms. +* CL note--special variables: Variable Scoping. +* CL note--symbol in obarrays: Creating Symbols. * cl-read: Reading in Edebug. * cl-specs.el: Instrumenting. * cl.el (Edebug): Instrumenting. @@ -611,8 +611,8 @@ Index * clear-range-table: Working With Range Tables. * clear-visited-file-modtime: Modification Time. * close parenthesis: Blinking. -* close parenthesis character: Syntax Class Table. * close-database: Connecting to a Database. +* close parenthesis character: Syntax Class Table. * closures not available: Extent. * clrhash: Working With Hash Tables. * codes, interactive, description of: Interactive Codes. @@ -660,10 +660,10 @@ Index * commandp: Interactive Call. * commandp example: High-Level Completion. * commands, defining: Defining Commands. -* comment ender: Syntax Class Table. -* comment starter: Syntax Class Table. * comment syntax: Syntax Class Table. * comments: Comments. +* comment ender: Syntax Class Table. +* comment starter: Syntax Class Table. * Common Lisp: Lisp History. * Common Lisp (Edebug): Instrumenting. * compare-buffer-substrings: Comparing Text. @@ -763,10 +763,10 @@ Index * creating buffers: Creating Buffers. * creating keymaps: Creating Keymaps. * ctl-arrow: Usual Display. -* ctl-x-4-map <1>: Prefix Keys. -* ctl-x-4-map: Standard Keymaps. -* ctl-x-5-map <1>: Prefix Keys. -* ctl-x-5-map: Standard Keymaps. +* ctl-x-4-map <1>: Standard Keymaps. +* ctl-x-4-map: Prefix Keys. +* ctl-x-5-map <1>: Standard Keymaps. +* ctl-x-5-map: Prefix Keys. * ctl-x-map <1>: Standard Keymaps. * ctl-x-map: Prefix Keys. * cube-root: Math Functions. @@ -826,8 +826,8 @@ Index * debug-on-next-call: Internals of Debugger. * debug-on-quit: Infinite Loops. * debug-on-signal: Error Debugging. -* debugger <1>: Debugger. -* debugger: Internals of Debugger. +* debugger <1>: Internals of Debugger. +* debugger: Debugger. * debugger command list: Debugger Commands. * debugger-mode-map: Standard Keymaps. * debugging errors: Error Debugging. @@ -896,8 +896,8 @@ Index * defsubst: Inline Functions. * defun: Defining Functions. * defun-prompt-regexp: List Motion. -* defvar <1>: Defining Variables. -* defvar: Domain Specification. +* defvar <1>: Domain Specification. +* defvar: Defining Variables. * defvaralias: Variable Aliases. * deiconify-frame: Visibility of Frames. * delete: Sets And Lists. @@ -950,11 +950,11 @@ Index * detach-extent: Detached Extents. * detached extent: Detached Extents. * detect-coding-region: Detection of Textual Encoding. -* device-baud-rate <1>: Console and Device I/O. -* device-baud-rate: Terminal Output. +* device-baud-rate <1>: Terminal Output. +* device-baud-rate: Console and Device I/O. * device-class: Console Types and Device Classes. -* device-frame-list <1>: Finding All Frames. -* device-frame-list: Basic Device Functions. +* device-frame-list <1>: Basic Device Functions. +* device-frame-list: Finding All Frames. * device-list: Basic Device Functions. * device-live-p: Connecting to a Console or Device. * device-matches-specifier-tag-set-p: Specifier Tag Functions. @@ -1041,36 +1041,36 @@ Index * echo area: The Echo Area. * echo-keystrokes <1>: The Echo Area. * echo-keystrokes: Command Loop Info. -* Edebug: Edebug. * edebug: Embedded Breakpoints. +* Edebug: Edebug. * Edebug execution modes: Edebug Execution Modes. * Edebug mode: Edebug. * Edebug specification list: Specification List. * edebug-`: Debugging Backquote. * edebug-all-defs <1>: Edebug Options. * edebug-all-defs: Instrumenting. -* edebug-all-forms <1>: Instrumenting. -* edebug-all-forms: Edebug Options. +* edebug-all-forms <1>: Edebug Options. +* edebug-all-forms: Instrumenting. * edebug-continue-kbd-macro: Edebug Options. * edebug-display-freq-count: Coverage Testing. * edebug-eval-top-level-form: Instrumenting. -* edebug-global-break-condition <1>: Global Break Condition. -* edebug-global-break-condition: Edebug Options. +* edebug-global-break-condition <1>: Edebug Options. +* edebug-global-break-condition: Global Break Condition. * edebug-initial-mode: Edebug Options. * edebug-on-error <1>: Edebug Options. * edebug-on-error: Trapping Errors. * edebug-on-quit <1>: Edebug Options. * edebug-on-quit: Trapping Errors. -* edebug-print-circle <1>: Printing in Edebug. -* edebug-print-circle: Edebug Options. -* edebug-print-length <1>: Printing in Edebug. -* edebug-print-length: Edebug Options. -* edebug-print-level <1>: Printing in Edebug. -* edebug-print-level: Edebug Options. -* edebug-print-trace-after <1>: Tracing. -* edebug-print-trace-after: Edebug Options. -* edebug-print-trace-before <1>: Tracing. -* edebug-print-trace-before: Edebug Options. +* edebug-print-circle <1>: Edebug Options. +* edebug-print-circle: Printing in Edebug. +* edebug-print-length <1>: Edebug Options. +* edebug-print-length: Printing in Edebug. +* edebug-print-level <1>: Edebug Options. +* edebug-print-level: Printing in Edebug. +* edebug-print-trace-after <1>: Edebug Options. +* edebug-print-trace-after: Tracing. +* edebug-print-trace-before <1>: Edebug Options. +* edebug-print-trace-before: Tracing. * edebug-save-displayed-buffer-points <1>: Edebug Options. * edebug-save-displayed-buffer-points: Edebug Display Update. * edebug-save-windows <1>: Edebug Options. @@ -1082,8 +1082,8 @@ Index * edebug-trace: Tracing. * edebug-tracing: Tracing. * edebug-unwrap: Specification List. -* edebug-unwrap-results <1>: Debugging Backquote. -* edebug-unwrap-results: Edebug Options. +* edebug-unwrap-results <1>: Edebug Options. +* edebug-unwrap-results: Debugging Backquote. * edit-abbrevs-map: Standard Keymaps. * edit-and-eval-command: Object from Minibuffer. * edit-menu-filter: Menu Filters. @@ -1150,8 +1150,8 @@ Index * errors: Errors. * esc-map: Prefix Keys. * ESC-prefix: Prefix Keys. -* escape <1>: Character Type. -* escape: Syntax Class Table. +* escape <1>: Syntax Class Table. +* escape: Character Type. * escape characters: Output Variables. * escape characters in printing: Output Functions. * escape sequence: Character Type. @@ -1236,8 +1236,8 @@ Index * expression prefix: Syntax Class Table. * expt: Math Functions. * extended-command-history: Minibuffer History. -* extent <1>: Variable Scoping. -* extent: Extents. +* extent <1>: Extents. +* extent: Variable Scoping. * extent children: Extent Parents. * extent end position: Extent Endpoints. * extent endpoint: Extent Endpoints. @@ -1479,8 +1479,8 @@ Index * ftruncate: Rounding Operations. * funcall: Calling Functions. * funcall, and debugging: Internals of Debugger. -* function <1>: What Is a Function. -* function: Anonymous Functions. +* function <1>: Anonymous Functions. +* function: What Is a Function. * function call: Function Forms. * function call debugging: Function Debugging. * function cell: Symbol Components. @@ -1506,8 +1506,8 @@ Index * garbage-collect: Garbage Collection. * gc-cons-threshold: Garbage Collection. * gc-message: Garbage Collection. -* gc-pointer-glyph <1>: Mouse Pointer. -* gc-pointer-glyph: Garbage Collection. +* gc-pointer-glyph <1>: Garbage Collection. +* gc-pointer-glyph: Mouse Pointer. * generate-new-buffer: Creating Buffers. * generate-new-buffer-name: Buffer Names. * generic-specifier-p: Specifier Types. @@ -1586,8 +1586,8 @@ Index * help-char: Help Functions. * help-command: Help Functions. * help-form: Help Functions. -* help-map <1>: Help Functions. -* help-map: Standard Keymaps. +* help-map <1>: Standard Keymaps. +* help-map: Help Functions. * Helper-describe-bindings: Help Functions. * Helper-help: Help Functions. * Helper-help-map: Standard Keymaps. @@ -1630,8 +1630,8 @@ Index * image-instance-type-list: Image Instance Types. * image-instance-width: Image Instance Functions. * image-instantiator-format-list: Image Specifiers. -* image-specifier-p <1>: Specifier Types. -* image-specifier-p: Image Specifiers. +* image-specifier-p <1>: Image Specifiers. +* image-specifier-p: Specifier Types. * implicit progn: Sequencing. * inc: Simple Macro. * indent-according-to-mode: Mode-Specific Indent. @@ -1881,8 +1881,8 @@ Index * lisp-mode-abbrev-table: Standard Abbrev Tables. * lisp-mode-map: Standard Keymaps. * lisp-mode.el: Example Major Modes. -* list <1>: Lists. -* list: Building Lists. +* list <1>: Building Lists. +* list: Lists. * list elements: List Elements. * list form evaluation: Classifying Lists. * list in keymap: Key Lookup. @@ -2113,13 +2113,13 @@ Index * minibuffer-frame-plist: Initial Properties. * minibuffer-help-form: Minibuffer Misc. * minibuffer-history: Minibuffer History. -* minibuffer-local-completion-map <1>: Completion Commands. -* minibuffer-local-completion-map: Standard Keymaps. +* minibuffer-local-completion-map <1>: Standard Keymaps. +* minibuffer-local-completion-map: Completion Commands. * minibuffer-local-isearch-map: Standard Keymaps. * minibuffer-local-map <1>: Standard Keymaps. * minibuffer-local-map: Text from Minibuffer. -* minibuffer-local-must-match-map <1>: Completion Commands. -* minibuffer-local-must-match-map: Standard Keymaps. +* minibuffer-local-must-match-map <1>: Standard Keymaps. +* minibuffer-local-must-match-map: Completion Commands. * minibuffer-local-ns-map: Text from Minibuffer. * minibuffer-prompt: Minibuffer Misc. * minibuffer-prompt-width: Minibuffer Misc. @@ -2149,8 +2149,8 @@ Index * modeline construct: Modeline Data. * modeline-buffer-identification: Modeline Variables. * modeline-format: Modeline Data. -* modeline-map <1>: Active Keymaps. -* modeline-map: Standard Keymaps. +* modeline-map <1>: Standard Keymaps. +* modeline-map: Active Keymaps. * modeline-modified: Modeline Variables. * modeline-pointer-glyph: Mouse Pointer. * modeline-process: Modeline Variables. @@ -2189,8 +2189,8 @@ Index * negative-argument: Prefix Command Arguments. * network connection: Network. * new file message: Subroutines of Visiting. -* newline <1>: Character Type. -* newline: Commands for Insertion. +* newline <1>: Commands for Insertion. +* newline: Character Type. * newline and Auto Fill mode: Commands for Insertion. * newline in print: Output Functions. * newline in strings: String Type. @@ -2255,11 +2255,11 @@ Index * old-eq: Equality Predicates. * one-window-p: Splitting Windows. * only-global-abbrevs: Defining Abbrevs. -* open parenthesis character: Syntax Class Table. * open-database: Connecting to a Database. * open-dribble-file: Recording Input. * open-network-stream: Network. * open-termscript: Terminal Output. +* open parenthesis character: Syntax Class Table. * operating system environment: System Environment. * option descriptions: A Sample Variable Description. * optional arguments: Argument List. @@ -2319,10 +2319,10 @@ Index * plist-put: Working With Normal Plists. * plist-remprop: Working With Normal Plists. * plist-to-alist: Converting Plists To/From Alists. -* plists-eq <1>: Working With Normal Plists. -* plists-eq: Other Plists. -* plists-equal <1>: Working With Normal Plists. -* plists-equal: Other Plists. +* plists-eq <1>: Other Plists. +* plists-eq: Working With Normal Plists. +* plists-equal <1>: Other Plists. +* plists-equal: Working With Normal Plists. * point: Point. * point excursion: Excursions. * point in window: Window Point. @@ -2476,8 +2476,8 @@ Index * putf: Other Plists. * puthash: Working With Hash Tables. * query-replace-history: Minibuffer History. -* query-replace-map <1>: Search and Replace. -* query-replace-map: Standard Keymaps. +* query-replace-map <1>: Standard Keymaps. +* query-replace-map: Search and Replace. * querying the user: Yes-or-No Queries. * question mark in character constant: Character Type. * quietly-read-abbrev-file: Abbrev Files. @@ -2916,7 +2916,6 @@ Index * string length: Sequence Functions. * string length, maximum when printing: Output Variables. * string properties: String Properties. -* string quote: Syntax Class Table. * string search: String Search. * string to character: String Conversion. * string to number: String Conversion. @@ -2935,6 +2934,7 @@ Index * strings: Strings and Characters. * strings, formatting them: Formatting Strings. * strings, modifying: Modifying Strings. +* string quote: Syntax Class Table. * subprocess: Processes. * subr: What Is a Function. * subrp: What Is a Function. @@ -2961,7 +2961,6 @@ Index * switching to a buffer: Displaying Buffers. * symbol: Symbols. * symbol components: Symbol Components. -* symbol constituent: Syntax Class Table. * symbol equality: Creating Symbols. * symbol evaluation: Symbol Forms. * symbol function indirection: Function Indirection. @@ -2972,6 +2971,7 @@ Index * symbol-plist: Symbol Plists. * symbol-value: Accessing Variables. * symbolp: Symbols. +* symbol constituent: Syntax Class Table. * synchronous subprocess: Synchronous Processes. * syntax classes: Syntax Descriptors. * syntax descriptor: Syntax Descriptors. @@ -3051,8 +3051,8 @@ Index * toolbar button type: Toolbar Button Type. * toolbar-buttons-captioned-p: Other Toolbar Variables. * toolbar-make-button-list: Toolbar Descriptor Format. -* toolbar-map <1>: Active Keymaps. -* toolbar-map: Standard Keymaps. +* toolbar-map <1>: Standard Keymaps. +* toolbar-map: Active Keymaps. * toolbar-pointer-glyph: Mouse Pointer. * toolbar-specifier-p <1>: Specifier Types. * toolbar-specifier-p: Specifying the Toolbar. @@ -3155,8 +3155,8 @@ Index * valid-specifier-domain-p: Specifier Validation Functions. * valid-specifier-locale-p: Specifier Validation Functions. * valid-specifier-locale-type-p: Specifier Validation Functions. -* valid-specifier-tag-p <1>: Specifier Tag Functions. -* valid-specifier-tag-p: Specifier Validation Functions. +* valid-specifier-tag-p <1>: Specifier Validation Functions. +* valid-specifier-tag-p: Specifier Tag Functions. * valid-specifier-tag-set-p: Specifier Tag Functions. * valid-specifier-type-p: Specifier Validation Functions. * value cell: Symbol Components. @@ -3224,8 +3224,8 @@ Index * window excursions: Excursions. * window ordering, cyclic: Cyclic Window Ordering. * window point: Window Point. -* window position <1>: Window Point. -* window position: Position of Window. +* window position <1>: Position of Window. +* window position: Window Point. * window resizing: Resizing Windows. * window size: Size of Window. * window size, changing: Resizing Windows. @@ -3266,11 +3266,11 @@ Index * with-output-to-temp-buffer: Temporary Displays. * with-selected-frame: Input Focus. * with-temp-file: Excursions. -* word constituent: Syntax Class Table. * word search: String Search. * word-search-backward: String Search. * word-search-forward: String Search. * words-include-escapes: Word Motion. +* word constituent: Syntax Class Table. * write-abbrev-file: Abbrev Files. * write-char: Output Functions. * write-contents-hooks: Saving Buffers. diff --git a/info/lispref.info-5 b/info/lispref.info-5 index cadf18b..7c590db 100644 --- a/info/lispref.info-5 +++ b/info/lispref.info-5 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -62,7 +62,7 @@ integers; whether an integer was intended as a character or not is determined only by how it is used. *Note Character Type::. The length of a string (like any array) is fixed and independent of -the string contents, and cannot be altered. Strings in Lisp are *not* +the string contents, and cannot be altered. Strings in Lisp are _not_ terminated by a distinguished character code. (By contrast, strings in C are terminated by a character with ASCII code 0.) This means that any character, including the null character (ASCII code 0), is a valid @@ -71,22 +71,22 @@ element of a string. Since strings are considered arrays, you can operate on them with the general array functions. (*Note Sequences Arrays Vectors::.) For example, you can access or change individual characters in a string -using the functions `aref' and `aset' (*note Array Functions::.). +using the functions `aref' and `aset' (*note Array Functions::). Strings use an efficient representation for storing the characters in them, and thus take up much less memory than a vector of the same length. Sometimes you will see strings used to hold key sequences. This -exists for backward compatibility with Emacs 18, but should *not* be +exists for backward compatibility with Emacs 18, but should _not_ be used in new code, since many key chords can't be represented at all and others (in particular meta key chords) are confused with accented characters. Strings are useful for holding regular expressions. You can also -match regular expressions against strings (*note Regexp Search::.). The -functions `match-string' (*note Simple Match Data::.) and -`replace-match' (*note Replacing Match::.) are useful for decomposing +match regular expressions against strings (*note Regexp Search::). The +functions `match-string' (*note Simple Match Data::) and +`replace-match' (*note Replacing Match::) are useful for decomposing and modifying strings based on regular expression matching. Like a buffer, a string can contain extents in it. These extents are @@ -108,10 +108,10 @@ The Predicates for Strings For more information about general sequence and array predicates, see *Note Sequences Arrays Vectors::, and *Note Arrays::. - - Function: stringp OBJECT + - Function: stringp object This function returns `t' if OBJECT is a string, `nil' otherwise. - - Function: char-or-string-p OBJECT + - Function: char-or-string-p object This function returns `t' if OBJECT is a string or a character, `nil' otherwise. @@ -129,7 +129,7 @@ Creating Strings The following functions create strings, either from scratch, or by putting strings together, or by taking them apart. - - Function: string &rest CHARACTERS + - Function: string &rest characters This function returns a new string made up of CHARACTERS. (string ?X ?E ?m ?a ?c ?s) @@ -138,11 +138,11 @@ putting strings together, or by taking them apart. => "" Analogous functions operating on other data types include `list', - `cons' (*note Building Lists::.), `vector' (*note Vectors::.) and - `bit-vector' (*note Bit Vectors::.). This function has not been + `cons' (*note Building Lists::), `vector' (*note Vectors::) and + `bit-vector' (*note Bit Vectors::). This function has not been available in XEmacs prior to 21.0 and FSF Emacs prior to 20.3. - - Function: make-string COUNT CHARACTER + - Function: make-string count character This function returns a string made up of COUNT repetitions of CHARACTER. If COUNT is negative, an error is signaled. @@ -152,10 +152,10 @@ putting strings together, or by taking them apart. => "" Other functions to compare with this one include `char-to-string' - (*note String Conversion::.), `make-vector' (*note Vectors::.), and - `make-list' (*note Building Lists::.). + (*note String Conversion::), `make-vector' (*note Vectors::), and + `make-list' (*note Building Lists::). - - Function: substring STRING START &optional END + - Function: substring string start &optional end This function returns a new string which consists of those characters from STRING in the range from (and including) the character at the index START up to (but excluding) the character @@ -195,7 +195,7 @@ putting strings together, or by taking them apart. => "abcdefg" But we recommend `copy-sequence' for this purpose (*note Sequence - Functions::.). + Functions::). If the characters copied from STRING have duplicable extents or text properties, those are copied into the new string also. *Note @@ -207,11 +207,11 @@ putting strings together, or by taking them apart. either integer is out of range for STRING. Contrast this function with `buffer-substring' (*note Buffer - Contents::.), which returns a string containing a portion of the + Contents::), which returns a string containing a portion of the text in the current buffer. The beginning of a string is at index 0, but the beginning of a buffer is at index 1. - - Function: concat &rest SEQUENCES + - Function: concat &rest sequences This function returns a new string consisting of the characters in the arguments passed to it (along with their text properties, if any). The arguments may be strings, lists of numbers, or vectors @@ -242,8 +242,8 @@ putting strings together, or by taking them apart. representation of the integer. *Don't use this feature; we plan to eliminate it. If you already use this feature, change your programs now!* The proper way to convert an integer to a decimal - number in this way is with `format' (*note Formatting Strings::.) - or `number-to-string' (*note String Conversion::.). + number in this way is with `format' (*note Formatting Strings::) or + `number-to-string' (*note String Conversion::). (concat 137) => "137" @@ -261,7 +261,7 @@ File: lispref.info, Node: Predicates for Characters, Next: Character Codes, P The Predicates for Characters ============================= - - Function: characterp OBJECT + - Function: characterp object This function returns `t' if OBJECT is a character. Some functions that work on integers (e.g. the comparison functions @@ -275,7 +275,7 @@ The Predicates for Characters in the future; therefore, do not rely on them. Instead, convert the characters explicitly using `char-int'. - - Function: integer-or-char-p OBJECT + - Function: integer-or-char-p object This function returns `t' if OBJECT is an integer or character.  @@ -284,7 +284,7 @@ File: lispref.info, Node: Character Codes, Next: Text Comparison, Prev: Predi Character Codes =============== - - Function: char-int CH + - Function: char-int ch This function converts a character into an equivalent integer. The resulting integer will always be non-negative. The integers in the range 0 - 255 map to characters as follows: @@ -307,17 +307,17 @@ Character Codes XEmacs, the order in which character sets were loaded, etc., and you should not depend on them. - - Function: int-char INTEGER + - Function: int-char integer This function converts an integer into the equivalent character. Not all integers correspond to valid characters; use `char-int-p' to determine whether this is the case. If the integer cannot be converted, `nil' is returned. - - Function: char-int-p OBJECT + - Function: char-int-p object This function returns `t' if OBJECT is an integer that can be converted into a character. - - Function: char-or-char-int-p OBJECT + - Function: char-or-char-int-p object This function returns `t' if OBJECT is a character or an integer that can be converted into one. @@ -327,7 +327,7 @@ File: lispref.info, Node: Text Comparison, Next: String Conversion, Prev: Cha Comparison of Characters and Strings ==================================== - - Function: char-equal CHARACTER1 CHARACTER2 + - Function: char-equal character1 character2 This function returns `t' if the arguments represent the same character, `nil' otherwise. This function ignores differences in case if `case-fold-search' is non-`nil'. @@ -341,7 +341,7 @@ Comparison of Characters and Strings (char-equal ?x ?X)) => nil - - Function: char= CHARACTER1 CHARACTER2 + - Function: char= character1 character2 This function returns `t' if the arguments represent the same character, `nil' otherwise. Case is significant. @@ -356,7 +356,7 @@ Comparison of Characters and Strings (char-equal ?x ?X)) => nil - - Function: string= STRING1 STRING2 + - Function: string= string1 string2 This function returns `t' if the characters of the two strings match exactly; case is significant. @@ -368,10 +368,10 @@ Comparison of Characters and Strings => nil - - Function: string-equal STRING1 STRING2 + - Function: string-equal string1 string2 `string-equal' is another name for `string='. - - Function: string< STRING1 STRING2 + - Function: string< string1 string2 This function compares two strings a character at a time. First it scans both the strings at once to find the first pair of corresponding characters that do not match. If the lesser @@ -410,7 +410,7 @@ Comparison of Characters and Strings (string< "" "") => nil - - Function: string-lessp STRING1 STRING2 + - Function: string-lessp string1 string2 `string-lessp' is another name for `string<'. See also `compare-buffer-substrings' in *Note Comparing Text::, for @@ -426,8 +426,8 @@ Conversion of Characters and Strings This section describes functions for conversions between characters, strings and integers. `format' and `prin1-to-string' (*note Output -Functions::.) can also convert Lisp objects into strings. -`read-from-string' (*note Input Functions::.) can "convert" a string +Functions::) can also convert Lisp objects into strings. +`read-from-string' (*note Input Functions::) can "convert" a string representation of a Lisp object into an object. *Note Documentation::, for functions that produce textual @@ -435,7 +435,7 @@ descriptions of text characters and general input events (`single-key-description' and `text-char-description'). These functions are used primarily for making help messages. - - Function: char-to-string CHARACTER + - Function: char-to-string character This function returns a new string with a length of one character. The value of CHARACTER, modulo 256, is used to initialize the element of the string. @@ -452,7 +452,7 @@ functions are used primarily for making help messages. (make-string 1 ?x) => "x" - - Function: string-to-char STRING + - Function: string-to-char string This function returns the first character in STRING. If the string is empty, the function returns 0. (Under XEmacs 19, the value is also 0 when the first character of STRING is the null @@ -473,7 +473,7 @@ functions are used primarily for making help messages. This function may be eliminated in the future if it does not seem useful enough to retain. - - Function: number-to-string NUMBER + - Function: number-to-string number This function returns a string consisting of the printed representation of NUMBER, which may be an integer or a floating point number. The value starts with a sign if the argument is @@ -490,7 +490,7 @@ functions are used primarily for making help messages. See also the function `format' in *Note Formatting Strings::. - - Function: string-to-number STRING &optional BASE + - Function: string-to-number string &optional base This function returns the numeric value of the characters in STRING, read in BASE. It skips spaces and tabs at the beginning of STRING, then reads as much of STRING as it can interpret as a @@ -530,7 +530,7 @@ character. string is created) and is incremented each time a change is made to that string. - - Function: string-modified-tick STRING + - Function: string-modified-tick string This function returns the tick counter for `string'.  @@ -565,7 +565,7 @@ In fact, the functions `message' and `error' provide the same formatting feature described here; they differ from `format' only in how they use the result of formatting. - - Function: format STRING &rest OBJECTS + - Function: format string &rest objects This function returns a new string that is made by copying STRING and then replacing any format specification in the copy with encodings of the corresponding OBJECTS. The arguments OBJECTS are @@ -747,11 +747,11 @@ truncated. In the third case, the padding is on the right. (format "The word `%7s' actually has %d letters in it." "foo" (length "foo")) => "The word ` foo' actually has 3 letters in it." - + (format "The word `%7s' actually has %d letters in it." "specification" (length "specification")) => "The word `specification' actually has 13 letters in it." - + (format "The word `%-7s' actually has %d letters in it." "foo" (length "foo")) => "The word `foo ' actually has 3 letters in it." @@ -793,7 +793,7 @@ that are passed to them as arguments. The examples below use the characters `X' and `x' which have ASCII codes 88 and 120 respectively. - - Function: downcase STRING-OR-CHAR + - Function: downcase string-or-char This function converts a character or a string to lower case. When the argument to `downcase' is a string, the function creates @@ -811,7 +811,7 @@ codes 88 and 120 respectively. => ?x ;; Under XEmacs 20. => 120 ;; Under XEmacs 19. - - Function: upcase STRING-OR-CHAR + - Function: upcase string-or-char This function converts a character or a string to upper case. When the argument to `upcase' is a string, the function creates @@ -831,7 +831,7 @@ codes 88 and 120 respectively. => ?X ;; Under XEmacs 20. => 88 ;; Under XEmacs 19. - - Function: capitalize STRING-OR-CHAR + - Function: capitalize string-or-char This function capitalizes strings or characters. If STRING-OR-CHAR is a string, the function creates and returns a new string, whose contents are a copy of STRING-OR-CHAR in which each @@ -841,7 +841,7 @@ codes 88 and 120 respectively. The definition of a word is any sequence of consecutive characters that are assigned to the word constituent syntax class in the - current syntax table (*note Syntax Class Table::.). + current syntax table (*note Syntax Class Table::). When the argument to `capitalize' is a character, `capitalize' has the same result as `upcase'. @@ -866,8 +866,8 @@ The Case Table table". A case table specifies the mapping between upper case and lower case letters. It affects both the string and character case conversion functions (see the previous section) and those that apply to text in the -buffer (*note Case Changes::.). You need a case table if you are using -a language which has letters other than the standard ASCII letters. +buffer (*note Case Changes::). You need a case table if you are using a +language which has letters other than the standard ASCII letters. A case table is a list of this form: @@ -907,10 +907,10 @@ Changing the standard case table doesn't affect any existing buffers. Here are the functions for working with case tables: - - Function: case-table-p OBJECT + - Function: case-table-p object This predicate returns non-`nil' if OBJECT is a valid case table. - - Function: set-standard-case-table TABLE + - Function: set-standard-case-table table This function makes TABLE the standard case table, so that it will apply to any buffers created subsequently. @@ -920,7 +920,7 @@ Changing the standard case table doesn't affect any existing buffers. - Function: current-case-table This function returns the current buffer's case table. - - Function: set-case-table TABLE + - Function: set-case-table table This sets the current buffer's case table to TABLE. The following three functions are convenient subroutines for packages @@ -929,15 +929,15 @@ DOWNCASE-TABLE provided as an argument; this should be a string to be used as the DOWNCASE part of a case table. They also modify the standard syntax table. *Note Syntax Tables::. - - Function: set-case-syntax-pair UC LC DOWNCASE-TABLE + - Function: set-case-syntax-pair uc lc downcase-table This function specifies a pair of corresponding letters, one upper case and one lower case. - - Function: set-case-syntax-delims L R DOWNCASE-TABLE + - Function: set-case-syntax-delims l r downcase-table This function makes characters L and R a matching pair of case-invariant delimiters. - - Function: set-case-syntax CHAR SYNTAX DOWNCASE-TABLE + - Function: set-case-syntax char syntax downcase-table This function makes CHAR case-invariant, with syntax SYNTAX. - Command: describe-buffer-case-table @@ -984,7 +984,7 @@ assigned values are * a single character - - Function: char-table-p OBJECT + - Function: char-table-p object This function returns non-`nil' if OBJECT is a char table. * Menu: @@ -1026,13 +1026,13 @@ different sorts of values. The different char table types are character. Higher-level Lisp functions are provided for working with syntax tables. The valid values are integers. - - Function: char-table-type TABLE + - Function: char-table-type table This function returns the type of char table TABLE. - Function: char-table-type-list This function returns a list of the recognized char table types. - - Function: valid-char-table-type-p TYPE + - Function: valid-char-table-type-p type This function returns `t' if TYPE if a recognized char table type.  @@ -1041,12 +1041,12 @@ File: lispref.info, Node: Working With Char Tables, Prev: Char Table Types, U Working With Char Tables ------------------------ - - Function: make-char-table TYPE + - Function: make-char-table type This function makes a new, empty char table of type TYPE. TYPE should be a symbol, one of `char', `category', `display', `generic', or `syntax'. - - Function: put-char-table RANGE VAL TABLE + - Function: put-char-table range val table This function sets the value for chars in RANGE to be VAL in TABLE. RANGE specifies one or more characters to be affected and should be @@ -1063,17 +1063,17 @@ Working With Char Tables VAL must be a value appropriate for the type of TABLE. - - Function: get-char-table CH TABLE + - Function: get-char-table ch table This function finds the value for char CH in TABLE. - - Function: get-range-char-table RANGE TABLE &optional MULTI + - Function: get-range-char-table range table &optional multi This function finds the value for a range in TABLE. If there is more than one value, MULTI is returned (defaults to `nil'). - - Function: reset-char-table TABLE + - Function: reset-char-table table This function resets a char table to its default state. - - Function: map-char-table FUNCTION TABLE &optional RANGE + - Function: map-char-table function table &optional range This function maps FUNCTION over entries in TABLE, calling it with two args, each key and value in the table. @@ -1081,11 +1081,11 @@ Working With Char Tables as the RANGE argument to `put-range-table'. If omitted or `t', it defaults to the entire table. - - Function: valid-char-table-value-p VALUE CHAR-TABLE-TYPE + - Function: valid-char-table-value-p value char-table-type This function returns non-`nil' if VALUE is a valid value for CHAR-TABLE-TYPE. - - Function: check-valid-char-table-value VALUE CHAR-TABLE-TYPE + - Function: check-valid-char-table-value value char-table-type This function signals an error if VALUE is not a valid value for CHAR-TABLE-TYPE. @@ -1222,18 +1222,18 @@ cons cell or is a list, or whether it is the distinguished object `nil'. (Many of these predicates can be defined in terms of the others, but they are used so often that it is worth having all of them.) - - Function: consp OBJECT + - Function: consp object This function returns `t' if OBJECT is a cons cell, `nil' - otherwise. `nil' is not a cons cell, although it *is* a list. + otherwise. `nil' is not a cons cell, although it _is_ a list. - - Function: atom OBJECT + - Function: atom object This function returns `t' if OBJECT is an atom, `nil' otherwise. All objects except cons cells are atoms. The symbol `nil' is an atom and is also a list; it is the only Lisp object that is both. (atom OBJECT) == (not (consp OBJECT)) - - Function: listp OBJECT + - Function: listp object This function returns `t' if OBJECT is a cons cell or `nil'. Otherwise, it returns `nil'. @@ -1242,13 +1242,13 @@ others, but they are used so often that it is worth having all of them.) (listp '()) => t - - Function: nlistp OBJECT + - Function: nlistp object This function is the opposite of `listp': it returns `t' if OBJECT is not a list. Otherwise, it returns `nil'. (listp OBJECT) == (not (nlistp OBJECT)) - - Function: null OBJECT + - Function: null object This function returns `t' if OBJECT is `nil', and returns `nil' otherwise. This function is identical to `not', but as a matter of clarity we use `null' when OBJECT is considered a list and diff --git a/info/lispref.info-6 b/info/lispref.info-6 index ce764e8..212bafa 100644 --- a/info/lispref.info-6 +++ b/info/lispref.info-6 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -55,7 +55,7 @@ File: lispref.info, Node: List Elements, Next: Building Lists, Prev: List-rel Accessing Elements of Lists =========================== - - Function: car CONS-CELL + - Function: car cons-cell This function returns the value pointed to by the first pointer of the cons cell CONS-CELL. Expressed another way, this function returns the CAR of CONS-CELL. @@ -69,7 +69,7 @@ Accessing Elements of Lists (car '()) => nil - - Function: cdr CONS-CELL + - Function: cdr cons-cell This function returns the value pointed to by the second pointer of the cons cell CONS-CELL. Expressed another way, this function returns the CDR of CONS-CELL. @@ -83,7 +83,7 @@ Accessing Elements of Lists (cdr '()) => nil - - Function: car-safe OBJECT + - Function: car-safe object This function lets you take the CAR of a cons cell while avoiding errors for other data types. It returns the CAR of OBJECT if OBJECT is a cons cell, `nil' otherwise. This is in contrast to @@ -96,7 +96,7 @@ Accessing Elements of Lists (car x) nil)) - - Function: cdr-safe OBJECT + - Function: cdr-safe object This function lets you take the CDR of a cons cell while avoiding errors for other data types. It returns the CDR of OBJECT if OBJECT is a cons cell, `nil' otherwise. This is in contrast to @@ -109,7 +109,7 @@ Accessing Elements of Lists (cdr x) nil)) - - Function: nth N LIST + - Function: nth n list This function returns the Nth element of LIST. Elements are numbered starting with zero, so the CAR of LIST is element number zero. If the length of LIST is N or less, the value is `nil'. @@ -125,7 +125,7 @@ Accessing Elements of Lists (nth n x) == (car (nthcdr n x)) - - Function: nthcdr N LIST + - Function: nthcdr n list This function returns the Nth CDR of LIST. In other words, it removes the first N links of LIST and returns what follows. @@ -143,34 +143,34 @@ Accessing Elements of Lists access particular elements in a nested list. All of these can be rewritten in terms of the functions just described. - - Function: caar CONS-CELL - - Function: cadr CONS-CELL - - Function: cdar CONS-CELL - - Function: cddr CONS-CELL - - Function: caaar CONS-CELL - - Function: caadr CONS-CELL - - Function: cadar CONS-CELL - - Function: caddr CONS-CELL - - Function: cdaar CONS-CELL - - Function: cdadr CONS-CELL - - Function: cddar CONS-CELL - - Function: cdddr CONS-CELL - - Function: caaaar CONS-CELL - - Function: caaadr CONS-CELL - - Function: caadar CONS-CELL - - Function: caaddr CONS-CELL - - Function: cadaar CONS-CELL - - Function: cadadr CONS-CELL - - Function: caddar CONS-CELL - - Function: cadddr CONS-CELL - - Function: cdaaar CONS-CELL - - Function: cdaadr CONS-CELL - - Function: cdadar CONS-CELL - - Function: cdaddr CONS-CELL - - Function: cddaar CONS-CELL - - Function: cddadr CONS-CELL - - Function: cdddar CONS-CELL - - Function: cddddr CONS-CELL + - Function: caar cons-cell + - Function: cadr cons-cell + - Function: cdar cons-cell + - Function: cddr cons-cell + - Function: caaar cons-cell + - Function: caadr cons-cell + - Function: cadar cons-cell + - Function: caddr cons-cell + - Function: cdaar cons-cell + - Function: cdadr cons-cell + - Function: cddar cons-cell + - Function: cdddr cons-cell + - Function: caaaar cons-cell + - Function: caaadr cons-cell + - Function: caadar cons-cell + - Function: caaddr cons-cell + - Function: cadaar cons-cell + - Function: cadadr cons-cell + - Function: caddar cons-cell + - Function: cadddr cons-cell + - Function: cdaaar cons-cell + - Function: cdaadr cons-cell + - Function: cdadar cons-cell + - Function: cdaddr cons-cell + - Function: cddaar cons-cell + - Function: cddadr cons-cell + - Function: cdddar cons-cell + - Function: cddddr cons-cell Each of these functions is equivalent to one or more applications of `car' and/or `cdr'. For example, @@ -191,22 +191,22 @@ rewritten in terms of the functions just described. That is to say, read the a's and d's from right to left and apply a `car' or `cdr' for each a or d found, respectively. - - Function: first LIST + - Function: first list This is equivalent to `(nth 0 LIST)', i.e. the first element of LIST. (Note that this is also equivalent to `car'.) - - Function: second LIST + - Function: second list This is equivalent to `(nth 1 LIST)', i.e. the second element of LIST. - - Function: third LIST - - Function: fourth LIST - - Function: fifth LIST - - Function: sixth LIST - - Function: seventh LIST - - Function: eighth LIST - - Function: ninth LIST - - Function: tenth LIST + - Function: third list + - Function: fourth list + - Function: fifth list + - Function: sixth list + - Function: seventh list + - Function: eighth list + - Function: ninth list + - Function: tenth list These are equivalent to `(nth 2 LIST)' through `(nth 9 LIST)' respectively, i.e. the third through tenth elements of LIST. @@ -221,7 +221,7 @@ Lisp. `cons' is the fundamental list-building function; however, it is interesting to note that `list' is used more times in the source code for Emacs than `cons'. - - Function: cons OBJECT1 OBJECT2 + - Function: cons object1 object2 This function is the fundamental function used to build new list structure. It creates a new cons cell, making OBJECT1 the CAR, and OBJECT2 the CDR. It then returns the new cons cell. The @@ -245,7 +245,7 @@ for Emacs than `cons'. used in this example and the function named `list' described below; any symbol can serve both purposes. - - Function: list &rest OBJECTS + - Function: list &rest objects This function creates a list with OBJECTS as its elements. The resulting list is always `nil'-terminated. If no OBJECTS are given, the empty list is returned. @@ -257,17 +257,17 @@ for Emacs than `cons'. (list) => nil - - Function: make-list LENGTH OBJECT + - Function: make-list length object This function creates a list of length LENGTH, in which all the elements have the identical value OBJECT. Compare `make-list' - with `make-string' (*note Creating Strings::.). + with `make-string' (*note Creating Strings::). (make-list 3 'pigs) => (pigs pigs pigs) (make-list 0 'pigs) => nil - - Function: append &rest SEQUENCES + - Function: append &rest sequences This function returns a list containing all the elements of SEQUENCES. The SEQUENCES may be lists, vectors, or strings, but the last one should be a list. All arguments except the last one @@ -357,12 +357,12 @@ for Emacs than `cons'. of the original integers. *Don't use this feature; we plan to eliminate it. If you already use this feature, change your programs now!* The proper way to convert an integer to a decimal - number in this way is with `format' (*note Formatting Strings::.) - or `number-to-string' (*note String Conversion::.). + number in this way is with `format' (*note Formatting Strings::) + or `number-to-string' (*note String Conversion::). - - Function: reverse LIST + - Function: reverse list This function creates a new list whose elements are the elements of - LIST, but in reverse order. The original argument LIST is *not* + LIST, but in reverse order. The original argument LIST is _not_ altered. (setq x '(1 2 3 4)) @@ -403,7 +403,7 @@ Altering List Elements with `setcar' a list, `setcar' replaces one element of a list with a different element. - - Function: setcar CONS OBJECT + - Function: setcar cons object This function stores OBJECT as the new CAR of CONS, replacing its previous CAR. It returns the value OBJECT. For example: @@ -481,7 +481,7 @@ Altering the CDR of a List The lowest-level primitive for modifying a CDR is `setcdr': - - Function: setcdr CONS OBJECT + - Function: setcdr cons object This function stores OBJECT as the new CDR of CONS, replacing its previous CDR. It returns the value OBJECT. @@ -535,7 +535,7 @@ list. Here is this result in box notation: - -------------- ------------- ------------- + -------------- ------------- ------------- | car | cdr | | car | cdr | | car | cdr | | a | o | -->| b | o------->| c | nil | | | | | | | | | | | | @@ -563,9 +563,9 @@ to them as arguments, to produce a new list that is the returned value. See `delq', in *Note Sets And Lists::, for another function that modifies cons cells. - - Function: nconc &rest LISTS + - Function: nconc &rest lists This function returns a list containing all the elements of LISTS. - Unlike `append' (*note Building Lists::.), the LISTS are *not* + Unlike `append' (*note Building Lists::), the LISTS are _not_ copied. Instead, the last CDR of each of the LISTS is changed to refer to the following list. The last of the LISTS is not altered. For example: @@ -595,23 +595,21 @@ modifies cons cells. (defun add-foo (x) ; We want this function to add (nconc '(foo) x)) ; `foo' to the front of its arg. - + (symbol-function 'add-foo) => (lambda (x) (nconc (quote (foo)) x)) - + (setq xx (add-foo '(1 2))) ; It seems to work. => (foo 1 2) - (setq xy (add-foo '(3 4))) ; What happened? => (foo 1 2 3 4) - (eq xx xy) => t - + (symbol-function 'add-foo) => (lambda (x) (nconc (quote (foo 1 2 3 4) x))) - - Function: nreverse LIST + - Function: nreverse list This function reverses the order of the elements of LIST. Unlike `reverse', `nreverse' alters its argument by reversing the CDRs in the cons cells forming the list. The cons cell that used to be @@ -646,7 +644,7 @@ modifies cons cells. | | | | ------------- ------------ - - Function: sort LIST PREDICATE + - Function: sort list predicate This function sorts LIST stably, though destructively, and returns the sorted list. It compares elements using PREDICATE. A stable sort is one in which elements with equal sort keys maintain their @@ -710,7 +708,7 @@ versions, `member' and `delete'. XEmacs Lisp does not have them. You can write them in Lisp if you wish. - - Function: memq OBJECT LIST + - Function: memq object list This function tests to see whether OBJECT is a member of LIST. If it is, `memq' returns a list starting with the first occurrence of OBJECT. Otherwise, it returns `nil'. The letter `q' in `memq' @@ -722,7 +720,7 @@ versions, `member' and `delete'. (memq '(2) '((1) (2))) ; `(2)' and `(2)' are not `eq'. => nil - - Function: delq OBJECT LIST + - Function: delq object list This function destructively removes all elements `eq' to OBJECT from LIST. The letter `q' in `delq' says that it uses `eq' to compare OBJECT against the elements of the list, like `memq'. @@ -734,7 +732,7 @@ after those elements: (delq 'a '(a b c)) == (cdr '(a b c)) When an element to be deleted appears in the middle of the list, -removing it involves changing the CDRs (*note Setcdr::.). +removing it involves changing the CDRs (*note Setcdr::). (setq sample-list '(a b c (4))) => (a b c (4)) @@ -766,7 +764,7 @@ and the `(4)' in the `sample-list' are not `eq': The following two functions are like `memq' and `delq' but use `equal' rather than `eq' to compare elements. They are new in Emacs 19. - - Function: member OBJECT LIST + - Function: member object list The function `member' tests to see whether OBJECT is a member of LIST, comparing members with OBJECT using `equal'. If OBJECT is a member, `member' returns a list starting with its first occurrence @@ -782,7 +780,7 @@ and the `(4)' in the `sample-list' are not `eq': (member "foo" '("foo" "bar")) => ("foo" "bar") - - Function: delete OBJECT LIST + - Function: delete object list This function destructively removes all elements `equal' to OBJECT from LIST. It is to `delq' as `member' is to `memq': it uses `equal' to compare elements with OBJECT, like `member'; when it @@ -820,7 +818,7 @@ key `maple' is associated with `seeds'. The associated values in an alist may be any Lisp objects; so may the keys. For example, in the following alist, the symbol `a' is associated with the number `1', and the string `"b"' is associated with -the *list* `(2 3)', which is the CDR of the alist element: +the _list_ `(2 3)', which is the CDR of the alist element: ((a . 1) ("b" 2 3)) @@ -847,7 +845,7 @@ the front of the list. When searching an association list for an association with a given key, the first one found is returned, if there is more than one. - In XEmacs Lisp, it is *not* an error if an element of an association + In XEmacs Lisp, it is _not_ an error if an element of an association list is not a cons cell. The alist search functions simply ignore such elements. Many other versions of Lisp signal errors in such cases. @@ -856,10 +854,10 @@ respects. A property list behaves like an association list in which each key can occur only once. *Note Property Lists::, for a comparison of property lists and association lists. - - Function: assoc KEY ALIST + - Function: assoc key alist This function returns the first association for KEY in ALIST. It compares KEY against the alist elements using `equal' (*note - Equality Predicates::.). It returns `nil' if no association in + Equality Predicates::). It returns `nil' if no association in ALIST has a CAR `equal' to KEY. For example: (setq trees '((pine . cones) (oak . acorns) (maple . seeds))) @@ -884,7 +882,7 @@ of property lists and association lists. (cdr (assoc 2 needles-per-cluster)) => ("Austrian Pine" "Red Pine") - - Function: rassoc VALUE ALIST + - Function: rassoc value alist This function returns the first association with value VALUE in ALIST. It returns `nil' if no association in ALIST has a CDR `equal' to VALUE. @@ -893,7 +891,7 @@ of property lists and association lists. ALIST association instead of the CAR. You can think of this as "reverse `assoc'", finding the key for a given value. - - Function: assq KEY ALIST + - Function: assq key alist This function is like `assoc' in that it returns the first association for KEY in ALIST, but it makes the comparison using `eq' instead of `equal'. `assq' returns `nil' if no association @@ -918,7 +916,7 @@ of property lists and association lists. (assoc "simple leaves" leaves) => ("simple leaves" . oak) - - Function: rassq VALUE ALIST + - Function: rassq value alist This function returns the first association with value VALUE in ALIST. It returns `nil' if no association in ALIST has a CDR `eq' to VALUE. @@ -950,7 +948,7 @@ of property lists and association lists. (lily white) == (lily . (white)) - - Function: remassoc KEY ALIST + - Function: remassoc key alist This function deletes by side effect any associations with key KEY in ALIST - i.e. it removes any elements from ALIST whose `car' is `equal' to KEY. The modified ALIST is returned. @@ -960,7 +958,7 @@ of property lists and association lists. `(setq foo (remassoc key foo))' to be sure of changing the value of `foo'. - - Function: remassq KEY ALIST + - Function: remassq key alist This function deletes by side effect any associations with key KEY in ALIST - i.e. it removes any elements from ALIST whose `car' is `eq' to KEY. The modified ALIST is returned. @@ -968,7 +966,7 @@ of property lists and association lists. This function is exactly like `remassoc', but comparisons between KEY and keys in ALIST are done using `eq' instead of `equal'. - - Function: remrassoc VALUE ALIST + - Function: remrassoc value alist This function deletes by side effect any associations with value VALUE in ALIST - i.e. it removes any elements from ALIST whose `cdr' is `equal' to VALUE. The modified ALIST is returned. @@ -983,7 +981,7 @@ of property lists and association lists. as "reverse `remassoc'", removing an association based on its value instead of its key. - - Function: remrassq VALUE ALIST + - Function: remrassq value alist This function deletes by side effect any associations with value VALUE in ALIST - i.e. it removes any elements from ALIST whose `cdr' is `eq' to VALUE. The modified ALIST is returned. @@ -991,7 +989,7 @@ of property lists and association lists. This function is exactly like `remrassoc', but comparisons between VALUE and values in ALIST are done using `eq' instead of `equal'. - - Function: copy-alist ALIST + - Function: copy-alist alist This function returns a two-level deep copy of ALIST: it creates a new copy of each association, so that you can alter the associations of the new alist without changing the old one. @@ -1062,13 +1060,13 @@ association lists generally are not. compared with `eq', and "lax" plists, whose keys are compared with `equal', - - Function: valid-plist-p PLIST + - Function: valid-plist-p plist Given a plist, this function returns non-`nil' if its format is correct. If it returns `nil', `check-valid-plist' will signal an error when given the plist; that means it's a malformed or circular plist or has non-symbols as keywords. - - Function: check-valid-plist PLIST + - Function: check-valid-plist plist Given a plist, this function signals an error if there is anything wrong with it. This means that it's a malformed or circular plist. @@ -1084,25 +1082,25 @@ File: lispref.info, Node: Working With Normal Plists, Next: Working With Lax P Working With Normal Plists -------------------------- - - Function: plist-get PLIST PROP &optional DEFAULT + - Function: plist-get plist prop &optional default This function extracts a value from a property list. The function returns the value corresponding to the given PROP, or DEFAULT if PROP is not one of the properties on the list. - - Function: plist-put PLIST PROP VAL + - Function: plist-put plist prop val This function changes the value in PLIST of PROP to VAL. If PROP is already a property on the list, its value is set to VAL, otherwise the new PROP VAL pair is added. The new plist is returned; use `(setq x (plist-put x prop val))' to be sure to use the new value. The PLIST is modified by side effects. - - Function: plist-remprop PLIST PROP + - Function: plist-remprop plist prop This function removes from PLIST the property PROP and its value. The new plist is returned; use `(setq x (plist-remprop x prop val))' to be sure to use the new value. The PLIST is modified by side effects. - - Function: plist-member PLIST PROP + - Function: plist-member plist prop This function returns `t' if PROP has a value specified in PLIST. In the following functions, if optional arg NIL-MEANS-NOT-PRESENT is @@ -1111,16 +1109,16 @@ This feature is a virus that has infected old Lisp implementations (and thus E-Lisp, due to RMS's enamorment with old Lisps), but should not be used except for backward compatibility. - - Function: plists-eq A B &optional NIL-MEANS-NOT-PRESENT + - Function: plists-eq a b &optional nil-means-not-present This function returns non-`nil' if property lists A and B are `eq' (i.e. their values are `eq'). - - Function: plists-equal A B &optional NIL-MEANS-NOT-PRESENT + - Function: plists-equal a b &optional nil-means-not-present This function returns non-`nil' if property lists A and B are `equal' (i.e. their values are `equal'; their keys are still compared using `eq'). - - Function: canonicalize-plist PLIST &optional NIL-MEANS-NOT-PRESENT + - Function: canonicalize-plist plist &optional nil-means-not-present This function destructively removes any duplicate entries from a plist. In such cases, the first entry applies. @@ -1137,21 +1135,21 @@ Working With Lax Plists Recall that a "lax plist" is a property list whose keys are compared using `equal' instead of `eq'. - - Function: lax-plist-get LAX-PLIST PROP &optional DEFAULT + - Function: lax-plist-get lax-plist prop &optional default This function extracts a value from a lax property list. The function returns the value corresponding to the given PROP, or DEFAULT if PROP is not one of the properties on the list. - - Function: lax-plist-put LAX-PLIST PROP VAL + - Function: lax-plist-put lax-plist prop val This function changes the value in LAX-PLIST of PROP to VAL. - - Function: lax-plist-remprop LAX-PLIST PROP + - Function: lax-plist-remprop lax-plist prop This function removes from LAX-PLIST the property PROP and its value. The new plist is returned; use `(setq x (lax-plist-remprop x prop val))' to be sure to use the new value. The LAX-PLIST is modified by side effects. - - Function: lax-plist-member LAX-PLIST PROP + - Function: lax-plist-member lax-plist prop This function returns `t' if PROP has a value specified in LAX-PLIST. @@ -1161,17 +1159,17 @@ This feature is a virus that has infected old Lisp implementations (and thus E-Lisp, due to RMS's enamorment with old Lisps), but should not be used except for backward compatibility. - - Function: lax-plists-eq A B &optional NIL-MEANS-NOT-PRESENT + - Function: lax-plists-eq a b &optional nil-means-not-present This function returns non-`nil' if lax property lists A and B are `eq' (i.e. their values are `eq'; their keys are still compared using `equal'). - - Function: lax-plists-equal A B &optional NIL-MEANS-NOT-PRESENT + - Function: lax-plists-equal a b &optional nil-means-not-present This function returns non-`nil' if lax property lists A and B are `equal' (i.e. their values are `equal'). - - Function: canonicalize-lax-plist LAX-PLIST &optional - NIL-MEANS-NOT-PRESENT + - Function: canonicalize-lax-plist lax-plist &optional + nil-means-not-present This function destructively removes any duplicate entries from a lax plist. In such cases, the first entry applies. @@ -1185,7 +1183,7 @@ File: lispref.info, Node: Converting Plists To/From Alists, Prev: Working With Converting Plists To/From Alists -------------------------------- - - Function: alist-to-plist ALIST + - Function: alist-to-plist alist This function converts association list ALIST into the equivalent property-list form. The plist is returned. This converts from @@ -1197,7 +1195,7 @@ Converting Plists To/From Alists The original alist is not modified. - - Function: plist-to-alist PLIST + - Function: plist-to-alist plist This function converts property list PLIST into the equivalent association-list form. The alist is returned. This converts from @@ -1214,11 +1212,11 @@ except that they destructively modify their arguments, using cons cells from the original list to form the new list rather than allocating new cons cells. - - Function: destructive-alist-to-plist ALIST + - Function: destructive-alist-to-plist alist This function destructively converts association list ALIST into the equivalent property-list form. The plist is returned. - - Function: destructive-plist-to-alist PLIST + - Function: destructive-plist-to-alist plist This function destructively converts property list PLIST into the equivalent association-list form. The alist is returned. @@ -1243,9 +1241,9 @@ parent will still be reclaimed, and will automatically be removed from its parent's list of children. Weak lists are similar to weak hash tables (*note Weak Hash -Tables::.). +Tables::). - - Function: weak-list-p OBJECT + - Function: weak-list-p object This function returns non-`nil' if OBJECT is a weak list. Weak lists come in one of four types: @@ -1266,18 +1264,18 @@ Tables::.). Objects in the list disappear if they are conses and the cdr is not referenced outside of the list. - - Function: make-weak-list &optional TYPE + - Function: make-weak-list &optional type This function creates a new weak list of type TYPE. TYPE is a symbol (one of `simple', `assoc', `key-assoc', or `value-assoc', as described above) and defaults to `simple'. - - Function: weak-list-type WEAK + - Function: weak-list-type weak This function returns the type of the given weak-list object. - - Function: weak-list-list WEAK + - Function: weak-list-list weak This function returns the list contained in a weak-list object. - - Function: set-weak-list-list WEAK NEW-LIST + - Function: set-weak-list-list weak new-list This function changes the list contained in a weak-list object.  diff --git a/info/lispref.info-7 b/info/lispref.info-7 index 780fd80..7c4b616 100644 --- a/info/lispref.info-7 +++ b/info/lispref.info-7 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -60,11 +60,11 @@ vector, or a string. The common property that all sequences have is that each is an ordered collection of elements. This section describes functions that accept any kind of sequence. - - Function: sequencep OBJECT + - Function: sequencep object Returns `t' if OBJECT is a list, vector, bit vector, or string, `nil' otherwise. - - Function: copy-sequence SEQUENCE + - Function: copy-sequence sequence Returns a copy of SEQUENCE. The copy is the same type of object as the original sequence, and it has the same elements in the same order. @@ -115,7 +115,7 @@ functions that accept any kind of sequence. (bit-vector 1 0 1 1 0 1 0 0) => #*10110100 - - Function: length SEQUENCE + - Function: length sequence Returns the number of elements in SEQUENCE. If SEQUENCE is a cons cell that is not a list (because the final CDR is not `nil'), a `wrong-type-argument' error is signaled. @@ -131,7 +131,7 @@ functions that accept any kind of sequence. (length #*01101) => 5 - - Function: elt SEQUENCE INDEX + - Function: elt sequence index This function returns the element of SEQUENCE indexed by INDEX. Legitimate values of INDEX are integers ranging from 0 up to one less than the length of SEQUENCE. If SEQUENCE is a list, then @@ -151,8 +151,8 @@ functions that accept any kind of sequence. (elt [1 2 3 4] -1) error-->Args out of range: [1 2 3 4], -1 - This function generalizes `aref' (*note Array Functions::.) and - `nth' (*note List Elements::.). + This function generalizes `aref' (*note Array Functions::) and + `nth' (*note List Elements::).  File: lispref.info, Node: Arrays, Next: Array Functions, Prev: Sequence Functions, Up: Sequences Arrays Vectors @@ -188,7 +188,7 @@ Type::, *Note Vector Type::, and *Note Bit Vector Type::. * The elements of an array may be referenced or changed with the functions `aref' and `aset', respectively (*note Array - Functions::.). + Functions::). In principle, if you wish to have an array of text characters, you could use either a string or a vector. In practice, we always choose @@ -233,7 +233,7 @@ Functions that Operate on Arrays In this section, we describe the functions that accept strings, vectors, and bit vectors. - - Function: arrayp OBJECT + - Function: arrayp object This function returns `t' if OBJECT is an array (i.e., a string, vector, or bit vector). @@ -244,7 +244,7 @@ vectors, and bit vectors. (arrayp #*101) => t - - Function: aref ARRAY INDEX + - Function: aref array index This function returns the INDEXth element of ARRAY. The first element is at index zero. @@ -263,7 +263,7 @@ vectors, and bit vectors. See also the function `elt', in *Note Sequence Functions::. - - Function: aset ARRAY INDEX OBJECT + - Function: aset array index object This function sets the INDEXth element of ARRAY to be OBJECT. It returns OBJECT. @@ -291,7 +291,7 @@ vectors, and bit vectors. If ARRAY is a string and OBJECT is not a character, a `wrong-type-argument' error results. - - Function: fillarray ARRAY OBJECT + - Function: fillarray array object This function fills the array ARRAY with OBJECT, so that each element of ARRAY is OBJECT. It returns ARRAY. @@ -364,7 +364,7 @@ Functions That Operate on Vectors Here are some functions that relate to vectors: - - Function: vectorp OBJECT + - Function: vectorp object This function returns `t' if OBJECT is a vector. (vectorp [a]) @@ -372,7 +372,7 @@ Functions That Operate on Vectors (vectorp "asdf") => nil - - Function: vector &rest OBJECTS + - Function: vector &rest objects This function creates and returns a vector whose elements are the arguments, OBJECTS. @@ -381,14 +381,14 @@ Functions That Operate on Vectors (vector) => [] - - Function: make-vector LENGTH OBJECT + - Function: make-vector length object This function returns a new vector consisting of LENGTH elements, each initialized to OBJECT. (setq sleepy (make-vector 9 'Z)) => [Z Z Z Z Z Z Z Z Z] - - Function: vconcat &rest SEQUENCES + - Function: vconcat &rest sequences This function returns a new vector containing all the elements of the SEQUENCES. The arguments SEQUENCES may be lists, vectors, or strings. If no SEQUENCES are given, an empty vector is returned. @@ -411,8 +411,8 @@ Functions That Operate on Vectors of the original integers. *Don't use this feature; we plan to eliminate it. If you already use this feature, change your programs now!* The proper way to convert an integer to a decimal - number in this way is with `format' (*note Formatting Strings::.) - or `number-to-string' (*note String Conversion::.). + number in this way is with `format' (*note Formatting Strings::) + or `number-to-string' (*note String Conversion::). For other concatenation functions, see `mapconcat' in *Note Mapping Functions::, `concat' in *Note Creating Strings::, `append' @@ -420,7 +420,7 @@ Functions That Operate on Vectors Functions::. The `append' function provides a way to convert a vector into a list -with the same elements (*note Building Lists::.): +with the same elements (*note Building Lists::): (setq avector [1 two (quote (three)) "four" [five]]) => [1 two (quote (three)) "four" [five]] @@ -458,7 +458,7 @@ Functions That Operate on Bit Vectors Here are some functions that relate to bit vectors: - - Function: bit-vector-p OBJECT + - Function: bit-vector-p object This function returns `t' if OBJECT is a bit vector. (bit-vector-p #*01) @@ -468,10 +468,10 @@ Functions That Operate on Bit Vectors (bit-vector-p "01") => nil - - Function: bitp OBJECT + - Function: bitp object This function returns `t' if OBJECT is either 0 or 1. - - Function: bit-vector &rest OBJECTS + - Function: bit-vector &rest objects This function creates and returns a bit vector whose elements are the arguments OBJECTS. The elements must be either of the two integers 0 or 1. @@ -481,14 +481,14 @@ Functions That Operate on Bit Vectors (bit-vector) => #* - - Function: make-bit-vector LENGTH OBJECT + - Function: make-bit-vector length object This function creates and returns a bit vector consisting of LENGTH elements, each initialized to OBJECT. (setq picket-fence (make-bit-vector 9 1)) => #*111111111 - - Function: bvconcat &rest SEQUENCES + - Function: bvconcat &rest sequences This function returns a new bit vector containing all the elements of the SEQUENCES. The arguments SEQUENCES may be lists, vectors, or bit vectors, all of whose elements are the integers 0 or 1. If @@ -512,7 +512,7 @@ Functions That Operate on Bit Vectors Building Lists::. The `append' function provides a way to convert a bit vector into a -list with the same elements (*note Building Lists::.): +list with the same elements (*note Building Lists::): (setq bv #*00001110) => #*00001110 @@ -535,7 +535,7 @@ Type::. You can test whether an arbitrary Lisp object is a symbol with `symbolp': - - Function: symbolp OBJECT + - Function: symbolp object This function returns `t' if OBJECT is a symbol, `nil' otherwise. * Menu: @@ -594,15 +594,15 @@ Symbols::.) In normal usage, the function cell usually contains a function or macro, as that is what the Lisp interpreter expects to see there (*note -Evaluation::.). Keyboard macros (*note Keyboard Macros::.), keymaps -(*note Keymaps::.) and autoload objects (*note Autoloading::.) are also +Evaluation::). Keyboard macros (*note Keyboard Macros::), keymaps +(*note Keymaps::) and autoload objects (*note Autoloading::) are also sometimes stored in the function cell of symbols. We often refer to "the function `foo'" when we really mean the function stored in the function cell of the symbol `foo'. We make the distinction only when necessary. The property list cell normally should hold a correctly formatted -property list (*note Property Lists::.), as a number of functions expect +property list (*note Property Lists::), as a number of functions expect to see a property list there. The function cell or the value cell may be "void", which means that @@ -635,9 +635,9 @@ file. (29529 is the offset from the beginning of the `DOC' file to where that documentation string begins.) The function cell contains the function for returning the name of the file. `buffer-file-name' names a primitive function, which has no read syntax and prints in hash -notation (*note Primitive Function Type::.). A symbol naming a -function written in Lisp would have a lambda expression (or a byte-code -object) in this cell. +notation (*note Primitive Function Type::). A symbol naming a function +written in Lisp would have a lambda expression (or a byte-code object) +in this cell.  File: lispref.info, Node: Definitions, Next: Creating Symbols, Prev: Symbol Components, Up: Symbols @@ -679,7 +679,7 @@ as a variable or function. Thus, you can make a symbol a global variable with `setq', whether you define it first or not. The real purpose of definitions is to guide programmers and programming tools. They inform programmers who read the code that certain symbols are -*intended* to be used as variables, or as functions. In addition, +_intended_ to be used as variables, or as functions. In addition, utilities such as `etags' and `make-docfile' recognize definitions, and add appropriate information to tag tables and the `DOC' file. *Note Accessing Documentation::. @@ -744,7 +744,7 @@ symbol in the obarray bucket. The results would be unpredictable. It is possible for two different symbols to have the same name in different obarrays; these symbols are not `eq' or `equal'. However, this normally happens only as part of the abbrev mechanism (*note -Abbrevs::.). +Abbrevs::). Common Lisp note: In Common Lisp, a single symbol may be interned in several obarrays. @@ -753,7 +753,7 @@ Abbrevs::.). arguments. A `wrong-type-argument' error is signaled if the name is not a string, or if the obarray is not a vector. - - Function: symbol-name SYMBOL + - Function: symbol-name symbol This function returns the string that is SYMBOL's name. For example: @@ -764,7 +764,7 @@ not a string, or if the obarray is not a vector. the name of the symbol, but fails to update the obarray, so don't do it! - - Function: make-symbol NAME + - Function: make-symbol name This function returns a newly-allocated, uninterned symbol whose name is NAME (which must be a string). Its value and function definition are void, and its property list is `nil'. In the @@ -776,7 +776,7 @@ not a string, or if the obarray is not a vector. (eq sym 'foo) => nil - - Function: intern NAME &optional OBARRAY + - Function: intern name &optional obarray This function returns the interned symbol whose name is NAME. If there is no such symbol in the obarray OBARRAY, `intern' creates a new one, adds it to the obarray, and returns it. If OBARRAY is @@ -792,7 +792,7 @@ not a string, or if the obarray is not a vector. (eq sym 'foo) => nil - - Function: intern-soft NAME &optional OBARRAY + - Function: intern-soft name &optional obarray This function returns the symbol in OBARRAY whose name is NAME, or `nil' if OBARRAY has no symbol with that name. Therefore, you can use `intern-soft' to test whether a symbol with a given name is @@ -805,13 +805,10 @@ not a string, or if the obarray is not a vector. => frazzle (intern-soft "frazzle") ; That one cannot be found. => nil - (setq sym (intern "frazzle")) ; Create an interned one. => frazzle - (intern-soft "frazzle") ; That one can be found! => frazzle - (eq sym 'frazzle) ; And it is the same one. => t @@ -819,7 +816,7 @@ not a string, or if the obarray is not a vector. This variable is the standard obarray for use by `intern' and `read'. - - Function: mapatoms FUNCTION &optional OBARRAY + - Function: mapatoms function &optional obarray This function calls FUNCTION for each symbol in the obarray OBARRAY. It returns `nil'. If OBARRAY is omitted, it defaults to the value of `obarray', the standard obarray for ordinary symbols. @@ -837,7 +834,7 @@ not a string, or if the obarray is not a vector. See `documentation' in *Note Accessing Documentation::, for another example using `mapatoms'. - - Function: unintern SYMBOL &optional OBARRAY + - Function: unintern symbol &optional obarray This function deletes SYMBOL from the obarray OBARRAY. If `symbol' is not actually in the obarray, `unintern' does nothing. If OBARRAY is `nil', the current obarray is used. @@ -891,7 +888,7 @@ File: lispref.info, Node: Plists and Alists, Next: Symbol Plists, Up: Symbol Property Lists and Association Lists ------------------------------------ - Association lists (*note Association Lists::.) are very similar to + Association lists (*note Association Lists::) are very similar to property lists. In contrast to association lists, the order of the pairs in the property list is not significant since the property names must be distinct. @@ -924,10 +921,10 @@ File: lispref.info, Node: Symbol Plists, Next: Other Plists, Prev: Plists and Property List Functions for Symbols ----------------------------------- - - Function: symbol-plist SYMBOL + - Function: symbol-plist symbol This function returns the property list of SYMBOL. - - Function: setplist SYMBOL PLIST + - Function: setplist symbol plist This function sets SYMBOL's property list to PLIST. Normally, PLIST should be a well-formed property list, but this is not enforced. @@ -940,9 +937,9 @@ Property List Functions for Symbols For symbols in special obarrays, which are not used for ordinary purposes, it may make sense to use the property list cell in a nonstandard fashion; in fact, the abbrev mechanism does so (*note - Abbrevs::.). + Abbrevs::). - - Function: get SYMBOL PROPERTY + - Function: get symbol property This function finds the value of the property named PROPERTY in SYMBOL's property list. If there is no such property, `nil' is returned. Thus, there is no distinction between a value of `nil' @@ -953,7 +950,7 @@ Property List Functions for Symbols See `put' for an example. - - Function: put SYMBOL PROPERTY VALUE + - Function: put symbol property value This function puts VALUE onto SYMBOL's property list under the property name PROPERTY, replacing any previous property value. The `put' function returns VALUE. @@ -976,14 +973,14 @@ Property Lists Outside Symbols These functions are useful for manipulating property lists that are stored in places other than symbols: - - Function: getf PLIST PROPERTY &optional DEFAULT + - Function: getf plist property &optional default This returns the value of the PROPERTY property stored in the property list PLIST. For example, (getf '(foo 4) 'foo) => 4 - - Function: putf PLIST PROPERTY VALUE + - Function: putf plist property value This stores VALUE as the value of the PROPERTY property in the property list PLIST. It may modify PLIST destructively, or it may construct a new list structure without altering the old. The @@ -997,13 +994,13 @@ stored in places other than symbols: (setq my-plist (putf my-plist 'quux '(a))) => (quux (a) bar t foo 5) - - Function: plists-eq A B + - Function: plists-eq a b This function returns non-`nil' if property lists A and B are `eq'. This means that the property lists have the same values for all the same properties, where comparison between values is done using `eq'. - - Function: plists-equal A B + - Function: plists-equal a b This function returns non-`nil' if property lists A and B are `equal'. @@ -1087,7 +1084,7 @@ function `car'. in it. *Note Functions::. The execution of the function may itself work by evaluating the function definition; or the function may be a Lisp primitive implemented in C, or it may be a byte-compiled function -(*note Byte Compilation::.). +(*note Byte Compilation::). The evaluation of forms takes place in a context called the "environment", which consists of the current values and bindings of all @@ -1096,14 +1093,14 @@ creating a new binding for it, the value of the binding in the current environment is used. *Note Variables::. Evaluation of a form may create new environments for recursive -evaluation by binding variables (*note Local Variables::.). These +evaluation by binding variables (*note Local Variables::). These environments are temporary and vanish by the time evaluation of the form is complete. The form may also make changes that persist; these changes are called "side effects". An example of a form that produces side effects is `(setq foo 1)'. The details of what evaluation means for each kind of form are -described below (*note Forms::.). +described below (*note Forms::). ---------- Footnotes ---------- @@ -1129,13 +1126,13 @@ ability to pass information to them as arguments. The functions and variables described in this section evaluate forms, specify limits to the evaluation process, or record recently returned -values. Loading a file also does evaluation (*note Loading::.). +values. Loading a file also does evaluation (*note Loading::). - - Function: eval FORM + - Function: eval form This is the basic function for performing evaluation. It evaluates FORM in the current environment and returns the result. How the evaluation proceeds depends on the type of the object (*note - Forms::.). + Forms::). Since `eval' is a function, the argument expression that appears in a call to `eval' is evaluated twice: once as preparation before @@ -1155,7 +1152,7 @@ values. Loading a file also does evaluation (*note Loading::.). The number of currently active calls to `eval' is limited to `max-lisp-eval-depth' (see below). - - Command: eval-region START END &optional STREAM + - Command: eval-region start end &optional stream This function evaluates the forms in the current buffer in the region defined by the positions START and END. It reads forms from the region and calls `eval' on them until the end of the region is @@ -1170,7 +1167,7 @@ values. Loading a file also does evaluation (*note Loading::.). `eval-region' always returns `nil'. - - Command: eval-buffer BUFFER &optional STREAM + - Command: eval-buffer buffer &optional stream This is like `eval-region' except that it operates on the whole contents of BUFFER. @@ -1243,7 +1240,7 @@ starting with "all other types" which are self-evaluating forms. we find the real function via the symbol. * Function Forms:: Forms that call functions. * Macro Forms:: Forms that call macros. -* Special Forms:: "Special forms" are idiosyncratic primitives, +* Special Forms:: ``Special forms'' are idiosyncratic primitives, most of them extremely important. * Autoloading:: Functions set up to load files containing their real definitions. diff --git a/info/lispref.info-8 b/info/lispref.info-8 index 379f384..a6423b1 100644 --- a/info/lispref.info-8 +++ b/info/lispref.info-8 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -91,7 +91,7 @@ macro, or special form. The first step in evaluating a nonempty list is to examine its first element. This element alone determines what kind of form the list is and how the rest of the list is to be processed. The first element is -*not* evaluated, as it would be in some Lisp dialects such as Scheme. +_not_ evaluated, as it would be in some Lisp dialects such as Scheme.  File: lispref.info, Node: Function Indirection, Next: Function Forms, Prev: Classifying Lists, Up: Forms @@ -122,7 +122,7 @@ these types, the error `invalid-function' is signaled. The following example illustrates the symbol indirection process. We use `fset' to set the function cell of a symbol and `symbol-function' -to get the function cell contents (*note Function Cells::.). +to get the function cell contents (*note Function Cells::). Specifically, we store the symbol `car' into the function cell of `first', and the symbol `first' into the function cell of `erste'. @@ -133,13 +133,10 @@ Specifically, we store the symbol `car' into the function cell of (symbol-function 'car) => # - (fset 'first 'car) => car - (fset 'erste 'first) => first - (erste '(1 2 3)) ; Call the function referenced by `erste'. => 1 @@ -157,7 +154,7 @@ symbol function indirection when calling `erste'. The built-in function `indirect-function' provides an easy way to perform symbol function indirection explicitly. - - Function: indirect-function FUNCTION + - Function: indirect-function function This function returns the meaning of FUNCTION as a function. If FUNCTION is a symbol, then it finds FUNCTION's function definition and starts over with that value. If FUNCTION is not a symbol, @@ -186,9 +183,9 @@ a "function call". For example, here is a call to the function `+': remaining elements of the list from left to right. The results are the actual argument values, one value for each list element. The next step is to call the function with this list of arguments, effectively using -the function `apply' (*note Calling Functions::.). If the function is +the function `apply' (*note Calling Functions::). If the function is written in Lisp, the arguments are used to bind the argument variables -of the function (*note Lambda Expressions::.); then the forms in the +of the function (*note Lambda Expressions::); then the forms in the function body are evaluated in order, and the value of the last body form becomes the value of the function call. @@ -200,7 +197,7 @@ Lisp Macro Evaluation If the first element of a list being evaluated is a macro object, then the list is a "macro call". When a macro call is evaluated, the -elements of the rest of the list are *not* initially evaluated. +elements of the rest of the list are _not_ initially evaluated. Instead, these elements themselves are used as the arguments of the macro. The macro definition computes a replacement form, called the "expansion" of the macro, to be evaluated in place of the original @@ -250,82 +247,82 @@ evaluated may depend on the results of evaluating other arguments. XEmacs Lisp with a reference to where each is described. `and' - *note Combining Conditions::. + *note Combining Conditions:: `catch' - *note Catch and Throw::. + *note Catch and Throw:: `cond' - *note Conditionals::. + *note Conditionals:: `condition-case' - *note Handling Errors::. + *note Handling Errors:: `defconst' - *note Defining Variables::. + *note Defining Variables:: `defmacro' - *note Defining Macros::. + *note Defining Macros:: `defun' - *note Defining Functions::. + *note Defining Functions:: `defvar' - *note Defining Variables::. + *note Defining Variables:: `function' - *note Anonymous Functions::. + *note Anonymous Functions:: `if' - *note Conditionals::. + *note Conditionals:: `interactive' - *note Interactive Call::. + *note Interactive Call:: `let' `let*' - *note Local Variables::. + *note Local Variables:: `or' - *note Combining Conditions::. + *note Combining Conditions:: `prog1' `prog2' `progn' - *note Sequencing::. + *note Sequencing:: `quote' - *note Quoting::. + *note Quoting:: `save-current-buffer' - *note Excursions::. + *note Excursions:: `save-excursion' - *note Excursions::. + *note Excursions:: `save-restriction' - *note Narrowing::. + *note Narrowing:: `save-selected-window' - *note Excursions::. + *note Excursions:: `save-window-excursion' - *note Window Configurations::. + *note Window Configurations:: `setq' - *note Setting Variables::. + *note Setting Variables:: `setq-default' - *note Creating Buffer-Local::. + *note Creating Buffer-Local:: `unwind-protect' - *note Nonlocal Exits::. + *note Nonlocal Exits:: `while' - *note Iteration::. + *note Iteration:: `with-output-to-temp-buffer' - *note Temporary Displays::. + *note Temporary Displays:: Common Lisp note: here are some comparisons of special forms in XEmacs Lisp and Common Lisp. `setq', `if', and `catch' are @@ -361,7 +358,7 @@ and lists, which are not self-evaluating objects, in a program. (It is not necessary to quote self-evaluating objects such as numbers, strings, and vectors.) - - Special Form: quote OBJECT + - Special Form: quote object This special form returns OBJECT, without evaluating it. Because `quote' is used so often in programs, Lisp provides a @@ -386,9 +383,9 @@ syntax `'x' is an abbreviation for `(quote x)'. => [(quote foo)] Other quoting constructs include `function' (*note Anonymous -Functions::.), which causes an anonymous lambda expression written in -Lisp to be compiled, and ``' (*note Backquote::.), which is used to -quote only part of a list, while computing and substituting other parts. +Functions::), which causes an anonymous lambda expression written in +Lisp to be compiled, and ``' (*note Backquote::), which is used to quote +only part of a list, while computing and substituting other parts.  File: lispref.info, Node: Control Structures, Next: Variables, Prev: Evaluation, Up: Top @@ -396,7 +393,7 @@ File: lispref.info, Node: Control Structures, Next: Variables, Prev: Evaluati Control Structures ****************** - A Lisp program consists of expressions or "forms" (*note Forms::.). + A Lisp program consists of expressions or "forms" (*note Forms::). We control the order of execution of the forms by enclosing them in "control structures". Control structures are special forms which control when, whether, or how many times to execute the forms they @@ -418,7 +415,7 @@ other varieties of sequencing, conditionals, iteration, and (controlled) jumps--all discussed below. The built-in control structures are special forms since their subforms are not necessarily evaluated or not evaluated sequentially. You can use macros to define your own control -structure constructs (*note Macros::.). +structure constructs (*note Macros::). * Menu: @@ -458,7 +455,7 @@ structures likewise contain an implicit `progn'. As a result, `progn' is not used as often as it used to be. It is needed now most often inside an `unwind-protect', `and', `or', or in the THEN-part of an `if'. - - Special Form: progn FORMS... + - Special Form: progn forms... This special form evaluates all of the FORMS, in textual order, returning the result of the final form. @@ -473,7 +470,7 @@ inside an `unwind-protect', `and', `or', or in the THEN-part of an `if'. Two other control constructs likewise evaluate a series of forms but return a different value: - - Special Form: prog1 FORM1 FORMS... + - Special Form: prog1 form1 forms... This special form evaluates FORM1 and all of the FORMS, in textual order, returning the result of FORM1. @@ -490,7 +487,7 @@ return a different value: (prog1 (car x) (setq x (cdr x))) - - Special Form: prog2 FORM1 FORM2 FORMS... + - Special Form: prog2 form1 form2 forms... This special form evaluates FORM1, FORM2, and all of the following FORMS, in textual order, returning the result of FORM2. @@ -512,7 +509,7 @@ Conditionals Lisp has two conditional forms: `if', which is much the same as in other languages, and `cond', which is a generalized case statement. - - Special Form: if CONDITION THEN-FORM ELSE-FORMS... + - Special Form: if condition then-form else-forms... `if' chooses between the THEN-FORM and the ELSE-FORMS based on the value of CONDITION. If the evaluated CONDITION is non-`nil', THEN-FORM is evaluated and the result returned. Otherwise, the @@ -532,7 +529,7 @@ languages, and `cond', which is a generalized case statement. 'very-false) => very-false - - Special Form: cond CLAUSE... + - Special Form: cond clause... `cond' chooses among an arbitrary number of alternatives. Each CLAUSE in the `cond' must be a list. The CAR of this list is the CONDITION; the remaining elements, if any, the BODY-FORMS. Thus, @@ -603,13 +600,13 @@ with `if' and `cond' to express complicated conditions. The constructs `and' and `or' can also be used individually as kinds of multiple conditional constructs. - - Function: not CONDITION + - Function: not condition This function tests for the falsehood of CONDITION. It returns `t' if CONDITION is `nil', and `nil' otherwise. The function `not' is identical to `null', and we recommend using the name `null' if you are testing for an empty list. - - Special Form: and CONDITIONS... + - Special Form: and conditions... The `and' special form tests whether all the CONDITIONS are true. It works by evaluating the CONDITIONS one by one in the order written. @@ -648,7 +645,7 @@ conditional constructs. == (cond (ARG1 (cond (ARG2 ARG3)))) - - Special Form: or CONDITIONS... + - Special Form: or conditions... The `or' special form tests whether at least one of the CONDITIONS is true. It works by evaluating all the CONDITIONS one by one in the order written. @@ -696,7 +693,7 @@ example, you might want to repeat some computation once for each element of a list, or once for each integer from 0 to N. You can do this in XEmacs Lisp with the special form `while': - - Special Form: while CONDITION FORMS... + - Special Form: while condition forms... `while' first evaluates CONDITION. If the result is non-`nil', it evaluates FORMS in textual order. Then it reevaluates CONDITION, and if the result is non-`nil', it evaluates FORMS again. This @@ -704,8 +701,7 @@ XEmacs Lisp with the special form `while': There is no limit on the number of iterations that may occur. The loop will continue until either CONDITION evaluates to `nil' or - until an error or `throw' jumps out of it (*note Nonlocal - Exits::.). + until an error or `throw' jumps out of it (*note Nonlocal Exits::). The value of a `while' form is always `nil'. @@ -786,12 +782,12 @@ innermost one takes precedence. `catch', including function calls. When binding constructs such as `let' or function calls are exited in this way, the bindings are unbound, just as they are when these constructs exit normally (*note -Local Variables::.). Likewise, `throw' restores the buffer and -position saved by `save-excursion' (*note Excursions::.), and the -narrowing status saved by `save-restriction' and the window selection -saved by `save-window-excursion' (*note Window Configurations::.). It -also runs any cleanups established with the `unwind-protect' special -form when it exits that form (*note Cleanups::.). +Local Variables::). Likewise, `throw' restores the buffer and position +saved by `save-excursion' (*note Excursions::), and the narrowing +status saved by `save-restriction' and the window selection saved by +`save-window-excursion' (*note Window Configurations::). It also runs +any cleanups established with the `unwind-protect' special form when it +exits that form (*note Cleanups::). The `throw' need not appear lexically within the `catch' that it jumps to. It can equally well be called from another function called @@ -799,14 +795,14 @@ within the `catch'. As long as the `throw' takes place chronologically after entry to the `catch', and chronologically before exit from it, it has access to that `catch'. This is why `throw' can be used in commands such as `exit-recursive-edit' that throw back to the editor -command loop (*note Recursive Editing::.). +command loop (*note Recursive Editing::). Common Lisp note: Most other versions of Lisp, including Common Lisp, have several ways of transferring control nonsequentially: `return', `return-from', and `go', for example. XEmacs Lisp has only `throw'. - - Special Form: catch TAG BODY... + - Special Form: catch tag body... `catch' establishes a return point for the `throw' function. The return point is distinguished from other such return points by TAG, which may be any Lisp object. The argument TAG is evaluated @@ -821,7 +817,7 @@ command loop (*note Recursive Editing::.). the `catch' exits immediately; the value it returns is whatever was specified as the second argument of `throw'. - - Function: throw TAG VALUE + - Function: throw tag value The purpose of `throw' is to return from a return point previously established with `catch'. The argument TAG is used to choose among the various existing return points; it must be `eq' to the @@ -947,10 +943,10 @@ can also signal errors explicitly with the functions `error' and Quitting, which happens when the user types `C-g', is not considered an error, but it is handled almost like an error. *Note Quitting::. - - Function: error FORMAT-STRING &rest ARGS + - Function: error format-string &rest args This function signals an error with an error message constructed by - applying `format' (*note String Conversion::.) to FORMAT-STRING - and ARGS. + applying `format' (*note String Conversion::) to FORMAT-STRING and + ARGS. These examples show typical uses of `error': @@ -971,7 +967,7 @@ an error, but it is handled almost like an error. *Note Quitting::. will be interpreted as a format specifier, with undesirable results. Instead, use `(error "%s" STRING)'. - - Function: signal ERROR-SYMBOL DATA + - Function: signal error-symbol data This function signals an error named by ERROR-SYMBOL. The argument DATA is a list of additional Lisp objects relevant to the circumstances of the error. @@ -990,15 +986,15 @@ an error, but it is handled almost like an error. *Note Quitting::. Both ERROR-SYMBOL and DATA are available to any error handlers that handle the error: `condition-case' binds a local variable to a list of the form `(ERROR-SYMBOL . DATA)' (*note Handling - Errors::.). If the error is not handled, these two values are - used in printing the error message. + Errors::). If the error is not handled, these two values are used + in printing the error message. The function `signal' never returns (though in older Emacs versions it could sometimes return). (signal 'wrong-number-of-arguments '(x y)) error--> Wrong number of arguments: x, y - + (signal 'no-such-error '("My unknown error condition.")) error--> peculiar error: "My unknown error condition." @@ -1028,8 +1024,8 @@ print an error message. An error that has no explicit handler may call the Lisp debugger. The debugger is enabled if the variable `debug-on-error' (*note Error -Debugging::.) is non-`nil'. Unlike error handlers, the debugger runs -in the environment of the error, so that you can examine values of +Debugging::) is non-`nil'. Unlike error handlers, the debugger runs in +the environment of the error, so that you can examine values of variables precisely as they were at the time of the error.  @@ -1099,7 +1095,7 @@ caught by a `catch', and a `throw' cannot be handled by an error handler (though using `throw' when there is no suitable `catch' signals an error that can be handled). - - Special Form: condition-case VAR PROTECTED-FORM HANDLERS... + - Special Form: condition-case var protected-form handlers... This special form establishes the error handlers HANDLERS around the execution of PROTECTED-FORM. If PROTECTED-FORM executes without error, the value it returns becomes the value of the @@ -1123,9 +1119,9 @@ an error that can be handled). Each error that occurs has an "error symbol" that describes what kind of error it is. The `error-conditions' property of this - symbol is a list of condition names (*note Error Symbols::.). - Emacs searches all the active `condition-case' forms for a handler - that specifies one or more of these condition names; the innermost + symbol is a list of condition names (*note Error Symbols::). Emacs + searches all the active `condition-case' forms for a handler that + specifies one or more of these condition names; the innermost matching `condition-case' handles the error. Within this `condition-case', the first applicable handler handles the error. @@ -1157,7 +1153,7 @@ message and returns a very large number. (princ (format "Arithmetic error: %s" err)) 1000000))) => safe-divide - + (safe-divide 5 0) -| Arithmetic error: (arith-error) => 1000000 @@ -1174,7 +1170,7 @@ including those signaled with `error': (setq baz 34) => 34 - + (condition-case err (if (eq baz 35) t @@ -1236,7 +1232,7 @@ classification; and `error', which is the widest of all. not end with a period. This is for consistency with the rest of Emacs. Naturally, XEmacs will never signal `new-error' on its own; only an -explicit call to `signal' (*note Signaling Errors::.) in your code can +explicit call to `signal' (*note Signaling Errors::) in your code can do this: (signal 'new-error '(x y)) diff --git a/info/lispref.info-9 b/info/lispref.info-9 index 579cb35..8a8df7b 100644 --- a/info/lispref.info-9 +++ b/info/lispref.info-9 @@ -1,5 +1,5 @@ -This is Info file ../../info/lispref.info, produced by Makeinfo version -1.68 from the input file lispref.texi. +This is ../info/lispref.info, produced by makeinfo version 3.12s from +lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -59,7 +59,7 @@ Cleaning Up from Nonlocal Exits put a data structure in an inconsistent state; it permits you to ensure the data are consistent in the event of an error or throw. - - Special Form: unwind-protect BODY CLEANUP-FORMS... + - Special Form: unwind-protect body cleanup-forms... `unwind-protect' executes the BODY with a guarantee that the CLEANUP-FORMS will be evaluated if control leaves BODY, no matter how that happens. The BODY may complete normally, or execute a @@ -73,14 +73,14 @@ the data are consistent in the event of an error or throw. Only the BODY is actually protected by the `unwind-protect'. If any of the CLEANUP-FORMS themselves exits nonlocally (e.g., via a - `throw' or an error), `unwind-protect' is *not* guaranteed to + `throw' or an error), `unwind-protect' is _not_ guaranteed to evaluate the rest of them. If the failure of one of the CLEANUP-FORMS has the potential to cause trouble, then protect it with another `unwind-protect' around that form. The number of currently active `unwind-protect' forms counts, together with the number of local variable bindings, against the - limit `max-specpdl-size' (*note Local Variables::.). + limit `max-specpdl-size' (*note Local Variables::). For example, here we make an invisible buffer for temporary use, and make sure to kill it before finishing: @@ -100,7 +100,7 @@ another `save-excursion' around the body, to ensure that the temporary buffer becomes current in time to kill it.) Here is an actual example taken from the file `ftp.el'. It creates -a process (*note Processes::.) to try to establish a connection to a +a process (*note Processes::) to try to establish a connection to a remote machine. As the function `ftp-login' is highly susceptible to numerous problems that the writer of the function cannot anticipate, it is protected with a form that guarantees deletion of the process in the @@ -247,7 +247,7 @@ variables; these last until exit from the `let' form. one) of the variable. When the life span of the local value is over, the previous value is restored. In the mean time, we say that the previous value is "shadowed" and "not visible". Both global and local -values may be shadowed (*note Scope::.). +values may be shadowed (*note Scope::). If you set a variable (such as with `setq') while it is local, this replaces the local value; it does not alter the global value, or @@ -277,7 +277,7 @@ binding. The special forms `let' and `let*' exist to create local bindings. - - Special Form: let (BINDINGS...) FORMS... + - Special Form: let (bindings...) forms... This special form binds variables according to BINDINGS and then evaluates all of the FORMS in textual order. The `let'-form returns the value of the last form in FORMS. @@ -288,7 +288,7 @@ binding. evaluating VALUE-FORM. If VALUE-FORM is omitted, `nil' is used. All of the VALUE-FORMs in BINDINGS are evaluated in the order they - appear and *before* any of the symbols are bound. Here is an + appear and _before_ any of the symbols are bound. Here is an example of this: `Z' is bound to the old value of `Y', which is 2, not the new value, 1. @@ -299,7 +299,7 @@ binding. (list Y Z)) => (1 2) - - Special Form: let* (BINDINGS...) FORMS... + - Special Form: let* (bindings...) forms... This special form is like `let', but it binds each variable right after computing its local value, before computing the local value for the next variable. Therefore, an expression in BINDINGS can @@ -317,21 +317,21 @@ binding. Here is a complete list of the other facilities that create local bindings: - * Function calls (*note Functions::.). + * Function calls (*note Functions::). - * Macro calls (*note Macros::.). + * Macro calls (*note Macros::). - * `condition-case' (*note Errors::.). + * `condition-case' (*note Errors::). Variables can also have buffer-local bindings (*note Buffer-Local -Variables::.). These kinds of bindings work somewhat like ordinary -local bindings, but they are localized depending on "where" you are in -Emacs, rather than localized in time. +Variables::). These kinds of bindings work somewhat like ordinary local +bindings, but they are localized depending on "where" you are in Emacs, +rather than localized in time. - Variable: max-specpdl-size This variable defines the limit on the total number of local variable bindings and `unwind-protect' cleanups (*note Nonlocal - Exits::.) that are allowed before signaling an error (with data + Exits::) that are allowed before signaling an error (with data `"Variable binding depth exceeds max-specpdl-size"'). This limit, with the associated error when it is exceeded, is one @@ -356,13 +356,13 @@ value. Note that a value of `nil' is not the same as void. The symbol `nil' is a Lisp object and can be the value of a variable just as any -other object can be; but it is *a value*. A void variable does not +other object can be; but it is _a value_. A void variable does not have any value. After you have given a variable a value, you can make it void once more using `makunbound'. - - Function: makunbound SYMBOL + - Function: makunbound symbol This function makes the current binding of SYMBOL void. Subsequent attempts to use this symbol's value as a variable will signal the error `void-variable', unless or until you set it again. @@ -390,7 +390,6 @@ more using `makunbound'. (makunbound 'x) ; Void the local binding. x) error--> Symbol's value as variable is void: x - x ; The global binding is unchanged. => 1 @@ -399,7 +398,7 @@ more using `makunbound'. (makunbound 'x) ; Void the innermost-local binding. x)) ; And refer: it's void. error--> Symbol's value as variable is void: x - + (let ((x 2)) (let ((x 3)) (makunbound 'x)) ; Void inner binding, then remove it. @@ -413,24 +412,20 @@ always been void. You can use the function `boundp' to test whether a variable is currently void. - - Function: boundp VARIABLE + - Function: boundp variable `boundp' returns `t' if VARIABLE (a symbol) is not void; more precisely, if its current binding is not void. It returns `nil' otherwise. (boundp 'abracadabra) ; Starts out void. => nil - (let ((abracadabra 5)) ; Locally bind it. (boundp 'abracadabra)) => t - (boundp 'abracadabra) ; Still globally void. => nil - (setq abracadabra 5) ; Make it globally nonvoid. => 5 - (boundp 'abracadabra) => t @@ -445,7 +440,7 @@ with a "variable definition": a special form, either `defconst' or `defvar'. In XEmacs Lisp, definitions serve three purposes. First, they inform -people who read the code that certain symbols are *intended* to be used +people who read the code that certain symbols are _intended_ to be used a certain way (as variables). Second, they inform the Lisp system of these things, supplying a value and documentation. Third, they provide information to utilities such as `etags' and `make-docfile', which @@ -467,7 +462,7 @@ Users would like to be able to set user options in their init files, and override the default values given in the definitions. For this reason, user options must be defined with `defvar'. - - Special Form: defvar SYMBOL [VALUE [DOC-STRING]] + - Special Form: defvar symbol [value [doc-string]] This special form defines SYMBOL as a value and initializes it. The definition informs a person reading your code that SYMBOL is used as a variable that programs are likely to set or change. It @@ -495,7 +490,7 @@ reason, user options must be defined with `defvar'. for the variable. (This opportunity to specify documentation is one of the main benefits of defining the variable.) The documentation is stored in the symbol's `variable-documentation' - property. The XEmacs help functions (*note Documentation::.) look + property. The XEmacs help functions (*note Documentation::) look for this property. If the first character of DOC-STRING is `*', it means that this @@ -539,7 +534,7 @@ reason, user options must be defined with `defvar'. The `defvar' form returns SYMBOL, but it is normally used at top level in a file where its value does not matter. - - Special Form: defconst SYMBOL [VALUE [DOC-STRING]] + - Special Form: defconst symbol [value [doc-string]] This special form defines SYMBOL as a value and initializes it. It informs a person reading your code that SYMBOL has a global value, established here, that will not normally be changed or @@ -570,7 +565,7 @@ reason, user options must be defined with `defvar'. pi => 3 - - Function: user-variable-p VARIABLE + - Function: user-variable-p variable This function returns `t' if VARIABLE is a user option--a variable intended to be set by the user for customization--and `nil' otherwise. (Variables other than user options exist for the @@ -601,12 +596,12 @@ Accessing Variable Values ========================= The usual way to reference a variable is to write the symbol which -names it (*note Symbol Forms::.). This requires you to specify the +names it (*note Symbol Forms::). This requires you to specify the variable name when you write the program. Usually that is exactly what you want to do. Occasionally you need to choose at run time which variable to reference; then you can use `symbol-value'. - - Function: symbol-value SYMBOL + - Function: symbol-value symbol This function returns the value of SYMBOL. This is the value in the innermost local binding of the symbol, or its global value if it has no local bindings. @@ -645,7 +640,7 @@ How to Alter a Variable Value form `setq'. When you need to compute the choice of variable at run time, use the function `set'. - - Special Form: setq [SYMBOL FORM]... + - Special Form: setq [symbol form]... This special form is the most common method of changing a variable's value. Each SYMBOL is given a new value, which is the result of evaluating the corresponding FORM. The most-local @@ -676,7 +671,7 @@ time, use the function `set'. y (1+ x)) ; the value of `y' is computed. => 11 - - Function: set SYMBOL VALUE + - Function: set symbol value This function sets SYMBOL's value to VALUE, then returns VALUE. Since `set' is a function, the expression written for SYMBOL is evaluated to obtain the symbol to set. @@ -725,7 +720,7 @@ time, use the function `set'. One other function for setting a variable is designed to add an element to a list if it is not already present in the list. - - Function: add-to-list SYMBOL ELEMENT + - Function: add-to-list symbol element This function sets the variable SYMBOL by consing ELEMENT onto the old value, if ELEMENT is not already a member of that value. It returns the resulting list, whether updated or not. The value of @@ -766,10 +761,10 @@ binding. The most recently established binding takes precedence over the others. Local bindings in XEmacs Lisp have "indefinite scope" and "dynamic -extent". "Scope" refers to *where* textually in the source code the +extent". "Scope" refers to _where_ textually in the source code the binding can be accessed. Indefinite scope means that any part of the program can potentially access the variable binding. "Extent" refers -to *when*, as the program is executing, the binding exists. Dynamic +to _when_, as the program is executing, the binding exists. Dynamic extent means that the binding lasts as long as the activation of the construct that established it. @@ -822,7 +817,7 @@ established in `binder', depending on circumstances: (user)) * If we define `foo' as follows and call `binder', then the binding - made in `binder' *will not* be seen in `user': + made in `binder' _will not_ be seen in `user': (defun foo (x) (user)) @@ -1017,7 +1012,7 @@ File: lispref.info, Node: Creating Buffer-Local, Next: Default Value, Prev: I Creating and Deleting Buffer-Local Bindings ------------------------------------------- - - Command: make-local-variable VARIABLE + - Command: make-local-variable variable This function creates a buffer-local binding in the current buffer for VARIABLE (a symbol). Other buffers are not affected. The value returned is VARIABLE. @@ -1051,21 +1046,21 @@ Creating and Deleting Buffer-Local Bindings *Please note:* do not use `make-local-variable' for a hook variable. Instead, use `make-local-hook'. *Note Hooks::. - - Command: make-variable-buffer-local VARIABLE + - Command: make-variable-buffer-local variable This function marks VARIABLE (a symbol) automatically buffer-local, so that any subsequent attempt to set it will make it local to the current buffer at the time. The value returned is VARIABLE. - - Function: local-variable-p VARIABLE &optional BUFFER + - Function: local-variable-p variable &optional buffer This returns `t' if VARIABLE is buffer-local in buffer BUFFER (which defaults to the current buffer); otherwise, `nil'. - - Function: buffer-local-variables &optional BUFFER + - Function: buffer-local-variables &optional buffer This function returns a list describing the buffer-local variables in buffer BUFFER. It returns an association list (*note - Association Lists::.) in which each association contains one + Association Lists::) in which each association contains one buffer-local variable and its value. When a buffer-local variable is void in BUFFER, then it appears directly in the resulting list. If BUFFER is omitted, the current buffer is used. @@ -1087,9 +1082,9 @@ Creating and Deleting Buffer-Local Bindings (bind-me . 69)) Note that storing new values into the CDRs of cons cells in this - list does *not* change the local values of the variables. + list does _not_ change the local values of the variables. - - Command: kill-local-variable VARIABLE + - Command: kill-local-variable variable This function deletes the buffer-local binding (if any) for VARIABLE (a symbol) in the current buffer. As a result, the global (default) binding of VARIABLE becomes visible in this @@ -1151,13 +1146,13 @@ buffer-local value for this variable. The special forms `defvar' and `defconst' also set the default value (if they set the variable at all), rather than any local value. - - Function: default-value SYMBOL + - Function: default-value symbol This function returns SYMBOL's default value. This is the value that is seen in buffers that do not have their own values for this variable. If SYMBOL is not buffer-local, this is equivalent to - `symbol-value' (*note Accessing Variables::.). + `symbol-value' (*note Accessing Variables::). - - Function: default-boundp SYMBOL + - Function: default-boundp symbol The function `default-boundp' tells you whether SYMBOL's default value is nonvoid. If `(default-boundp 'foo)' returns `nil', then `(default-value 'foo)' would get an error. @@ -1165,7 +1160,7 @@ buffer-local value for this variable. `default-boundp' is to `default-value' as `boundp' is to `symbol-value'. - - Special Form: setq-default SYMBOL VALUE + - Special Form: setq-default symbol value This sets the default value of SYMBOL to VALUE. It does not evaluate SYMBOL, but does evaluate VALUE. The value of the `setq-default' form is VALUE. @@ -1205,7 +1200,7 @@ buffer-local value for this variable. (default-value 'local) => another-default - - Function: set-default SYMBOL VALUE + - Function: set-default symbol value This function is like `setq-default', except that SYMBOL is evaluated. diff --git a/info/new-users-guide.info b/info/new-users-guide.info index ced6a25..41ab099 100644 --- a/info/new-users-guide.info +++ b/info/new-users-guide.info @@ -1,5 +1,5 @@ -This is Info file ../../info/new-users-guide.info, produced by Makeinfo -version 1.68 from the input file new-users-guide.texi. +This is ../info/new-users-guide.info, produced by makeinfo version +3.12s from new-users-guide/new-users-guide.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -18,59 +18,59 @@ preserved on all copies.  Indirect: -new-users-guide.info-1: 648 -new-users-guide.info-2: 50484 -new-users-guide.info-3: 99987 +new-users-guide.info-1: 637 +new-users-guide.info-2: 50473 +new-users-guide.info-3: 99975  Tag Table: (Indirect) -Node: Top648 -Node: Intro4626 -Node: Entering7209 -Node: Enter8723 -Node: Frame9405 -Node: Exiting11074 -Node: Mode Line12274 -Node: Echo Area14421 -Node: Windows and Menus15776 -Node: XEmacs Window16229 -Node: Pull-down Menus19850 -Node: File menu20729 -Node: Edit menu23988 -Node: Options Menu26515 -Node: Buffers Menu31297 -Node: Help menu31683 -Node: Edit32181 -Node: Insert33775 -Node: Cursor Position35103 -Node: Erase37174 -Node: Numeric Argument38328 -Node: Undo39512 -Node: Customization Basics40275 -Node: Customizing key Bindings41504 -Node: Customizing Menus44994 -Node: Help50484 -Node: The Help Menu51172 -Node: Modes56097 -Node: Major Modes57013 -Node: Minor Modes60962 -Node: Files65048 -Node: File Names65770 -Node: Visiting67573 -Node: Saving Files69697 -Node: Other Customizations73075 -Node: Setting Variables75544 -Node: Init File78753 -Node: Select and Move84222 -Node: Selecting Text85176 -Node: Mouse86689 -Node: Region Operation88014 -Node: Moving Text89274 -Node: Accumulating text90514 -Node: Search and Replace92834 -Node: Key Index96698 -Node: Command Index99987 -Node: Variable Index104089 -Node: Concept Index104666 +Node: Top637 +Node: Intro4617 +Node: Entering7200 +Node: Enter8714 +Node: Frame9396 +Node: Exiting11065 +Node: Mode Line12265 +Node: Echo Area14412 +Node: Windows and Menus15767 +Node: XEmacs Window16220 +Node: Pull-down Menus19841 +Node: File menu20720 +Node: Edit menu23979 +Node: Options Menu26505 +Node: Buffers Menu31287 +Node: Help menu31673 +Node: Edit32171 +Node: Insert33765 +Node: Cursor Position35093 +Node: Erase37164 +Node: Numeric Argument38318 +Node: Undo39502 +Node: Customization Basics40265 +Node: Customizing key Bindings41494 +Node: Customizing Menus44984 +Node: Help50473 +Node: The Help Menu51161 +Node: Modes56086 +Node: Major Modes57002 +Node: Minor Modes60951 +Node: Files65037 +Node: File Names65759 +Node: Visiting67562 +Node: Saving Files69686 +Node: Other Customizations73063 +Node: Setting Variables75531 +Node: Init File78740 +Node: Select and Move84210 +Node: Selecting Text85164 +Node: Mouse86677 +Node: Region Operation88002 +Node: Moving Text89262 +Node: Accumulating text90502 +Node: Search and Replace92822 +Node: Key Index96686 +Node: Command Index99975 +Node: Variable Index104077 +Node: Concept Index104654  End Tag Table diff --git a/info/new-users-guide.info-1 b/info/new-users-guide.info-1 index 043aa9b..d2a595e 100644 --- a/info/new-users-guide.info-1 +++ b/info/new-users-guide.info-1 @@ -1,5 +1,5 @@ -This is Info file ../../info/new-users-guide.info, produced by Makeinfo -version 1.68 from the input file new-users-guide.texi. +This is ../info/new-users-guide.info, produced by makeinfo version +3.12s from new-users-guide/new-users-guide.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -51,7 +51,7 @@ Other Features of XEmacs - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Entering and Exiting Emacs @@ -617,7 +617,7 @@ Undo Cut Removes the selected text block from the current buffer, makes it the X clipboard selection, and places it in the kill ring (*note - Moving Text::.). Before executing this command, you have to select + Moving Text::). Before executing this command, you have to select a region using Emacs region selection commands or with the mouse. *Note Selecting Text::. @@ -1149,14 +1149,14 @@ Pull-down Menus::. Some of the functions which are available to you for customization are: - 1. add-menu-item: (MENU-NAME ITEM-NAME FUNCTION ENABLED-P &OPTIONAL + 1. add-menu-item: (MENU-NAME ITEM-NAME FUNCTION ENABLED-P &optional BEFORE) This function will add a menu item to a menu, creating the menu first if necessary. If the named item already exists, the menu will remain unchanged. For example, if you add the following example to your `.emacs' file or evaluate it (*note Customization - Basics::.), + Basics::), (add-menu-item '("Edit") "Replace String" replace-string t "Clear") diff --git a/info/new-users-guide.info-2 b/info/new-users-guide.info-2 index bbd6423..b66855c 100644 --- a/info/new-users-guide.info-2 +++ b/info/new-users-guide.info-2 @@ -1,5 +1,5 @@ -This is Info file ../../info/new-users-guide.info, produced by Makeinfo -version 1.68 from the input file new-users-guide.texi. +This is ../info/new-users-guide.info, produced by makeinfo version +3.12s from new-users-guide/new-users-guide.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -546,7 +546,7 @@ if you set the variable MAKE-BACKUP-FILES to non-NIL i.e. `t', Emacs will create a "backup" file. Select the Describe variable option from the Help menu and look at the documentation for this variable. Its default value should be `t'. However, if its not then use `M-x -set-variable' to set it to `t' (*note Setting Variables::.). The backup +set-variable' to set it to `t' (*note Setting Variables::). The backup file will contain the contents from the last time you visited the file. Emacs also provides options for creating numbered backups. For more information on backups, *Note Backup: (xemacs)Backup. @@ -596,9 +596,9 @@ turn on the auto-fill-mode, add the appropriate hook as shown in the example above. Similarly, to enable the "font-lock mode" which displays your -program in different fonts and colors(*note Modes::.), put the -following in your `.emacs' file. The comments above the statement -explain what the statements do. +program in different fonts and colors(*note Modes::), put the following +in your `.emacs' file. The comments above the statement explain what the +statements do. ;;; enables the font-lock-mode in Lisp Mode (add-hook 'lisp-mode-hook 'turn-on-font-lock) @@ -870,6 +870,7 @@ find any of them useful, just type them in your `.emacs' file: examples in `/usr/local/lib/xemacs-20.0/lisp/packages/big-menubar.el' file. + For more information on initializing your `.emacs' file, *Note Init File: (xemacs)Init File. You should also look at `/usr/local/lib/xemacs-20.0/etc/sample.emacs', which is a sample @@ -1203,8 +1204,8 @@ Key (Character) Index * C-p: Cursor Position. * C-r: Search and Replace. * C-s: Search and Replace. -* C-SPC <1>: Selecting Text. -* C-SPC: Region Operation. +* C-SPC <1>: Region Operation. +* C-SPC: Selecting Text. * C-t: Cursor Position. * C-u: Numeric Argument. * C-v: Cursor Position. diff --git a/info/new-users-guide.info-3 b/info/new-users-guide.info-3 index bc0bf7c..f29fc2e 100644 --- a/info/new-users-guide.info-3 +++ b/info/new-users-guide.info-3 @@ -1,5 +1,5 @@ -This is Info file ../../info/new-users-guide.info, produced by Makeinfo -version 1.68 from the input file new-users-guide.texi. +This is ../info/new-users-guide.info, produced by makeinfo version +3.12s from new-users-guide/new-users-guide.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -38,8 +38,8 @@ Command and Function Index * delete-backward-char: Erase. * delete-char: Erase. * delete-menu-item: Customizing Menus. -* delete-other-windows <1>: Windows and Menus. -* delete-other-windows: XEmacs Window. +* delete-other-windows <1>: XEmacs Window. +* delete-other-windows: Windows and Menus. * delete-window <1>: XEmacs Window. * delete-window: Windows and Menus. * describe-variable: Setting Variables. @@ -144,8 +144,8 @@ Concept Index * cursor control: Cursor Position. * cursor position: Cursor Position. * cursor shapes: Mouse. -* customize <1>: Customization Basics. -* customize: Other Customizations. +* customize <1>: Other Customizations. +* customize: Customization Basics. * customize menus: Customizing Menus. * Cut menu item: Edit menu. * Delete Frame menu item: File menu. @@ -177,8 +177,8 @@ Concept Index * fortran-mode: Major Modes. * fundamental-mode: Major Modes. * goto-line: Cursor Position. -* help <1>: Help. -* help: The Help Menu. +* help <1>: The Help Menu. +* help: Help. * Help menu: Help menu. * hook: Other Customizations. * init file examples: Init File. @@ -254,8 +254,8 @@ Concept Index * visiting files: Visiting. * Weight menu item: Options Menu. * windows <1>: XEmacs Window. -* windows <2>: Entering. -* windows: Windows and Menus. +* windows <2>: Windows and Menus. +* windows: Entering. * yanking: Moving Text. diff --git a/info/standards.info b/info/standards.info index edaa2b5..94102b9 100644 --- a/info/standards.info +++ b/info/standards.info @@ -1,12 +1,12 @@ -This is Info file ../info/standards.info, produced by Makeinfo version -1.68 from the input file standards.texi. +This is ../info/standards.info, produced by makeinfo version 3.12s from +standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. END-INFO-DIR-ENTRY - GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free -Software Foundation, Inc. + GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996, +1997, 1998, 1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -24,52 +24,62 @@ translation approved by the Free Software Foundation.  Indirect: -standards.info-1: 982 -standards.info-2: 49841 -standards.info-3: 95838 +standards.info-1: 976 +standards.info-2: 48771 +standards.info-3: 97948  Tag Table: (Indirect) -Node: Top982 -Node: Preface1491 -Node: Intellectual Property2529 -Node: Reading Non-Free Code2885 -Node: Contributions4617 -Node: Design Advice6215 -Node: Compatibility6698 -Node: Using Extensions8342 -Node: ANSI C9844 -Node: Source Language11080 -Node: Program Behavior12214 -Node: Semantics12806 -Node: Libraries16560 -Node: Errors17795 -Node: User Interfaces19018 -Node: Memory Usage36043 -Node: Writing C37040 -Node: Formatting37750 -Node: Comments41022 -Node: Syntactic Conventions43815 -Node: Names46753 -Node: System Portability48065 -Node: CPU Portability49841 -Node: System Functions52002 -Node: Internationalization56903 -Node: Documentation59104 -Node: GNU Manuals59648 -Node: Manual Structure Details61690 -Node: NEWS File63095 -Node: Change Logs63776 -Node: Man Pages67978 -Node: Reading other Manuals69597 -Node: Managing Releases70381 -Node: Configuration71087 -Node: Makefile Conventions78027 -Node: Makefile Basics78551 -Node: Utilities in Makefiles81022 -Node: Command Variables82896 -Node: Directory Variables85732 -Node: Standard Targets95838 -Node: Releases105580 +Node: Top976 +Node: Preface1567 +Node: Legal Issues2584 +Node: Reading Non-Free Code2950 +Node: Contributions4673 +Node: Design Advice6803 +Node: Compatibility7311 +Node: Using Extensions8822 +Node: ANSI C10324 +Node: Source Language12447 +Node: Program Behavior13940 +Node: Semantics14649 +Node: Libraries18966 +Node: Errors20201 +Node: User Interfaces21977 +Node: Option Table28854 +Node: Memory Usage43664 +Node: Writing C44658 +Node: Formatting45499 +Node: Comments48771 +Node: Syntactic Conventions52069 +Node: Names55007 +Node: System Portability56941 +Node: CPU Portability58538 +Node: System Functions60795 +Node: Internationalization65899 +Node: Mmap69047 +Node: Documentation69752 +Node: GNU Manuals70387 +Node: Manual Structure Details74635 +Node: License for Manuals75968 +Node: NEWS File76552 +Node: Change Logs77228 +Node: Change Log Concepts77945 +Node: Style of Change Logs79800 +Node: Simple Changes81354 +Node: Conditional Changes82545 +Node: Man Pages83922 +Node: Reading other Manuals85541 +Node: Managing Releases86325 +Node: Configuration87080 +Node: Makefile Conventions94020 +Node: Makefile Basics94779 +Node: Utilities in Makefiles97948 +Node: Command Variables100084 +Node: Directory Variables103585 +Node: Standard Targets114462 +Ref: Standard Targets-Footnote-1124901 +Node: Install Command Categories125001 +Node: Releases129574 +Node: References133657  End Tag Table diff --git a/info/standards.info-1 b/info/standards.info-1 index 4ffe023..b1d8299 100644 --- a/info/standards.info-1 +++ b/info/standards.info-1 @@ -1,12 +1,12 @@ -This is Info file ../info/standards.info, produced by Makeinfo version -1.68 from the input file standards.texi. +This is ../info/standards.info, produced by makeinfo version 3.12s from +standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. END-INFO-DIR-ENTRY - GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free -Software Foundation, Inc. + GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996, +1997, 1998, 1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -28,20 +28,21 @@ File: standards.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) Version ******* - Last updated 17 May 1996. + Last updated June 24, 1999. * Menu: -* Preface:: About the GNU Coding Standards -* Intellectual Property:: Keeping Free Software Free -* Design Advice:: General Program Design -* Program Behavior:: Program Behavior for All Programs -* Writing C:: Making The Best Use of C -* Documentation:: Documenting Programs -* Managing Releases:: The Release Process +* Preface:: About the GNU Coding Standards +* Legal Issues:: Keeping Free Software Free +* Design Advice:: General Program Design +* Program Behavior:: Program Behavior for All Programs +* Writing C:: Making The Best Use of C +* Documentation:: Documenting Programs +* Managing Releases:: The Release Process +* References:: References to Non-Free Software or Documentation  -File: standards.info, Node: Preface, Next: Intellectual Property, Prev: Top, Up: Top +File: standards.info, Node: Preface, Next: Legal Issues, Prev: Top, Up: Top About the GNU Coding Standards ****************************** @@ -54,17 +55,17 @@ programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way. - Corrections or suggestions regarding this document should be sent to -`gnu@prep.ai.mit.edu'. If you make a suggestion, please include a -suggested new wording for it; our time is limited. We prefer a context -diff to the `standards.texi' or `make-stds.texi' files, but if you -don't have those files, please mail your suggestion anyway. + Corrections or suggestions for this document should be sent to +. If you make a suggestion, please include a suggested +new wording for it; our time is limited. We prefer a context diff to +the `standards.texi' or `make-stds.texi' files, but if you don't have +those files, please mail your suggestion anyway. - This release of the GNU Coding Standards was last updated 17 May -1996. + This release of the GNU Coding Standards was last updated June 24, +1999.  -File: standards.info, Node: Intellectual Property, Next: Design Advice, Prev: Preface, Up: Top +File: standards.info, Node: Legal Issues, Next: Design Advice, Prev: Preface, Up: Top Keeping Free Software Free ************************** @@ -74,11 +75,11 @@ unencumbered. * Menu: -* Reading Non-Free Code:: Referring to Proprietary Programs -* Contributions:: Accepting Contributions +* Reading Non-Free Code:: Referring to Proprietary Programs +* Contributions:: Accepting Contributions  -File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Intellectual Property +File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Legal Issues Referring to Proprietary Programs ================================= @@ -115,43 +116,54 @@ precisely when to free memory, or use a new GNU facility such as obstacks.  -File: standards.info, Node: Contributions, Prev: Reading Non-Free Code, Up: Intellectual Property +File: standards.info, Node: Contributions, Prev: Reading Non-Free Code, Up: Legal Issues Accepting Contributions ======================= - If someone else sends you a piece of code to add to the program you -are working on, we need legal papers to use it--the same sort of legal -papers we will need to get from you. *Each* significant contributor to -a program must sign some sort of legal papers in order for us to have -clear title to the program. The main author alone is not enough. - - So, before adding in any contributions from other people, tell us so -we can arrange to get the papers. Then wait until we tell you that we -have received the signed papers, before you actually use the + If the program you are working on is copyrighted by the Free Software +Foundation, then when someone else sends you a piece of code to add to +the program, we need legal papers to use it--just as we asked you to +sign papers initially. _Each_ person who makes a nontrivial +contribution to a program must sign some sort of legal papers in order +for us to have clear title to the program; the main author alone is not +enough. + + So, before adding in any contributions from other people, please tell +us, so we can arrange to get the papers. Then wait until we tell you +that we have received the signed papers, before you actually use the contribution. This applies both before you release the program and afterward. If you receive diffs to fix a bug, and they make significant changes, we -need legal papers for it. +need legal papers for that change. + + This also applies to comments and documentation files. For copyright +law, comments and code are just text. Copyright applies to all kinds of +text, so we need legal papers for all kinds. + + We know it is frustrating to ask for legal papers; it's frustrating +for us as well. But if you don't wait, you are going out on a limb--for +example, what if the contributor's employer won't sign a disclaimer? +You might have to take that code out again! You don't need papers for changes of a few lines here or there, since they are not significant for copyright purposes. Also, you don't need papers if all you get from the suggestion is some ideas, not actual code -which you use. For example, if you write a different solution to the -problem, you don't need to get papers. - - We know this is frustrating; it's frustrating for us as well. But if -you don't wait, you are going out on a limb--for example, what if the -contributor's employer won't sign a disclaimer? You might have to take -that code out again! +which you use. For example, if someone send you one implementation, but +you write a different implementation of the same idea, you don't need to +get papers. The very worst thing is if you forget to tell us about the other contributor. We could be very embarrassed in court some day as a result. + We have more detailed advice for maintainers of programs; if you have +reached the stage of actually maintaining a program for GNU (whether +released or not), please ask us for a copy. +  -File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Intellectual Property, Up: Top +File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Legal Issues, Up: Top General Program Design ********************** @@ -161,10 +173,10 @@ when designing your program. * Menu: -* Compatibility:: Compatibility with other implementations -* Using Extensions:: Using non-standard features +* Compatibility:: Compatibility with other implementations +* Using Extensions:: Using non-standard features * ANSI C:: Using ANSI C features -* Source Language:: Using languages other than C +* Source Language:: Using languages other than C  File: standards.info, Node: Compatibility, Next: Using Extensions, Up: Design Advice @@ -198,8 +210,6 @@ completely with something totally different and better. (For example, feature as well. (There is a free `vi' clone, so we offer it.) Additional useful features not in Berkeley Unix are welcome. -Additional programs with no counterpart in Unix may be useful, but our -first priority is usually to duplicate what Unix already has.  File: standards.info, Node: Using Extensions, Next: ANSI C, Prev: Compatibility, Up: Design Advice @@ -248,9 +258,16 @@ that use ANSI C features (and therefore will not work in non-ANSI compilers). And if a program is already written in ANSI C, there's no need to convert it to support non-ANSI compilers. + If you don't know non-ANSI C, there's no need to learn it; just +write in ANSI C. + However, it is easy to support non-ANSI compilers in most programs, -so you might still consider doing so when you write a program. Instead -of writing function definitions in ANSI prototype form, +so you might still consider doing so when you write a program. And if a +program you are maintaining has such support, you should try to keep it +working. + + To support pre-ANSI C, instead of writing function definitions in +ANSI prototype form, int foo (int x, int y) @@ -269,11 +286,22 @@ and use a separate declaration to specify the argument prototype: You need such a declaration anyway, in a header file, to get the benefit of ANSI C prototypes in all the files where the function is -called. And once you have it, you lose nothing by writing the function -definition in the pre-ANSI style. - - If you don't know non-ANSI C, there's no need to learn it; just -write in ANSI C. +called. And once you have the declaration, you normally lose nothing +by writing the function definition in the pre-ANSI style. + + This technique does not work for integer types narrower than `int'. +If you think of an argument as being of a type narrower than `int', +declare it as `int' instead. + + There are a few special cases where this technique is hard to use. +For example, if a function argument needs to hold the system type +`dev_t', you run into trouble, because `dev_t' is shorter than `int' on +some machines; but you cannot use `int' instead, because `dev_t' is +wider than `int' on some machines. There is no type you can safely use +on all machines in a non-ANSI definition. The only way to support +non-ANSI C and pass such an argument is to check the width of `dev_t' +using Autoconf and choose the argument type accordingly. This may not +be worth the trouble.  File: standards.info, Node: Source Language, Prev: ANSI C, Up: Design Advice @@ -284,13 +312,16 @@ Using Languages Other Than C Using a language other than C is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the -compiler for that other language in order to build your program. So -please write in C. +compiler for that other language in order to build your program. For +example, if you write your program in C++, people will have to install +the C++ compiler in order to compile your program. Thus, it is better +if you write in C. - There are three exceptions for this rule: + But there are three situations when there is no disadvantage in using +some other language: - * It is okay to use a special language if the same program contains - an interpreter for that language. + * It is okay to use another language if your program contains an + interpreter for that language. For example, if your program links with GUILE, it is ok to write part of the program in Scheme or another language supported by @@ -302,10 +333,14 @@ please write in C. This is okay because the only people who want to build the tool will be those who have installed the other language anyway. - * If an application is not of extremely widespread interest, then + * If an application is of interest to a narrow community, then perhaps it's not important if the application is inconvenient to install. + C has one other advantage over C++ and other compiled languages: more +people know C, so more people will find it easy to read and modify the +program if it is written in C. +  File: standards.info, Node: Program Behavior, Next: Writing C, Prev: Design Advice, Up: Top @@ -318,10 +353,11 @@ how libraries should behave. * Menu: -* Semantics:: Writing robust programs -* Libraries:: Library behavior -* Errors:: Formatting error messages -* User Interfaces:: Standards for command line interfaces +* Semantics:: Writing robust programs +* Libraries:: Library behavior +* Errors:: Formatting error messages +* User Interfaces:: Standards for command line interfaces +* Option Table:: Table of long options. * Memory Usage:: When and how to care about memory needs  @@ -330,21 +366,23 @@ File: standards.info, Node: Semantics, Next: Libraries, Up: Program Behavior Writing Robust Programs ======================= - Avoid arbitrary limits on the length or number of *any* data + Avoid arbitrary limits on the length or number of _any_ data structure, including file names, lines, files, and symbols, by allocating all data structures dynamically. In most Unix utilities, "long lines are silently truncated". This is not acceptable in a GNU utility. Utilities reading files should not drop NUL characters, or any other -nonprinting characters *including those with codes above 0177*. The +nonprinting characters _including those with codes above 0177_. The only sensible exceptions would be utilities specifically intended for -interface to certain types of printers that can't handle those -characters. +interface to certain types of terminals or printers that can't handle +those characters. Whenever possible, try to make programs work +properly with sequences of bytes that represent multibyte characters, +using encodings such as UTF-8 and others. Check every system call for an error return, unless you know you wish to ignore errors. Include the system error text (from `perror' or -equivalent) in *every* error message resulting from a failing system +equivalent) in _every_ error message resulting from a failing system call, as well as the name of the file if any and the name of the utility. Just "cannot open foo.c" or "stat failed" is not sufficient. @@ -380,11 +418,18 @@ for data that will not be changed. (such as file directories, utmp, or the layout of kernel memory), since these are less likely to work compatibly. If you need to find all the files in a directory, use `readdir' or some other high-level interface. -These will be supported compatibly by GNU. +These are supported compatibly by GNU. + + The preferred signal handling facilities are the BSD variant of +`signal', and the POSIX `sigaction' function; the alternative USG +`signal' interface is an inferior design. - By default, the GNU system will provide the signal handling -functions of BSD and of POSIX. So GNU software should be written to use -these. + Nowadays, using the POSIX signal functions may be the easiest way to +make a program portable. If you use `signal', then on GNU/Linux +systems running GNU libc version 1, you should include `bsd/signal.h' +instead of `signal.h', so as to get BSD behavior. It is up to you +whether to support systems where `signal' has only the USG behavior, or +give up on them. In error checks that detect "impossible" conditions, just abort. There is usually no point in printing any message. These checks @@ -395,7 +440,7 @@ are easy to examine with the debugger, so there is no point moving them elsewhere. Do not use a count of errors as the exit status for a program. -*That does not work*, because exit status values are limited to 8 bits +_That does not work_, because exit status values are limited to 8 bits (0 through 255). A single run of the program might have 256 errors; if you try to return 256 as the exit status, the parent process will see 0 as the status, and it will appear that the program succeeded. @@ -445,6 +490,16 @@ Formatting Error Messages SOURCE-FILE-NAME:LINENO: MESSAGE +If you want to mention the column number, use this format: + + SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE + +Line numbers should start from 1 at the beginning of the file, and +column numbers should start from 1 at the beginning of the line. (Both +of these conventions are chosen for compatibility.) Calculate column +numbers assuming that space and all ASCII printing characters have +equal width, and assuming tab stops every 8 columns. + Error messages from other noninteractive programs should look like this: @@ -456,6 +511,10 @@ when there is an appropriate source file, or like this: when there is no relevant source file. + If you want to mention the column number, use this format: + + PROGRAM:SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE + In an interactive program (one that is reading commands from a terminal), it is better not to include the program name in an error message. The place to indicate which program is running is in the @@ -472,7 +531,7 @@ usage messages, should start with a capital letter. But they should not end with a period.  -File: standards.info, Node: User Interfaces, Next: Memory Usage, Prev: Errors, Up: Program Behavior +File: standards.info, Node: User Interfaces, Next: Option Table, Prev: Errors, Up: Program Behavior Standards for Command Line Interfaces ===================================== @@ -487,7 +546,9 @@ select among the alternate behaviors. Likewise, please don't make the behavior of the program depend on the type of output device it is used with. Device independence is an important principle of the system's design; do not compromise it merely -to save someone from typing an option now and then. +to save someone from typing an option now and then. (Variation in error +message syntax when using a terminal is ok, because that is a side issue +that people do not depend on.) If you think one behavior is most useful when the output is to a terminal, and another is most useful when the output is a file or a @@ -520,27 +581,113 @@ consistent from program to program. For example, users should be able to expect the "verbose" option of any GNU program which has one, to be spelled precisely `--verbose'. To achieve this uniformity, look at the table of common long-option names when you choose the option names for -your program. The table appears below. - - If you use names not already in the table, please send -`gnu@prep.ai.mit.edu' a list of them, with their meanings, so we can -update the table. +your program (*note Option Table::). It is usually a good idea for file names given as ordinary arguments to be input files only; any output files would be specified using -options (preferably `-o'). Even if you allow an output file name as an -ordinary argument for compatibility, try to provide a suitable option -as well. This will lead to more consistency among GNU utilities, so -that there are fewer idiosyncracies for users to remember. +options (preferably `-o' or `--output'). Even if you allow an output +file name as an ordinary argument for compatibility, try to provide an +option as another way to specify it. This will lead to more consistency +among GNU utilities, and fewer idiosyncracies for users to remember. + + All programs should support two standard options: `--version' and +`--help'. + +`--version' + This option should direct the program to print information about + its name, version, origin and legal status, all on standard + output, and then exit successfully. Other options and arguments + should be ignored once this is seen, and the program should not + perform its normal function. + + The first line is meant to be easy for a program to parse; the + version number proper starts after the last space. In addition, + it contains the canonical name for this program, in this format: + + GNU Emacs 19.30 + + The program's name should be a constant string; _don't_ compute it + from `argv[0]'. The idea is to state the standard or canonical + name for the program, not its file name. There are other ways to + find out the precise file name where a command is found in `PATH'. + + If the program is a subsidiary part of a larger package, mention + the package name in parentheses, like this: + + emacsserver (GNU Emacs) 19.30 + + If the package has a version number which is different from this + program's version number, you can mention the package version + number just before the close-parenthesis. + + If you *need* to mention the version numbers of libraries which + are distributed separately from the package which contains this + program, you can do so by printing an additional line of version + info for each library you want to mention. Use the same format + for these lines as for the first line. + + Please do not mention all of the libraries that the program uses + "just for completeness"--that would produce a lot of unhelpful + clutter. Please mention library version numbers only if you find + in practice that they are very important to you in debugging. + + The following line, after the version number line or lines, should + be a copyright notice. If more than one copyright notice is + called for, put each on a separate line. + + Next should follow a brief statement that the program is free + software, and that users are free to copy and change it on certain + conditions. If the program is covered by the GNU GPL, say so + here. Also mention that there is no warranty, to the extent + permitted by law. + + It is ok to finish the output with a list of the major authors of + the program, as a way of giving credit. + + Here's an example of output that follows these rules: + + GNU Emacs 19.34.5 + Copyright (C) 1996 Free Software Foundation, Inc. + GNU Emacs comes with NO WARRANTY, + to the extent permitted by law. + You may redistribute copies of GNU Emacs + under the terms of the GNU General Public License. + For more information about these matters, + see the files named COPYING. + + You should adapt this to your program, of course, filling in the + proper year, copyright holder, name of program, and the references + to distribution terms, and changing the rest of the wording as + necessary. + + This copyright notice only needs to mention the most recent year in + which changes were made--there's no need to list the years for + previous versions' changes. You don't have to mention the name of + the program in these notices, if that is inconvenient, since it + appeared in the first line. + +`--help' + This option should output brief documentation for how to invoke the + program, on standard output, then exit successfully. Other + options and arguments should be ignored once this is seen, and the + program should not perform its normal function. + + Near the end of the `--help' option's output there should be a line + that says where to mail bug reports. It should have this format: + + Report bugs to MAILING-ADDRESS. - Programs should support an option `--version' which prints the -program's version number on standard output and exits successfully, and -an option `--help' which prints option usage information on standard -output and exits successfully. These options should inhibit the normal -function of the command; they should do nothing except print the -requested information. + +File: standards.info, Node: Option Table, Next: Memory Usage, Prev: User Interfaces, Up: Program Behavior - Here is the table of long options used by GNU programs. +Table of Long Options +===================== + + Here is a table of long options used by GNU programs. It is surely +incomplete, but we aim to list all the options that a new program might +want to be compatible with. If you use names not already in the table, +please send a list of them, with their meanings, so we +can update the table. `after-date' `-N' in `tar'. @@ -590,6 +737,9 @@ requested information. `avoid-wraps' `-n' in `wdiff'. +`background' + For server programs, run in the background. + `backward-search' `-B' in `ctags'. @@ -710,6 +860,9 @@ requested information. `dereference-args' `-D' in `du'. +`device' + Specify an I/O device (special file name). + `diacritics' `-d' in `recode'. @@ -840,6 +993,10 @@ requested information. `force-prefix' `-F' in `shar'. +`foreground' + For server programs, run in the foreground; in other words, don't + do anything special to run the server in the background. + `format' Used in `ls', `time', and `ptx'. @@ -1012,7 +1169,7 @@ requested information. `machine' No listing of which programs already use this; someone should - check to see if any actually do and tell `gnu@prep.ai.mit.edu'. + check to see if any actually do, and tell . `macro-name' `-M' in `ptx'. @@ -1137,6 +1294,9 @@ requested information. `no-validate' Used in `makeinfo'. +`no-wait' + Used in `emacsclient'. + `no-warn' Used in various programs to inhibit warnings. @@ -1188,6 +1348,9 @@ requested information. `only-time' `-F' in `gprof'. +`options' + `-o' in `getopt', `fdlist', `fdmount', `fdmountd', and `fdumount'. + `output' In various programs, specify the output file name. @@ -1272,6 +1435,9 @@ requested information. `prompt' `-p' in `ed'. +`proxy' + Specify an HTTP proxy. + `query-user' `-X' in `shar'. @@ -1279,9 +1445,8 @@ requested information. `-q' in Make. `quiet' - Used in many programs to inhibit the usual output. *Please note:* - every program accepting `--quiet' should accept `--silent' as a - synonym. + Used in many programs to inhibit the usual output. *Note:* every + program accepting `--quiet' should accept `--silent' as a synonym. `quiet-unshar' `-Q' in `shar' @@ -1392,13 +1557,18 @@ requested information. `-T' in `cat'. `silent' - Used in many programs to inhibit the usual output. *Please note:* - every program accepting `--silent' should accept `--quiet' as a - synonym. + Used in many programs to inhibit the usual output. *Note:* every + program accepting `--silent' should accept `--quiet' as a synonym. `size' `-s' in `ls'. +`socket' + Specify a file descriptor for a network server to use for its + socket, instead of opening and binding a new socket. This + provides a way to run, in a nonpriveledged process, a server that + normally needs a reserved port number. + `sort' Used in `ls'. @@ -1496,6 +1666,9 @@ requested information. `time' Used in `ls' and `touch'. +`timeout' + Specify how long to wait before giving up on some operation. + `to-stdout' `-O' in `tar'. @@ -1585,7 +1758,7 @@ requested information. `-z' in `gprof'.  -File: standards.info, Node: Memory Usage, Prev: User Interfaces, Up: Program Behavior +File: standards.info, Node: Memory Usage, Prev: Option Table, Up: Program Behavior Memory Usage ============ @@ -1617,14 +1790,15 @@ writing GNU software. * Menu: -* Formatting:: Formatting Your Source Code -* Comments:: Commenting Your Work -* Syntactic Conventions:: Clean Use of C Constructs -* Names:: Naming Variables and Functions -* System Portability:: Portability between different operating systems +* Formatting:: Formatting Your Source Code +* Comments:: Commenting Your Work +* Syntactic Conventions:: Clean Use of C Constructs +* Names:: Naming Variables and Functions +* System Portability:: Portability between different operating systems * CPU Portability:: Supporting the range of CPU types -* System Functions:: Portability and "standard" library functions +* System Functions:: Portability and ``standard'' library functions * Internationalization:: Techniques for internationalization +* Mmap:: How you can safely use `mmap'.  File: standards.info, Node: Formatting, Next: Comments, Up: Writing C @@ -1728,246 +1902,3 @@ pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves. - -File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Writing C - -Commenting Your Work -==================== - - Every program should start with a comment saying briefly what it is -for. Example: `fmt - filter for simple filling of text'. - - Please put a comment on each function saying what the function does, -what sorts of arguments it gets, and what the possible values of -arguments mean and are used for. It is not necessary to duplicate in -words the meaning of the C argument declarations, if a C type is being -used in its customary fashion. If there is anything nonstandard about -its use (such as an argument of type `char *' which is really the -address of the second character of a string, not the first), or any -possible values that would not work the way one would expect (such as, -that strings containing newlines are not guaranteed to work), be sure -to say so. - - Also explain the significance of the return value, if there is one. - - Please put two spaces after the end of a sentence in your comments, -so that the Emacs sentence commands will work. Also, please write -complete sentences and capitalize the first word. If a lower-case -identifier comes at the beginning of a sentence, don't capitalize it! -Changing the spelling makes it a different identifier. If you don't -like starting a sentence with a lower case letter, write the sentence -differently (e.g., "The identifier lower-case is ..."). - - The comment on a function is much clearer if you use the argument -names to speak about the argument values. The variable name itself -should be lower case, but write it in upper case when you are speaking -about the value rather than the variable itself. Thus, "the inode -number NODE_NUM" rather than "an inode". - - There is usually no purpose in restating the name of the function in -the comment before it, because the reader can see that for himself. -There might be an exception when the comment is so long that the -function itself would be off the bottom of the screen. - - There should be a comment on each static variable as well, like this: - - /* Nonzero means truncate lines in the display; - zero means continue them. */ - int truncate_lines; - - Every `#endif' should have a comment, except in the case of short -conditionals (just a few lines) that are not nested. The comment should -state the condition of the conditional that is ending, *including its -sense*. `#else' should have a comment describing the condition *and -sense* of the code that follows. For example: - - #ifdef foo - ... - #else /* not foo */ - ... - #endif /* not foo */ - -but, by contrast, write the comments this way for a `#ifndef': - - #ifndef foo - ... - #else /* foo */ - ... - #endif /* foo */ - - -File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Writing C - -Clean Use of C Constructs -========================= - - Please explicitly declare all arguments to functions. Don't omit -them just because they are `int's. - - Declarations of external functions and functions to appear later in -the source file should all go in one place near the beginning of the -file (somewhere before the first function definition in the file), or -else should go in a header file. Don't put `extern' declarations inside -functions. - - It used to be common practice to use the same local variables (with -names like `tem') over and over for different values within one -function. Instead of doing this, it is better declare a separate local -variable for each distinct purpose, and give it a name which is -meaningful. This not only makes programs easier to understand, it also -facilitates optimization by good compilers. You can also move the -declaration of each local variable into the smallest scope that includes -all its uses. This makes the program even cleaner. - - Don't use local variables or parameters that shadow global -identifiers. - - Don't declare multiple variables in one declaration that spans lines. -Start a new declaration on each line, instead. For example, instead of -this: - - int foo, - bar; - -write either this: - - int foo, bar; - -or this: - - int foo; - int bar; - -(If they are global variables, each should have a comment preceding it -anyway.) - - When you have an `if'-`else' statement nested in another `if' -statement, always put braces around the `if'-`else'. Thus, never write -like this: - - if (foo) - if (bar) - win (); - else - lose (); - -always like this: - - if (foo) - { - if (bar) - win (); - else - lose (); - } - - If you have an `if' statement nested inside of an `else' statement, -either write `else if' on one line, like this, - - if (foo) - ... - else if (bar) - ... - -with its `then'-part indented like the preceding `then'-part, or write -the nested `if' within braces like this: - - if (foo) - ... - else - { - if (bar) - ... - } - - Don't declare both a structure tag and variables or typedefs in the -same declaration. Instead, declare the structure tag separately and -then use it to declare the variables or typedefs. - - Try to avoid assignments inside `if'-conditions. For example, don't -write this: - - if ((foo = (char *) malloc (sizeof *foo)) == 0) - fatal ("virtual memory exhausted"); - -instead, write this: - - foo = (char *) malloc (sizeof *foo); - if (foo == 0) - fatal ("virtual memory exhausted"); - - Don't make the program ugly to placate `lint'. Please don't insert -any casts to `void'. Zero without a cast is perfectly fine as a null -pointer constant, except when calling a varargs function. - - -File: standards.info, Node: Names, Next: System Portability, Prev: Syntactic Conventions, Up: Writing C - -Naming Variables and Functions -============================== - - Please use underscores to separate words in a name, so that the Emacs -word commands can be useful within them. Stick to lower case; reserve -upper case for macros and `enum' constants, and for name-prefixes that -follow a uniform convention. - - For example, you should use names like `ignore_space_change_flag'; -don't use names like `iCantReadThis'. - - Variables that indicate whether command-line options have been -specified should be named after the meaning of the option, not after -the option-letter. A comment should state both the exact meaning of -the option and its letter. For example, - - /* Ignore changes in horizontal whitespace (-b). */ - int ignore_space_change_flag; - - When you want to define names with constant integer values, use -`enum' rather than `#define'. GDB knows about enumeration constants. - - Use file names of 14 characters or less, to avoid creating gratuitous -problems on older System V systems. You can use the program `doschk' -to test for this. `doschk' also tests for potential name conflicts if -the files were loaded onto an MS-DOS file system--something you may or -may not care about. - - -File: standards.info, Node: System Portability, Next: CPU Portability, Prev: Names, Up: Writing C - -Portability between System Types -================================ - - In the Unix world, "portability" refers to porting to different Unix -versions. For a GNU program, this kind of portability is desirable, but -not paramount. - - The primary purpose of GNU software is to run on top of the GNU -kernel, compiled with the GNU C compiler, on various types of CPU. The -amount and kinds of variation among GNU systems on different CPUs will -be comparable to the variation among Linux-based GNU systems or among -BSD systems today. So the kinds of portability that are absolutely -necessary are quite limited. - - But many users do run GNU software on non-GNU Unix or Unix-like -systems. So supporting a variety of Unix-like systems is desirable, -although not paramount. - - The easiest way to achieve portability to most Unix-like systems is -to use Autoconf. It's unlikely that your program needs to know more -information about the host platform than Autoconf can provide, simply -because most of the programs that need such knowledge have already been -written. - - Avoid using the format of semi-internal data bases (e.g., -directories) when there is a higher-level alternative (`readdir'). - - As for systems that are not like Unix, such as MSDOS, Windows, the -Macintosh, VMS, and MVS, supporting them is usually so much work that it -is better if you don't. - - The planned GNU kernel is not finished yet, but you can tell which -facilities it will provide by looking at the GNU C Library Manual. The -GNU kernel is based on Mach, so the features of Mach will also be -available. However, if you use Mach features, you'll probably have -trouble debugging your program today. - diff --git a/info/standards.info-2 b/info/standards.info-2 index 4473101..f997e27 100644 --- a/info/standards.info-2 +++ b/info/standards.info-2 @@ -1,12 +1,12 @@ -This is Info file ../info/standards.info, produced by Makeinfo version -1.68 from the input file standards.texi. +This is ../info/standards.info, produced by makeinfo version 3.12s from +standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. END-INFO-DIR-ENTRY - GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free -Software Foundation, Inc. + GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996, +1997, 1998, 1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -23,6 +23,271 @@ versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  +File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Writing C + +Commenting Your Work +==================== + + Every program should start with a comment saying briefly what it is +for. Example: `fmt - filter for simple filling of text'. + + Please write the comments in a GNU program in English, because +English is the one language that nearly all programmers in all +countries can read. If you do not write English well, please write +comments in English as well as you can, then ask other people to help +rewrite them. If you can't write comments in English, please find +someone to work with you and translate your comments into English. + + Please put a comment on each function saying what the function does, +what sorts of arguments it gets, and what the possible values of +arguments mean and are used for. It is not necessary to duplicate in +words the meaning of the C argument declarations, if a C type is being +used in its customary fashion. If there is anything nonstandard about +its use (such as an argument of type `char *' which is really the +address of the second character of a string, not the first), or any +possible values that would not work the way one would expect (such as, +that strings containing newlines are not guaranteed to work), be sure +to say so. + + Also explain the significance of the return value, if there is one. + + Please put two spaces after the end of a sentence in your comments, +so that the Emacs sentence commands will work. Also, please write +complete sentences and capitalize the first word. If a lower-case +identifier comes at the beginning of a sentence, don't capitalize it! +Changing the spelling makes it a different identifier. If you don't +like starting a sentence with a lower case letter, write the sentence +differently (e.g., "The identifier lower-case is ..."). + + The comment on a function is much clearer if you use the argument +names to speak about the argument values. The variable name itself +should be lower case, but write it in upper case when you are speaking +about the value rather than the variable itself. Thus, "the inode +number NODE_NUM" rather than "an inode". + + There is usually no purpose in restating the name of the function in +the comment before it, because the reader can see that for himself. +There might be an exception when the comment is so long that the +function itself would be off the bottom of the screen. + + There should be a comment on each static variable as well, like this: + + /* Nonzero means truncate lines in the display; + zero means continue them. */ + int truncate_lines; + + Every `#endif' should have a comment, except in the case of short +conditionals (just a few lines) that are not nested. The comment should +state the condition of the conditional that is ending, _including its +sense_. `#else' should have a comment describing the condition _and +sense_ of the code that follows. For example: + + #ifdef foo + ... + #else /* not foo */ + ... + #endif /* not foo */ + #ifdef foo + ... + #endif /* foo */ + +but, by contrast, write the comments this way for a `#ifndef': + + #ifndef foo + ... + #else /* foo */ + ... + #endif /* foo */ + #ifndef foo + ... + #endif /* not foo */ + + +File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Writing C + +Clean Use of C Constructs +========================= + + Please explicitly declare all arguments to functions. Don't omit +them just because they are `int's. + + Declarations of external functions and functions to appear later in +the source file should all go in one place near the beginning of the +file (somewhere before the first function definition in the file), or +else should go in a header file. Don't put `extern' declarations inside +functions. + + It used to be common practice to use the same local variables (with +names like `tem') over and over for different values within one +function. Instead of doing this, it is better declare a separate local +variable for each distinct purpose, and give it a name which is +meaningful. This not only makes programs easier to understand, it also +facilitates optimization by good compilers. You can also move the +declaration of each local variable into the smallest scope that includes +all its uses. This makes the program even cleaner. + + Don't use local variables or parameters that shadow global +identifiers. + + Don't declare multiple variables in one declaration that spans lines. +Start a new declaration on each line, instead. For example, instead of +this: + + int foo, + bar; + +write either this: + + int foo, bar; + +or this: + + int foo; + int bar; + +(If they are global variables, each should have a comment preceding it +anyway.) + + When you have an `if'-`else' statement nested in another `if' +statement, always put braces around the `if'-`else'. Thus, never write +like this: + + if (foo) + if (bar) + win (); + else + lose (); + +always like this: + + if (foo) + { + if (bar) + win (); + else + lose (); + } + + If you have an `if' statement nested inside of an `else' statement, +either write `else if' on one line, like this, + + if (foo) + ... + else if (bar) + ... + +with its `then'-part indented like the preceding `then'-part, or write +the nested `if' within braces like this: + + if (foo) + ... + else + { + if (bar) + ... + } + + Don't declare both a structure tag and variables or typedefs in the +same declaration. Instead, declare the structure tag separately and +then use it to declare the variables or typedefs. + + Try to avoid assignments inside `if'-conditions. For example, don't +write this: + + if ((foo = (char *) malloc (sizeof *foo)) == 0) + fatal ("virtual memory exhausted"); + +instead, write this: + + foo = (char *) malloc (sizeof *foo); + if (foo == 0) + fatal ("virtual memory exhausted"); + + Don't make the program ugly to placate `lint'. Please don't insert +any casts to `void'. Zero without a cast is perfectly fine as a null +pointer constant, except when calling a varargs function. + + +File: standards.info, Node: Names, Next: System Portability, Prev: Syntactic Conventions, Up: Writing C + +Naming Variables and Functions +============================== + + The names of global variables and functions in a program serve as +comments of a sort. So don't choose terse names--instead, look for +names that give useful information about the meaning of the variable or +function. In a GNU program, names should be English, like other +comments. + + Local variable names can be shorter, because they are used only +within one context, where (presumably) comments explain their purpose. + + Try to limit your use of abbreviations in symbol names. It is ok to +make a few abbreviations, explain what they mean, and then use them +frequently, but don't use lots of obscure abbreviations. + + Please use underscores to separate words in a name, so that the Emacs +word commands can be useful within them. Stick to lower case; reserve +upper case for macros and `enum' constants, and for name-prefixes that +follow a uniform convention. + + For example, you should use names like `ignore_space_change_flag'; +don't use names like `iCantReadThis'. + + Variables that indicate whether command-line options have been +specified should be named after the meaning of the option, not after +the option-letter. A comment should state both the exact meaning of +the option and its letter. For example, + + /* Ignore changes in horizontal whitespace (-b). */ + int ignore_space_change_flag; + + When you want to define names with constant integer values, use +`enum' rather than `#define'. GDB knows about enumeration constants. + + Use file names of 14 characters or less, to avoid creating gratuitous +problems on older System V systems. You can use the program `doschk' +to test for this. `doschk' also tests for potential name conflicts if +the files were loaded onto an MS-DOS file system--something you may or +may not care about. + + +File: standards.info, Node: System Portability, Next: CPU Portability, Prev: Names, Up: Writing C + +Portability between System Types +================================ + + In the Unix world, "portability" refers to porting to different Unix +versions. For a GNU program, this kind of portability is desirable, but +not paramount. + + The primary purpose of GNU software is to run on top of the GNU +kernel, compiled with the GNU C compiler, on various types of CPU. The +amount and kinds of variation among GNU systems on different CPUs will +be comparable to the variation among Linux-based GNU systems or among +BSD systems today. So the kinds of portability that are absolutely +necessary are quite limited. + + But many users do run GNU software on non-GNU Unix or Unix-like +systems. So supporting a variety of Unix-like systems is desirable, +although not paramount. + + The easiest way to achieve portability to most Unix-like systems is +to use Autoconf. It's unlikely that your program needs to know more +information about the host platform than Autoconf can provide, simply +because most of the programs that need such knowledge have already been +written. + + Avoid using the format of semi-internal data bases (e.g., +directories) when there is a higher-level alternative (`readdir'). + + As for systems that are not like Unix, such as MSDOS, Windows, the +Macintosh, VMS, and MVS, supporting them is often a lot of work. When +that is the case, it is better to spend your time adding features that +will be useful on GNU and GNU/Linux, rather than on supporting other +incompatible systems. + + File: standards.info, Node: CPU Portability, Next: System Functions, Prev: System Portability, Up: Writing C Portability between CPUs @@ -58,22 +323,24 @@ that pass their arguments along to `printf' and friends: error (s, a1, a2, a3) char *s; - int a1, a2, a3; + char *a1, *a2, *a3; { fprintf (stderr, "error: "); fprintf (stderr, s, a1, a2, a3); } -In practice, this works on all machines, and it is much simpler than any -"correct" alternative. Be sure *not* to use a prototype for such +In practice, this works on all machines, since a pointer is generally +the widest possible kind of argument, and it is much simpler than any +"correct" alternative. Be sure _not_ to use a prototype for such functions. However, avoid casting pointers to integers unless you really need -to. These assumptions really reduce portability, and in most programs -they are easy to avoid. In the cases where casting pointers to -integers is essential--such as, a Lisp interpreter which stores type -information as well as an address in one word--it is ok to do so, but -you'll have to make explicit provisions to handle different word sizes. +to. Outside of special situations, such casts greatly reduce +portability, and in most programs they are easy to avoid. In the cases +where casting pointers to integers is essential--such as, a Lisp +interpreter which stores type information as well as an address in one +word--it is ok to do it, but you'll have to make explicit provisions to +handle different word sizes.  File: standards.info, Node: System Functions, Next: Internationalization, Prev: CPU Portability, Up: Writing C @@ -90,6 +357,10 @@ functions to avoid unnecessary loss of portability. * Don't use the value of `sprintf'. It returns the number of characters written on some systems, but not on all systems. + * `main' should be declared to return type `int'. It should + terminate either by calling `exit' or by returning the integer + status code; make sure it cannot ever return an undefined value. + * Don't declare system functions explicitly. Almost any declaration for a system function is wrong on some @@ -184,7 +455,7 @@ defined in systems where the corresponding functions exist. One way to get them properly defined is to use Autoconf.  -File: standards.info, Node: Internationalization, Prev: System Functions, Up: Writing C +File: standards.info, Node: Internationalization, Next: Mmap, Prev: System Functions, Up: Writing C Internationalization ==================== @@ -212,35 +483,75 @@ translations for this package from the translations for other packages. Normally, the text domain name should be the same as the name of the package--for example, `fileutils' for the GNU file utilities. - To enable gettext to work, avoid writing code that makes assumptions -about the structure of words. Don't construct words from parts. Here -is an example of what not to do: + To enable gettext to work well, avoid writing code that makes +assumptions about the structure of words or sentences. When you want +the precise text of a sentence to vary depending on the data, use two or +more alternative string constants each containing a complete sentences, +rather than inserting conditionalized words or phrases into a single +sentence framework. - prinf ("%d file%s processed", nfiles, - nfiles > 1 ? "s" : ""); + Here is an example of what not to do: + + printf ("%d file%s processed", nfiles, + nfiles != 1 ? "s" : ""); The problem with that example is that it assumes that plurals are made by adding `s'. If you apply gettext to the format string, like this, - prinf (gettext ("%d file%s processed"), nfiles, - nfiles > 1 ? "s" : ""); + printf (gettext ("%d file%s processed"), nfiles, + nfiles != 1 ? "s" : ""); the message can use different words, but it will still be forced to use `s' for the plural. Here is a better way: - prinf ((nfiles > 1 ? "%d files processed" - : "%d file processed"), - nfiles); + printf ((nfiles != 1 ? "%d files processed" + : "%d file processed"), + nfiles); This way, you can apply gettext to each of the two strings independently: - prinf ((nfiles > 1 ? gettext ("%d files processed") - : gettext ("%d file processed")), - nfiles); + printf ((nfiles != 1 ? gettext ("%d files processed") + : gettext ("%d file processed")), + nfiles); + +This can be any method of forming the plural of the word for "file", and +also handles languages that require agreement in the word for +"processed". + + A similar problem appears at the level of sentence structure with +this code: + + printf ("# Implicit rule search has%s been done.\n", + f->tried_implicit ? "" : " not"); + +Adding `gettext' calls to this code cannot give correct results for all +languages, because negation in some languages requires adding words at +more than one place in the sentence. By contrast, adding `gettext' +calls does the job straightfowardly if the code starts out like this: + + printf (f->tried_implicit + ? "# Implicit rule search has been done.\n", + : "# Implicit rule search has not been done.\n"); -This can handle any language, no matter how it forms the plural of the -word for "file." + +File: standards.info, Node: Mmap, Prev: Internationalization, Up: Writing C + +Mmap +==== + + Don't assume that `mmap' either works on all files or fails for all +files. It may work on some files and fail on others. + + The proper way to use `mmap' is to try it on the specific file for +which you want to use it--and if `mmap' doesn't work, fall back on +doing the job in another way using `read' and `write'. + + The reason this precaution is needed is that the GNU kernel (the +HURD) provides a user-extensible file system, in which there can be many +different kinds of "ordinary files." Many of them support `mmap', but +some do not. It is important to make programs handle all these kinds +of files.  File: standards.info, Node: Documentation, Next: Managing Releases, Prev: Writing C, Up: Top @@ -252,8 +563,9 @@ Documenting Programs * GNU Manuals:: Writing proper manuals. * Manual Structure Details:: Specific structure conventions. +* License for Manuals:: Writing the distribution terms for a manual. * NEWS File:: NEWS files supplement manuals. -* Change Logs:: Recording Changes +* Change Logs:: Recording Changes * Man Pages:: Man pages are secondary. * Reading other Manuals:: How far you can go in learning from other manuals. @@ -265,28 +577,60 @@ GNU Manuals =========== The preferred way to document part of the GNU system is to write a -manual in the Texinfo formatting language. See the Texinfo manual, -either the hardcopy, or the on-line version available through `info' or -the Emacs Info subsystem (`C-h i'). - - The manual should document all of the program's command-line options -and all of its commands. It should give examples of their use. But -don't organize the manual as a list of features. Instead, organize it -logically, by subtopics. Address the goals that a user will have in -mind, and explain how to accomplish them. +manual in the Texinfo formatting language. This makes it possible to +produce a good quality formatted book, using TeX, and to generate an +Info file. It is also possible to generate HTML output from Texinfo +source. See the Texinfo manual, either the hardcopy, or the on-line +version available through `info' or the Emacs Info subsystem (`C-h i'). + + Programmers often find it most natural to structure the documentation +following the structure of the implementation, which they know. But +this structure is not necessarily good for explaining how to use the +program; it may be irrelevant and confusing for a user. + + At every level, from the sentences in a paragraph to the grouping of +topics into separate manuals, the right way to structure documentation +is according to the concepts and questions that a user will have in mind +when reading it. Sometimes this structure of ideas matches the +structure of the implementation of the software being documented--but +often they are different. Often the most important part of learning to +write good documentation is learning to notice when you are structuring +the documentation like the implementation, and think about better +alternatives. + + For example, each program in the GNU system probably ought to be +documented in one manual; but this does not mean each program should +have its own manual. That would be following the structure of the +implementation, rather than the structure that helps the user +understand. + + Instead, each manual should cover a coherent _topic_. For example, +instead of a manual for `diff' and a manual for `diff3', we have one +manual for "comparison of files" which covers both of those programs, +as well as `cmp'. By documenting these programs together, we can make +the whole subject clearer. + + The manual which discusses a program should document all of the +program's command-line options and all of its commands. It should give +examples of their use. But don't organize the manual as a list of +features. Instead, organize it logically, by subtopics. Address the +questions that a user will ask when thinking about the job that the +program does. In general, a GNU manual should serve both as tutorial and reference. It should be set up for convenient access to each topic through Info, and for reading straight through (appendixes aside). A GNU manual should give a good introduction to a beginner reading through from the -start, and should also provide all the details that hackers want. +start, and should also provide all the details that hackers want. The +Bison manual is a good example of this--please take a look at it to see +what we mean. That is not as hard as it first sounds. Arrange each chapter as a logical breakdown of its topic, but order the sections, and write their text, so that reading the chapter straight through makes sense. Do likewise when structuring the book into chapters, and when structuring a -section into paragraphs. The watchword is, *at each point, address the -most fundamental and important issue raised by the preceding text.* +section into paragraphs. The watchword is, _at each point, address the +most fundamental and important issue raised by the preceding text._ If necessary, add extra chapters at the beginning of the manual which are purely tutorial and cover the basics of the subject. These provide @@ -294,32 +638,40 @@ the framework for a beginner to understand the rest of the manual. The Bison manual provides a good example of how to do this. Don't use Unix man pages as a model for how to write GNU -documentation; they are a bad example to follow. +documentation; most of them are terse, badly structured, and give +inadequate explanation of the underlying concepts. (There are, of +course exceptions.) Also Unix man pages use a particular format which +is different from what we use in GNU manuals. + + Please include an email address in the manual for where to report +bugs _in the manual_. Please do not use the term "pathname" that is used in Unix documentation; use "file name" (two words) instead. We use the term -"path" only for search paths, which are lists of file names. +"path" only for search paths, which are lists of directory names. + + Please do not use the term "illegal" to refer to erroneous input to a +computer program. Please use "invalid" for this, and reserve the term +"illegal" for violations of law.  -File: standards.info, Node: Manual Structure Details, Next: NEWS File, Prev: GNU Manuals, Up: Documentation +File: standards.info, Node: Manual Structure Details, Next: License for Manuals, Prev: GNU Manuals, Up: Documentation Manual Structure Details ======================== - The title page of the manual should state the version of the program -to which the manual applies. The Top node of the manual should also -contain this information. If the manual is changing more frequently -than or independent of the program, also state a version number for the -manual in both of these places. - - The manual should have a node named `PROGRAM Invocation' or -`Invoking PROGRAM', where PROGRAM stands for the name of the program -being described, as you would type it in the shell to run the program. -This node (together with its subnodes, if any) should describe the -program's command line arguments and how to run it (the sort of -information people would look in a man page for). Start with an -`@example' containing a template for all the options and arguments that -the program uses. + The title page of the manual should state the version of the +programs or packages documented in the manual. The Top node of the +manual should also contain this information. If the manual is changing +more frequently than or independent of the program, also state a version +number for the manual in both of these places. + + Each program documented in the manual should have a node named +`PROGRAM Invocation' or `Invoking PROGRAM'. This node (together with +its subnodes, if any) should describe the program's command line +arguments and how to run it (the sort of information people would look +in a man page for). Start with an `@example' containing a template for +all the options and arguments that the program uses. Alternatively, put a menu item in some menu whose item name fits one of the above patterns. This identifies the node which that item points @@ -332,7 +684,22 @@ quickly reading just this part of its manual. for each program described.  -File: standards.info, Node: NEWS File, Next: Change Logs, Prev: Manual Structure Details, Up: Documentation +File: standards.info, Node: License for Manuals, Next: NEWS File, Prev: Manual Structure Details, Up: Documentation + +License for Manuals +=================== + + If the manual contains a copy of the GNU GPL or GNU LGPL, or if it +contains chapters that make political or personal statements, please +copy the distribution terms of the GNU Emacs Manual, and adapt it by +modifying appropriately the list of special chapters that may not be +modified or deleted. + + If the manual does not contain any such chapters, then imitate the +simpler distribution terms of the Texinfo manual. + + +File: standards.info, Node: NEWS File, Next: Change Logs, Prev: License for Manuals, Up: Documentation The NEWS File ============= @@ -358,17 +725,48 @@ Change Logs files. The purpose of this is so that people investigating bugs in the future will know about the changes that might have introduced the bug. Often a new bug can be found by looking at what was recently changed. -More importantly, change logs can help eliminate conceptual -inconsistencies between different parts of a program; they can give you -a history of how the conflicting concepts arose. +More importantly, change logs can help you eliminate conceptual +inconsistencies between different parts of a program, by giving you a +history of how the conflicting concepts arose and who they came from. + +* Menu: + +* Change Log Concepts:: +* Style of Change Logs:: +* Simple Changes:: +* Conditional Changes:: + + +File: standards.info, Node: Change Log Concepts, Next: Style of Change Logs, Up: Change Logs + +Change Log Concepts +------------------- - A change log file is normally called `ChangeLog' and covers an + You can think of the change log as a conceptual "undo list" which +explains how earlier versions were different from the current version. +People can see the current version; they don't need the change log to +tell them what is in it. What they want from a change log is a clear +explanation of how the earlier version differed. + + The change log file is normally called `ChangeLog' and covers an entire directory. Each directory can have its own change log, or a directory can use the change log of its parent directory-it's up to you. Another alternative is to record change log information with a version control system such as RCS or CVS. This can be converted -automatically to a `ChangeLog' file. +automatically to a `ChangeLog' file using `rcs2log'; in Emacs, the +command `C-x v a' (`vc-update-change-log') does the job. + + There's no need to describe the full purpose of the changes or how +they work together. If you think that a change calls for explanation, +you're probably right. Please do explain it--but please put the +explanation in comments in the code, where people will see it whenever +they see the code. For example, "New function" is enough for the +change log when you add a function, because there should be a comment +before the function definition to explain what it does. + + However, sometimes it is useful to write one line to describe the +overall purpose of a batch of changes. The easiest way to add an entry to `ChangeLog' is with the Emacs command `M-x add-change-log-entry'. An entry should have an asterisk, @@ -376,12 +774,13 @@ the name of the changed file, and then in parentheses the name of the changed functions, variables or whatever, followed by a colon. Then describe the changes you made to that function or variable. - Separate unrelated entries with blank lines. When two entries -represent parts of the same change, so that they work together, then -don't put blank lines between them. Then you can omit the file name -and the asterisk when successive entries are in the same file. + +File: standards.info, Node: Style of Change Logs, Next: Simple Changes, Prev: Change Log Concepts, Up: Change Logs + +Style of Change Logs +-------------------- - Here are some examples: + Here are some examples of change log entries: * register.el (insert-register): Return nil. (jump-to-register): Likewise. @@ -398,43 +797,84 @@ and the asterisk when successive entries are in the same file. It's important to name the changed function or variable in full. Don't abbreviate function or variable names, and don't combine them. -Subsequent maintainers will often search for a function name to find -all the change log entries that pertain to it; if you abbreviate the -name, they won't find it when they search. For example, some people -are tempted to abbreviate groups of function names by writing `* -register.el ({insert,jump-to}-register)'; this is not a good idea, -since searching for `jump-to-register' or `insert-register' would not -find the entry. +Subsequent maintainers will often search for a function name to find all +the change log entries that pertain to it; if you abbreviate the name, +they won't find it when they search. - There's no need to describe the full purpose of the changes or how -they work together. It is better to put such explanations in comments -in the code. That's why just "New function" is enough; there is a -comment with the function in the source to explain what it does. + For example, some people are tempted to abbreviate groups of function +names by writing `* register.el ({insert,jump-to}-register)'; this is +not a good idea, since searching for `jump-to-register' or +`insert-register' would not find that entry. - However, sometimes it is useful to write one line to describe the -overall purpose of a large batch of changes. + Separate unrelated change log entries with blank lines. When two +entries represent parts of the same change, so that they work together, +then don't put blank lines between them. Then you can omit the file +name and the asterisk when successive entries are in the same file. - You can think of the change log as a conceptual "undo list" which -explains how earlier versions were different from the current version. -People can see the current version; they don't need the change log to -tell them what is in it. What they want from a change log is a clear -explanation of how the earlier version differed. + +File: standards.info, Node: Simple Changes, Next: Conditional Changes, Prev: Style of Change Logs, Up: Change Logs + +Simple Changes +-------------- + + Certain simple kinds of changes don't need much detail in the change +log. When you change the calling sequence of a function in a simple fashion, and you change all the callers of the function, there is no -need to make individual entries for all the callers. Just write in the -entry for the function being called, "All callers changed." +need to make individual entries for all the callers that you changed. +Just write in the entry for the function being called, "All callers +changed." + + * keyboard.c (Fcommand_execute): New arg SPECIAL. + All callers changed. When you change just comments or doc strings, it is enough to write -an entry for the file, without mentioning the functions. Write just, -"Doc fix." +an entry for the file, without mentioning the functions. Just "Doc +fixes" is enough for the change log. There's no need to make change log entries for documentation files. This is because documentation is not susceptible to bugs that are hard to fix. Documentation does not consist of parts that must interact in a precisely engineered fashion. To correct an error, you need not know -the history of the erroneous passage; it is enough to compare the -passage with the way the program actually works. +the history of the erroneous passage; it is enough to compare what the +documentation says with the way the program actually works. + + +File: standards.info, Node: Conditional Changes, Prev: Simple Changes, Up: Change Logs + +Conditional Changes +------------------- + + C programs often contain compile-time `#if' conditionals. Many +changes are conditional; sometimes you add a new definition which is +entirely contained in a conditional. It is very useful to indicate in +the change log the conditions for which the change applies. + + Our convention for indicating conditional changes is to use square +brackets around the name of the condition. + + Here is a simple example, describing a change which is conditional +but does not have a function or entity name associated with it: + + * xterm.c [SOLARIS2]: Include string.h. + + Here is an entry describing a new definition which is entirely +conditional. This new definition for the macro `FRAME_WINDOW_P' is +used only when `HAVE_X_WINDOWS' is defined: + + * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. + + Here is an entry for a change within the function `init_display', +whose definition as a whole is unconditional, but the changes themselves +are contained in a `#ifdef HAVE_LIBNCURSES' conditional: + + * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. + + Here is an entry for a change that takes affect only when a certain +macro is _not_ defined: + + (gethostname) [!HAVE_SOCKETS]: Replace with winsock version.  File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: Change Logs, Up: Documentation @@ -489,7 +929,7 @@ documentation. Copying from free documentation may be ok; please check with the FSF about the individual case.  -File: standards.info, Node: Managing Releases, Prev: Documentation, Up: Top +File: standards.info, Node: Managing Releases, Next: References, Prev: Documentation, Up: Top The Release Process ******************* @@ -504,9 +944,9 @@ GNU software. * Menu: -* Configuration:: How Configuration Should Work +* Configuration:: How Configuration Should Work * Makefile Conventions:: Makefile Conventions -* Releases:: Making Releases +* Releases:: Making Releases  File: standards.info, Node: Configuration, Next: Makefile Conventions, Up: Managing Releases @@ -523,12 +963,12 @@ they affect compilation. One way to do this is to make a link from a standard name such as `config.h' to the proper configuration file for the chosen system. If -you use this technique, the distribution should *not* contain a file +you use this technique, the distribution should _not_ contain a file named `config.h'. This is so that people won't be able to build the program without configuring it first. Another thing that `configure' can do is to edit the Makefile. If -you do this, the distribution should *not* contain a file named +you do this, the distribution should _not_ contain a file named `Makefile'. Instead, it should include a file `Makefile.in' which contains the input used for editing. Once again, this is so that people won't be able to build the program without configuring it first. @@ -604,8 +1044,8 @@ parts of the package: The package PACKAGE will be installed, so configure this package to work with PACKAGE. - Possible values of PACKAGE include `x', `x-toolkit', `gnu-as' (or - `gas'), `gnu-ld', `gnu-libc', and `gdb'. + Possible values of PACKAGE include `gnu-as' (or `gas'), `gnu-ld', + `gnu-libc', `gdb', `x', and `x-toolkit'. Do not use a `--with' option to specify the file name to use to find certain files. That is outside the scope of what `--with' @@ -668,7 +1108,8 @@ Makefile Conventions ==================== This node describes conventions for writing the Makefiles for GNU -programs. +programs. Using Automake will help you write a Makefile that follows +these conventions. * Menu: @@ -677,6 +1118,8 @@ programs. * Command Variables:: Variables for Specifying Commands * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users +* Install Command Categories:: Three categories of commands in the `install' + rule: normal, pre-install and post-install.  File: standards.info, Node: Makefile Basics, Next: Utilities in Makefiles, Up: Makefile Conventions @@ -710,14 +1153,16 @@ part of the make or `$(srcdir)/' if the file is an unchanging part of the source code. Without one of these prefixes, the current search path is used. - The distinction between `./' and `$(srcdir)/' is important when -using the `--srcdir' option to `configure'. A rule of the form: + The distinction between `./' (the "build directory") and +`$(srcdir)/' (the "source directory") is important because users can +build in a separate directory using the `--srcdir' option to +`configure'. A rule of the form: foo.1 : foo.man sedscript sed -e sedscript foo.man > foo.1 -will fail when the current directory is not the source directory, -because `foo.man' and `sedscript' are not in the current directory. +will fail when the build directory is not the source directory, because +`foo.man' and `sedscript' are in the the source directory. When using GNU `make', relying on `VPATH' to find the source file will work in the case where there is a single dependency file, since @@ -741,349 +1186,18 @@ is best written as: foo.1 : foo.man sedscript sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@ - Try to make the build and installation targets, at least (and all -their subtargets) work correctly with a parallel `make'. - - -File: standards.info, Node: Utilities in Makefiles, Next: Command Variables, Prev: Makefile Basics, Up: Makefile Conventions - -Utilities in Makefiles ----------------------- - - Write the Makefile commands (and any shell scripts, such as -`configure') to run in `sh', not in `csh'. Don't use any special -features of `ksh' or `bash'. - - The `configure' script and the Makefile rules for building and -installation should not use any utilities directly except these: + GNU distributions usually contain some files which are not source +files--for example, Info files, and the output from Autoconf, Automake, +Bison or Flex. Since these files normally appear in the source +directory, they should always appear in the source directory, not in the +build directory. So Makefile rules to update them should put the +updated files in the source directory. - cat cmp cp echo egrep expr false grep - ln mkdir mv pwd rm rmdir sed test touch true + However, if a file does not appear in the distribution, then the +Makefile should not put it in the source directory, because building a +program in ordinary circumstances should not modify the source directory +in any way. - Stick to the generally supported options for these programs. For -example, don't use `mkdir -p', convenient as it may be, because most -systems don't support it. - - It is a good idea to avoid creating symbolic links in makefiles, -since a few systems don't support them. - - The Makefile rules for building and installation can also use -compilers and related programs, but should do so via `make' variables -so that the user can substitute alternatives. Here are some of the -programs we mean: - - ar bison cc flex install ld lex - make makeinfo ranlib texi2dvi yacc - - Use the following `make' variables: - - $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) - $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) - - When you use `ranlib', you should make sure nothing bad happens if -the system does not have `ranlib'. Arrange to ignore an error from -that command, and print a message before the command to tell the user -that failure of the `ranlib' command does not mean a problem. (The -Autoconf `AC_PROG_RANLIB' macro can help with this.) - - If you use symbolic links, you should implement a fallback for -systems that don't have symbolic links. - - It is ok to use other utilities in Makefile portions (or scripts) -intended only for particular systems where you know those utilities -exist. - - -File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions - -Variables for Specifying Commands ---------------------------------- - - Makefiles should provide variables for overriding certain commands, -options, and so on. - - In particular, you should run most utility programs via variables. -Thus, if you use Bison, have a variable named `BISON' whose default -value is set with `BISON = bison', and refer to it with `$(BISON)' -whenever you need to use Bison. - - File management utilities such as `ln', `rm', `mv', and so on, need -not be referred to through variables in this way, since users don't -need to replace them with other programs. - - Each program-name variable should come with an options variable that -is used to supply options to the program. Append `FLAGS' to the -program-name variable name to get the options variable name--for -example, `BISONFLAGS'. (The name `CFLAGS' is an exception to this -rule, but we keep it because it is standard.) Use `CPPFLAGS' in any -compilation command that runs the preprocessor, and use `LDFLAGS' in -any compilation command that does linking as well as in any direct use -of `ld'. - - If there are C compiler options that *must* be used for proper -compilation of certain files, do not include them in `CFLAGS'. Users -expect to be able to specify `CFLAGS' freely themselves. Instead, -arrange to pass the necessary options to the C compiler independently -of `CFLAGS', by writing them explicitly in the compilation commands or -by defining an implicit rule, like this: - - CFLAGS = -g - ALL_CFLAGS = -I. $(CFLAGS) - .c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< - - Do include the `-g' option in `CFLAGS', because that is not -*required* for proper compilation. You can consider it a default that -is only recommended. If the package is set up so that it is compiled -with GCC by default, then you might as well include `-O' in the default -value of `CFLAGS' as well. - - Put `CFLAGS' last in the compilation command, after other variables -containing compiler options, so the user can use `CFLAGS' to override -the others. - - Every Makefile should define the variable `INSTALL', which is the -basic command for installing a file into the system. - - Every Makefile should also define the variables `INSTALL_PROGRAM' -and `INSTALL_DATA'. (The default for each of these should be -`$(INSTALL)'.) Then it should use those variables as the commands for -actual installation, for executables and nonexecutables respectively. -Use these variables as follows: - - $(INSTALL_PROGRAM) foo $(bindir)/foo - $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a - -Always use a file name, not a directory name, as the second argument of -the installation commands. Use a separate command for each file to be -installed. - - -File: standards.info, Node: Directory Variables, Next: Standard Targets, Prev: Command Variables, Up: Makefile Conventions - -Variables for Installation Directories --------------------------------------- - - Installation directories should always be named by variables, so it -is easy to install in a nonstandard place. The standard names for these -variables are described below. They are based on a standard filesystem -layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and -other modern operating systems. - - These two variables set the root for the installation. All the other -installation directories should be subdirectories of one of these two, -and nothing should be directly installed into these two directories. - -`prefix' - A prefix used in constructing the default values of the variables - listed below. The default value of `prefix' should be - `/usr/local'. When building the complete GNU system, the prefix - will be empty and `/usr' will be a symbolic link to `/'. (If you - are using Autoconf, write it as `@prefix@'.) - -`exec_prefix' - A prefix used in constructing the default values of some of the - variables listed below. The default value of `exec_prefix' should - be `$(prefix)'. (If you are using Autoconf, write it as - `@exec_prefix@'.) - - Generally, `$(exec_prefix)' is used for directories that contain - machine-specific files (such as executables and subroutine - libraries), while `$(prefix)' is used directly for other - directories. - - Executable programs are installed in one of the following -directories. - -`bindir' - The directory for installing executable programs that users can - run. This should normally be `/usr/local/bin', but write it as - `$(exec_prefix)/bin'. (If you are using Autoconf, write it as - `@bindir@'.) - -`sbindir' - The directory for installing executable programs that can be run - from the shell, but are only generally useful to system - administrators. This should normally be `/usr/local/sbin', but - write it as `$(exec_prefix)/sbin'. (If you are using Autoconf, - write it as `@sbindir@'.) - -`libexecdir' - The directory for installing executable programs to be run by other - programs rather than by users. This directory should normally be - `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'. - (If you are using Autoconf, write it as `@libexecdir@'.) - - Data files used by the program during its execution are divided into -categories in two ways. - - * Some files are normally modified by programs; others are never - normally modified (though users may edit some of these). - - * Some files are architecture-independent and can be shared by all - machines at a site; some are architecture-dependent and can be - shared only by machines of the same kind and operating system; - others may never be shared between two machines. - - This makes for six different possibilities. However, we want to -discourage the use of architecture-dependent files, aside from object -files and libraries. It is much cleaner to make other data files -architecture-independent, and it is generally not hard. - - Therefore, here are the variables Makefiles should use to specify -directories: - -`datadir' - The directory for installing read-only architecture independent - data files. This should normally be `/usr/local/share', but write - it as `$(prefix)/share'. (If you are using Autoconf, write it as - `@datadir@'.) As a special exception, see `$(infodir)' and - `$(includedir)' below. - -`sysconfdir' - The directory for installing read-only data files that pertain to a - single machine-that is to say, files for configuring a host. - Mailer and network configuration files, `/etc/passwd', and so - forth belong here. All the files in this directory should be - ordinary ASCII text files. This directory should normally be - `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are - using Autoconf, write it as `@sysconfdir@'.) - - Do not install executables in this directory (they probably belong - in `$(libexecdir)' or `$(sbindir)'). Also do not install files - that are modified in the normal course of their use (programs - whose purpose is to change the configuration of the system - excluded). Those probably belong in `$(localstatedir)'. - -`sharedstatedir' - The directory for installing architecture-independent data files - which the programs modify while they run. This should normally be - `/usr/local/com', but write it as `$(prefix)/com'. (If you are - using Autoconf, write it as `@sharedstatedir@'.) - -`localstatedir' - The directory for installing data files which the programs modify - while they run, and that pertain to one specific machine. Users - should never need to modify files in this directory to configure - the package's operation; put such configuration information in - separate files that go in `$(datadir)' or `$(sysconfdir)'. - `$(localstatedir)' should normally be `/usr/local/var', but write - it as `$(prefix)/var'. (If you are using Autoconf, write it as - `@localstatedir@'.) - -`libdir' - The directory for object files and libraries of object code. Do - not install executables here, they probably ought to go in - `$(libexecdir)' instead. The value of `libdir' should normally be - `/usr/local/lib', but write it as `$(exec_prefix)/lib'. (If you - are using Autoconf, write it as `@libdir@'.) - -`infodir' - The directory for installing the Info files for this package. By - default, it should be `/usr/local/info', but it should be written - as `$(prefix)/info'. (If you are using Autoconf, write it as - `@infodir@'.) - -`includedir' - The directory for installing header files to be included by user - programs with the C `#include' preprocessor directive. This - should normally be `/usr/local/include', but write it as - `$(prefix)/include'. (If you are using Autoconf, write it as - `@includedir@'.) - - Most compilers other than GCC do not look for header files in - `/usr/local/include'. So installing the header files this way is - only useful with GCC. Sometimes this is not a problem because some - libraries are only really intended to work with GCC. But some - libraries are intended to work with other compilers. They should - install their header files in two places, one specified by - `includedir' and one specified by `oldincludedir'. - -`oldincludedir' - The directory for installing `#include' header files for use with - compilers other than GCC. This should normally be `/usr/include'. - (If you are using Autoconf, you can write it as `@oldincludedir@'.) - - The Makefile commands should check whether the value of - `oldincludedir' is empty. If it is, they should not try to use - it; they should cancel the second installation of the header files. - - A package should not replace an existing header in this directory - unless the header came from the same package. Thus, if your Foo - package provides a header file `foo.h', then it should install the - header file in the `oldincludedir' directory if either (1) there - is no `foo.h' there or (2) the `foo.h' that exists came from the - Foo package. - - To tell whether `foo.h' came from the Foo package, put a magic - string in the file--part of a comment--and `grep' for that string. - - Unix-style man pages are installed in one of the following: - -`mandir' - The top-level directory for installing the man pages (if any) for - this package. It will normally be `/usr/local/man', but you should - write it as `$(prefix)/man'. (If you are using Autoconf, write it - as `@mandir@'.) - -`man1dir' - The directory for installing section 1 man pages. Write it as - `$(mandir)/man1'. - -`man2dir' - The directory for installing section 2 man pages. Write it as - `$(mandir)/man2' - -`...' - *Don't make the primary documentation for any GNU software be a - man page. Write a manual in Texinfo instead. Man pages are just - for the sake of people running GNU software on Unix, which is a - secondary application only.* - -`manext' - The file name extension for the installed man page. This should - contain a period followed by the appropriate digit; it should - normally be `.1'. - -`man1ext' - The file name extension for installed section 1 man pages. - -`man2ext' - The file name extension for installed section 2 man pages. - -`...' - Use these names instead of `manext' if the package needs to - install man pages in more than one section of the manual. - - And finally, you should set the following variable: - -`srcdir' - The directory for the sources being compiled. The value of this - variable is normally inserted by the `configure' shell script. - (If you are using Autconf, use `srcdir = @srcdir@'.) - - For example: - - # Common prefix for installation directories. - # NOTE: This directory must exist when you start the install. - prefix = /usr/local - exec_prefix = $(prefix) - # Where to put the executable for the command `gcc'. - bindir = $(exec_prefix)/bin - # Where to put the directories used by the compiler. - libexecdir = $(exec_prefix)/libexec - # Where to put the Info files. - infodir = $(prefix)/info - - If your program installs a large number of files into one of the -standard user-specified directories, it might be useful to group them -into a subdirectory particular to that program. If you do this, you -should write the `install' rule to create these subdirectories. - - Do not expect the user to include the subdirectory name in the value -of any of the variables listed above. The idea of having a uniform set -of variable names for installation directories is to enable the user to -specify the exact same values for several different GNU packages. In -order for this to be useful, all the packages must be designed so that -they will work sensibly when the user does so. + Try to make the build and installation targets, at least (and all +their subtargets) work correctly with a parallel `make'. diff --git a/info/standards.info-3 b/info/standards.info-3 index 426dd71..0244350 100644 --- a/info/standards.info-3 +++ b/info/standards.info-3 @@ -1,12 +1,12 @@ -This is Info file ../info/standards.info, produced by Makeinfo version -1.68 from the input file standards.texi. +This is ../info/standards.info, produced by makeinfo version 3.12s from +standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. END-INFO-DIR-ENTRY - GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free -Software Foundation, Inc. + GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996, +1997, 1998, 1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -23,7 +23,389 @@ versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  -File: standards.info, Node: Standard Targets, Prev: Directory Variables, Up: Makefile Conventions +File: standards.info, Node: Utilities in Makefiles, Next: Command Variables, Prev: Makefile Basics, Up: Makefile Conventions + +Utilities in Makefiles +---------------------- + + Write the Makefile commands (and any shell scripts, such as +`configure') to run in `sh', not in `csh'. Don't use any special +features of `ksh' or `bash'. + + The `configure' script and the Makefile rules for building and +installation should not use any utilities directly except these: + + cat cmp cp diff echo egrep expr false grep install-info + ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true + + The compression program `gzip' can be used in the `dist' rule. + + Stick to the generally supported options for these programs. For +example, don't use `mkdir -p', convenient as it may be, because most +systems don't support it. + + It is a good idea to avoid creating symbolic links in makefiles, +since a few systems don't support them. + + The Makefile rules for building and installation can also use +compilers and related programs, but should do so via `make' variables +so that the user can substitute alternatives. Here are some of the +programs we mean: + + ar bison cc flex install ld ldconfig lex + make makeinfo ranlib texi2dvi yacc + + Use the following `make' variables to run those programs: + + $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) + $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) + + When you use `ranlib' or `ldconfig', you should make sure nothing +bad happens if the system does not have the program in question. +Arrange to ignore an error from that command, and print a message before +the command to tell the user that failure of this command does not mean +a problem. (The Autoconf `AC_PROG_RANLIB' macro can help with this.) + + If you use symbolic links, you should implement a fallback for +systems that don't have symbolic links. + + Additional utilities that can be used via Make variables are: + + chgrp chmod chown mknod + + It is ok to use other utilities in Makefile portions (or scripts) +intended only for particular systems where you know those utilities +exist. + + +File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions + +Variables for Specifying Commands +--------------------------------- + + Makefiles should provide variables for overriding certain commands, +options, and so on. + + In particular, you should run most utility programs via variables. +Thus, if you use Bison, have a variable named `BISON' whose default +value is set with `BISON = bison', and refer to it with `$(BISON)' +whenever you need to use Bison. + + File management utilities such as `ln', `rm', `mv', and so on, need +not be referred to through variables in this way, since users don't +need to replace them with other programs. + + Each program-name variable should come with an options variable that +is used to supply options to the program. Append `FLAGS' to the +program-name variable name to get the options variable name--for +example, `BISONFLAGS'. (The names `CFLAGS' for the C compiler, +`YFLAGS' for yacc, and `LFLAGS' for lex, are exceptions to this rule, +but we keep them because they are standard.) Use `CPPFLAGS' in any +compilation command that runs the preprocessor, and use `LDFLAGS' in +any compilation command that does linking as well as in any direct use +of `ld'. + + If there are C compiler options that _must_ be used for proper +compilation of certain files, do not include them in `CFLAGS'. Users +expect to be able to specify `CFLAGS' freely themselves. Instead, +arrange to pass the necessary options to the C compiler independently +of `CFLAGS', by writing them explicitly in the compilation commands or +by defining an implicit rule, like this: + + CFLAGS = -g + ALL_CFLAGS = -I. $(CFLAGS) + .c.o: + $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< + + Do include the `-g' option in `CFLAGS', because that is not +_required_ for proper compilation. You can consider it a default that +is only recommended. If the package is set up so that it is compiled +with GCC by default, then you might as well include `-O' in the default +value of `CFLAGS' as well. + + Put `CFLAGS' last in the compilation command, after other variables +containing compiler options, so the user can use `CFLAGS' to override +the others. + + `CFLAGS' should be used in every invocation of the C compiler, both +those which do compilation and those which do linking. + + Every Makefile should define the variable `INSTALL', which is the +basic command for installing a file into the system. + + Every Makefile should also define the variables `INSTALL_PROGRAM' +and `INSTALL_DATA'. (The default for each of these should be +`$(INSTALL)'.) Then it should use those variables as the commands for +actual installation, for executables and nonexecutables respectively. +Use these variables as follows: + + $(INSTALL_PROGRAM) foo $(bindir)/foo + $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a + + Optionally, you may prepend the value of `DESTDIR' to the target +filename. Doing this allows the installer to create a snapshot of the +installation to be copied onto the real target filesystem later. Do not +set the value of `DESTDIR' in your Makefile, and do not include it in +any installed files. With support for `DESTDIR', the above examples +become: + + $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo + $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a + +Always use a file name, not a directory name, as the second argument of +the installation commands. Use a separate command for each file to be +installed. + + +File: standards.info, Node: Directory Variables, Next: Standard Targets, Prev: Command Variables, Up: Makefile Conventions + +Variables for Installation Directories +-------------------------------------- + + Installation directories should always be named by variables, so it +is easy to install in a nonstandard place. The standard names for these +variables are described below. They are based on a standard filesystem +layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and +other modern operating systems. + + These two variables set the root for the installation. All the other +installation directories should be subdirectories of one of these two, +and nothing should be directly installed into these two directories. + +`prefix' + A prefix used in constructing the default values of the variables + listed below. The default value of `prefix' should be + `/usr/local'. When building the complete GNU system, the prefix + will be empty and `/usr' will be a symbolic link to `/'. (If you + are using Autoconf, write it as `@prefix@'.) + + Running `make install' with a different value of `prefix' from the + one used to build the program should NOT recompile the program. + +`exec_prefix' + A prefix used in constructing the default values of some of the + variables listed below. The default value of `exec_prefix' should + be `$(prefix)'. (If you are using Autoconf, write it as + `@exec_prefix@'.) + + Generally, `$(exec_prefix)' is used for directories that contain + machine-specific files (such as executables and subroutine + libraries), while `$(prefix)' is used directly for other + directories. + + Running `make install' with a different value of `exec_prefix' + from the one used to build the program should NOT recompile the + program. + + Executable programs are installed in one of the following +directories. + +`bindir' + The directory for installing executable programs that users can + run. This should normally be `/usr/local/bin', but write it as + `$(exec_prefix)/bin'. (If you are using Autoconf, write it as + `@bindir@'.) + +`sbindir' + The directory for installing executable programs that can be run + from the shell, but are only generally useful to system + administrators. This should normally be `/usr/local/sbin', but + write it as `$(exec_prefix)/sbin'. (If you are using Autoconf, + write it as `@sbindir@'.) + +`libexecdir' + The directory for installing executable programs to be run by other + programs rather than by users. This directory should normally be + `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'. + (If you are using Autoconf, write it as `@libexecdir@'.) + + Data files used by the program during its execution are divided into +categories in two ways. + + * Some files are normally modified by programs; others are never + normally modified (though users may edit some of these). + + * Some files are architecture-independent and can be shared by all + machines at a site; some are architecture-dependent and can be + shared only by machines of the same kind and operating system; + others may never be shared between two machines. + + This makes for six different possibilities. However, we want to +discourage the use of architecture-dependent files, aside from object +files and libraries. It is much cleaner to make other data files +architecture-independent, and it is generally not hard. + + Therefore, here are the variables Makefiles should use to specify +directories: + +`datadir' + The directory for installing read-only architecture independent + data files. This should normally be `/usr/local/share', but write + it as `$(prefix)/share'. (If you are using Autoconf, write it as + `@datadir@'.) As a special exception, see `$(infodir)' and + `$(includedir)' below. + +`sysconfdir' + The directory for installing read-only data files that pertain to a + single machine-that is to say, files for configuring a host. + Mailer and network configuration files, `/etc/passwd', and so + forth belong here. All the files in this directory should be + ordinary ASCII text files. This directory should normally be + `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are + using Autoconf, write it as `@sysconfdir@'.) + + Do not install executables here in this directory (they probably + belong in `$(libexecdir)' or `$(sbindir)'). Also do not install + files that are modified in the normal course of their use (programs + whose purpose is to change the configuration of the system + excluded). Those probably belong in `$(localstatedir)'. + +`sharedstatedir' + The directory for installing architecture-independent data files + which the programs modify while they run. This should normally be + `/usr/local/com', but write it as `$(prefix)/com'. (If you are + using Autoconf, write it as `@sharedstatedir@'.) + +`localstatedir' + The directory for installing data files which the programs modify + while they run, and that pertain to one specific machine. Users + should never need to modify files in this directory to configure + the package's operation; put such configuration information in + separate files that go in `$(datadir)' or `$(sysconfdir)'. + `$(localstatedir)' should normally be `/usr/local/var', but write + it as `$(prefix)/var'. (If you are using Autoconf, write it as + `@localstatedir@'.) + +`libdir' + The directory for object files and libraries of object code. Do + not install executables here, they probably ought to go in + `$(libexecdir)' instead. The value of `libdir' should normally be + `/usr/local/lib', but write it as `$(exec_prefix)/lib'. (If you + are using Autoconf, write it as `@libdir@'.) + +`infodir' + The directory for installing the Info files for this package. By + default, it should be `/usr/local/info', but it should be written + as `$(prefix)/info'. (If you are using Autoconf, write it as + `@infodir@'.) + +`lispdir' + The directory for installing any Emacs Lisp files in this package. + By default, it should be `/usr/local/share/emacs/site-lisp', but + it should be written as `$(prefix)/share/emacs/site-lisp'. + + If you are using Autoconf, write the default as `@lispdir@'. In + order to make `@lispdir@' work, you need the following lines in + your `configure.in' file: + + lispdir='${datadir}/emacs/site-lisp' + AC_SUBST(lispdir) + +`includedir' + The directory for installing header files to be included by user + programs with the C `#include' preprocessor directive. This + should normally be `/usr/local/include', but write it as + `$(prefix)/include'. (If you are using Autoconf, write it as + `@includedir@'.) + + Most compilers other than GCC do not look for header files in + directory `/usr/local/include'. So installing the header files + this way is only useful with GCC. Sometimes this is not a problem + because some libraries are only really intended to work with GCC. + But some libraries are intended to work with other compilers. + They should install their header files in two places, one + specified by `includedir' and one specified by `oldincludedir'. + +`oldincludedir' + The directory for installing `#include' header files for use with + compilers other than GCC. This should normally be `/usr/include'. + (If you are using Autoconf, you can write it as `@oldincludedir@'.) + + The Makefile commands should check whether the value of + `oldincludedir' is empty. If it is, they should not try to use + it; they should cancel the second installation of the header files. + + A package should not replace an existing header in this directory + unless the header came from the same package. Thus, if your Foo + package provides a header file `foo.h', then it should install the + header file in the `oldincludedir' directory if either (1) there + is no `foo.h' there or (2) the `foo.h' that exists came from the + Foo package. + + To tell whether `foo.h' came from the Foo package, put a magic + string in the file--part of a comment--and `grep' for that string. + + Unix-style man pages are installed in one of the following: + +`mandir' + The top-level directory for installing the man pages (if any) for + this package. It will normally be `/usr/local/man', but you should + write it as `$(prefix)/man'. (If you are using Autoconf, write it + as `@mandir@'.) + +`man1dir' + The directory for installing section 1 man pages. Write it as + `$(mandir)/man1'. + +`man2dir' + The directory for installing section 2 man pages. Write it as + `$(mandir)/man2' + +`...' + *Don't make the primary documentation for any GNU software be a + man page. Write a manual in Texinfo instead. Man pages are just + for the sake of people running GNU software on Unix, which is a + secondary application only.* + +`manext' + The file name extension for the installed man page. This should + contain a period followed by the appropriate digit; it should + normally be `.1'. + +`man1ext' + The file name extension for installed section 1 man pages. + +`man2ext' + The file name extension for installed section 2 man pages. + +`...' + Use these names instead of `manext' if the package needs to + install man pages in more than one section of the manual. + + And finally, you should set the following variable: + +`srcdir' + The directory for the sources being compiled. The value of this + variable is normally inserted by the `configure' shell script. + (If you are using Autconf, use `srcdir = @srcdir@'.) + + For example: + + # Common prefix for installation directories. + # NOTE: This directory must exist when you start the install. + prefix = /usr/local + exec_prefix = $(prefix) + # Where to put the executable for the command `gcc'. + bindir = $(exec_prefix)/bin + # Where to put the directories used by the compiler. + libexecdir = $(exec_prefix)/libexec + # Where to put the Info files. + infodir = $(prefix)/info + + If your program installs a large number of files into one of the +standard user-specified directories, it might be useful to group them +into a subdirectory particular to that program. If you do this, you +should write the `install' rule to create these subdirectories. + + Do not expect the user to include the subdirectory name in the value +of any of the variables listed above. The idea of having a uniform set +of variable names for installation directories is to enable the user to +specify the exact same values for several different GNU packages. In +order for this to be useful, all the packages must be designed so that +they will work sensibly when the user does so. + + +File: standards.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions Standard Targets for Users -------------------------- @@ -68,17 +450,18 @@ Makefiles: that don't have the Unix man page documentation system installed. The way to install Info files is to copy them into `$(infodir)' - with `$(INSTALL_DATA)' (*note Command Variables::.), and then run + with `$(INSTALL_DATA)' (*note Command Variables::), and then run the `install-info' program if it is present. `install-info' is a program that edits the Info `dir' file to add or update the menu entry for the given Info file; it is part of the Texinfo package. Here is a sample rule to install an Info file: - $(infodir)/foo.info: foo.info + $(DESTDIR)$(infodir)/foo.info: foo.info + $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ - $(INSTALL_DATA) $$d/foo.info $@; \ + $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@; \ # Run install-info only if it exists. # Use `if' instead of just prepending `-' to the # line so we notice real errors from install-info. @@ -86,21 +469,30 @@ Makefiles: # fail gracefully when there is an unknown command. if $(SHELL) -c 'install-info --version' \ >/dev/null 2>&1; then \ - install-info --dir-file=$(infodir)/dir \ - $(infodir)/foo.info; \ + install-info --dir-file=$(DESTDIR)$(infodir)/dir \ + $(DESTDIR)$(infodir)/foo.info; \ else true; fi + When writing the `install' target, you must classify all the + commands into three categories: normal ones, "pre-installation" + commands and "post-installation" commands. *Note Install Command + Categories::. + `uninstall' - Delete all the installed files that the `install' target would - create (but not the noninstalled files such as `make all' would - create). + Delete all the installed files--the copies that the `install' + target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. + The uninstallation commands are divided into three categories, + just like the installation commands. *Note Install Command + Categories::. + `install-strip' Like `install', but strip the executable files while installing - them. The definition of this target can be very simple: + them. In many cases, the definition of this target can be very + simple: install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ @@ -177,6 +569,12 @@ Makefiles: run the `makeinfo' program, which is part of the Texinfo distribution. + Normally a GNU distribution comes with Info files, and that means + the Info files are present in the source directory. Therefore, + the Make rule for an info file should update it in the source + directory. When users build the package, ordinarily Make will not + update the Info files because they will already be up to date. + `dvi' Generate DVI files for all Texinfo documentation. For example: @@ -203,7 +601,7 @@ Makefiles: appropriately named, use `ln' or `cp' to install the proper files in it, and then `tar' that subdirectory. - Compress the tar file with `gzip'. For example, the actual + Compress the tar file file with `gzip'. For example, the actual distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'. The `dist' target should explicitly depend on all non-source files @@ -247,14 +645,120 @@ programs in which they are useful. not distributed with Texinfo.  +File: standards.info, Node: Install Command Categories, Prev: Standard Targets, Up: Makefile Conventions + +Install Command Categories +-------------------------- + + When writing the `install' target, you must classify all the +commands into three categories: normal ones, "pre-installation" +commands and "post-installation" commands. + + Normal commands move files into their proper places, and set their +modes. They may not alter any files except the ones that come entirely +from the package they belong to. + + Pre-installation and post-installation commands may alter other +files; in particular, they can edit global configuration files or data +bases. + + Pre-installation commands are typically executed before the normal +commands, and post-installation commands are typically run after the +normal commands. + + The most common use for a post-installation command is to run +`install-info'. This cannot be done with a normal command, since it +alters a file (the Info directory) which does not come entirely and +solely from the package being installed. It is a post-installation +command because it needs to be done after the normal command which +installs the package's Info files. + + Most programs don't need any pre-installation commands, but we have +the feature just in case it is needed. + + To classify the commands in the `install' rule into these three +categories, insert "category lines" among them. A category line +specifies the category for the commands that follow. + + A category line consists of a tab and a reference to a special Make +variable, plus an optional comment at the end. There are three +variables you can use, one for each category; the variable name +specifies the category. Category lines are no-ops in ordinary execution +because these three Make variables are normally undefined (and you +_should not_ define them in the makefile). + + Here are the three possible category lines, each with a comment that +explains what it means: + + $(PRE_INSTALL) # Pre-install commands follow. + $(POST_INSTALL) # Post-install commands follow. + $(NORMAL_INSTALL) # Normal commands follow. + + If you don't use a category line at the beginning of the `install' +rule, all the commands are classified as normal until the first category +line. If you don't use any category lines, all the commands are +classified as normal. + + These are the category lines for `uninstall': + + $(PRE_UNINSTALL) # Pre-uninstall commands follow. + $(POST_UNINSTALL) # Post-uninstall commands follow. + $(NORMAL_UNINSTALL) # Normal commands follow. + + Typically, a pre-uninstall command would be used for deleting entries +from the Info directory. + + If the `install' or `uninstall' target has any dependencies which +act as subroutines of installation, then you should start _each_ +dependency's commands with a category line, and start the main target's +commands with a category line also. This way, you can ensure that each +command is placed in the right category regardless of which of the +dependencies actually run. + + Pre-installation and post-installation commands should not run any +programs except for these: + + [ basename bash cat chgrp chmod chown cmp cp dd diff echo + egrep expand expr false fgrep find getopt grep gunzip gzip + hostname install install-info kill ldconfig ln ls md5sum + mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee + test touch true uname xargs yes + + The reason for distinguishing the commands in this way is for the +sake of making binary packages. Typically a binary package contains +all the executables and other files that need to be installed, and has +its own method of installing them--so it does not need to run the normal +installation commands. But installing the binary package does need to +execute the pre-installation and post-installation commands. + + Programs to build binary packages work by extracting the +pre-installation and post-installation commands. Here is one way of +extracting the pre-installation commands: + + make -n install -o all \ + PRE_INSTALL=pre-install \ + POST_INSTALL=post-install \ + NORMAL_INSTALL=normal-install \ + | gawk -f pre-install.awk + +where the file `pre-install.awk' could contain this: + + $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0} + on {print $0} + $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1} + + The resulting file of pre-installation commands is executed as a +shell script as part of installing the binary package. + + File: standards.info, Node: Releases, Prev: Makefile Conventions, Up: Managing Releases Making Releases =============== - Package the distribution of Foo version 69.96 in a gzipped tar file -named `foo-69.96.tar.gz'. It should unpack into a subdirectory named -`foo-69.96'. + Package the distribution of `Foo version 69.96' up in a gzipped tar +file with the name `foo-69.96.tar.gz'. It should unpack into a +subdirectory named `foo-69.96'. Building and installing the program should never modify any of the files contained in the distribution. This means that all the files @@ -263,6 +767,21 @@ files" and "non-source files". Source files are written by humans and never changed automatically; non-source files are produced from source files by programs under the control of the Makefile. + The distribution should contain a file named `README' which gives +the name of the package, and a general description of what it does. It +is also good to explain the purpose of each of the first-level +subdirectories in the package, if there are any. The `README' file +should either state the version number of the package, or refer to where +in the package it can be found. + + The `README' file should refer to the file `INSTALL', which should +contain an explanation of the installation procedure. + + The `README' file should also refer to the file which contains the +copying conditions. The GNU GPL, if used, should be in a file called +`COPYING'. If the GNU LGPL is used, it should be in a file called +`COPYING.LIB'. + Naturally, all the source files must be in the distribution. It is okay to include non-source files in the distribution, provided they are up-to-date and machine-independent, so that building the distribution @@ -313,4 +832,32 @@ file. Leaving them out would make the distribution file a little smaller at the expense of possible inconvenience to a user who doesn't know what other files to get. + +File: standards.info, Node: References, Prev: Managing Releases, Up: Top + +References to Non-Free Software and Documentation +************************************************* + + A GNU program should not recommend use of any non-free program. We +can't stop some people from writing proprietary programs, or stop other +people from using them. But we can and should avoid helping to +advertise them to new customers. + + Sometimes it is important to mention how to build your package on +top of some non-free operating system or other non-free base package. +In such cases, please mention the name of the non-free package or +system in the briefest possible way. Don't include any references for +where to find more information about the proprietary program. The goal +should be that people already using the proprietary program will get +the advice they need about how to use your free program, while people +who don't already use the proprietary program will not see anything to +encourage them to take an interest in it. + + Likewise, a GNU package should not refer the user to any non-free +documentation for free software. The need for free documentation to go +with free software is now a major focus of the GNU project; to show that +we are serious about the need for free documentation, we must not +undermine our position by recommending use of documentation that isn't +free. + diff --git a/info/term.info b/info/term.info index e81567a..1f84f9e 100644 --- a/info/term.info +++ b/info/term.info @@ -1,5 +1,5 @@ -This is Info file ../info/term.info, produced by Makeinfo version 1.68 -from the input file term.texi. +This is ../info/term.info, produced by makeinfo version 4.0 from +term.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -142,7 +142,7 @@ screen state to what it was before the program started. Many people are used to this behavior from `xterm', and its also offered by the `term' emulator. - - Function: term-switch-to-alternate-sub-buffer SET + - Function: term-switch-to-alternate-sub-buffer set If SET is true, and we're not already using the alternate sub-buffer, switch to it. What this means is that the `term-home-marker' is saved (in the variable @@ -238,7 +238,7 @@ of output (since the last input sent to the inferior). It will enter "pager" mode, which feels a lot like the "more" program: Typing a space requests another screenful of output. Other commands request more or less output, or scroll backwards in the `term' buffer. In -pager mode, type `h' or `?' to display a help message listing all the +pager mode, type `h' or `?' to display a help message listing all the available pager mode commands. In either character or line mode, type `C-c p' to enable paging, and @@ -421,21 +421,21 @@ Miscellaneous escapes  Tag Table: -Node: Top227 -Node: term mode393 -Node: Overview1216 -Node: Output from the inferior1966 -Node: subbuffer3546 -Node: altsubbuffer4869 -Node: Input to the inferior5894 -Node: Connecting to remote computers7414 -Node: Paging9319 -Node: Terminal escapes9989 -Node: Cursor motion10857 -Node: Erasing11517 -Node: Inserting and deleting12312 -Node: Scrolling12702 -Node: Command hook13148 -Node: Miscellaneous escapes14184 +Node: Top201 +Node: term mode367 +Node: Overview1190 +Node: Output from the inferior1940 +Node: subbuffer3520 +Node: altsubbuffer4843 +Node: Input to the inferior5868 +Node: Connecting to remote computers7388 +Node: Paging9293 +Node: Terminal escapes9962 +Node: Cursor motion10830 +Node: Erasing11490 +Node: Inserting and deleting12285 +Node: Scrolling12675 +Node: Command hook13121 +Node: Miscellaneous escapes14157  End Tag Table diff --git a/info/termcap.info b/info/termcap.info index fefb70c..5bbede1 100644 --- a/info/termcap.info +++ b/info/termcap.info @@ -1,5 +1,5 @@ -This is Info file ../info/termcap.info, produced by Makeinfo version -1.68 from the input file termcap.texi. +This is ../info/termcap.info, produced by makeinfo version 4.0 from +termcap.texi. START-INFO-DIR-ENTRY * Termcap: (termcap). Termcap library of the GNU system. @@ -25,57 +25,57 @@ translation approved by the Foundation.  Indirect: -termcap.info-1: 985 -termcap.info-2: 49255 -termcap.info-3: 92578 +termcap.info-1: 959 +termcap.info-2: 49216 +termcap.info-3: 92525  Tag Table: (Indirect) -Node: Top985 -Node: Introduction1630 -Node: Library3357 -Node: Preparation4374 -Node: Find5573 -Node: Interrogate9121 -Node: Initialize14429 -Node: Padding16069 -Node: Why Pad16730 -Node: Describe Padding18374 -Node: Output Padding19849 -Node: Parameters23464 -Node: Encode Parameters25123 -Node: Using Parameters31228 -Node: tparam31817 -Node: tgoto33882 -Node: Data Base36437 -Node: Format37315 -Node: Capability Format39406 -Node: Naming42459 -Node: Inheriting47028 -Node: Capabilities49255 -Node: Basic52097 -Node: Screen Size55941 -Node: Cursor Motion57681 -Node: Wrapping67338 -Node: Scrolling70163 -Node: Windows75183 -Node: Clearing75917 -Node: Insdel Line77681 -Node: Insdel Char82593 -Node: Standout92578 -Node: Underlining101637 -Node: Cursor Visibility104056 -Node: Bell104804 -Node: Keypad105353 -Node: Meta Key110074 -Node: Initialization111028 -Node: Pad Specs113392 -Node: Status Line115445 -Node: Half-Line117329 -Node: Printer118131 -Node: Summary119810 -Node: Var Index130016 -Node: Cap Index130740 -Node: Index137931 +Node: Top959 +Node: Introduction1604 +Node: Library3331 +Node: Preparation4348 +Node: Find5547 +Node: Interrogate9094 +Node: Initialize14401 +Node: Padding16039 +Node: Why Pad16700 +Node: Describe Padding18344 +Node: Output Padding19819 +Node: Parameters23432 +Node: Encode Parameters25090 +Node: Using Parameters31195 +Node: tparam31784 +Node: tgoto33849 +Node: Data Base36404 +Node: Format37281 +Node: Capability Format39372 +Node: Naming42422 +Node: Inheriting46990 +Node: Capabilities49216 +Node: Basic52059 +Node: Screen Size55903 +Node: Cursor Motion57643 +Node: Wrapping67293 +Node: Scrolling70117 +Node: Windows75137 +Node: Clearing75871 +Node: Insdel Line77635 +Node: Insdel Char82541 +Node: Standout92525 +Node: Underlining101582 +Node: Cursor Visibility104001 +Node: Bell104749 +Node: Keypad105298 +Node: Meta Key110019 +Node: Initialization110973 +Node: Pad Specs113337 +Node: Status Line115390 +Node: Half-Line117274 +Node: Printer118076 +Node: Summary119755 +Node: Var Index129960 +Node: Cap Index130684 +Node: Index137875  End Tag Table diff --git a/info/termcap.info-1 b/info/termcap.info-1 index d24e7ac..10aa505 100644 --- a/info/termcap.info-1 +++ b/info/termcap.info-1 @@ -1,5 +1,5 @@ -This is Info file ../info/termcap.info, produced by Makeinfo version -1.68 from the input file termcap.texi. +This is ../info/termcap.info, produced by makeinfo version 4.0 from +termcap.texi. START-INFO-DIR-ENTRY * Termcap: (termcap). Termcap library of the GNU system. @@ -154,7 +154,7 @@ up the description of the terminal type in use. This is done by calling This function finds the description and remembers it internally so that you can interrogate it about specific terminal capabilities (*note -Interrogate::.). +Interrogate::). The argument TERMTYPE is a string which is the name for the type of terminal to look up. Usually you would obtain this from the environment @@ -236,7 +236,7 @@ of columns is named `co'. *Note Capabilities::, for definitions of all the standard capability names. Once you have found the proper terminal description with `tgetent' -(*note Find::.), your application program must "interrogate" it for +(*note Find::), your application program must "interrogate" it for various terminal capabilities. You must specify the two-letter code of the capability whose value you seek. @@ -366,8 +366,8 @@ application program should do two things: * Initialize various global variables which termcap library output functions refer to. These include `PC' and `ospeed' for padding - (*note Output Padding::.) and `UP' and `BC' for cursor motion - (*note tgoto::.). + (*note Output Padding::) and `UP' and `BC' for cursor motion + (*note tgoto::). * Tell the kernel to turn off alteration and padding of horizontal-tab characters sent to the terminal. @@ -485,7 +485,7 @@ Performing Padding with `tputs' Use the termcap function `tputs' to output a string containing an optional padding spec of the form described above (*note Describe -Padding::.). The function `tputs' strips off and decodes the padding +Padding::). The function `tputs' strips off and decodes the padding spec, outputs the rest of the string, and then outputs the appropriate padding. Here is its declaration in ANSI C: @@ -510,7 +510,7 @@ characters. The value of `PC' is the character used for padding. You are responsible for storing suitable values into these variables before using `tputs'. The value stored into the `PC' variable should be taken from the `pc' capability in the terminal description (*note Pad -Specs::.). Store zero in `PC' if there is no `pc' capability. +Specs::). Store zero in `PC' if there is no `pc' capability. The argument NLINES requires some thought. Normally, it should be the number of lines whose contents will be cleared or moved by the @@ -579,7 +579,7 @@ The language for parameter encoding is described in this section. or `tgoto' to encode parameters according to the specifications. These functions produce a string containing the actual commands to be output (as well a padding spec which must be processed with `tputs'; *note -Padding::.). +Padding::). * Menu: @@ -631,7 +631,7 @@ the following parameter. `%3' Like `%03d' in `printf': output the next parameter in decimal, and always use at least three digits. Note that `%4' and so on are - *not* defined. + _not_ defined. `%.' Output the next parameter as a single character whose ASCII code is @@ -881,7 +881,7 @@ comments. A terminal description starts with one or more names for the terminal type. The information in the description is a series of "capability names" and values. The capability names have standard -meanings (*note Capabilities::.) and their values describe the terminal. +meanings (*note Capabilities::) and their values describe the terminal. * Menu: @@ -976,13 +976,13 @@ capability the value `ab:cd', it would also appear to define `cd' as a flag. The string value will often contain digits at the front to specify -padding (*note Padding::.) and/or `%'-sequences within to specify how -to encode parameters (*note Parameters::.). Although these things are -not to be output literally to the terminal, they are considered part of -the value of the capability. They are special only when the string -value is processed by `tputs', `tparam' or `tgoto'. By contrast, `\' -and `^' are considered part of the syntax for specifying the characters -in the string. +padding (*note Padding::) and/or `%'-sequences within to specify how to +encode parameters (*note Parameters::). Although these things are not +to be output literally to the terminal, they are considered part of the +value of the capability. They are special only when the string value +is processed by `tputs', `tparam' or `tgoto'. By contrast, `\' and `^' +are considered part of the syntax for specifying the characters in the +string. Let's look at the VT52 example again: @@ -996,7 +996,7 @@ in the string. `bs' and `pt', and many string-valued capabilities. Most of the strings start with represented as `\E'. The rest contain control characters represented using `^'. The meanings of the individual -capabilities are defined elsewhere (*note Capabilities::.). +capabilities are defined elsewhere (*note Capabilities::).  File: termcap.info, Node: Naming, Next: Inheriting, Prev: Capability Format, Up: Data Base @@ -1073,7 +1073,7 @@ are used for two reasons: `-s' "Status". Says to enable use of a status line which ordinary - output does not touch (*note Status Line::.). + output does not touch (*note Status Line::). Some terminals have a special line that is used only as a status line. For these terminals, there is no need for an `-s' variant; @@ -1133,7 +1133,7 @@ to use that many lines. text shown above followed by the text of the description of `aaa-unk'. The `tc' capability is handled automatically by `tgetent', which finds the description thus referenced and combines the two descriptions -(*note Find::.). Therefore, only the implementor of the terminal +(*note Find::). Therefore, only the implementor of the terminal descriptions needs to think about using `tc'. Users and application programmers do not need to be concerned with it. diff --git a/info/termcap.info-2 b/info/termcap.info-2 index 156c7e7..fb9ec77 100644 --- a/info/termcap.info-2 +++ b/info/termcap.info-2 @@ -1,5 +1,5 @@ -This is Info file ../info/termcap.info, produced by Makeinfo version -1.68 from the input file termcap.texi. +This is ../info/termcap.info, produced by makeinfo version 4.0 from +termcap.texi. START-INFO-DIR-ENTRY * Termcap: (termcap). Termcap library of the GNU system. @@ -36,7 +36,7 @@ For writing a terminal description, you must read each subsection and fill in the capabilities described there. String capabilities that are display commands may require numeric -parameters (*note Parameters::.). Most such capabilities do not use +parameters (*note Parameters::). Most such capabilities do not use parameters. When a capability requires parameters, this is explicitly stated at the beginning of its definition. In simple cases, the first or second sentence of the definition mentions all the parameters, in @@ -76,7 +76,7 @@ should be omitted from terminal descriptions as well. * Meta Key:: acts like an extra shift key. * Initialization:: Commands used to initialize or reset the terminal. * Pad Specs:: Info for the kernel on how much padding is needed. -* Status Line:: A status line displays "background" information. +* Status Line:: A status line displays ``background'' information. * Half-Line:: Moving by half-lines, for superscripts and subscripts. * Printer:: Controlling auxiliary printers of display terminals. @@ -301,7 +301,7 @@ Even hardcopy terminals can support `nw'. carriage-return newline sequence. But many terminal descriptions do use newline in the `do' string, so this is not possible; a program which sends the `do' string must disable output conversion - in the kernel (*note Initialize::.). + in the kernel (*note Initialize::). `bw' Flag whose presence says that `le' may be used in column zero to @@ -393,9 +393,8 @@ programs. New programs should not assume any default for `ta', so they need not look at `xt' in connection with cursor motion. Note that `xt' - also has implications for standout mode (*note Standout::.). It - is obsolete in regard to cursor motion but not in regard to - standout. + also has implications for standout mode (*note Standout::). It is + obsolete in regard to cursor motion but not in regard to standout. In fact, `xt' means that the terminal is a Teleray 1061. @@ -416,7 +415,7 @@ programs. use the newline character for this purpose. These programs follow a bad practice, but because they exist, it is still desirable to define the `nl' capability in a terminal description if the best - way to move down is *not* a newline. + way to move down is _not_ a newline.  File: termcap.info, Node: Wrapping, Next: Scrolling, Prev: Cursor Motion, Up: Capabilities @@ -441,7 +440,7 @@ column. Writing in the last column of the last line should be avoided on terminals with `am', as it may or may not cause scrolling to occur - (*note Scrolling::.). Scrolling is surely not what you would + (*note Scrolling::). Scrolling is surely not what you would intend. If your program needs to check the `am' flag, then it also needs @@ -695,8 +694,7 @@ using any of these commands. cursor is on. The existing line, and all lines below it, are moved down. The last line in the screen (or in the scroll region, if one is set) disappears and in most circumstances is discarded. - It may not be discarded if the `db' is present (*note - Scrolling::.). + It may not be discarded if the `db' is present (*note Scrolling::). The cursor must be at the left margin before this command is used. This command does not move the cursor. @@ -759,7 +757,7 @@ argument should be the total number of lines from the cursor to the bottom of the screen (or scroll region). Very often these commands require padding proportional to this number of lines. *Note Padding::. - For `AL' and `DL' the NLINES argument should *not* depend on the + For `AL' and `DL' the NLINES argument should _not_ depend on the number of lines inserted or deleted; only the total number of lines affected. This is because it is just as fast to insert two or N lines with `AL' as to insert one line with `al'. @@ -867,15 +865,15 @@ of these capabilities. If your terminal offers a choice of ways to insert--either use insert mode or use a special command--then define `im' and do not define `ic', since this gives the most efficient operation when - several characters are to be inserted. *Do not* define both - strings, for that means that *both* must be used each time + several characters are to be inserted. _Do not_ define both + strings, for that means that _both_ must be used each time insertion is done. `ip' String of commands to output following an inserted graphic character in insert mode. Often it is used just for a padding spec, when padding is needed after an inserted character (*note - Padding::.). + Padding::). `IC' String of commands to insert N character positions at and after @@ -895,7 +893,7 @@ of these capabilities. positions which have been cleared. An application program can assume that the terminal can do character -insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is +insertion if _any one of_ the capabilities `IC', `im', `ic' or `ip' is provided. To insert N blank character positions, move the cursor to the place diff --git a/info/termcap.info-3 b/info/termcap.info-3 index 973a2c1..e2e200d 100644 --- a/info/termcap.info-3 +++ b/info/termcap.info-3 @@ -1,5 +1,5 @@ -This is Info file ../info/termcap.info, produced by Makeinfo version -1.68 from the input file termcap.texi. +This is ../info/termcap.info, produced by makeinfo version 4.0 from +termcap.texi. START-INFO-DIR-ENTRY * Termcap: (termcap). Termcap library of the GNU system. @@ -124,7 +124,7 @@ obsolete. with non-standout text must check for the `xs' flag. In a per-character terminal, this flag says that the only way to remove standout once written is to clear that portion of the line with the `ce' string or -something even more powerful (*note Clearing::.); just writing new +something even more powerful (*note Clearing::); just writing new characters at those screen positions will not change the modes in effect there. In a magic cookie terminal, `xs' says that the only way to remove a cookie is to clear a portion of the line that includes the @@ -140,7 +140,7 @@ finds and removes the next `so' magic cookie on the screen. (It may also be possible to remove a cookie which is not at the beginning of a line by clearing that line.) The `xt' capability also has implications for the use of tab characters, but in that regard it is obsolete (*note -Cursor Motion::.). +Cursor Motion::). `so' String of commands to enter standout mode. @@ -726,7 +726,7 @@ Summary of Capability Names Here are all the terminal capability names in alphabetical order with a brief description of each. For cross references to their -definitions, see the index of capability names (*note Cap Index::.). +definitions, see the index of capability names (*note Cap Index::). `ae' String to turn off alternate character set mode. @@ -1257,8 +1257,8 @@ Capability Index * ce: Clearing. * ch: Cursor Motion. * cl: Clearing. -* cm: Cursor Motion. * CM: Cursor Motion. +* cm: Cursor Motion. * co: Screen Size. * cr: Cursor Motion. * cS: Scrolling. @@ -1310,8 +1310,8 @@ Capability Index * ka...ku: Keypad. * km: Meta Key. * l0...l9: Keypad. -* le: Cursor Motion. * LE: Cursor Motion. +* le: Cursor Motion. * li: Screen Size. * ll: Cursor Motion. * lm: Scrolling. @@ -1325,8 +1325,8 @@ Capability Index * mo: Meta Key. * mp: Standout. * mr: Standout. -* ms <1>: Standout. -* ms: Underlining. +* ms <1>: Underlining. +* ms: Standout. * nc: Cursor Motion. * nd: Cursor Motion. * nl: Cursor Motion. @@ -1346,12 +1346,12 @@ Capability Index * sa: Standout. * sc: Cursor Motion. * se: Standout. -* sf: Scrolling. * SF: Scrolling. +* sf: Scrolling. * sg: Standout. * so: Standout. -* sr: Scrolling. * SR: Scrolling. +* sr: Scrolling. * st: Initialization. * ta: Cursor Motion. * te: Initialization. @@ -1361,8 +1361,8 @@ Capability Index * ue: Underlining. * ug: Underlining. * ul: Underlining. -* up: Cursor Motion. * UP: Cursor Motion. +* up: Cursor Motion. * us: Underlining. * vb: Bell. * ve: Cursor Visibility. @@ -1373,8 +1373,8 @@ Capability Index * xb: Basic. * xn: Wrapping. * xs: Standout. -* xt <1>: Cursor Motion. -* xt: Standout. +* xt <1>: Standout. +* xt: Cursor Motion.  File: termcap.info, Node: Index, Prev: Cap Index, Up: Top @@ -1407,8 +1407,8 @@ Concept Index * meta key: Meta Key. * names of terminal types: Naming. * overstrike: Basic. -* padding <1>: Padding. -* padding: Pad Specs. +* padding <1>: Pad Specs. +* padding: Padding. * parameters: Parameters. * printer: Printer. * repeat output: Basic. @@ -1426,7 +1426,7 @@ Concept Index * visibility: Cursor Visibility. * visible bell: Bell. * window: Windows. -* wrapping <1>: Naming. -* wrapping: Wrapping. +* wrapping <1>: Wrapping. +* wrapping: Naming. diff --git a/info/texinfo.info b/info/texinfo.info index 2986f92..586bcfc 100644 --- a/info/texinfo.info +++ b/info/texinfo.info @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -34,306 +34,317 @@ translation approved by the Free Software Foundation.  Indirect: -texinfo.info-1: 1510 -texinfo.info-2: 48723 -texinfo.info-3: 96698 -texinfo.info-4: 146082 -texinfo.info-5: 196057 -texinfo.info-6: 245140 -texinfo.info-7: 294058 -texinfo.info-8: 343872 -texinfo.info-9: 393199 -texinfo.info-10: 435577 -texinfo.info-11: 481692 -texinfo.info-12: 519851 +texinfo.info-1: 1486 +texinfo.info-2: 48705 +texinfo.info-3: 96679 +texinfo.info-4: 146071 +texinfo.info-5: 196044 +texinfo.info-6: 245136 +texinfo.info-7: 293731 +texinfo.info-8: 343546 +texinfo.info-9: 392859 +texinfo.info-10: 435237 +texinfo.info-11: 481353 +texinfo.info-12: 519513  Tag Table: (Indirect) -Node: Top1510 -Node: Copying23823 -Node: Overview25828 -Node: Overview-Footnotes27256 -Node: Using Texinfo27792 -Node: Info Files30275 -Node: Info Files-Footnotes34310 -Node: Printed Books34557 -Node: Printed Books-Footnotes37228 -Node: Formatting Commands37512 -Node: Formatting Commands-Footnotes40338 -Node: Conventions41040 -Node: Comments43602 -Node: Minimum45025 -Node: Six Parts47211 -Node: Short Sample48723 -Node: Acknowledgements52858 -Node: Texinfo Mode53693 -Node: Texinfo Mode Overview55065 -Node: Emacs Editing55841 -Node: Inserting57971 -Node: Showing the Structure62252 -Node: Updating Nodes and Menus64779 -Node: Updating Commands65852 -Node: Updating Requirements71913 -Node: Other Updating Commands74210 -Node: Info Formatting77478 -Node: Printing78736 -Node: Texinfo Mode Summary81082 -Node: Beginning a File85836 -Node: Four Parts86727 -Node: Sample Beginning88197 -Node: Header89817 -Node: First Line91169 -Node: Start of Header92158 -Node: setfilename92872 -Node: settitle94808 -Node: setchapternewpage96698 -Node: paragraphindent99459 -Node: End of Header100941 -Node: Info Summary and Permissions101780 -Node: Titlepage & Copyright Page102799 -Node: titlepage104405 -Node: titlepage-Footnotes106686 -Node: titlefont center sp107026 -Node: title subtitle author108252 -Node: Copyright & Permissions110524 -Node: end titlepage112525 -Node: headings on off114231 -Node: The Top Node116276 -Node: Title of Top Node117431 -Node: Master Menu Parts118684 -Node: Software Copying Permissions120921 -Node: Ending a File122089 -Node: Printing Indices & Menus122937 -Node: Contents125239 -Node: File End127579 -Node: Structuring128252 -Node: Tree Structuring129910 -Node: Structuring Command Types131353 -Node: makeinfo top133679 -Node: chapter134212 -Node: unnumbered & appendix135236 -Node: majorheading & chapheading136075 -Node: section136896 -Node: unnumberedsec appendixsec heading137660 -Node: subsection138649 -Node: unnumberedsubsec appendixsubsec subheading139221 -Node: subsubsection140174 -Node: Raise/lower sections141724 -Node: Nodes143859 -Node: Two Paths144796 -Node: Node Menu Illustration146082 -Node: node149777 -Node: Node Names152473 -Node: Writing a Node153549 -Node: Node Line Tips155567 -Node: Node Line Requirements156361 -Node: First Node157962 -Node: makeinfo top command159408 -Node: Top Node Summary160587 -Node: makeinfo Pointer Creation162037 -Node: Menus163284 -Node: Menus-Footnotes164222 -Node: Menu Location164573 -Node: Writing a Menu166250 -Node: Menu Parts167216 -Node: Less Cluttered Menu Entry168374 -Node: Menu Example168999 -Node: Other Info Files170520 -Node: Cross References172376 -Node: References173333 -Node: Cross Reference Commands175080 -Node: Cross Reference Parts176139 -Node: xref178975 -Node: Reference Syntax179774 -Node: One Argument181429 -Node: Two Arguments182441 -Node: Three Arguments183556 -Node: Four and Five Arguments185947 -Node: Top Node Naming188359 -Node: ref189369 -Node: pxref190759 -Node: inforef193141 -Node: uref194434 -Node: Marking Text195433 -Node: Indicating196057 -Node: Useful Highlighting197962 -Node: code199351 -Node: kbd202389 -Node: key204259 -Node: samp205592 -Node: var207179 -Node: file208972 -Node: dfn209579 -Node: cite210489 -Node: url210943 -Node: email211507 -Node: Emphasis212319 -Node: emph & strong213219 -Node: Smallcaps214205 -Node: Fonts215532 -Node: Customized Highlighting216620 -Node: Customized Highlighting-Footnotes219434 -Node: Quotations and Examples219654 -Node: Block Enclosing Commands221276 -Node: quotation223301 -Node: example224391 -Node: noindent226446 -Node: Lisp Example227911 -Node: Lisp Example-Footnotes228612 -Node: smallexample & smalllisp228802 -Node: display230827 -Node: format231459 -Node: exdent231920 -Node: flushleft & flushright233000 -Node: cartouche234266 -Node: Lists and Tables235033 -Node: Introducing Lists235709 -Node: itemize237371 -Node: enumerate239518 -Node: Two-column Tables242017 -Node: table242706 -Node: ftable vtable245140 -Node: itemx246241 -Node: Multi-column Tables247252 -Node: Multitable Column Widths247923 -Node: Multitable Rows249377 -Node: Indices251250 -Node: Index Entries252401 -Node: Predefined Indices253534 -Node: Indexing Commands254531 -Node: Combining Indices259072 -Node: syncodeindex260435 -Node: synindex262097 -Node: New Indices262622 -Node: Insertions264448 -Node: Braces Atsigns265632 -Node: Inserting An Atsign266184 -Node: Inserting Braces266458 -Node: Inserting Space266821 -Node: Not Ending a Sentence267325 -Node: Ending a Sentence268679 -Node: Multiple Spaces269808 -Node: dmn271028 -Node: Inserting Accents272236 -Node: Dots Bullets274212 -Node: dots275035 -Node: bullet275559 -Node: TeX and copyright275956 -Node: tex276523 -Node: copyright symbol276939 -Node: pounds277199 -Node: minus277563 -Node: math278485 -Node: Glyphs279214 -Node: Glyphs Summary280327 -Node: result280955 -Node: expansion281440 -Node: Print Glyph282396 -Node: Error Glyph283273 -Node: Equivalence284106 -Node: Point Glyph284794 -Node: Images286351 -Node: Breaks288018 -Node: Break Commands289449 -Node: Line Breaks290290 -Node: - and hyphenation291308 -Node: w292559 -Node: sp293272 -Node: page293681 -Node: group294058 -Node: need295801 -Node: Definition Commands296531 -Node: Def Cmd Template298102 -Node: Optional Arguments301099 -Node: deffnx302687 -Node: Def Cmds in Detail303642 -Node: Functions Commands304752 -Node: Variables Commands307757 -Node: Typed Functions309843 -Node: Typed Variables313385 -Node: Abstract Objects315368 -Node: Data Types320593 -Node: Def Cmd Conventions321848 -Node: Sample Function Definition322411 -Node: Footnotes325295 -Node: Footnotes-Footnotes325682 -Node: Footnote Commands326028 -Node: Footnote Commands-Footnotes327524 -Node: Footnote Styles327642 -Node: Conditionals330228 -Node: Conditional Commands331039 -Node: Conditional Not Commands332532 -Node: Raw Formatter Commands333277 -Node: set clear value335107 -Node: ifset ifclear335908 -Node: value339087 -Node: value Example340499 -Node: Macros342077 -Node: Defining Macros342783 -Node: Invoking Macros343872 -Node: Format/Print Hardcopy344978 -Node: Use TeX346815 -Node: Format with tex/texindex347443 -Node: Format with texi2dvi351086 -Node: Print with lpr351677 -Node: Within Emacs352531 -Node: Texinfo Mode Printing353450 -Node: Compile-Command356860 -Node: Requirements Summary357748 -Node: Preparing for TeX359061 -Node: Overfull hboxes361850 -Node: smallbook363409 -Node: A4 Paper364929 -Node: Cropmarks and Magnification366155 -Node: Create an Info File368097 -Node: makeinfo advantages369400 -Node: Invoking makeinfo370316 -Node: makeinfo options371004 -Node: Pointer Validation376493 -Node: makeinfo in Emacs377837 -Node: texinfo-format commands380395 -Node: Batch Formatting381667 -Node: Tag and Split Files382883 -Node: Install an Info File386237 -Node: Directory file387055 -Node: New Info File388923 -Node: Other Info Directories389984 -Node: Installing Dir Entries393199 -Node: Invoking install-info395192 -Node: Command List397607 -Node: Tips435577 -Node: Sample Texinfo File446987 -Node: Sample Permissions449105 -Node: Inserting Permissions450148 -Node: ifinfo Permissions452454 -Node: Titlepage Permissions454075 -Node: Include Files455337 -Node: Using Include Files456424 -Node: texinfo-multiple-files-update458379 -Node: Include File Requirements460740 -Node: Sample Include File461985 -Node: Include Files Evolution463504 -Node: Headings465475 -Node: Headings Introduced466112 -Node: Heading Format468000 -Node: Heading Choice470452 -Node: Custom Headings471824 -Node: Catching Mistakes476152 -Node: makeinfo Preferred477441 -Node: Debugging with Info478346 -Node: Debugging with TeX481692 -Node: Using texinfo-show-structure485973 -Node: Using occur489072 -Node: Running Info-Validate490609 -Node: Using Info-validate491670 -Node: Unsplit493512 -Node: Tagifying494558 -Node: Splitting495410 -Node: Refilling Paragraphs497026 -Node: Refilling Paragraphs-Footnotes498679 -Node: Command Syntax498930 -Node: Obtaining TeX501887 -Node: Command and Variable Index503999 -Node: Concept Index519851 +Node: Top1486 +Node: Copying23801 +Node: Overview25806 +Node: Overview-Footnotes27235 +Ref: Overview-Footnote-127299 +Node: Using Texinfo27771 +Node: Info Files30254 +Node: Info Files-Footnotes34290 +Ref: Info Files-Footnote-134358 +Node: Printed Books34537 +Node: Printed Books-Footnotes37209 +Ref: Printed Books-Footnote-137283 +Node: Formatting Commands37493 +Node: Formatting Commands-Footnotes40320 +Ref: Formatting Commands-Footnote-140406 +Node: Conventions41022 +Node: Comments43584 +Node: Minimum45007 +Node: Six Parts47193 +Node: Short Sample48705 +Node: Acknowledgements52841 +Node: Texinfo Mode53676 +Node: Texinfo Mode Overview55048 +Node: Emacs Editing55824 +Node: Inserting57954 +Node: Showing the Structure62235 +Node: Updating Nodes and Menus64762 +Node: Updating Commands65835 +Node: Updating Requirements71896 +Node: Other Updating Commands74193 +Node: Info Formatting77461 +Node: Printing78719 +Node: Texinfo Mode Summary81064 +Node: Beginning a File85818 +Node: Four Parts86709 +Node: Sample Beginning88179 +Node: Header89799 +Node: First Line91151 +Node: Start of Header92140 +Node: setfilename92853 +Node: settitle94789 +Node: setchapternewpage96679 +Node: paragraphindent99440 +Node: End of Header100922 +Node: Info Summary and Permissions101761 +Node: Titlepage & Copyright Page102780 +Node: titlepage104386 +Node: titlepage-Footnotes106668 +Ref: titlepage-Footnote-1106734 +Node: titlefont center sp107008 +Node: title subtitle author108234 +Node: Copyright & Permissions110506 +Node: end titlepage112507 +Node: headings on off114213 +Node: The Top Node116258 +Node: Title of Top Node117413 +Node: Master Menu Parts118666 +Node: Software Copying Permissions120903 +Node: Ending a File122071 +Node: Printing Indices & Menus122919 +Node: Contents125228 +Node: File End127568 +Node: Structuring128241 +Node: Tree Structuring129898 +Node: Structuring Command Types131341 +Node: makeinfo top133668 +Node: chapter134201 +Node: unnumbered & appendix135225 +Node: majorheading & chapheading136064 +Node: section136885 +Node: unnumberedsec appendixsec heading137649 +Node: subsection138638 +Node: unnumberedsubsec appendixsubsec subheading139210 +Node: subsubsection140163 +Node: Raise/lower sections141713 +Node: Nodes143848 +Node: Two Paths144785 +Node: Node Menu Illustration146071 +Node: node149766 +Node: Node Names152462 +Node: Writing a Node153538 +Node: Node Line Tips155556 +Node: Node Line Requirements156350 +Node: First Node157951 +Node: makeinfo top command159395 +Node: Top Node Summary160574 +Node: makeinfo Pointer Creation162024 +Node: Menus163271 +Node: Menus-Footnotes164210 +Ref: Menus-Footnote-1164268 +Node: Menu Location164561 +Node: Writing a Menu166238 +Node: Menu Parts167204 +Node: Less Cluttered Menu Entry168362 +Node: Menu Example168987 +Node: Other Info Files170508 +Node: Cross References172364 +Node: References173321 +Node: Cross Reference Commands175068 +Node: Cross Reference Parts176127 +Node: xref178963 +Node: Reference Syntax179762 +Node: One Argument181416 +Node: Two Arguments182428 +Node: Three Arguments183543 +Node: Four and Five Arguments185934 +Node: Top Node Naming188346 +Node: ref189356 +Node: pxref190746 +Node: inforef193128 +Node: uref194421 +Node: Marking Text195420 +Node: Indicating196044 +Node: Useful Highlighting197949 +Node: code199338 +Node: kbd202376 +Node: key204246 +Node: samp205579 +Node: var207166 +Node: file208959 +Node: dfn209566 +Node: cite210476 +Node: url210930 +Node: email211494 +Node: Emphasis212306 +Node: emph & strong213206 +Node: Smallcaps214192 +Node: Fonts215519 +Node: Customized Highlighting216607 +Node: Customized Highlighting-Footnotes219422 +Ref: Customized Highlighting-Footnote-1219516 +Node: Quotations and Examples219642 +Node: Block Enclosing Commands221264 +Node: quotation223289 +Node: example224379 +Node: noindent226434 +Node: Lisp Example227898 +Node: Lisp Example-Footnotes228600 +Ref: Lisp Example-Footnote-1228672 +Node: smallexample & smalllisp228790 +Node: display230815 +Node: format231447 +Node: exdent231908 +Node: flushleft & flushright232988 +Node: cartouche234254 +Node: Lists and Tables235021 +Node: Introducing Lists235697 +Node: itemize237362 +Node: enumerate239509 +Node: Two-column Tables242014 +Node: table242703 +Node: ftable vtable245136 +Node: itemx246237 +Node: Multi-column Tables247248 +Node: Multitable Column Widths247919 +Node: Multitable Rows249373 +Node: Indices251150 +Node: Index Entries252300 +Node: Predefined Indices253433 +Node: Indexing Commands254430 +Node: Combining Indices258970 +Node: syncodeindex260333 +Node: synindex261995 +Node: New Indices262520 +Node: Insertions264345 +Node: Braces Atsigns265529 +Node: Inserting An Atsign266081 +Node: Inserting Braces266355 +Node: Inserting Space266718 +Node: Not Ending a Sentence267222 +Node: Ending a Sentence268576 +Node: Multiple Spaces269705 +Node: dmn270924 +Node: Inserting Accents272131 +Node: Dots Bullets273888 +Node: dots274710 +Node: bullet275234 +Node: TeX and copyright275631 +Node: tex276198 +Node: copyright symbol276614 +Node: pounds276874 +Node: minus277238 +Node: math278160 +Node: Glyphs278888 +Node: Glyphs Summary280001 +Node: result280629 +Node: expansion281114 +Node: Print Glyph282070 +Node: Error Glyph282947 +Node: Equivalence283780 +Node: Point Glyph284468 +Node: Images286025 +Node: Breaks287692 +Node: Break Commands289123 +Node: Line Breaks289964 +Node: - and hyphenation290982 +Node: w292232 +Node: sp292945 +Node: page293354 +Node: group293731 +Node: need295474 +Node: Definition Commands296204 +Node: Def Cmd Template297775 +Node: Optional Arguments300772 +Node: deffnx302360 +Node: Def Cmds in Detail303315 +Node: Functions Commands304425 +Node: Variables Commands307430 +Node: Typed Functions309516 +Node: Typed Variables313058 +Node: Abstract Objects315041 +Node: Data Types320266 +Node: Def Cmd Conventions321521 +Node: Sample Function Definition322084 +Node: Footnotes324968 +Node: Footnotes-Footnotes325356 +Ref: Footnotes-Footnote-1325422 +Node: Footnote Commands325702 +Node: Footnote Commands-Footnotes327199 +Ref: Footnote Commands-Footnote-1327281 +Node: Footnote Styles327317 +Node: Conditionals329903 +Node: Conditional Commands330714 +Node: Conditional Not Commands332207 +Node: Raw Formatter Commands332952 +Node: set clear value334782 +Node: ifset ifclear335583 +Node: value338762 +Node: value Example340174 +Node: Macros341752 +Node: Defining Macros342457 +Node: Invoking Macros343546 +Node: Format/Print Hardcopy344652 +Node: Use TeX346489 +Node: Format with tex/texindex347117 +Node: Format with texi2dvi350758 +Node: Print with lpr351349 +Node: Within Emacs352203 +Node: Texinfo Mode Printing353122 +Node: Compile-Command356532 +Node: Requirements Summary357420 +Node: Preparing for TeX358733 +Node: Overfull hboxes361520 +Node: smallbook363079 +Node: A4 Paper364597 +Node: Cropmarks and Magnification365822 +Node: Create an Info File367763 +Node: makeinfo advantages369066 +Node: Invoking makeinfo369982 +Node: makeinfo options370670 +Node: Pointer Validation376154 +Node: makeinfo in Emacs377498 +Node: texinfo-format commands380056 +Node: Batch Formatting381327 +Node: Tag and Split Files382543 +Node: Install an Info File385897 +Node: Directory file386715 +Node: New Info File388583 +Node: Other Info Directories389644 +Node: Installing Dir Entries392859 +Node: Invoking install-info394852 +Node: Command List397267 +Node: Tips435237 +Node: Sample Texinfo File446647 +Node: Sample Permissions448766 +Node: Inserting Permissions449809 +Node: ifinfo Permissions452115 +Node: Titlepage Permissions453736 +Node: Include Files454998 +Node: Using Include Files456085 +Node: texinfo-multiple-files-update458040 +Node: Include File Requirements460401 +Node: Sample Include File461646 +Node: Include Files Evolution463165 +Node: Headings465136 +Node: Headings Introduced465773 +Node: Heading Format467661 +Node: Heading Choice470113 +Node: Custom Headings471485 +Node: Catching Mistakes475813 +Node: makeinfo Preferred477102 +Node: Debugging with Info478007 +Node: Debugging with TeX481353 +Node: Using texinfo-show-structure485633 +Node: Using occur488732 +Node: Running Info-Validate490269 +Node: Using Info-validate491330 +Node: Unsplit493172 +Node: Tagifying494218 +Node: Splitting495070 +Node: Refilling Paragraphs496686 +Node: Refilling Paragraphs-Footnotes498340 +Ref: Refilling Paragraphs-Footnote-1498428 +Node: Command Syntax498591 +Node: Obtaining TeX501548 +Node: Command and Variable Index503661 +Node: Concept Index519513  End Tag Table diff --git a/info/texinfo.info-1 b/info/texinfo.info-1 index bc542dc..398ba54 100644 --- a/info/texinfo.info-1 +++ b/info/texinfo.info-1 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -91,7 +91,7 @@ menu lists all the lower level nodes in the document. * Concept Index:: A menu covering many topics. - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Overview of Texinfo @@ -556,7 +556,7 @@ File: texinfo.info, Node: Overview, Next: Texinfo Mode, Prev: Copying, Up: T Overview of Texinfo ******************* - "Texinfo"(1) (*note Overview-Footnotes::) is a documentation system + "Texinfo"(1) (*note Overview-Footnote-1::) is a documentation system that uses a single source file to produce both on-line information and printed output. This means that instead of writing two different documents, one for the on-line help or other on-line information and @@ -679,7 +679,7 @@ Normally the order in this chain is the same as the order of the children in the parent's menu. Each child node records the parent node name as its `Up' pointer. The last child has no `Next' pointer, and the first child has the parent both as its `Previous' and as its `Up' -pointer.(1) (*note Info Files-Footnotes::) +pointer.(1) (*note Info Files-Footnote-1::) The book-like structuring of an Info file into nodes that correspond to chapters, sections, and the like is a matter of convention, not a @@ -735,7 +735,7 @@ Printed Books A Texinfo file can be formatted and typeset as a printed book or manual. To do this, you need TeX, a powerful, sophisticated typesetting -program written by Donald Knuth.(1) (*note Printed Books-Footnotes::) +program written by Donald Knuth.(1) (*note Printed Books-Footnote-1::) A Texinfo-based book is similar to any other typeset, printed work: it can have a title page, copyright page, table of contents, and preface, @@ -812,7 +812,7 @@ characters. Similarly, you can print the output generated by TeX on a wide variety of printers. Depending on what they do or what arguments(1) (*note Formatting -Commands-Footnotes::) they take, you need to write @-commands on lines +Commands-Footnote-1::) they take, you need to write @-commands on lines of their own or as part of sentences: * Write a command such as `@noindent' at the beginning of a line as diff --git a/info/texinfo.info-10 b/info/texinfo.info-10 index 7b4fbcc..f746dad 100644 --- a/info/texinfo.info-10 +++ b/info/texinfo.info-10 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -247,7 +247,7 @@ In this case, the text should be formatted with `@table', `@item', and Periods Outside of Quotes ......................... - Place periods and other punctuation marks *outside* of quotations, + Place periods and other punctuation marks _outside_ of quotations, unless the punctuation is part of the quotation. This practice goes against publishing conventions in the United States, but enables the reader to distinguish between the contents of the quotation and the @@ -258,7 +258,7 @@ outside the end quotation marks: Evidently, `au' is an abbreviation for ``author''. -since `au' does *not* serve as an abbreviation for `author.' (with a +since `au' does _not_ serve as an abbreviation for `author.' (with a period following the word). Introducing New Terms @@ -372,6 +372,7 @@ A Sample Texinfo File You can see this file, with comments, in the first chapter. *Note A Short Sample Texinfo File: Short Sample. + \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename sample.info @@ -724,8 +725,8 @@ hierarchical level in the file structure. Usually, each is an each included file contains one, and only one, chapter or equivalent-level node. - The outer file should contain only *one* node, the `Top' node. It -should *not* contain any nodes besides the single `Top' node. The + The outer file should contain only _one_ node, the `Top' node. It +should _not_ contain any nodes besides the single `Top' node. The `texinfo-multiple-files-update' command will not process them.  @@ -1064,7 +1065,7 @@ and `@end iftex' commands. For `@include' files only: expands to the name of the current `@include' file. If the current Texinfo source file is not an `@include' file, this command has no effect. This command does - *not* provide the name of the current Texinfo source file unless + _not_ provide the name of the current Texinfo source file unless it is an `@include' file. (*Note Include Files::, for more information about `@include' files.) diff --git a/info/texinfo.info-11 b/info/texinfo.info-11 index 94a7f31..e102b6a 100644 --- a/info/texinfo.info-11 +++ b/info/texinfo.info-11 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -103,7 +103,7 @@ three things. prompt. Please note that if you are running TeX inside Emacs, you need to -switch to the shell buffer and line at which TeX offers the `?' prompt. +switch to the shell buffer and line at which TeX offers the `?' prompt. Sometimes TeX will format a file without producing error messages even though there is a problem. This usually occurs if a command is not @@ -417,7 +417,7 @@ Refilling Paragraphs ******************** The `@refill' command refills and, optionally, indents the first line -of a paragraph.(1) (*note Refilling Paragraphs-Footnotes::) The +of a paragraph.(1) (*note Refilling Paragraphs-Footnote-1::) The `@refill' command is no longer important, but we describe it here because you once needed it. You will see it in many old Texinfo files. @@ -432,7 +432,7 @@ automatically.) Now, all the Info formatters automatically fill and indent those paragraphs that need to be filled and indented. The `@refill' command causes `texinfo-format-region' and -`texinfo-format-buffer' to refill a paragraph in the Info file *after* +`texinfo-format-buffer' to refill a paragraph in the Info file _after_ all the other processing has been done. For this reason, you can not use `@refill' with a paragraph containing either `@*' or `@w{ ... }' since the refilling action will override those two commands. @@ -503,7 +503,7 @@ uses the rest of the line as its argument. Emacs paragraph and filling commands work properly. There is only one exception to this rule: the command `@refill', which is always used at the end of a paragraph immediately following the final period or other -punctuation character. `@refill' takes no argument and does *not* +punctuation character. `@refill' takes no argument and does _not_ require braces. `@refill' never confuses the Emacs paragraph commands because it cannot appear at the beginning of a line. @@ -562,6 +562,7 @@ the TeX Users Group co-sponsors a complete CD-ROM TeX distribution. sites: please add to the base cost, if desired, $20.00 for shipment via air parcel post, or $30.00 for shipment via courier. + Many other TeX distributions are available; see `http://tug.org/'.  @@ -592,8 +593,8 @@ the commands are listed without their preceding `@'. * @ (single @): Inserting An Atsign. * ^: Inserting Accents. * `: Inserting Accents. -* aa: Inserting Accents. * AA: Inserting Accents. +* aa: Inserting Accents. * AE: Inserting Accents. * ae: Inserting Accents. * afourpaper: A4 Paper. @@ -623,8 +624,8 @@ the commands are listed without their preceding `@'. * columnfractions: Multitable Column Widths. * comment: Comments. * contents: Contents. -* copyright <1>: Copyright & Permissions. -* copyright: copyright symbol. +* copyright <1>: copyright symbol. +* copyright: Copyright & Permissions. * cropmarks: Cropmarks and Magnification. * defcodeindex: New Indices. * defcv: Abstract Objects. @@ -703,9 +704,9 @@ the commands are listed without their preceding `@'. * input (TeX command): Minimum. * isearch-backward: deffnx. * isearch-forward: deffnx. -* item <1>: itemize. -* item <2>: Multitable Rows. -* item: table. +* item <1>: Multitable Rows. +* item <2>: table. +* item: itemize. * itemize: itemize. * itemx: itemx. * kbd: kbd. @@ -730,14 +731,14 @@ the commands are listed without their preceding `@'. * need: need. * next-error: makeinfo in Emacs. * noindent: noindent. -* o: Inserting Accents. * O: Inserting Accents. +* o: Inserting Accents. * occur: Using occur. * occur-mode-goto-occurrence: Showing the Structure. * oddfooting: Custom Headings. * oddheading: Custom Headings. -* oe: Inserting Accents. * OE: Inserting Accents. +* oe: Inserting Accents. * page: page. * paragraphindent: paragraphindent. * pindex: Indexing Commands. @@ -804,8 +805,8 @@ the commands are listed without their preceding `@'. * texinfo-multiple-files-update: texinfo-multiple-files-update. * texinfo-multiple-files-update (in brief): Other Updating Commands. * texinfo-sequential-node-update: Other Updating Commands. -* texinfo-show-structure <1>: Showing the Structure. -* texinfo-show-structure: Using texinfo-show-structure. +* texinfo-show-structure <1>: Using texinfo-show-structure. +* texinfo-show-structure: Showing the Structure. * texinfo-start-menu-description: Inserting. * texinfo-tex-buffer: Printing. * texinfo-tex-print: Printing. diff --git a/info/texinfo.info-12 b/info/texinfo.info-12 index 84c76c7..58b9177 100644 --- a/info/texinfo.info-12 +++ b/info/texinfo.info-12 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -42,39 +42,43 @@ Concept Index * !: Inserting Accents. * (dir) as Up node of Top node: First Node. +* --delete: Invoking install-info. +* --dir-file=NAME: Invoking install-info. +* --entry=TEXT: Invoking install-info. +* --error-limit=LIMIT: makeinfo options. +* --fill-column=WIDTH: makeinfo options. +* --footnote-style=STYLE: makeinfo options. +* --force: makeinfo options. +* --help <1>: Invoking install-info. +* --help: makeinfo options. +* --info-dir=DIR: Invoking install-info. +* --info-file=FILE: Invoking install-info. +* --item=TEXT: Invoking install-info. +* --no-headers: makeinfo options. +* --no-number-footnotes: makeinfo options. +* --no-pointer-validate: makeinfo options. +* --no-split: makeinfo options. +* --no-validate: makeinfo options. +* --no-warn: makeinfo options. +* --output=FILE: makeinfo options. +* --paragraph-indent=INDENT: makeinfo options. +* --quiet: Invoking install-info. +* --reference-limit=LIMIT: makeinfo options. +* --remove: Invoking install-info. +* --section=SEC: Invoking install-info. +* --verbose: makeinfo options. +* --version <1>: Invoking install-info. +* --version: makeinfo options. * -D VAR: makeinfo options. -* -delete: Invoking install-info. -* -dir-file=NAME: Invoking install-info. -* -entry=TEXT: Invoking install-info. -* -error-limit=LIMIT: makeinfo options. -* -fill-column=WIDTH: makeinfo options. -* -footnote-style=STYLE: makeinfo options. -* -force: makeinfo options. -* -help <1>: makeinfo options. -* -help: Invoking install-info. * -I DIR: makeinfo options. -* -info-dir=DIR: Invoking install-info. -* -info-file=FILE: Invoking install-info. -* -item=TEXT: Invoking install-info. -* -no-headers: makeinfo options. -* -no-number-footnotes: makeinfo options. -* -no-pointer-validate: makeinfo options. -* -no-split: makeinfo options. -* -no-validate: makeinfo options. -* -no-warn: makeinfo options. * -o FILE: makeinfo options. -* -output=FILE: makeinfo options. * -P DIR: makeinfo options. -* -paragraph-indent=INDENT: makeinfo options. -* -quiet: Invoking install-info. -* -reference-limit=LIMIT: makeinfo options. -* -remove: Invoking install-info. -* -section=SEC: Invoking install-info. -* -verbose: makeinfo options. -* -version <1>: Invoking install-info. -* -version: makeinfo options. * .cshrc initialization file: Preparing for TeX. * .profile initialization file: Preparing for TeX. +* /L: Inserting Accents. +* /l: Inserting Accents. +* /O: Inserting Accents. +* /o: Inserting Accents. * ?: Inserting Accents. * @-command in nodename: Node Line Requirements. * @-command list: Command List. @@ -84,8 +88,8 @@ Concept Index * @menu parts: Menu Parts. * @node line writing: Writing a Node. * A4 paper, printing on: A4 Paper. -* aa: Inserting Accents. * AA: Inserting Accents. +* aa: Inserting Accents. * Abbreviations for keys: key. * Accents, inserting: Inserting Accents. * Acute accent: Inserting Accents. @@ -182,7 +186,7 @@ Concept Index * Definition template: Def Cmd Template. * Definitions grouped together: deffnx. * Description for menu, start: Inserting. -* Did^ot points: Images. +* Dido^t points: Images. * Different cross reference commands: Cross Reference Commands. * Dimension formatting: dmn. * Dimensions and image sizes: Images. @@ -328,8 +332,8 @@ Concept Index * Insert nodes, menus automatically: Updating Nodes and Menus. * Inserting @, braces: Braces Atsigns. * Inserting accents: Inserting Accents. -* Inserting dots <1>: Dots Bullets. -* Inserting dots: dots. +* Inserting dots <1>: dots. +* Inserting dots: Dots Bullets. * Inserting ellipsis: Dots Bullets. * Inserting frequently used commands: Inserting. * Inserting space: Inserting Space. @@ -344,8 +348,6 @@ Concept Index * keyboard input: kbd. * Keys, recommended names: key. * Knuth, Donald: Printed Books. -* l/: Inserting Accents. -* L/: Inserting Accents. * Larger or smaller pages: Cropmarks and Magnification. * Less cluttered menu entry: Less Cluttered Menu Entry. * License agreement: Software Copying Permissions. @@ -362,8 +364,8 @@ Concept Index * Location of menus: Menu Location. * Looking for badly referenced nodes: Running Info-Validate. * lpr (DVI print command): Print with lpr. -* Macro definitions <1>: Sample Function Definition. -* Macro definitions: Defining Macros. +* Macro definitions <1>: Defining Macros. +* Macro definitions: Sample Function Definition. * Macro invocation: Invoking Macros. * Macron accent: Inserting Accents. * Macros: Macros. @@ -424,8 +426,6 @@ Concept Index * Nodes, catching mistakes: Catching Mistakes. * Nodes, checking for badly referenced: Running Info-Validate. * Not ending a sentence: Not Ending a Sentence. -* o/: Inserting Accents. -* O/: Inserting Accents. * Obtaining TeX: Obtaining TeX. * Occurrences, listing with @occur: Using occur. * OE: Inserting Accents. @@ -565,8 +565,8 @@ Concept Index * TeX, how to obtain: Obtaining TeX. * texi2dvi: Format with tex/texindex. * texi2dvi (shell script): Format with texi2dvi. -* texindex <1>: Format/Print Hardcopy. -* texindex: Format with tex/texindex. +* texindex <1>: Format with tex/texindex. +* texindex: Format/Print Hardcopy. * Texinfo commands, defining new: Macros. * Texinfo file beginning: Beginning a File. * Texinfo file ending: Ending a File. @@ -627,8 +627,8 @@ Concept Index * Vertically holding text together: group. * Visibility of conditional text: Conditionals. * Weisshaus, Melissa: Acknowledgements. -* Whitespace, inserting <1>: Inserting Space. -* Whitespace, inserting: Multiple Spaces. +* Whitespace, inserting <1>: Multiple Spaces. +* Whitespace, inserting: Inserting Space. * Width of images: Images. * Widths, defining multitable column: Multitable Column Widths. * Wildcards: Format with tex/texindex. diff --git a/info/texinfo.info-2 b/info/texinfo.info-2 index 1697d67..a2ae54e 100644 --- a/info/texinfo.info-2 +++ b/info/texinfo.info-2 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -44,7 +44,7 @@ titlepage', look more intimidating than they are. Most of the material is standard boilerplate; when you write a manual, simply insert the names for your own manual in this segment. (*Note Beginning a File::.) -In the following, the sample text is *indented*; comments on it are +In the following, the sample text is _indented_; comments on it are not. The complete file, without any comments, is shown in *Note Sample Texinfo File::. @@ -160,6 +160,7 @@ The Results Here is what the contents of the first chapter of the sample look like: + This is the contents of the first chapter. Here is a numbered list. @@ -371,7 +372,7 @@ first letter of the @-command: however, more mnemonic; hence the two keybindings. (Also, you can move out from between braces by typing `C-f'.) - To put a command such as `@code{...}' around an *existing* word, + To put a command such as `@code{...}' around an _existing_ word, position the cursor in front of the word and type `C-u 1 C-c C-c c'. This makes it easy to edit existing plain text. The value of the prefix argument tells Emacs how many words following point to include @@ -519,7 +520,7 @@ or an `@ifinfo' line. followed by a node with an `@chapter' or equivalent-level command. Note that the menu updating commands will not create a main or master menu for a Texinfo file that has only `@chapter'-level nodes! The menu -updating commands only create menus *within* nodes for lower level +updating commands only create menus _within_ nodes for lower level nodes. To create a menu of chapters, you must provide a `Top' node. The menu updating commands remove menu entries that refer to other @@ -785,7 +786,7 @@ an Info file: or M-x makeinfo-buffer - For TeX or the Info formatting commands to work, the file *must* + For TeX or the Info formatting commands to work, the file _must_ include a line that has `@setfilename' in its header. *Note Create an Info File::, for details about Info formatting. @@ -802,7 +803,7 @@ print the file. Optionally, you may also create indices. To do this, you must run the `texindex' command after first running the `tex' typesetting command; and then you must run the `tex' command again. Or else run the `texi2dvi' command which automatically creates indices as -needed (*note Format with texi2dvi::.). +needed (*note Format with texi2dvi::). Often, when you are writing a document, you want to typeset and print only part of a file to see what it will look like. You can use the @@ -836,7 +837,7 @@ only part of a file to see what it will look like. You can use the `texinfo-tex-buffer' or `texinfo-tex-region'. For `texinfo-tex-region' or `texinfo-tex-buffer' to work, the file -*must* start with a `\input texinfo' line and must include an +_must_ start with a `\input texinfo' line and must include an `@settitle' line. The file must end with `@bye' on a line by itself. (When you use `texinfo-tex-region', you must surround the `@settitle' line with start-of-header and end-of-header lines.) @@ -1181,7 +1182,7 @@ Start of Header Follow the start-of-header line with `@setfilename' and `@settitle' lines and, optionally, with other command lines, such as `@smallbook' or `@footnotestyle'; and then by an end-of-header line (*note End of -Header::.). +Header::). With these lines, you can format part of a Texinfo file for Info or typeset part for printing. diff --git a/info/texinfo.info-3 b/info/texinfo.info-3 index e95f8a8..a18f73e 100644 --- a/info/texinfo.info-3 +++ b/info/texinfo.info-3 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -181,8 +181,8 @@ and be put on a line by itself. appendix to this manual; see *Note `ifinfo' Copying Permissions: ifinfo Permissions, for the complete text. - The permissions text appears in an Info file *before* the first node. -This mean that a reader does *not* see this text when reading the file + The permissions text appears in an Info file _before_ the first node. +This mean that a reader does _not_ see this text when reading the file using Info, except when using the advanced Info command `g *'.  @@ -245,7 +245,7 @@ command, but that would have been rather long!) version of the program to which the manual applies on the title page. If the manual changes more frequently than the program or is independent of it, you should also include an edition number(1) (*note -titlepage-Footnotes::) for the manual. This helps readers keep track +titlepage-Footnote-1::) for the manual. This helps readers keep track of which manual is for which version of the program. (The `Top' node should also contain this information; see *Note `@top': makeinfo top.) @@ -727,16 +727,16 @@ those just cause the raw data for the index to be accumulated. To generate an index, you must include the `@printindex' command at the place in the document where you want the index to appear. Also, as part of the process of creating a printed manual, you must run a -program called `texindex' (*note Format/Print Hardcopy::.) to sort the +program called `texindex' (*note Format/Print Hardcopy::) to sort the raw data to produce a sorted index file. The sorted index file is what is actually used to print the index. Texinfo offers six different types of predefined index: the concept index, the function index, the variables index, the keystroke index, the -program index, and the data type index (*note Predefined Indices::.). +program index, and the data type index (*note Predefined Indices::). Each index type has a two-letter name: `cp', `fn', `vr', `ky', `pg', and `tp'. You may merge indices, or put them into separate sections -(*note Combining Indices::.); or you may define your own indices (*note +(*note Combining Indices::); or you may define your own indices (*note Defining New Indices: New Indices.). The `@printindex' command takes a two-letter index name, reads the @@ -756,13 +756,13 @@ Precede the `@unnumbered' command with an `@node' line. @unnumbered Variable Index @printindex vr - + @node Concept Index, , Variable Index, Top @comment node-name, next, previous, up @unnumbered Concept Index @printindex cp - + @summarycontents @contents @bye @@ -799,7 +799,7 @@ actual table to appear in the manual. To do this, you must use the table of contents in addition to the full table of contents. Write the `@shortcontents' command on a line by itself right - *before* the `@contents' command. + _before_ the `@contents' command. The table of contents commands automatically generate a chapter-like heading at the top of the first table of contents page. Write the table @@ -857,7 +857,7 @@ Contents.). The chapter structuring commands do not create an Info node structure, so normally you should put an `@node' command immediately before each -chapter structuring command (*note Nodes::.). The only time you are +chapter structuring command (*note Nodes::). The only time you are likely to use the chapter structuring commands without using the node structuring commands is if you are writing a document that contains no cross references and will never be transformed into Info format. @@ -959,6 +959,7 @@ that are listed in the table of contents of a printed book or manual. Here are the four groups of chapter structuring commands: + No new pages Numbered Unnumbered Lettered and numbered Unnumbered In contents In contents In contents Not in contents diff --git a/info/texinfo.info-4 b/info/texinfo.info-4 index 04bcd4c..f75aa98 100644 --- a/info/texinfo.info-4 +++ b/info/texinfo.info-4 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -73,7 +73,7 @@ is "Chapter 1", and the name of the `Up' node is "Top". may be at a lower level--a section-level node may follow a chapter-level node, and a subsection-level node may follow a section-level node. `Next' and `Previous' refer to nodes at the - *same* hierarchical level. (The `Top' node contains the exception + _same_ hierarchical level. (The `Top' node contains the exception to this rule. Since the `Top' node is the only node at that level, `Next' refers to the first following node, which is almost always a chapter or chapter-level node.) @@ -316,9 +316,9 @@ The First Node -------------- The first node of a Texinfo file is the "Top" node, except in an -included file (*note Include Files::.). The Top node contains the main +included file (*note Include Files::). The Top node contains the main or master menu for the document, and a short summary of the document -(*note Top Node Summary::.). +(*note Top Node Summary::). The Top node (which must be named `top' or `Top') should have as its `Up' node the name of a node in another file, where there is a menu @@ -433,13 +433,13 @@ Menus ***** "Menus" contain pointers to subordinate nodes.(1) (*note -Menus-Footnotes::) In Info, you use menus to go to such nodes. Menus +Menus-Footnote-1::) In Info, you use menus to go to such nodes. Menus have no effect in printed manuals and do not appear in them. By convention, a menu is put at the end of a node since a reader who uses the menu may not see text that follows it. - A node that has a menu should *not* contain much text. If you have a + A node that has a menu should _not_ contain much text. If you have a lot of text and a menu, move most of the text into a new subnode--all but a few lines. @@ -902,7 +902,7 @@ differently. *Note `@pxref': pxref.) file and in the printed manual. `@xref' must refer to an Info node by name. Use `@node' to define -the node (*note Writing a Node::.). +the node (*note Writing a Node::). `@xref' is followed by several arguments inside braces, separated by commas. Whitespace before and after these commas is ignored. @@ -1215,7 +1215,7 @@ in a printed document, and the following in Info: Sea surges are described in *Note Hurricanes::. - *Caution:* You *must* write a period or comma immediately after an + *Caution:* You _must_ write a period or comma immediately after an `@ref' command with two or more arguments. Otherwise, Info will not find the end of the cross reference entry and its attempt to follow the cross reference will fail. As a general rule, you @@ -1229,7 +1229,7 @@ File: texinfo.info, Node: pxref, Next: inforef, Prev: ref, Up: Cross Referen ======== The parenthetical reference command, `@pxref', is nearly the same as -`@xref', but you use it *only* inside parentheses and you do *not* type +`@xref', but you use it _only_ inside parentheses and you do _not_ type a comma or period after the command's closing brace. The command differs from `@xref' in two ways: @@ -1240,7 +1240,7 @@ differs from `@xref' in two ways: closing colon or period. Because one type of formatting automatically inserts closing -punctuation and the other does not, you should use `@pxref' *only* +punctuation and the other does not, you should use `@pxref' _only_ inside parentheses as part of another sentence. Also, you yourself should not insert punctuation after the reference, as you do with `@xref'. diff --git a/info/texinfo.info-5 b/info/texinfo.info-5 index e7fea89..8f64324 100644 --- a/info/texinfo.info-5 +++ b/info/texinfo.info-5 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -43,7 +43,7 @@ of text refers to. For example, metasyntactic variables are marked by `@var', and code by `@code'. Since the pieces of text are labelled by commands that tell what kind of object they are, it is easy to change the way the Texinfo formatters prepare such text. (Texinfo is an -*intentional* formatting language rather than a *typesetting* +_intentional_ formatting language rather than a _typesetting_ formatting language.) For example, in a printed manual, code is usually illustrated in a @@ -523,7 +523,7 @@ File: texinfo.info, Node: emph & strong, Next: Smallcaps, Prev: Emphasis, Up --------------------------------- The `@emph' and `@strong' commands are for emphasis; `@strong' is -stronger. In printed output, `@emph' produces *italics* and `@strong' +stronger. In printed output, `@emph' produces _italics_ and `@strong' produces *bold*. For example, @@ -631,7 +631,7 @@ work only with TeX. `@end ifinfo' to define commands for Info with the same names as new commands for TeX. `@definfoenclose' creates new commands for Info that mark text by enclosing it in strings that precede and follow the text. -(1) (*note Customized Highlighting-Footnotes::) +(1) (*note Customized Highlighting-Footnote-1::) Here is how to create a new @-command called `@phoo' that causes TeX to typeset its argument in italics and causes Info to display the @@ -920,7 +920,7 @@ line, and neither does the `@end example' line. Do not put braces after an `@noindent' command; they are not necessary, since `@noindent' is a command used outside of paragraphs -(*note Command Syntax::.). +(*note Command Syntax::).  File: texinfo.info, Node: Lisp Example, Next: smallexample & smalllisp, Prev: noindent, Up: Quotations and Examples @@ -938,7 +938,7 @@ File: texinfo.info, Node: Lisp Example, Next: smallexample & smalllisp, Prev: the nature of the example. This is useful, for example, if you write a function that evaluates only and all the Lisp code in a Texinfo file. Then you can use the Texinfo file as a Lisp library.(1) (*note Lisp -Example-Footnotes::) +Example-Footnote-1::) Mark the end of `@lisp' with `@end lisp' on a line by itself. @@ -1165,6 +1165,7 @@ itemize' command. Precede each element of a list with an `@item' or `@itemx' command. + Here is an itemized list of the different kinds of table and lists: * Itemized lists with and without bullets. @@ -1173,6 +1174,7 @@ Here is an itemized list of the different kinds of table and lists: * Two-column tables with highlighting. + Here is an enumerated list with the same items: 1. Itemized lists with and without bullets. @@ -1181,6 +1183,7 @@ Here is an enumerated list with the same items: 3. Two-column tables with highlighting. + And here is a two-column table with the same items and their @-commands: `@itemize' @@ -1313,8 +1316,11 @@ This produces: 2. Proximate causes. + + Here is an example with an argument of `3': + @enumerate 3 @item Predisposing causes. @@ -1334,9 +1340,12 @@ This produces: 5. Perpetuating causes. + + Here is a brief summary of the alternatives. The summary is constructed using `@enumerate' with an argument of `a'. + a. `@enumerate' Without an argument, produce a numbered list, starting with the @@ -1389,7 +1398,7 @@ Using the `@table' Command Write the `@table' command at the beginning of a line and follow it on the same line with an argument that is a Texinfo "indicating" command such as `@code', `@samp', `@var', or `@kbd' (*note -Indicating::.). Although these commands are usually followed by +Indicating::). Although these commands are usually followed by arguments in braces, in this case you use the command name without an argument because `@item' will supply the argument. This command will be applied to the text that goes into the first column of each item and diff --git a/info/texinfo.info-6 b/info/texinfo.info-6 index 5b8991a..e13c6f4 100644 --- a/info/texinfo.info-6 +++ b/info/texinfo.info-6 @@ -1,5 +1,5 @@ -This is Info file ../info/texinfo.info, produced by Makeinfo version -1.68 from the input file texinfo.texi. +This is ../info/texinfo.info, produced by makeinfo version 3.12s from +texinfo.texi. INFO-DIR-SECTION Texinfo documentation system START-INFO-DIR-ENTRY @@ -179,16 +179,16 @@ your source file as necessary. produces: -Key Command Description -C-x 2 `split-window-vertically' Split the selected window - into two windows, with one - above the other. -C-x 3 `split-window-horizontally' Split the selected window - into two windows positioned - side by side. -C-Mouse-2 In the mode line or scroll - bar of a window, split that - window. +Key Command Description +C-x 2 `split-window-vertically' Split the selected window + into two windows, with one + above the other. +C-x 3 `split-window-horizontally' Split the selected window + into two windows positioned + side by side. +C-Mouse-2 In the mode line or scroll + bar of a window, split that + window.  File: texinfo.info, Node: Indices, Next: Insertions, Prev: Lists and Tables, Up: Top @@ -224,8 +224,8 @@ Making Index Entries ==================== When you are making index entries, it is good practice to think of the -different ways people may look for something. Different people *do -not* think of the same words when they look something up. A helpful +different ways people may look for something. Different people _do +not_ think of the same words when they look something up. A helpful index will have items indexed under all the different words that people may use. For example, one reader may think it obvious that the two-letter names for indices should be listed under "Indices, @@ -322,7 +322,7 @@ case-sensitive, so use upper and lower case as required for them. font and entries for the other indices are printed in a small `@code' font. You may change the way part of an entry is printed with the usual Texinfo commands, such as `@file' for file names and `@emph' for -emphasis (*note Marking Text::.). +emphasis (*note Marking Text::). The six indexing commands for predefined indices are: @@ -525,7 +525,7 @@ roman font. Thus, it parallels the `@findex' command rather than the You should define new indices within or right after the end-of-header line of a Texinfo file, before any `@synindex' or `@syncodeindex' -commands (*note Header::.). +commands (*note Header::).  File: texinfo.info, Node: Insertions, Next: Breaks, Prev: Indices, Up: Top @@ -704,7 +704,7 @@ produces Spacey example. Other possible uses of `@SPACE' have been subsumed by `@multitable' -(*note Multi-column Tables::.). +(*note Multi-column Tables::). Do not follow any of these commands with braces. @@ -734,7 +734,7 @@ produces Not everyone uses this style. Some people prefer `8.27 in.@:' or `8.27 inches' to `8.27@dmn{in}' in the Texinfo file. In these cases, however, the formatters may insert a line break between the number and -the dimension, so use `@w' (*note w::.). Also, if you write a period +the dimension, so use `@w' (*note w::). Also, if you write a period after an abbreviation within a sentence, you should write `@:' after the period to prevent TeX from inserting extra whitespace, as shown here. *Note Inserting Space::. @@ -748,40 +748,40 @@ Inserting Accents Here is a table with the commands Texinfo provides for inserting floating accents. The commands with non-alphabetic names do not take braces around their argument (which is taken to be the next character). -(Exception: `@,' *does* take braces around its argument.) This is so +(Exception: `@,' _does_ take braces around its argument.) This is so as to make the source as convenient to type and read as possible, since accented characters are very common in some languages. -Command Output What -@"o "o umlaut accent -@'o 'o acute accent -@,{c} c, cedilla accent -@=o =o macron/overbar accent -@^o ^o circumflex accent -@`o `o grave accent -@~o ~o tilde accent -@dotaccent{o} .o overdot accent -@H{o} ''o long Hungarian umlaut -@ringaccent{o} *o ring accent -@tieaccent{oo} [oo tie-after accent -@u{o} (o breve accent -@ubaraccent{o} o_ underbar accent -@udotaccent{o} o-. underdot accent -@v{o} '. *Note `@result': result. `@ringaccent{C}' - Generate a ring accent over the next character, as in *o. *Note + Generate a ring accent over the next character, as in o*. *Note Inserting Accents::. `@samp{TEXT}' @@ -1020,7 +1021,7 @@ indicates repeated text. `@tieaccent{CC}' Generate a tie-after accent over the next two characters CC, as in - `[oo'. *Note Inserting Accents::. + `oo['. *Note Inserting Accents::. `@tindex ENTRY' Add ENTRY to the index of data types. *Note Defining the Entries @@ -1063,7 +1064,7 @@ indicates repeated text. `@ubaraccent{C}' `@udotaccent{C}' Generate a breve, underbar, or underdot accent, respectively, over - or under the character C, as in (o, o_, o-.. *Note Inserting + or under the character C, as in o(, o_, .o. *Note Inserting Accents::. `@unnumbered TITLE' @@ -1101,7 +1102,7 @@ indicates repeated text. Web. *Note `@url': url. `@v{C}' - Generate check accent over the character C, as in ' - - Command: widget-forward &optional COUNT + - Command: widget-forward &optional count Move point COUNT buttons or editing fields forward. `' - - Command: widget-backward &optional COUNT + - Command: widget-backward &optional count Move point COUNT buttons or editing fields backward.  @@ -369,14 +369,14 @@ object. This object can be queried and manipulated by other widget functions, until it is deleted with `widget-delete'. After the widgets have been created, `widget-setup' must be called to enable them. - - Function: widget-create TYPE [ KEYWORD ARGUMENT ]... + - Function: widget-create type [ keyword argument ]... Create and return a widget of type TYPE. The syntax for the TYPE argument is described in *Note Basic Types::. The keyword arguments can be used to overwrite the keyword arguments that are part of TYPE. - - Function: widget-delete WIDGET + - Function: widget-delete widget Delete WIDGET and remove it from the buffer. - Function: widget-setup @@ -480,13 +480,13 @@ widget specific way. Text around %[ %] in the format. These can be - *nil* + _nil_ No text is inserted. - *a string* + _a string_ The string is inserted literally. - *a symbol* + _a symbol_ The value of the symbol is expanded according to this table. `:doc' @@ -545,7 +545,7 @@ widget specific way. The following predefined function can be used: - - Function: widget-children-validate WIDGET + - Function: widget-children-validate widget All the `:children' of WIDGET must be valid. `:tab-order' @@ -800,7 +800,7 @@ arguments. widget after it has been created with the function `widget-radio-add-item'. - - Function: widget-radio-add-item WIDGET TYPE + - Function: widget-radio-add-item widget type Add to `radio-button-choice' widget WIDGET a new radio button item of type TYPE. @@ -1198,15 +1198,15 @@ Properties You can examine or set the value of a widget by using the widget object that was returned by `widget-create'. - - Function: widget-value WIDGET + - Function: widget-value widget Return the current value contained in WIDGET. It is an error to call this function on an uninitialized widget. - - Function: widget-value-set WIDGET VALUE + - Function: widget-value-set widget value Set the value contained in WIDGET to VALUE. It is an error to call this function with an invalid VALUE. - *Important:* You *must* call `widget-setup' after modifying the + *Important:* You _must_ call `widget-setup' after modifying the value of a widget before the user is allowed to edit the widget again. It is enough to call `widget-setup' once if you modify multiple widgets. This is currently only necessary if the widget contains an @@ -1217,22 +1217,22 @@ widget objects, for example a reference to the item being edited, it can be done with `widget-put' and `widget-get'. The property names must begin with a `:'. - - Function: widget-put WIDGET PROPERTY VALUE + - Function: widget-put widget property value In WIDGET set PROPERTY to VALUE. PROPERTY should be a symbol, while VALUE can be anything. - - Function: widget-get WIDGET PROPERTY + - Function: widget-get widget property In WIDGET return the value for PROPERTY. PROPERTY should be a symbol, the value is what was last set by `widget-put' for PROPERTY. - - Function: widget-member WIDGET PROPERTY + - Function: widget-member widget property Non-nil if WIDGET has a value (even nil) for property PROPERTY. Occasionally it can be useful to know which kind of widget you have, i.e. the name of the widget type you gave when the widget was created. - - Function: widget-type WIDGET + - Function: widget-type widget Return the name of WIDGET, a symbol. Widgets can be in two states: active, which means they are @@ -1278,7 +1278,7 @@ you to create a shorthand for more complex widgets, including specifying component widgets and default new default values for the keyword arguments. - - Function: widget-define NAME CLASS DOC &rest ARGS + - Function: widget-define name class doc &rest args Define a new widget type named NAME from `class'. NAME and class should both be symbols, `class' should be one of @@ -1312,10 +1312,10 @@ new widgets: The following predefined functions can be used here: - - Function: widget-types-convert-widget WIDGET + - Function: widget-types-convert-widget widget Convert `:args' as widget types in WIDGET. - - Function: widget-value-convert-widget WIDGET + - Function: widget-value-convert-widget widget Initialize `:value' from `:args' in WIDGET. `:value-to-internal' @@ -1354,7 +1354,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-children-value-delete WIDGET + - Function: widget-children-value-delete widget Delete all `:children' and `:buttons' in WIDGET. `:value-get' @@ -1363,7 +1363,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-value-value-get WIDGET + - Function: widget-value-value-get widget Return the `:value' property of WIDGET. `:format-handler' @@ -1382,7 +1382,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-parent-action WIDGET &optional EVENT + - Function: widget-parent-action widget &optional event Tell `:parent' of WIDGET to handle the `:action'. Optional EVENT is the event that triggered the action. @@ -1450,12 +1450,12 @@ File: widget.info, Node: Utilities, Next: Widget Wishlist, Prev: Widget Minor Utilities. ========== - - Function: widget-prompt-value WIDGET PROMPT [ VALUE UNBOUND ] + - Function: widget-prompt-value widget prompt [ value unbound ] Prompt for a value matching WIDGET, using PROMPT. The current value is assumed to be VALUE, unless UNBOUND is non-nil. - - Function: widget-get-sibling WIDGET + - Function: widget-get-sibling widget Get the item WIDGET is assumed to toggle. This is only meaningful for radio buttons or checkboxes in a list. @@ -1514,39 +1514,40 @@ Wishlist symbol, it should pop up a menu. +  Tag Table: -Node: Top227 -Node: Introduction607 -Node: User Interface4090 -Node: Programming Example8985 -Node: Setting Up the Buffer12302 -Node: Basic Types14019 -Node: link20064 -Node: url-link20578 -Node: info-link20890 -Node: push-button21181 -Node: editable-field21754 -Node: text23093 -Node: menu-choice23391 -Node: radio-button-choice24256 -Node: item25835 -Node: choice-item26223 -Node: toggle26721 -Node: checkbox27446 -Node: checklist27752 -Node: editable-list29196 -Node: group30378 -Node: Sexp Types30665 -Node: constants30978 -Node: generic32057 -Node: atoms32590 -Node: composite34537 -Node: Widget Properties37003 -Node: Defining New Widgets40066 -Node: Widget Browser45366 -Node: Widget Minor Mode46224 -Node: Utilities46781 -Node: Widget Wishlist47262 +Node: Top203 +Node: Introduction583 +Node: User Interface4066 +Node: Programming Example8961 +Node: Setting Up the Buffer12278 +Node: Basic Types13995 +Node: link20040 +Node: url-link20554 +Node: info-link20866 +Node: push-button21157 +Node: editable-field21730 +Node: text23069 +Node: menu-choice23367 +Node: radio-button-choice24232 +Node: item25811 +Node: choice-item26199 +Node: toggle26697 +Node: checkbox27422 +Node: checklist27728 +Node: editable-list29172 +Node: group30354 +Node: Sexp Types30641 +Node: constants30954 +Node: generic32033 +Node: atoms32566 +Node: composite34513 +Node: Widget Properties36979 +Node: Defining New Widgets40042 +Node: Widget Browser45342 +Node: Widget Minor Mode46200 +Node: Utilities46757 +Node: Widget Wishlist47238  End Tag Table diff --git a/info/xemacs-faq.info b/info/xemacs-faq.info index cf12847..2e37720 100644 --- a/info/xemacs-faq.info +++ b/info/xemacs-faq.info @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -8,241 +8,259 @@ END-INFO-DIR-ENTRY  Indirect: -xemacs-faq.info-1: 221 -xemacs-faq.info-2: 48809 -xemacs-faq.info-3: 95901 -xemacs-faq.info-4: 145739 -xemacs-faq.info-5: 195532 +xemacs-faq.info-1: 197 +xemacs-faq.info-2: 47858 +xemacs-faq.info-3: 94967 +xemacs-faq.info-4: 144802 +xemacs-faq.info-5: 194690  Tag Table: (Indirect) -Node: Top221 -Node: Introduction15614 -Node: Q1.0.119134 -Node: Q1.0.219670 -Node: Q1.0.320106 -Node: Q1.0.420364 -Node: Q1.0.521796 -Node: Q1.0.622485 -Node: Q1.0.723616 -Node: Q1.0.824015 -Node: Q1.0.924211 -Node: Q1.0.1024489 -Node: Q1.0.1125938 -Node: Q1.0.1226395 -Node: Q1.0.1326763 -Node: Q1.0.1426998 -Node: Q1.1.127542 -Node: Q1.1.228737 -Node: Q1.1.329112 -Node: Q1.2.130060 -Node: Q1.2.231120 -Node: Q1.2.331550 -Node: Q1.3.132501 -Node: Q1.3.236419 -Node: Q1.3.337128 -Node: Q1.3.437370 -Node: Q1.3.538134 -Node: Q1.3.640549 -Node: Q1.3.742044 -Node: Q1.4.142979 -Node: Q1.4.243849 -Node: Q1.4.344190 -Node: Q1.4.444832 -Node: Q1.4.546372 -Node: Q1.4.646676 -Node: Q1.4.747684 -Node: Installation48809 -Node: Q2.0.151217 -Node: Q2.0.252090 -Node: Q2.0.359300 -Node: Q2.0.460598 -Node: Q2.0.561187 -Node: Q2.0.661555 -Node: Q2.0.761936 -Node: Q2.0.862317 -Node: Q2.0.963892 -Node: Q2.0.1065330 -Node: Q2.0.1166174 -Node: Q2.0.1267115 -Node: Q2.0.1368638 -Node: Q2.0.1469296 -Node: Q2.1.169864 -Node: Q2.1.272606 -Node: Q2.1.373783 -Node: Q2.1.475076 -Node: Q2.1.575875 -Node: Q2.1.676237 -Node: Q2.1.776714 -Node: Q2.1.877067 -Node: Q2.1.978583 -Node: Q2.1.1079005 -Node: Q2.1.1179762 -Node: Q2.1.1280627 -Node: Q2.1.1381582 -Node: Q2.1.1482613 -Node: Q2.1.1583721 -Node: Q2.1.1689678 -Node: Q2.1.1790356 -Node: Q2.1.1890953 -Node: Q2.1.1992750 -Node: Q2.1.2093280 -Node: Q2.1.2193662 -Node: Q2.1.2293952 -Node: Q2.1.2395249 -Node: Customization95901 -Node: Q3.0.1100795 -Node: Q3.0.2101501 -Node: Q3.0.3102065 -Node: Q3.0.4102482 -Node: Q3.0.5103315 -Node: Q3.0.6104096 -Node: Q3.0.7104676 -Node: Q3.0.8105340 -Node: Q3.0.9106186 -Node: Q3.1.1106747 -Node: Q3.1.2107484 -Node: Q3.1.3107915 -Node: Q3.1.4108500 -Node: Q3.1.5109036 -Node: Q3.1.6109420 -Node: Q3.1.7110101 -Node: Q3.1.8112325 -Node: Q3.2.1112864 -Node: Q3.2.2114272 -Node: Q3.2.3115071 -Node: Q3.2.4115673 -Node: Q3.2.5116707 -Node: Q3.2.6117174 -Node: Q3.3.1118136 -Node: Q3.3.2118529 -Node: Q3.3.3119160 -Node: Q3.3.4119541 -Node: Q3.3.5120635 -Node: Q3.4.1122129 -Node: Q3.4.2122772 -Node: Q3.5.1123284 -Node: Q3.5.2124739 -Node: Q3.5.3125157 -Node: Q3.5.4125998 -Node: Q3.5.5126830 -Node: Q3.5.6127970 -Node: Q3.5.7128960 -Node: Q3.5.8130312 -Node: Q3.5.9131059 -Node: Q3.5.10131839 -Node: Q3.5.11132472 -Node: Q3.6.1133025 -Node: Q3.6.2133765 -Node: Q3.6.3134193 -Node: Q3.7.1134693 -Node: Q3.7.2135581 -Node: Q3.7.3136240 -Node: Q3.7.4136662 -Node: Q3.7.5137005 -Node: Q3.7.6137473 -Node: Q3.7.7138188 -Node: Q3.7.8139208 -Node: Q3.8.1139627 -Node: Q3.8.2140087 -Node: Q3.8.3140550 -Node: Q3.8.4141156 -Node: Q3.8.5141875 -Node: Q3.9.1142660 -Node: Q3.9.2143600 -Node: Q3.9.3144198 -Node: Q3.9.4144860 -Node: Q3.10.1145739 -Node: Q3.10.2146557 -Node: Q3.10.3147338 -Node: Q3.10.4148066 -Node: Q3.10.5148449 -Node: Subsystems149459 -Node: Q4.0.1151874 -Node: Q4.0.2152399 -Node: Q4.0.3152957 -Node: Q4.0.4153278 -Node: Q4.0.5153520 -Node: Q4.0.6153751 -Node: Q4.0.7154329 -Node: Q4.0.8154654 -Node: Q4.0.9155881 -Node: Q4.0.10157919 -Node: Q4.0.11158373 -Node: Q4.0.12159223 -Node: Q4.1.1160196 -Node: Q4.1.2160599 -Node: Q4.1.3160926 -Node: Q4.2.1161235 -Node: Q4.2.2161865 -Node: Q4.2.3162105 -Node: Q4.2.4162649 -Node: Q4.3.1163302 -Node: Q4.3.2163886 -Node: Q4.3.3165602 -Node: Q4.3.4165871 -Node: Q4.3.5166560 -Node: Q4.4.1167188 -Node: Q4.5.1168695 -Node: Q4.6.1169464 -Node: Q4.7.1174724 -Node: Q4.7.2175679 -Node: Q4.7.3175976 -Node: Q4.7.4176322 -Node: Q4.7.5177206 -Node: Q4.7.6178848 -Node: Miscellaneous179397 -Node: Q5.0.1182823 -Node: Q5.0.2183557 -Node: Q5.0.3184411 -Node: Q5.0.4185113 -Node: Q5.0.5186053 -Node: Q5.0.6188033 -Node: Q5.0.7188690 -Node: Q5.0.8189295 -Node: Q5.0.9189814 -Node: Q5.0.10190328 -Node: Q5.0.11190576 -Node: Q5.0.12191137 -Node: Q5.0.13192054 -Node: Q5.0.14192738 -Node: Q5.0.15193503 -Node: Q5.0.16193804 -Node: Q5.0.17194316 -Node: Q5.0.18194581 -Node: Q5.0.19195107 -Node: Q5.0.20195532 -Node: Q5.1.1196447 -Node: Q5.1.2198516 -Node: Q5.1.3199252 -Node: Q5.1.4202646 -Node: Q5.1.5203181 -Node: Q5.1.6205275 -Node: Q5.1.7206664 -Node: Q5.1.8208265 -Node: Q5.1.9208817 -Node: Q5.1.10209702 -Node: Q5.1.11210833 -Node: Q5.2.1211379 -Node: Q5.2.2211950 -Node: Q5.2.3212367 -Node: Q5.2.4212602 -Node: Q5.3.1213512 -Node: Q5.3.2214733 -Node: Q5.3.3215509 -Node: Q5.3.4215993 -Node: Q5.3.5216660 -Node: Q5.3.6217529 -Node: Q5.3.7217774 -Node: Q5.3.8219964 -Node: Q5.3.9220211 -Node: Q5.3.10221164 +Node: Top197 +Node: Introduction16713 +Node: Q1.0.120232 +Node: Q1.0.220768 +Node: Q1.0.321263 +Node: Q1.0.421525 +Node: Q1.0.522975 +Node: Q1.0.623664 +Node: Q1.0.724670 +Node: Q1.0.824919 +Node: Q1.0.925134 +Node: Q1.0.1025412 +Node: Q1.0.1125655 +Node: Q1.0.1226112 +Node: Q1.0.1326480 +Node: Q1.0.1426715 +Node: Q1.1.127189 +Node: Q1.1.228151 +Node: Q1.1.328544 +Node: Q1.2.129495 +Node: Q1.2.230551 +Node: Q1.2.330985 +Node: Q1.3.131936 +Node: Q1.3.235854 +Node: Q1.3.336409 +Node: Q1.3.436650 +Node: Q1.3.537414 +Node: Q1.3.639829 +Node: Q1.3.741324 +Node: Q1.4.142259 +Node: Q1.4.243121 +Node: Q1.4.343462 +Node: Q1.4.443881 +Node: Q1.4.545421 +Node: Q1.4.645725 +Node: Q1.4.746733 +Node: Installation47858 +Node: Q2.0.150264 +Node: Q2.0.251137 +Node: Q2.0.358340 +Node: Q2.0.459638 +Node: Q2.0.560230 +Node: Q2.0.660598 +Node: Q2.0.760979 +Node: Q2.0.861360 +Node: Q2.0.962938 +Node: Q2.0.1064376 +Node: Q2.0.1165220 +Node: Q2.0.1266161 +Node: Q2.0.1367684 +Node: Q2.0.1468342 +Node: Q2.1.168910 +Node: Q2.1.271652 +Node: Q2.1.372829 +Node: Q2.1.474122 +Node: Q2.1.574921 +Node: Q2.1.675283 +Node: Q2.1.775760 +Node: Q2.1.876113 +Node: Q2.1.977629 +Node: Q2.1.1078051 +Node: Q2.1.1178808 +Node: Q2.1.1279673 +Node: Q2.1.1380628 +Node: Q2.1.1481659 +Node: Q2.1.1582770 +Node: Q2.1.1688728 +Node: Q2.1.1789422 +Node: Q2.1.1890019 +Node: Q2.1.1991816 +Node: Q2.1.2092346 +Node: Q2.1.2192728 +Node: Q2.1.2293018 +Node: Q2.1.2394315 +Node: Customization94967 +Node: Q3.0.199854 +Node: Q3.0.2100560 +Node: Q3.0.3101124 +Node: Q3.0.4101541 +Node: Q3.0.5102374 +Node: Q3.0.6103155 +Node: Q3.0.7103735 +Node: Q3.0.8104399 +Node: Q3.0.9105245 +Node: Q3.1.1105806 +Node: Q3.1.2106543 +Node: Q3.1.3106974 +Node: Q3.1.4107559 +Node: Q3.1.5108095 +Node: Q3.1.6108479 +Node: Q3.1.7109160 +Node: Q3.1.8111384 +Node: Q3.2.1111926 +Node: Q3.2.2113334 +Node: Q3.2.3114133 +Node: Q3.2.4114735 +Node: Q3.2.5115769 +Node: Q3.2.6116236 +Node: Q3.3.1117198 +Node: Q3.3.2117591 +Node: Q3.3.3118222 +Node: Q3.3.4118603 +Node: Q3.3.5119697 +Node: Q3.4.1121191 +Node: Q3.4.2121834 +Node: Q3.5.1122346 +Node: Q3.5.2123800 +Node: Q3.5.3124218 +Node: Q3.5.4125058 +Node: Q3.5.5125890 +Node: Q3.5.6127030 +Node: Q3.5.7128020 +Node: Q3.5.8129372 +Node: Q3.5.9130119 +Node: Q3.5.10130899 +Node: Q3.5.11131535 +Node: Q3.6.1132088 +Node: Q3.6.2132828 +Node: Q3.6.3133256 +Node: Q3.7.1133756 +Node: Q3.7.2134644 +Node: Q3.7.3135303 +Node: Q3.7.4135725 +Node: Q3.7.5136068 +Node: Q3.7.6136536 +Node: Q3.7.7137251 +Node: Q3.7.8138271 +Node: Q3.8.1138690 +Node: Q3.8.2139150 +Node: Q3.8.3139613 +Node: Q3.8.4140219 +Node: Q3.8.5140938 +Node: Q3.9.1141723 +Node: Q3.9.2142663 +Node: Q3.9.3143261 +Node: Q3.9.4143923 +Node: Q3.10.1144802 +Node: Q3.10.2145620 +Node: Q3.10.3146401 +Node: Q3.10.4147129 +Node: Q3.10.5147512 +Node: Subsystems148522 +Node: Q4.0.1151007 +Node: Q4.0.2151532 +Node: Q4.0.3152090 +Node: Q4.0.4152411 +Node: Q4.0.5152653 +Node: Q4.0.6152884 +Node: Q4.0.7153465 +Node: Q4.0.8153790 +Node: Q4.0.9155017 +Node: Q4.0.10157055 +Node: Q4.0.11157509 +Node: Q4.0.12158359 +Node: Q4.1.1159332 +Node: Q4.1.2159735 +Node: Q4.1.3160062 +Node: Q4.2.1160371 +Node: Q4.2.2161001 +Node: Q4.2.3161241 +Node: Q4.2.4161785 +Node: Q4.3.1162438 +Node: Q4.3.2163022 +Node: Q4.3.3164503 +Node: Q4.3.4164775 +Node: Q4.3.5165452 +Node: Q4.4.1166080 +Node: Q4.4.2167566 +Node: Q4.5.1168770 +Node: Q4.6.1169539 +Node: Q4.7.1174799 +Node: Q4.7.2175754 +Node: Q4.7.3176051 +Node: Q4.7.4176397 +Node: Q4.7.5177281 +Node: Q4.7.6178923 +Node: Miscellaneous179517 +Node: Q5.0.1182937 +Node: Q5.0.2183671 +Node: Q5.0.3184525 +Node: Q5.0.4185227 +Node: Q5.0.5186166 +Node: Q5.0.6188146 +Node: Q5.0.7188803 +Node: Q5.0.8189408 +Node: Q5.0.9189927 +Node: Q5.0.10190441 +Node: Q5.0.11190689 +Node: Q5.0.12191250 +Node: Q5.0.13192167 +Node: Q5.0.14192851 +Node: Q5.0.15193616 +Node: Q5.0.16193913 +Node: Q5.0.17194425 +Node: Q5.0.18194690 +Node: Q5.0.19195216 +Node: Q5.0.20195640 +Node: Q5.1.1196555 +Node: Q5.1.2198624 +Node: Q5.1.3199360 +Node: Q5.1.4202754 +Node: Q5.1.5203289 +Node: Q5.1.6205383 +Node: Q5.1.7206772 +Node: Q5.1.8208373 +Node: Q5.1.9208925 +Node: Q5.1.10209810 +Node: Q5.1.11210941 +Node: Q5.2.1211490 +Node: Q5.2.2212061 +Node: Q5.2.3212478 +Node: Q5.2.4212713 +Node: Q5.3.1213623 +Node: Q5.3.2214844 +Node: Q5.3.3215620 +Node: Q5.3.4216104 +Node: Q5.3.5216771 +Node: Q5.3.6217640 +Node: Q5.3.7217885 +Node: Q5.3.8220075 +Node: Q5.3.9220322 +Node: Q5.3.10221275 Node: Q5.3.11223359 Node: Q5.3.12224908 -Node: Current Events226182 -Node: Q6.0.1226839 -Node: Q6.0.2227478 -Node: Q6.0.3228552 -Node: Q6.0.4228780 +Node: MS Windows226182 +Node: Q6.0.1227513 +Node: Q6.0.2228260 +Node: Q6.0.3228725 +Node: Q6.0.4229005 +Node: Q6.1.1231286 +Node: Q6.1.2232157 +Node: Q6.1.3232438 +Node: Q6.1.4232720 +Node: Q6.1.5233098 +Node: Q6.1.6233930 +Node: Q6.2.1234514 +Node: Q6.2.2235415 +Node: Q6.2.3235816 +Node: Q6.3.1236105 +Node: Q6.3.2237199 +Node: Q6.3.3240380 +Node: Current Events240634 +Node: Q7.0.1241288 +Node: Q7.0.2241927 +Node: Q7.0.3243001 +Node: Q7.0.4243229  End Tag Table diff --git a/info/xemacs-faq.info-1 b/info/xemacs-faq.info-1 index 4b06ab8..80b96e3 100644 --- a/info/xemacs-faq.info-1 +++ b/info/xemacs-faq.info-1 @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -39,10 +39,11 @@ archives. * Customization:: Customization and Options. * Subsystems:: Major Subsystems. * Miscellaneous:: The Miscellaneous Stuff. +* MS Windows:: XEmacs on Microsoft Windows. * Current Events:: What the Future Holds. - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- Introduction, Policy, Credits @@ -120,7 +121,7 @@ Trouble Shooting: * 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 `create_process' failure -* Q2.1.14:: `C-g' doesn't work for me. Is it broken? +* Q2.1.14:: 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 `strcat' on HP/UX 10. * Q2.1.17:: `Marker does not point anywhere'. @@ -176,9 +177,9 @@ 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 `Delete'? +* Q3.5.4:: Globally binding Delete? * Q3.5.5:: Scrolling one line at a time. -* Q3.5.6:: How to map `Help' key alone on Sun type4 keyboard? +* Q3.5.6:: How to map Help key alone on Sun type4 keyboard? * Q3.5.7:: How can you type in special characters in XEmacs? * Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain? * Q3.5.9:: How do I make the Delete key delete forward? @@ -198,7 +199,7 @@ The Mouse and Highlighting: * 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 `M-w' take so long? +* Q3.7.8:: Why does M-w take so long? The Menubar and Toolbar: * Q3.8.1:: How do I get rid of the menu (or menubar)? @@ -217,7 +218,7 @@ 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 `C-x C-p' (mark-page)? +* Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)? * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling. Major Subsystems @@ -255,6 +256,7 @@ Other Mail & News: 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? @@ -316,7 +318,7 @@ Miscellaneous: * Q5.3.1:: How do you make XEmacs indent CL if-clauses correctly? * Q5.3.2:: Fontifying hangs when editing a postscript file. * Q5.3.3:: How can I print WYSIWYG a font-locked buffer? -* Q5.3.4:: Getting `M-x lpr' to work with postscript printer. +* Q5.3.4:: Getting 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? @@ -326,12 +328,38 @@ Miscellaneous: * Q5.3.11:: How do I add new Info directories? * Q5.3.12:: What do I need to change to make printing work? -What the Future Holds +XEmacs on MS Windows -* Q6.0.1:: What is new in 20.2? -* Q6.0.2:: What is new in 20.3? -* Q6.0.3:: What is new in 20.4? -* Q6.0.4:: Procedural changes in XEmacs development. +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? +* Q6.0.3:: Are binary kits available? +* Q6.0.4:: Does XEmacs on MS Windows require an X server to run? + +Building XEmacs on MS Windows: +* Q6.1.1:: I decided to run with X. Where do I get an X server? +* Q6.1.2:: What compiler do I need to compile XEmacs? +* Q6.1.3:: How do I compile for the native port? +* Q6.1.4:: How do I compile for the X port? +* Q6.1.5:: How do I compile for Cygnus' Cygwin? +* Q6.1.6:: What do I need for Cygwin? + +Customization and User Interface: +* Q6.2.1:: How will 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 `.emacs' file? + +Miscellaneous: +* Q6.3.1:: Will XEmacs rename all the win32-* symbols to w32-*? +* Q6.3.2:: What are the differences between the various MS Windows emacsen? +* Q6.3.3:: What is the porting team doing at the moment? + +Current Events: + +* Q7.0.1:: What is new in 20.2? +* Q7.0.2:: What is new in 20.3? +* Q7.0.3:: What is new in 20.4? +* Q7.0.4:: Procedural changes in XEmacs development.  File: xemacs-faq.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top @@ -346,24 +374,25 @@ 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 Anthony Rossini , who started it, after getting tired of hearing JWZ complain -about repeatedly having to answer questions. Ben Wing -and 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 Anthony Rossini +, who started it, after getting tired of hearing +JWZ complain about repeatedly having to answer questions. Ben Wing + and 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 version was converted to hypertext format, and edited by -Steven L. Baur . It was converted back to -texinfo by Hrvoje Niksic . +Steven L. Baur . It was converted back to texinfo by +Hrvoje Niksic . The FAQ was then maintained by Andreas Kaempf , -who passed it on to Christian Nybo/ , the current FAQ +who passed it on to Christian Nyb/o , the current FAQ maintainer. If you notice any errors or items which should be added or amended to -this FAQ please send email to Christian Nybo/ . Include +this FAQ please send email to Christian Nyb/o . Include `XEmacs FAQ' on the Subject: line. * Menu: @@ -434,6 +463,8 @@ File: xemacs-faq.info, Node: Q1.0.2, Next: Q1.0.3, Prev: Q1.0.1, Up: Introdu Q1.0.2: What is the current version of XEmacs? ---------------------------------------------- + XEmacs 21.1.8 is the current stable version of XEmacs. + XEmacs 20.4 is a minor upgrade from 20.3, containing many bugfixes. It was released in February 1998. @@ -446,7 +477,7 @@ File: xemacs-faq.info, Node: Q1.0.3, Next: Q1.0.4, Prev: Q1.0.2, Up: Introdu Q1.0.3: Where can I find it? ---------------------------- - The canonical source and binaries is found via anonymous FTP at: + The canonical source and binaries can be found via anonymous FTP at: `ftp://ftp.xemacs.org/pub/xemacs/' @@ -458,7 +489,7 @@ Q1.0.4: Why Another Version of Emacs? For a detailed description of the differences between GNU Emacs and XEmacs and a detailed history of XEmacs, check out the - NEWS file (http://www.xemacs.org/NEWS.html) + NEWS file (http://www.xemacs.org/About/XEmacsVsGNUemacs.html) However, here is a list of some of the reasons why we think you might consider using it: @@ -526,28 +557,22 @@ Q1.0.6: Where can I get help? ----------------------------- Probably the easiest way, if everything is installed, is to use -info, by pressing `C-h i', or selecting `Manuals->Info' from the Help -Menu. - - Also, `M-x apropos' will look for commands for you. +Info, by pressing `C-h i', or selecting `Manuals->Info' from the Help +Menu. `M-x apropos' can be used to look for particular commands. - Try reading this FAQ, examining the regular GNU Emacs FAQ (which can -be found with the Emacs 19 distribution) as well as at -`http://www.eecs.nwu.edu/emacs/faq/' and reading the Usenet group -comp.emacs.xemacs. + For items not found in the manual, try reading this FAQ and reading +the Usenet group comp.emacs.xemacs. - If that does not help, try posting your question to -comp.emacs.xemacs. Please *do not* post XEmacs related questions to + If you choose to post to a newsgroup, *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 which is available. It can be subscribed to by sending a -message with a subject of `subscribe' to -for subscription information and to send messages -to the list. - - To cancel a subscription, you *must* use the xemacs-request address. -Send a message with a subject of `unsubscribe' to be removed. +message to with `subscribe' in the body of +the message. Send to the list at . list. To +cancel a subscription, you *must* use the xemacs-request address. Send +a message with a subject of `unsubscribe' to be removed.  File: xemacs-faq.info, Node: Q1.0.7, Next: Q1.0.8, Prev: Q1.0.6, Up: Introduction @@ -555,11 +580,7 @@ File: xemacs-faq.info, Node: Q1.0.7, Next: Q1.0.8, Prev: Q1.0.6, Up: Introdu Q1.0.7: Where is the mailing list archived? ------------------------------------------- - The mailing list was archived in the directory - `ftp://ftp.xemacs.org/pub/mlists/'. - - However, this archive is out of date. The current mailing list -server supports an `archive' feature, which may be utilized. + The archives can be found at `http://www.xemacs.org/Lists/Archive'  File: xemacs-faq.info, Node: Q1.0.8, Next: Q1.0.9, Prev: Q1.0.7, Up: Introduction @@ -567,7 +588,7 @@ File: xemacs-faq.info, Node: Q1.0.8, Next: Q1.0.9, Prev: Q1.0.7, Up: Introdu Q1.0.8: How do you pronounce XEmacs? ------------------------------------ - I pronounce it `Eks eemax'. + The most common pronounciation is `Eks eemax'.  File: xemacs-faq.info, Node: Q1.0.9, Next: Q1.0.10, Prev: Q1.0.8, Up: Introduction @@ -584,30 +605,7 @@ File: xemacs-faq.info, Node: Q1.0.10, Next: Q1.0.11, Prev: Q1.0.9, Up: Intro Q1.0.10: Is there a port of XEmacs to Microsoft ('95 or NT)? ------------------------------------------------------------ - Thanks to efforts of many people, coordinated by David Hobley and Marc Paquette , beta versions of -XEmacs now run on 32-bit Windows platforms (NT and 95). The current -betas require having an X server to run XEmacs; however, a native NT/95 -port is in alpha, thanks to Jonathan Harris . - - Although some features are still unimplemented, XEmacs 21.0 will -support MS-Windows. - - The NT development is now coordinated by a mailing list at -. - - If you are willing to contribute or want to follow the progress, -mail to to subscribe. - - Furthermore, Altrasoft is seeking corporate and government sponsors -to help fund a fully native port of XEmacs to Windows 95 and NT using -full-time, senior-level staff working under a professionally managed -project structure. See the Altrasoft web site (http://www.altrasoft.com/) for more details or contact Altrasoft directly at 1-888-ALTSOFT. - - The closest existing port is "Win-Emacs", which is based on Lucid -Emacs 19.6. Available from `http://www.pearlsoft.com/'. - - There's a port of GNU Emacs (not XEmacs) at - `http://www.cs.washington.edu/homes/voelker/ntemacs.html'. + Yes, *Note MS Windows::.  File: xemacs-faq.info, Node: Q1.0.11, Next: Q1.0.12, Prev: Q1.0.10, Up: Introduction @@ -619,8 +617,8 @@ Q1.0.11: Is there a port of XEmacs to the Macintosh? but no patches have been submitted to the maintainers to get this in the mainstream distribution. - For the MacOS, there is a port of -Emacs 18.59 (ftp://ftp.cs.cornell.edu/pub/parmet/). + For the MacOS, there is a port of Emacs 18.59 +(ftp://ftp.cs.cornell.edu/pub/parmet/).  File: xemacs-faq.info, Node: Q1.0.12, Next: Q1.0.13, Prev: Q1.0.11, Up: Introduction @@ -646,13 +644,11 @@ File: xemacs-faq.info, Node: Q1.0.14, Next: Q1.1.1, Prev: Q1.0.13, Up: Intro Q1.0.14: Where can I obtain a printed copy of the XEmacs users manual? ---------------------------------------------------------------------- - Altrasoft Associates, a firm specializing in Emacs-related support -and development, will be maintaining the XEmacs user manual. The firm -plans to begin publishing printed copies of the manual soon. + Pre-printed manuals are not available. If you are familiar with +TeX, you can generate your own manual from the XEmacs sources. - Web: `http://www.xemacs.com' - E-mail: - Tel: +1 408 243 3300 + HTML and Postscript versions of XEmacs manuals may be available from +the XEmacs web site in the future.  File: xemacs-faq.info, Node: Q1.1.1, Next: Q1.1.2, Prev: Q1.0.14, Up: Introduction @@ -664,18 +660,12 @@ Q1.1.1: What is the FAQ editorial policy? ----------------------------------------- The FAQ is actively maintained and modified regularly. All links -should be up to date. - - Changes are displayed on a monthly basis. "Months", for this -purpose are defined as the 5th of the month through the 5th of the -month. Preexisting questions that have been changed are marked as such. -Brand new questions are tagged. - - All submissions are welcome. E-mail submissions to Christian Nybo/ . +should be up to date. All submissions are welcome. E-mail submissions +to XEmacs FAQ maintainers . Please make sure that `XEmacs FAQ' appears on the Subject: line. If you think you have a better way of answering a question, or think a -question should be included, I'd like to hear about it. Questions and +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 one @@ -689,8 +679,8 @@ File: xemacs-faq.info, Node: Q1.1.2, Next: Q1.1.3, Prev: Q1.1.1, Up: Introdu Q1.1.2: How do I become a Beta Tester? -------------------------------------- - Send an email message to with a -subject line of `subscribe'. + Send an email message to with the +line `subscribe' in the body of the message. Be prepared to get your hands dirty, as beta testers are expected to identify problems as best they can. @@ -701,7 +691,7 @@ File: xemacs-faq.info, Node: Q1.1.3, Next: Q1.2.1, Prev: Q1.1.2, Up: Introdu Q1.1.3: How do I contribute to XEmacs itself? --------------------------------------------- - Ben Wing writes: + Ben Wing writes: 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 @@ -738,9 +728,10 @@ developers responsible for the 19.16/20.x releases are: * Martin Buchholz - * Steve Baur + * Steve Baur + + * Hrvoje Niksic - * Hrvoje Niksic The developers responsible for the 19.14 release are: @@ -749,9 +740,10 @@ developers responsible for the 19.16/20.x releases are: Chuck was Mr. XEmacs from 19.11 through 19.14, and is responsible for XEmacs becoming a widely distributed program over the Internet. - * Ben Wing + * Ben Wing + - * Jamie Zawinski + * Jamie Zawinski Jamie Zawinski was Mr. Lucid Emacs from 19.0 through 19.10, the last release actually named Lucid Emacs. Richard Mlynarik was @@ -773,10 +765,11 @@ this version of the FAQ (listed in alphabetical order): * SL Baur - * Hrvoje Niksic + * Hrvoje Niksic * Aki Vehtari +  File: xemacs-faq.info, Node: Q1.2.3, Next: Q1.3.1, Prev: Q1.2.2, Up: Introduction @@ -834,7 +827,7 @@ in February 1998. When compiled without MULE support, 20.4 is approximately as stable as 19.16, and probably faster (due to additional optimization work.) - As of XEmacs 20.3, version 20 is *the* supported version of XEmacs. + As of XEmacs 20.3, version 20 is _the_ supported version of XEmacs. This means that 19.16 will optionally receive stability fixes (if any), but that all the real development work will be done on the v20 tree. @@ -879,7 +872,7 @@ for your convenience. characters. If XEmacs was not compiled with MULE support, the range of this integer will always be 0 to 255 - eight bits, or one byte. (Integers outside this range are accepted but silently - truncated; however, you should most decidedly *not* rely on this, + truncated; however, you should most decidedly _not_ rely on this, because it will not work under XEmacs with MULE support.) When MULE support is present, the range of character codes is much larger. (Currently, 19 bits are used.) @@ -892,7 +885,7 @@ for your convenience. XEmacs. Individual characters are not often used in programs. It is far - more common to work with *strings*, which are sequences composed of + more common to work with _strings_, which are sequences composed of characters.  @@ -901,15 +894,12 @@ File: xemacs-faq.info, Node: Q1.3.2, Next: Q1.3.3, Prev: Q1.3.1, Up: Introdu Q1.3.2: What is the status of Asian-language support, aka MULE? --------------------------------------------------------------- - The MULE support works OK but still needs a fair amount of work -before it's really solid. We could definitely use some help here, esp. -people who speak Japanese and will use XEmacs/MULE to work with -Japanese and have some experience with E-Lisp. + MULE support is now available for UNIX versions of XEmacs. - As the fundings on Mule have stopped, the Mule part of XEmacs is -currently looking for a full-time maintainer. If you can provide help -here, or are willing to fund the work, please mail to -. + If you would like to help, you may want to join the + 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. *Note Q1.1.2::. @@ -919,7 +909,7 @@ File: xemacs-faq.info, Node: Q1.3.3, Next: Q1.3.4, Prev: Q1.3.2, Up: Introdu Q1.3.3: How do I type non-ASCII characters? ------------------------------------------- - See question 3.5.7 (*note Q3.5.7::.) in part 3 of this FAQ. + See question 3.5.7 (*note Q3.5.7::) in part 3 of this FAQ.  File: xemacs-faq.info, Node: Q1.3.4, Next: Q1.3.5, Prev: Q1.3.3, Up: Introduction @@ -928,8 +918,8 @@ Q1.3.4: Can XEmacs messages come out in a different language? ------------------------------------------------------------- The message-catalog support has mostly been written but doesn't -currently work. The first release of XEmacs 20 will *not* support it. -However, menubar localization *does* work, even in 19.14. To enable +currently work. The first release of XEmacs 20 will _not_ support it. +However, menubar localization _does_ work, even in 19.14. To enable it, add to your `Emacs' file entries like this: Emacs*XlwMenu.resourceLabels: True @@ -1075,9 +1065,9 @@ directory called `sample.emacs'. Copy this file from there to your home directory and rename it `.emacs'. Then edit it to suit. Starting with 19.14, you may bring the `sample.emacs' into an XEmacs -buffer by selecting `Help->Samples->Sample .emacs' from the menubar. -To determine the location of the `etc' directory type the command `C-h -v data-directory '. +buffer by selecting `Help->Sample .emacs' from the menubar. To +determine the location of the `etc' directory type the command `C-h v +data-directory '.  File: xemacs-faq.info, Node: Q1.4.2, Next: Q1.4.3, Prev: Q1.4.1, Up: Introduction @@ -1099,13 +1089,6 @@ Q1.4.3: Any good tutorials around? available in a non-english language, type `C-u C-h t TAB', type the first letters of your preferred language, then type . - There's an Emacs Lisp tutorial at - - `ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz'. - - Erik Sundermann has made a tutorial web page -at `http://petaxp.rug.ac.be/~erik/xemacs/'. -  File: xemacs-faq.info, Node: Q1.4.4, Next: Q1.4.5, Prev: Q1.4.3, Up: Introduction diff --git a/info/xemacs-faq.info-2 b/info/xemacs-faq.info-2 index 5f5d1e5..f540c5c 100644 --- a/info/xemacs-faq.info-2 +++ b/info/xemacs-faq.info-2 @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -47,7 +47,7 @@ Trouble Shooting: * 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 `create_process' failure -* Q2.1.14:: `C-g' doesn't work for me. Is it broken? +* Q2.1.14:: 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 `strcat' on HP/UX 10. * Q2.1.17:: `Marker does not point anywhere'. @@ -93,7 +93,7 @@ Q2.0.2: XEmacs is too big Although this entry has been written for XEmacs 19.13, most of it still stands true. - Steve Baur writes: + Steve Baur writes: The 45MB of space required by the installation directories can be reduced dramatically if desired. Gzip all the .el files. Remove @@ -180,15 +180,15 @@ still stands true. These are all Emacs Lisp source code and bytecompiled object code. You may safely gzip everything named *.el here. You may remove - any package you don't use. *Nothing bad will happen if you delete - a package that you do not use*. You must be sure you do not use + any package you don't use. _Nothing bad will happen if you delete + a package that you do not use_. You must be sure you do not use it though, so be conservative at first. Possible candidates for deletion include w3 (newer versions exist, or you may just use Lynx or Netscape for web browsing), games, hyperbole, mh-e, hm-html-menus (better packages exist), vm, viper, - oobr, gnus (new versions exist), etc. Ask yourself, *Do I ever - want to use this package?* If the answer is no, then it is a + oobr, gnus (new versions exist), etc. Ask yourself, _Do I ever + want to use this package?_ If the answer is no, then it is a candidate for removal. First, gzip all the .el files. Then go about package by package @@ -295,7 +295,7 @@ libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device: Initialization error: Terminal type `xterm' undefined (or can't access database?) - Ben Wing writes: + Ben Wing writes: Your ncurses configuration is messed up. Your /usr/lib/terminfo is a bad pointer, perhaps to a CD-ROM that is not inserted. @@ -351,14 +351,14 @@ ELF libraries are out of date. You have the following options: 3. Rebuild XEmacs yourself - any working ELF version of libc should be O.K. - Hrvoje Niksic writes: + Hrvoje Niksic writes: Why not use a Perl one-liner for No. 2? perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \ /usr/local/bin/xemacs-19.14 - NB: You *must* patch `/usr/local/bin/xemacs-19.14', and not + NB: You _must_ patch `/usr/local/bin/xemacs-19.14', and not `xemacs' because `xemacs' is a link to `xemacs-19.14'; the Perl `-i' option will cause unwanted side-effects if applied to a symbolic link. @@ -409,8 +409,8 @@ PNG Compface `ftp://ftp.cs.indiana.edu/pub/faces/compface/'. This library has been frozen for about 6 years, and is distributed without version - numbers. *It should be compiled with the same options that X11 was - compiled with on your system*. The version of this library at + numbers. _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 `xbm2xface.pl' script, written by , which may be useful when generating your own xface. @@ -889,7 +889,7 @@ File: xemacs-faq.info, Node: Q2.1.14, Next: Q2.1.15, Prev: Q2.1.13, Up: Inst Q2.1.14: `C-g' doesn't work for me. Is it broken? -------------------------------------------------- - Ben Wing writes: + Ben Wing writes: `C-g' does work for most people in most circumstances. If it doesn't, there are only two explanations: @@ -905,7 +905,7 @@ Q2.1.14: `C-g' doesn't work for me. Is it broken? Morten Welinder writes: - On some (but *not* all) machines a hung XEmacs can be revived by + On some (but _not_ all) machines a hung XEmacs can be revived by `kill -FPE '. 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 @@ -1033,14 +1033,15 @@ debugger. Here are some hints: `gdbinit' files provided in the `src' directory. Use the one corresponding to the configure options used when building XEmacs. +  File: xemacs-faq.info, Node: Q2.1.16, Next: Q2.1.17, Prev: Q2.1.15, Up: Installation Q2.1.16: XEmacs crashes in `strcat' on HP/UX 10 ----------------------------------------------- - >From the problems database (through -`http://support.mayfield.hp.com/'): + From the problems database (through the former address +http://support.mayfield.hp.com/): Problem Report: 5003302299 Status: Open @@ -1100,12 +1101,12 @@ Q2.1.18: 19.14 hangs on HP/UX 10.10. Apparently somebody has found the reason why there is this `poll: interrupted...' message for each event. For some reason, libcurses reimplements a `select()' system call, in a highly broken fashion. - The fix is to add a -lc to the link line *before* the -lxcurses. + The fix is to add a -lc to the link line _before_ the -lxcurses. XEmacs will then use the right version of `select()'. Alain Fauconnet writes: - The *real* solution is to *not* link -lcurses in! I just changed + The _real_ solution is to _not_ link -lcurses in! I just changed -lcurses to -ltermcap in the Makefile and it fixed: 1. The `poll: interrupted system call' message. @@ -1113,7 +1114,7 @@ Q2.1.18: 19.14 hangs on HP/UX 10.10. 2. A more serious problem I had discovered in the meantime, that is the fact that subprocess handling was seriously broken: subprocesses e.g. started by AUC TeX for TeX compilation of a - buffer would *hang*. Actually they would wait forever for + buffer would _hang_. Actually they would wait forever for emacs to read the socket which connects stdout...  diff --git a/info/xemacs-faq.info-3 b/info/xemacs-faq.info-3 index 36d1e07..0c24c82 100644 --- a/info/xemacs-faq.info-3 +++ b/info/xemacs-faq.info-3 @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -17,7 +17,7 @@ section is devoted to Customization and screen settings. * Menu: -Customization--Emacs Lisp and `.emacs': +Customization---Emacs Lisp and `.emacs': * Q3.0.1:: What version of Emacs am I running? * Q3.0.2:: How do I evaluate Elisp expressions? * Q3.0.3:: `(setq tab-width 6)' behaves oddly. @@ -61,9 +61,9 @@ The Modeline: * 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 `Delete'? +* Q3.5.4:: Globally binding Delete? * Q3.5.5:: Scrolling one line at a time. -* Q3.5.6:: How to map `Help' key alone on Sun type4 keyboard? +* Q3.5.6:: How to map Help key alone on Sun type4 keyboard? * Q3.5.7:: How can you type in special characters in XEmacs? * Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain? * Q3.5.9:: How do I make the Delete key delete forward? @@ -83,7 +83,7 @@ The Mouse and Highlighting: * 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 `M-w' take so long? +* Q3.7.8:: Why does M-w take so long? The Menubar and Toolbar: * Q3.8.1:: How do I get rid of the menu (or menubar)? @@ -102,7 +102,7 @@ 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 `C-x C-p' (mark-page)? +* Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)? * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.  @@ -228,7 +228,7 @@ Q3.0.7: Font selections in don't get saved after `Save Options'. You have to go to Options->Frame Appearance and unselect `Frame-Local Font Menu'. If this option is selected, font changes - are only applied to the *current* frame and do *not* get saved + are only applied to the _current_ frame and do _not_ get saved when you save options. For XEmacs 19.15 and later: @@ -437,7 +437,7 @@ Q3.1.8: `-iconic' doesn't work. `-unmapped' on the command line, and setting the `initiallyUnmapped' X Resource don't seem to help much either... - Ben Wing writes: + Ben Wing writes: Ugh, this stuff is such an incredible mess that I've about given up getting it to work. The principal problem is numerous @@ -763,7 +763,7 @@ bound to keys. 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 (*note Q3.5.3::.). +question 3.5.3 (*note Q3.5.3::).  File: xemacs-faq.info, Node: Q3.5.2, Next: Q3.5.3, Prev: Q3.5.1, Up: Customization @@ -799,7 +799,7 @@ and Wayne Newberry ) to `.emacs': 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. -(*note Q3.5.1::. for a better answer). +(*note Q3.5.1:: for a better answer).  File: xemacs-faq.info, Node: Q3.5.4, Next: Q3.5.5, Prev: Q3.5.3, Up: Customization @@ -876,8 +876,8 @@ Q3.5.6: How to map `Help' key alone on Sun type4 keyboard? (global-set-key [(shift help)] 'help-command);; Help But it doesn't work alone. This is in the file `PROBLEMS' which -should have come with your XEmacs installation: *Emacs ignores the -`help' key when running OLWM*. +should have come with your XEmacs installation: _Emacs ignores the +`help' key when running OLWM_. OLWM grabs the `help' key, and retransmits it to the appropriate client using `XSendEvent'. Allowing Emacs to react to synthetic events @@ -987,7 +987,7 @@ 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. - Ben Wing writes: + Ben Wing writes: 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" diff --git a/info/xemacs-faq.info-4 b/info/xemacs-faq.info-4 index ddfcd27..01b60d1 100644 --- a/info/xemacs-faq.info-4 +++ b/info/xemacs-faq.info-4 @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -160,6 +160,7 @@ Other Mail & News: 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? @@ -243,7 +244,7 @@ Q4.0.6: I have various addresses at which I receive mail. How can I tell VM to (setq vm-reply-ignored-addresses '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com" - "wing@netcom.com" "wing@666.com")) + "wing@netcom.com" "wing@xemacs.org")) Note that each string is a regular expression. @@ -385,7 +386,7 @@ Q4.0.12: Customization of VM not covered in the manual, or here. directory of the lisp library. `vm-vars.el' contains, initializes and carefully describes, with - examples of usage, the plethora of user options that *fully* + examples of usage, the plethora of user options that _fully_ control VM's behavior. Enter vm-vars, `forward-search' for toolbar, find the variables @@ -440,7 +441,7 @@ Q4.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 *must* enter the muddy waters of Gnus, visit the +them. If you feel you _must_ enter the muddy waters of Gnus, visit the excellent FAQ, maintained by Justin Sheehy, at: `http://www.ccs.neu.edu/software/contrib/gnus/' @@ -543,14 +544,6 @@ KOBAYASHI Shuhei . * MIME extenders for mh-e, GNUS, RMAIL and VM. tm is available from following anonymous ftp sites: - * `ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/' (Japan). - - * `ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/' (Japan). - - * `ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/' (US). - - * `ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/' (US). - * `ftp://ftp.unicamp.br/pub/mail/mime/tm/' (Brasil). * `ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/' @@ -569,7 +562,7 @@ File: xemacs-faq.info, Node: Q4.3.3, Next: Q4.3.4, Prev: Q4.3.2, Up: Subsyst Q4.3.3: Why isn't this `movemail' program working? -------------------------------------------------- - Ben Wing writes: + Ben Wing writes: It wasn't chown'ed/chmod'd correctly. @@ -579,12 +572,12 @@ File: xemacs-faq.info, Node: Q4.3.4, Next: Q4.3.5, Prev: Q4.3.3, Up: Subsyst Q4.3.4: Movemail is also distributed by Netscape? Can that cause problems? --------------------------------------------------------------------------- - Steve Baur writes: + Steve Baur writes: Yes. Always use the movemail installed with your XEmacs. Failure to do so can result in lost mail. - Please refer to Jamie Zawinski's notes at + Please refer to Jamie Zawinski's notes at `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 @@ -613,7 +606,7 @@ Q4.3.5: Where do I find pstogif (required by tm)? `ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/'.  -File: xemacs-faq.info, Node: Q4.4.1, Next: Q4.5.1, Prev: Q4.3.5, Up: Subsystems +File: xemacs-faq.info, Node: Q4.4.1, Next: Q4.4.2, Prev: Q4.3.5, Up: Subsystems 4.4: Sparcworks, EOS, and WorkShop ================================== @@ -650,17 +643,45 @@ time. 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 + `http://www.sun.com/software/Products/Developer-products'. + +File: xemacs-faq.info, Node: Q4.4.2, Next: Q4.5.1, Prev: Q4.4.1, Up: Subsystems +Q4.4.2: How do I start the Sun Workshop support in XEmacs 21? +------------------------------------------------------------- - - - - - `http://www.sun.com/software/Products/Developer-products/programs.html'. + 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): + + (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)) + + If you are not using the latest Workshop (5.0) you have to apply the +following patch: + +--- /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") + +-(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version) ++(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version) + (setq running-xemacs t) + (setq running-emacs t))  -File: xemacs-faq.info, Node: Q4.5.1, Next: Q4.6.1, Prev: Q4.4.1, Up: Subsystems +File: xemacs-faq.info, Node: Q4.5.1, Next: Q4.6.1, Prev: Q4.4.2, Up: Subsystems 4.5: Energize ============= @@ -939,14 +960,14 @@ Q4.7.5: Is there a MatLab mode? Can I "teach" emacs what words are MatLab commands, comments, etc. ? Ulrich Elsner writes: - One way to do this (and much more) is by using the - matlab mode - (ftp://ftp.mathworks.com/pub/contrib/v5/tools/matlab.el). + One way to do this (and much more) is by using the matlab mode. + (If someone knows where this can be found, please contact the + XEmacs FAQ maintainer . Instructions on how to install this mode are included in this file.  -File: xemacs-faq.info, Node: Miscellaneous, Next: Current Events, Prev: Subsystems, Up: Top +File: xemacs-faq.info, Node: Miscellaneous, Next: MS Windows, Prev: Subsystems, Up: Top 5 The Miscellaneous Stuff ************************* @@ -1002,7 +1023,7 @@ Miscellaneous: * Q5.3.1:: How do you make XEmacs indent CL if-clauses correctly? * Q5.3.2:: Fontifying hangs when editing a postscript file. * Q5.3.3:: How can I print WYSIWYG a font-locked buffer? -* Q5.3.4:: Getting `M-x lpr' to work with postscript printer. +* Q5.3.4:: Getting 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? @@ -1098,7 +1119,7 @@ standard with XEmacs. Put this into your `.emacs': You can customize filling and adaptive filling with Customize. Select from the `Options' menu -`Customize->Emacs->->Editing->Fill->Fill...' or type `M-x customize +`Customize->Emacs->->Editing->Fill->Fill...' or type `M-x customize fill '. Note that well-behaving text-lookalike modes will run @@ -1315,7 +1336,7 @@ Q5.0.15: Where do I get the latest CC Mode? Barry A. Warsaw writes: - This can be had from `http://www.python.org/ftp/emacs/'. + This can be had from `http://www.python.org/emacs/'.  File: xemacs-faq.info, Node: Q5.0.16, Next: Q5.0.17, Prev: Q5.0.15, Up: Miscellaneous @@ -1339,28 +1360,3 @@ Q5.0.17: How can I get two instances of info? You can't. The `info' package does not provide for multiple info buffers. - -File: xemacs-faq.info, Node: Q5.0.18, Next: Q5.0.19, Prev: Q5.0.17, Up: Miscellaneous - -Q5.0.18: I upgraded to XEmacs 19.14 and gnuserv stopped working. ----------------------------------------------------------------- - - Mark Daku writes: - - It turns out I was using an older version of gnuserv. The - installation didn't put the binary into the public bin directory. - It put it in `lib/xemacs-19.14/hppa1.1-hp-hpux9.05/gnuserv'. - Shouldn't it have been put in `bin/hppa1.1-hp-hpux9.0'? - - -File: xemacs-faq.info, Node: Q5.0.19, Next: Q5.0.20, Prev: Q5.0.18, Up: Miscellaneous - -Q5.0.19: Is there something better than LaTeX mode? ---------------------------------------------------- - - David Kastrup writes: - - The standard TeX modes leave much to be desired, and are somewhat - leniently maintained. Serious TeX users use AUC TeX (*note - Q4.7.1::.). - diff --git a/info/xemacs-faq.info-5 b/info/xemacs-faq.info-5 index f7ed4c3..a87a738 100644 --- a/info/xemacs-faq.info-5 +++ b/info/xemacs-faq.info-5 @@ -1,5 +1,5 @@ -This is Info file ../info/xemacs-faq.info, produced by Makeinfo version -1.68 from the input file xemacs-faq.texi. +This is ../info/xemacs-faq.info, produced by makeinfo version 3.12s +from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -7,6 +7,31 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY  +File: xemacs-faq.info, Node: Q5.0.18, Next: Q5.0.19, Prev: Q5.0.17, Up: Miscellaneous + +Q5.0.18: I upgraded to XEmacs 19.14 and gnuserv stopped working. +---------------------------------------------------------------- + + Mark Daku writes: + + It turns out I was using an older version of gnuserv. The + installation didn't put the binary into the public bin directory. + It put it in `lib/xemacs-19.14/hppa1.1-hp-hpux9.05/gnuserv'. + Shouldn't it have been put in `bin/hppa1.1-hp-hpux9.0'? + + +File: xemacs-faq.info, Node: Q5.0.19, Next: Q5.0.20, Prev: Q5.0.18, Up: Miscellaneous + +Q5.0.19: Is there something better than LaTeX mode? +--------------------------------------------------- + + David Kastrup writes: + + The standard TeX modes leave much to be desired, and are somewhat + leniently maintained. Serious TeX users use AUC TeX (*note + Q4.7.1::). + + File: xemacs-faq.info, Node: Q5.0.20, Next: Q5.1.1, Prev: Q5.0.19, Up: Miscellaneous Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? @@ -306,7 +331,7 @@ performance: using the more readable `incf' and `push' forms in your compiled code. - *Interpreted* code, on the other hand, must expand these macros + _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 "Special Form" instead of "Function" in this @@ -391,7 +416,7 @@ Q5.1.11: My elisp program is horribly slow. Is there an easy way to find out where it spends time? - zHrvoje Niksic writes: + zHrvoje Niksic writes: Under XEmacs 20.4 and later you can use `M-x profile-key-sequence', press a key (say in the Gnus Group buffer), and get the results using `M-x profile-results'. It @@ -717,8 +742,7 @@ method, one should NOT quote the face string using the sed script . It might also be helpful to use Stig's script (included in the compface distribution at XEmacs.org) to do the -conversion. For convenience xbm2xface is available for anonymous FTP at -`ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl'. +conversion. Contributors for this item: @@ -745,10 +769,10 @@ Q5.3.11: How do I add new Info directories? 1. Emacs Info scans `Info-directory-list' from right-to-left while XEmacs Info reads it from left-to-right, so append to - the *correct* end of the list. + the _correct_ end of the list. 2. Use `Info-default-directory-list' to initialize - `Info-directory-list' *if* it is available at startup, but not + `Info-directory-list' _if_ it is available at startup, but not all Emacsen define it. 3. Emacs Info looks for a standard `dir' file in each of the @@ -805,12 +829,386 @@ printing (the `Pretty Print Buffer' menu item) *requires* a window system environment. It cannot be used outside of X11.  -File: xemacs-faq.info, Node: Current Events, Prev: Miscellaneous, Up: Top +File: xemacs-faq.info, Node: MS Windows, Next: Current Events, Prev: Miscellaneous, Up: Top + +6 XEmacs on MS Windows +********************** + + 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. + +* 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? +* Q6.0.3:: Where are the XEmacs on MS Windows binaries? +* Q6.0.4:: Does XEmacs on MS Windows require an X server to run? + +Building XEmacs on MS Windows +* Q6.1.1:: I decided to run with X. Where do I get an X server? +* Q6.1.2:: What compiler do I need to compile XEmacs? +* Q6.1.3:: How do I compile for the native port? +* Q6.1.4:: How do I compile for the X port? +* Q6.1.5:: How do I compile for Cygnus' Cygwin? +* Q6.1.6:: What do I need for Cygwin? + +Customization and User Interface +* Q6.2.1:: How will 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 `.emacs' file? + +Miscellaneous +* Q6.3.1:: Will XEmacs rename all the win32-* symbols to w32-*? +* Q6.3.2:: What are the differences between the various MS Windows emacsen? +* Q6.3.3:: What is the porting team doing at the moment? + + +File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: MS Windows, Up: MS Windows + +6.0: General Info +================= + +Q6.0.1: What is the status of the XEmacs port to Windows? +--------------------------------------------------------- + + Is XEmacs really getting ported to MS Windows? What is the status +of the port? + + Yes, a group of volunteers actively works on making XEmacs code base +cleanly compile and run on MS Windows operating systems. The mailing +list at is dedicated to that effort (please use +the -request address to subscribe). + + At this time, XEmacs on MS Windows is usable, but lacks some of the +features of XEmacs on UNIX and UNIX-like systems. Notably, +internationalization does not work. + + +File: xemacs-faq.info, Node: Q6.0.2, Next: Q6.0.3, Prev: Q6.0.1, Up: MS Windows + +Q6.0.2: What flavors of MS Windows are supported? The list name implies NT only. +--------------------------------------------------------------------------------- + + The list name is misleading, as XEmacs will support both Windows 95, +Windows 98 and Windows NT. The MS Windows-specific code is based on +Microsoft Win32 API, and will not work on MS Windows 3.x or on MS-DOS. + + +File: xemacs-faq.info, Node: Q6.0.3, Next: Q6.0.4, Prev: Q6.0.2, Up: MS Windows + +Q6.0.3: Are binary kits available? +---------------------------------- + + Binary kits are available at +`ftp://ftp.xemacs.org/pub/xemacs/binary-kits/win32/' for the "plain" MS +Windows version. + + +File: xemacs-faq.info, Node: Q6.0.4, Next: Q6.1.1, Prev: Q6.0.3, Up: MS Windows + +Q6.0.4: Does XEmacs on MS Windows require an X server to run? +------------------------------------------------------------- + + Short answer: No. + + Long answer: XEmacs can be built in several ways in the MS Windows +environment, some of them requiring an X server and some not. + + One is what we call the "X" port - it requires X libraries to build +and an X server to run. Internally it uses the Xt event loop and makes +use of X toolkits. Its look is quite un-Windowsy, but it works +reliably and supports all of the graphical features of Unix XEmacs. + + The other is what we call the "native" port. It uses the Win32 API +and does not require X libraries to build, nor does it require an X to +run. In fact, it has no connection with X whatsoever. At this time, +the native port obsoletes the X port, providing almost all of its +features, including support for menus, scrollbars, toolbars, embedded +images and background pixmaps, frame pointers, etc. Most of the future +work will be based on the native port. + + There is also a third special case, the Cygwin port. It takes +advantage of Cygnus emulation library under Win32, which enables it to +reuse much of the Unix XEmacs code base, such as processes and network +support, or internal select() mechanisms. + + Cygwin port supports all display types - TTY, X & MS gui, and can be +built with support for all three. If you build with ms gui support +then the Cygwin version uses the majority of the msw code, which is +mostly related to display. If you want to build with X support you +need X libraries. If you want to build with tty support you need +ncurses. MS gui requires no additional libraries. + + Some of the advantages of the Cygwin version are that it: + + * integrates well with Cygwin environment for existing Cygwin users; + + * uses configure so building with different features is very easy; + + * has process support in X & tty. + + + The disadvantage is that it requires several Unix utilities and 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). + + +File: xemacs-faq.info, Node: Q6.1.1, Next: Q6.1.2, Prev: Q6.0.4, Up: MS Windows + +6.1: Building XEmacs on MS Windows +================================== + +Q6.1.1: I decided to run with X. Where do I get an X server? +------------------------------------------------------------- + + Pointers to X servers can be found at +`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/'; + + look for "Where to get an X server". Also note that, although the +above page talks about Cygnus gnu-win32 (Cygwin), the information on X +servers is Cygwin-independent. You don't have to be running/using +Cygwin to use these X servers, and you don't have to compile XEmacs +under Cygwin to use XEmacs with these X servers. An "X port" XEmacs +compiled under Visual C++ will work with these X servers (as will +XEmacs running on a Unix box, redirected to the server running on your +PC). + + +File: xemacs-faq.info, Node: Q6.1.2, Next: Q6.1.3, Prev: Q6.1.1, Up: MS Windows + +Q6.1.2: What compiler do I need to compile XEmacs? +-------------------------------------------------- + + You need Visual C++ 4.2 or 5.0, with the exception of the Cygwin +port, which uses Gcc. + + +File: xemacs-faq.info, Node: Q6.1.3, Next: Q6.1.4, Prev: Q6.1.2, Up: MS Windows + +Q6.1.3: How do I compile for the native port? +--------------------------------------------- + + Please read the file `nt/README' in the XEmacs distribution, which +contains the full description. + + +File: xemacs-faq.info, Node: Q6.1.4, Next: Q6.1.5, Prev: Q6.1.3, Up: MS Windows + +Q6.1.4: How do I compile for the X port? +---------------------------------------- + + Again, it is described in `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, I don't know of it. + + +File: xemacs-faq.info, Node: Q6.1.5, Next: Q6.1.6, Prev: Q6.1.4, Up: MS Windows + +Q6.1.5: How do I compile for Cygnus' Cygwin? +-------------------------------------------- + + Similar as on Unix; use the usual `configure' and `make' process. +Some problems to watch out for: + + * make sure HOME is set. This controls where you `.emacs' file comes + from; + + * CYGWIN32 needs to be set to tty for process support work. e.g. + CYGWIN32=tty; + + * picking up some other grep or other unix like tools can kill + configure; + + * static heap too small, adjust src/sheap-adjust.h to a more positive + number; + + * The Cygwin version doesn't understand `//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. + + + +File: xemacs-faq.info, Node: Q6.1.6, Next: Q6.2.1, Prev: Q6.1.5, Up: MS Windows + +Q6.1.6: What do I need for Cygwin? +---------------------------------- + + You can find the Cygwin tools and compiler at: + + `http://sourceware.cygnus.com/cygwin/' + + You will need version b19 or later. + + You will also need the X libraries. There are libraries at +`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/', but these are +not b19 compatible. You can get b19 X11R6.3 binaries, as well as +pre-built ncurses and graphic libraries, from: + + `ftp://ftp.parallax.co.uk/pub/andyp/'. + + +File: xemacs-faq.info, Node: Q6.2.1, Next: Q6.2.2, Prev: Q6.1.6, Up: MS Windows + +6.2: Customization and User Interface +===================================== + +Q6.2.1: How will the port cope with differences in the Windows user interface? +------------------------------------------------------------------------------ + + XEmacs (and Emacs in general) UI is pretty different from what is +expected of a typical MS Windows program. How will the MS Windows port +cope with it? + + Fortunately, Emacs is also one of the most configurable editor beasts +in the world. The MS Windows "look and feel" (mark via shift-arrow, +self-inserting deletes region, etc.) can be easily configured via +various packages distributed with XEmacs. The `pending-delete' package +is an example of such a utility. + + In future versions, some of these packages might be turned on by +default in the MS Windows environment. + + +File: xemacs-faq.info, Node: Q6.2.2, Next: Q6.2.3, Prev: Q6.2.1, Up: MS Windows + +Q6.2.2: How do I change fonts in XEmacs on MS Windows? +------------------------------------------------------ + + You can change font manually, but not from the menubar, yet. For +example: + + (set-face-font 'default "Lucida Console:Regular:10") + (set-face-font 'modeline "MS Sans Serif:Regular:10") + + +File: xemacs-faq.info, Node: Q6.2.3, Next: Q6.3.1, Prev: Q6.2.2, Up: MS Windows + +Q6.2.3: Where do I put my `.emacs' file? +---------------------------------------- + + If the HOME environment variable is set, `.emacs' will be looked for +there. Else the directory defaults to `c:\'. + + +File: xemacs-faq.info, Node: Q6.3.1, Next: Q6.3.2, Prev: Q6.2.3, Up: MS Windows + +6.3: Miscellaneous +================== + +Q6.3.1: Will XEmacs rename all the win32-* symbols to w32-*? +------------------------------------------------------------ + + In his flavor of Emacs 20, Richard Stallman has renamed all the +win32-* symbols to w32-*. Will XEmacs do the same? + + We consider such a move counter-productive, thus we will not use the +`w32' prefix. However, we do recognize that Win32 name is little more +than a marketing buzzword (will it be Win64 in the next release?), so +we decided not to use it. Using `windows-' would be wrong because the +term is too generic, which is why we settled on a compromise +`mswindows' term. + + Thus all the XEmacs variables and functions directly related to Win32 +are prefixed `mswindows-'. The user-variables shared with NT Emacs +will be provided as compatibility aliases. + + Architectural note: We believe that there should be a very small +number of window-systems-specific variables, and will try to provide +generic interfaces whenever possible. + + +File: xemacs-faq.info, Node: Q6.3.2, Next: Q6.3.3, Prev: Q6.3.1, Up: MS Windows + +Q6.3.2: What are the differences between the various MS Windows emacsen? +------------------------------------------------------------------------ + + XEmacs, Win-Emacs, DOS Emacs, NT Emacs, this is all very confusing. +Could you briefly explain the differences between them? + + Here is a recount of various Emacs versions running on MS Windows: + + * Win-Emacs + + - Win-Emacs is a port of Lucid Emacs 19.6 to MS Windows using X + compatibility libraries. Win-Emacs has been written by Ben + Wing. The MS Windows code has not made it back to Lucid + Emacs, which left Win-Emacs pretty much dead for our + purposes. Win-Emacs used to be available at Pearlsoft, but + not anymore, since Pearlsoft went out of business. + + * GNU Emacs for DOS + + - 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 supports long file names, + lacks proper subprocesses support, and is far too big + compared to typical DOS editors. + + * GNU Emacs compiled with Win32 + + - 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 is very similar to GNU Emacs + compiled under MS DOS, only it supports longer file names, + etc. This "port" is similar to the "X" flavor of XEmacs on + MS Windows. + + * NT Emacs + + - NT Emacs is a version of GNU Emacs modified to compile and + run under MS MS Windows 95 and NT using the native Win32 API. + As such, it is close in spirit to the XEmacs "native" port. + + - NT Emacs has been written by Geoff Voelker, and more + information can be found at + `http://www.cs.washington.edu/homes/voelker/ntemacs.html'. + + + * XEmacs + + - Beginning with XEmacs 19.12, XEmacs' architecture has been + 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" XEmacs + supported. The 19.12 design is the basis for the current + native MS Windows code. + + - 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. + + - 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), + Jeff Sparkes (contributed scrollbars support) and many others. + + + + +File: xemacs-faq.info, Node: Q6.3.3, Prev: Q6.3.2, Up: MS Windows + +Q6.3.3: What is the porting team doing at the moment? +----------------------------------------------------- + + The porting team is continuing work on the MS Windows-specific code. + + +File: xemacs-faq.info, Node: Current Events, Prev: MS Windows, Up: Top -6 What the Future Holds +7 What the Future Holds *********************** - This is part 6 of the XEmacs Frequently Asked Questions list. This + This is part 7 of the XEmacs Frequently Asked Questions list. This section will change monthly, and contains any interesting items that have transpired over the previous month. If you are reading this from the XEmacs distribution, please see the version on the Web or archived @@ -818,18 +1216,18 @@ at the various FAQ FTP sites, as this file is surely out of date. * Menu: -* Q6.0.1:: What is new in 20.2? -* Q6.0.2:: What is new in 20.3? -* Q6.0.3:: What is new in 20.4? -* Q6.0.4:: Procedural changes in XEmacs development. +* Q7.0.1:: What is new in 20.2? +* Q7.0.2:: What is new in 20.3? +* Q7.0.3:: What is new in 20.4? +* Q7.0.4:: Procedural changes in XEmacs development.  -File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: Current Events, Up: Current Events +File: xemacs-faq.info, Node: Q7.0.1, Next: Q7.0.2, Prev: Current Events, Up: Current Events -6.0: Changes +7.0: Changes ============ -Q6.0.1: What is new in 20.2? +Q7.0.1: What is new in 20.2? ---------------------------- The biggest changes in 20.2 include integration of EFS (the next @@ -842,9 +1240,9 @@ new system for customizing XEmacs options, invoked via `M-x customize'. longer considered unstable.  -File: xemacs-faq.info, Node: Q6.0.2, Next: Q6.0.3, Prev: Q6.0.1, Up: Current Events +File: xemacs-faq.info, Node: Q7.0.2, Next: Q7.0.3, Prev: Q7.0.1, Up: Current Events -Q6.0.2: What is new in 20.3? +Q7.0.2: What is new in 20.3? ---------------------------- XEmacs 20.3 was released in November 1997. It contains many bugfixes, @@ -865,17 +1263,17 @@ the default) is definitely faster than XEmacs 19.16. for all further development.  -File: xemacs-faq.info, Node: Q6.0.3, Next: Q6.0.4, Prev: Q6.0.2, Up: Current Events +File: xemacs-faq.info, Node: Q7.0.3, Next: Q7.0.4, Prev: Q7.0.2, Up: Current Events -Q6.0.3: What's new in XEmacs 20.4? +Q7.0.3: What's new in XEmacs 20.4? ---------------------------------- XEmacs 20.4 is a bugfix release with no user-visible changes.  -File: xemacs-faq.info, Node: Q6.0.4, Prev: Q6.0.3, Up: Current Events +File: xemacs-faq.info, Node: Q7.0.4, Prev: Q7.0.3, Up: Current Events -Q6.0.4: Procedural changes in XEmacs development. +Q7.0.4: Procedural changes in XEmacs development. ------------------------------------------------- 1. Discussion about the development of XEmacs occurs on the @@ -897,7 +1295,7 @@ Q6.0.4: Procedural changes in XEmacs development. XEmacs 19.16 was the last 19 release, basically consisting of 19.15 plus the collected bugfixes. - 3. As of December 1996, Steve Baur has - become the lead maintainer of XEmacs. + 3. As of December 1996, Steve Baur has become the + lead maintainer of XEmacs. diff --git a/info/xemacs.info b/info/xemacs.info index bb32bf7..17d169c 100644 --- a/info/xemacs.info +++ b/info/xemacs.info @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -31,367 +31,368 @@ translation approved by the author instead of in the original English.  Indirect: -xemacs.info-1: 1372 -xemacs.info-2: 47958 -xemacs.info-3: 95918 -xemacs.info-4: 144030 -xemacs.info-5: 192248 -xemacs.info-6: 241615 -xemacs.info-7: 290442 -xemacs.info-8: 339995 -xemacs.info-9: 385290 -xemacs.info-10: 433122 -xemacs.info-11: 482303 -xemacs.info-12: 528200 -xemacs.info-13: 577026 -xemacs.info-14: 625173 -xemacs.info-15: 673936 -xemacs.info-16: 723464 -xemacs.info-17: 772031 -xemacs.info-18: 815954 -xemacs.info-19: 857130 -xemacs.info-20: 905126 -xemacs.info-21: 945846 +xemacs.info-1: 1352 +xemacs.info-2: 47940 +xemacs.info-3: 95897 +xemacs.info-4: 144001 +xemacs.info-5: 192200 +xemacs.info-6: 241565 +xemacs.info-7: 290381 +xemacs.info-8: 339924 +xemacs.info-9: 385203 +xemacs.info-10: 433027 +xemacs.info-11: 482197 +xemacs.info-12: 531346 +xemacs.info-13: 580170 +xemacs.info-14: 628311 +xemacs.info-15: 677065 +xemacs.info-16: 726590 +xemacs.info-17: 775151 +xemacs.info-18: 819069 +xemacs.info-19: 860232 +xemacs.info-20: 908228 +xemacs.info-21: 948948  Tag Table: (Indirect) -Node: Top1372 -Node: License22524 -Node: Distrib35806 -Node: Intro37470 -Node: Frame40341 -Node: Point43613 -Node: Echo Area45580 -Node: Mode Line47958 -Node: XEmacs under X52389 -Node: Keystrokes55567 -Node: Intro to Keystrokes56411 -Node: Representing Keystrokes58514 -Node: Key Sequences59871 -Node: String Key Sequences63211 -Node: Meta Key63594 -Node: Super and Hyper Keys65067 -Node: Character Representation71291 -Node: Commands72311 -Node: Pull-down Menus75160 -Node: File Menu78509 -Node: Edit Menu82331 -Node: Apps Menu84716 -Node: Options Menu85206 -Node: Buffers Menu89186 -Node: Tools Menu89493 -Node: Help Menu89984 -Node: Menu Customization90385 -Node: Entering Emacs94615 -Node: Exiting95918 -Node: Command Switches99010 -Node: Startup Paths108199 -Node: Basic115775 -Node: Blank Lines125258 -Node: Continuation Lines126684 -Node: Position Info128118 -Node: Arguments131252 -Node: Undo134389 -Node: Minibuffer137336 -Node: Minibuffer File139820 -Node: Minibuffer Edit141457 -Node: Completion144030 -Node: Repetition150905 -Node: M-x153697 -Node: Help158791 -Node: Mark168713 -Node: Setting Mark170567 -Node: Using Region173689 -Node: Marking Objects174434 -Node: Mark Ring176275 -Node: Mouse Selection177991 -Node: Additional Mouse Operations179999 -Node: Killing184203 -Node: Yanking189843 -Node: Kill Ring190646 -Node: Appending Kills192248 -Node: Earlier Kills194285 -Node: Using X Selections196898 -Node: X Clipboard Selection198148 -Node: X Selection Commands200325 -Node: X Cut Buffers201411 -Node: Active Regions202770 -Node: Accumulating Text207350 -Node: Rectangles210423 -Node: Registers213942 -Node: RegPos214977 -Node: RegText215880 -Node: RegRect216964 -Node: Display217704 -Node: Scrolling219199 -Node: Horizontal Scrolling223342 -Node: Selective Display224538 -Node: Display Vars225757 -Node: Search228435 -Node: Incremental Search229628 -Node: Non-Incremental Search238555 -Node: Word Search239997 -Node: Regexp Search241615 -Node: Regexps243151 -Node: Search Case253452 -Node: Replace254233 -Node: Unconditional Replace255181 -Node: Regexp Replace256317 -Node: Replacement and Case257252 -Node: Query Replace258232 -Node: Other Repeating Search261465 -Node: Fixit262720 -Node: Kill Errors263300 -Node: Transpose264633 -Node: Fixing Case267038 -Node: Spelling267684 -Node: Files269145 -Node: File Names270453 -Node: Visiting274791 -Node: Saving281481 -Node: Backup286404 -Node: Backup Names287800 -Node: Backup Deletion289283 -Node: Backup Copying290442 -Node: Interlocking292149 -Node: Reverting296277 -Node: Auto Save298190 -Node: Auto Save Files299157 -Node: Auto Save Control300998 -Node: Recover302837 -Node: Version Control303992 -Node: Concepts of VC306030 -Node: Editing with VC307640 -Node: Variables for Check-in/out312896 -Node: Log Entries314795 -Node: Change Logs and VC315975 -Node: Old Versions319243 -Node: VC Status321247 -Node: Renaming and VC322961 -Node: Snapshots323642 -Node: Making Snapshots324143 -Node: Snapshot Caveats325437 -Node: Version Headers327246 -Node: ListDir329945 -Node: Comparing Files331994 -Node: Dired333527 -Node: Dired Enter334198 -Node: Dired Edit335023 -Node: Dired Deletion336770 -Node: Dired Immed339995 -Node: Misc File Ops341271 -Node: Buffers343760 -Node: Select Buffer345920 -Node: List Buffers347717 -Node: Misc Buffer349463 -Node: Kill Buffer351107 -Node: Several Buffers352237 -Node: Windows356103 -Node: Basic Window356814 -Node: Split Window358533 -Node: Other Window360666 -Node: Pop Up Window363096 -Node: Change Window364603 -Node: Mule367511 -Node: Mule Intro368774 -Node: Language Environments369790 -Node: Input Methods371898 -Node: Select Input Method375618 -Node: Coding Systems377773 -Node: Recognize Coding381961 -Node: Specify Coding385290 -Node: Major Modes390221 -Node: Choosing Modes392443 -Node: Indentation394833 -Node: Indentation Commands396928 -Node: Tab Stops399657 -Node: Just Spaces401506 -Node: Text402321 -Node: Text Mode404304 -Node: Nroff Mode406385 -Node: TeX Mode408029 -Node: TeX Editing410281 -Node: TeX Print413716 -Node: Outline Mode416936 -Node: Outline Format418417 -Node: Outline Motion421217 -Node: Outline Visibility422770 -Node: Words425691 -Node: Sentences428638 -Node: Paragraphs430834 -Node: Pages433122 -Node: Filling435722 -Node: Auto Fill436293 -Node: Fill Commands438441 -Node: Fill Prefix440607 -Node: Case442795 -Node: Programs444823 -Node: Program Modes447381 -Node: Lists449613 -Node: Defuns455453 -Node: Grinding458106 -Node: Basic Indent458734 -Node: Multi-line Indent460755 -Node: Lisp Indent462371 -Node: C Indent465821 -Node: Matching471061 -Node: Comments472583 -Node: Balanced Editing479035 -Node: Lisp Completion480049 -Node: Documentation481064 -Node: Change Log482303 -Node: Tags484881 -Node: Tag Syntax486458 -Node: Create Tags Table489832 -Node: Select Tags Table495930 -Node: Find Tag499672 -Node: Tags Search502636 -Node: List Tags506093 -Node: Fortran507122 -Node: Fortran Motion508198 -Node: Fortran Indent509018 -Node: ForIndent Commands509703 -Node: ForIndent Num510848 -Node: ForIndent Conv512122 -Node: ForIndent Vars512898 -Node: Fortran Comments514066 -Node: Fortran Columns517665 -Node: Fortran Abbrev519088 -Node: Asm Mode519998 -Node: Running520550 -Node: Compilation521520 -Node: Lisp Modes526371 -Node: Lisp Libraries527645 -Node: Loading528200 -Node: Compiling Libraries532660 -Node: Mocklisp535551 -Node: Lisp Eval536228 -Node: Lisp Debug539868 -Node: Lisp Interaction545294 -Node: External Lisp546649 -Node: Packages548724 -Node: Package Terminology549465 -Node: Using Packages550823 -Node: Building Packages559612 -Node: Abbrevs562134 -Node: Defining Abbrevs564334 -Node: Expanding Abbrevs566781 -Node: Editing Abbrevs569483 -Node: Saving Abbrevs571351 -Node: Dynamic Abbrevs573291 -Node: Picture574593 -Node: Basic Picture577026 -Node: Insert in Picture579313 -Node: Tabs in Picture580735 -Node: Rectangles in Picture582256 -Node: Sending Mail584165 -Node: Mail Format585876 -Node: Mail Headers587226 -Node: Mail Mode593636 -Node: Reading Mail597249 -Node: Calendar/Diary598824 -Node: Calendar Motion600496 -Node: Calendar Unit Motion601379 -Node: Move to Beginning or End603702 -Node: Specified Dates604835 -Node: Scroll Calendar605724 -Node: Mark and Region607515 -Node: General Calendar609422 -Node: LaTeX Calendar611030 -Node: Holidays613044 -Node: Sunrise/Sunset616147 -Node: Lunar Phases619190 -Node: Other Calendars620575 -Node: Calendar Systems622062 -Node: To Other Calendar625173 -Node: From Other Calendar627164 -Node: Mayan Calendar629470 -Node: Diary632666 -Node: Diary Commands634416 -Node: Format of Diary File637725 -Node: Date Formats640595 -Node: Adding to Diary643169 -Node: Special Diary Entries644800 -Node: Calendar Customization650140 -Node: Calendar Customizing651002 -Node: Holiday Customizing654222 -Node: Date Display Format660690 -Node: Time Display Format661648 -Node: Daylight Savings662786 -Node: Diary Customizing665974 -Node: Hebrew/Islamic Entries670596 -Node: Fancy Diary Display673936 -Node: Included Diary Files675833 -Node: Sexp Diary Entries676814 -Node: Appt Customizing681904 -Node: Sorting682950 -Node: Shell687756 -Node: Single Shell689049 -Node: Interactive Shell690648 -Node: Shell Mode694413 -Node: Terminal emulator696904 -Node: Term Mode699214 -Node: Paging in Term700128 -Node: Narrowing700926 -Node: Hardcopy702876 -Node: Recursive Edit703848 -Node: Dissociated Press706835 -Node: CONX709398 -Node: Amusements710422 -Node: Emulation710902 -Node: Customization712746 -Node: Minor Modes714470 -Node: Variables716102 -Node: Examining718060 -Node: Easy Customization719521 -Node: Customization Groups720535 -Node: Changing an Option723464 -Node: Face Customization729720 -Node: Specific Customization731485 -Node: Edit Options734092 -Node: Locals735676 -Node: File Variables738855 -Node: Keyboard Macros743382 -Node: Basic Kbd Macro745553 -Node: Save Kbd Macro747485 -Node: Kbd Macro Query749157 -Node: Key Bindings751099 -Node: Keymaps751973 -Node: Rebinding755823 -Node: Interactive Rebinding756519 -Node: Programmatic Rebinding758711 -Node: Key Bindings Using Strings761518 -Node: Disabling763124 -Node: Syntax764896 -Node: Syntax Entry765777 -Node: Syntax Change769861 -Node: Init File772031 -Node: Init Syntax773539 -Node: Init Examples775892 -Node: Terminal Init780083 -Node: Audible Bell781793 -Node: Faces785224 -Node: X Resources790061 -Node: Geometry Resources791682 -Node: Iconic Resources794130 -Node: Resource List794602 -Node: Face Resources801109 -Node: Widgets804786 -Node: Menubar Resources805725 -Node: Quitting806658 -Node: Lossage809637 -Node: Stuck Recursive810280 -Node: Screen Garbled810986 -Node: Text Garbled812120 -Node: Unasked-for Search812759 -Node: Emergency Escape813544 -Node: Total Frustration815323 -Node: Bugs815954 -Node: Glossary825489 -Node: Manifesto857130 -Node: Key Index880606 -Node: Command Index905126 -Node: Variable Index945846 -Node: Concept Index961797 +Node: Top1352 +Node: License22511 +Node: Distrib35793 +Node: Intro37457 +Node: Frame40328 +Node: Point43596 +Node: Echo Area45563 +Node: Mode Line47940 +Node: XEmacs under X52371 +Node: Keystrokes55548 +Node: Intro to Keystrokes56392 +Node: Representing Keystrokes58495 +Node: Key Sequences59852 +Node: String Key Sequences63192 +Node: Meta Key63575 +Node: Super and Hyper Keys65048 +Node: Character Representation71272 +Node: Commands72292 +Node: Pull-down Menus75141 +Node: File Menu78490 +Node: Edit Menu82312 +Node: Apps Menu84695 +Node: Options Menu85185 +Node: Buffers Menu89165 +Node: Tools Menu89472 +Node: Help Menu89963 +Node: Menu Customization90364 +Node: Entering Emacs94594 +Node: Exiting95897 +Node: Command Switches98988 +Node: Startup Paths108175 +Node: Basic115755 +Node: Blank Lines125233 +Node: Continuation Lines126659 +Node: Position Info128091 +Node: Arguments131224 +Node: Undo134361 +Node: Minibuffer137308 +Node: Minibuffer File139792 +Node: Minibuffer Edit141428 +Node: Completion144001 +Node: Repetition150876 +Node: M-x153668 +Node: Help158762 +Node: Mark168681 +Node: Setting Mark170535 +Node: Using Region173657 +Node: Marking Objects174394 +Node: Mark Ring176232 +Node: Mouse Selection177948 +Node: Additional Mouse Operations179955 +Node: Killing184159 +Node: Yanking189795 +Node: Kill Ring190598 +Node: Appending Kills192200 +Node: Earlier Kills194237 +Node: Using X Selections196850 +Node: X Clipboard Selection198100 +Node: X Selection Commands200277 +Node: X Cut Buffers201363 +Node: Active Regions202722 +Node: Accumulating Text207302 +Node: Rectangles210375 +Node: Registers213894 +Node: RegPos214928 +Node: RegText215831 +Node: RegRect216915 +Node: Display217655 +Node: Scrolling219150 +Node: Horizontal Scrolling223293 +Node: Selective Display224488 +Node: Display Vars225707 +Node: Search228385 +Node: Incremental Search229578 +Node: Non-Incremental Search238505 +Node: Word Search239947 +Node: Regexp Search241565 +Node: Regexps243101 +Node: Search Case253402 +Node: Replace254183 +Node: Unconditional Replace255131 +Node: Regexp Replace256266 +Node: Replacement and Case257201 +Node: Query Replace258181 +Node: Other Repeating Search261408 +Node: Fixit262663 +Node: Kill Errors263243 +Node: Transpose264576 +Node: Fixing Case266980 +Node: Spelling267626 +Node: Files269087 +Node: File Names270397 +Node: Visiting274734 +Node: Saving281420 +Node: Backup286343 +Node: Backup Names287739 +Node: Backup Deletion289222 +Node: Backup Copying290381 +Node: Interlocking292087 +Node: Reverting296215 +Node: Auto Save298127 +Node: Auto Save Files299094 +Node: Auto Save Control300935 +Node: Recover302773 +Node: Version Control303928 +Node: Concepts of VC305966 +Node: Editing with VC307576 +Node: Variables for Check-in/out312832 +Node: Log Entries314731 +Node: Change Logs and VC315911 +Node: Old Versions319178 +Node: VC Status321181 +Node: Renaming and VC322895 +Node: Snapshots323574 +Node: Making Snapshots324075 +Node: Snapshot Caveats325368 +Node: Version Headers327177 +Node: ListDir329876 +Node: Comparing Files331925 +Node: Dired333458 +Node: Dired Enter334129 +Node: Dired Edit334954 +Node: Dired Deletion336701 +Node: Dired Immed339924 +Node: Misc File Ops341200 +Node: Buffers343688 +Node: Select Buffer345846 +Node: List Buffers347641 +Node: Misc Buffer349386 +Node: Kill Buffer351029 +Node: Several Buffers352159 +Node: Windows356025 +Node: Basic Window356736 +Node: Split Window358455 +Node: Other Window360588 +Node: Pop Up Window363017 +Node: Change Window364522 +Node: Mule367430 +Node: Mule Intro368693 +Node: Language Environments369709 +Node: Input Methods371816 +Node: Select Input Method375536 +Node: Coding Systems377691 +Node: Recognize Coding381877 +Node: Specify Coding385203 +Node: Major Modes390134 +Node: Choosing Modes392353 +Node: Indentation394743 +Node: Indentation Commands396838 +Node: Tab Stops399567 +Node: Just Spaces401416 +Node: Text402231 +Node: Text Mode404214 +Node: Nroff Mode406293 +Node: TeX Mode407936 +Node: TeX Editing410188 +Node: TeX Print413622 +Node: Outline Mode416841 +Node: Outline Format418322 +Node: Outline Motion421122 +Node: Outline Visibility422675 +Node: Words425596 +Node: Sentences428543 +Node: Paragraphs430739 +Node: Pages433027 +Node: Filling435627 +Node: Auto Fill436198 +Node: Fill Commands438345 +Node: Fill Prefix440510 +Node: Case442698 +Node: Programs444726 +Node: Program Modes447275 +Node: Lists449507 +Node: Defuns455347 +Node: Grinding458000 +Node: Basic Indent458628 +Node: Multi-line Indent460649 +Node: Lisp Indent462265 +Node: C Indent465715 +Node: Matching470955 +Node: Comments472477 +Node: Balanced Editing478929 +Node: Lisp Completion479943 +Node: Documentation480958 +Node: Change Log482197 +Node: Tags484775 +Node: Tag Syntax486424 +Node: Create Tags Table490368 +Node: Etags Regexps494428 +Node: Select Tags Table499086 +Node: Find Tag502824 +Node: Tags Search505788 +Node: List Tags509244 +Node: Fortran510273 +Node: Fortran Motion511349 +Node: Fortran Indent512169 +Node: ForIndent Commands512854 +Node: ForIndent Num513999 +Node: ForIndent Conv515273 +Node: ForIndent Vars516049 +Node: Fortran Comments517217 +Node: Fortran Columns520815 +Node: Fortran Abbrev522238 +Node: Asm Mode523147 +Node: Running523699 +Node: Compilation524669 +Node: Lisp Modes529519 +Node: Lisp Libraries530792 +Node: Loading531346 +Node: Compiling Libraries535806 +Node: Mocklisp538697 +Node: Lisp Eval539374 +Node: Lisp Debug543014 +Node: Lisp Interaction548439 +Node: External Lisp549794 +Node: Packages551868 +Node: Package Terminology552609 +Node: Using Packages553967 +Node: Building Packages562756 +Node: Abbrevs565278 +Node: Defining Abbrevs567478 +Node: Expanding Abbrevs569925 +Node: Editing Abbrevs572627 +Node: Saving Abbrevs574495 +Node: Dynamic Abbrevs576435 +Node: Picture577737 +Node: Basic Picture580170 +Node: Insert in Picture582455 +Node: Tabs in Picture583877 +Node: Rectangles in Picture585398 +Node: Sending Mail587306 +Node: Mail Format589017 +Node: Mail Headers590367 +Node: Mail Mode596777 +Node: Reading Mail600390 +Node: Calendar/Diary601965 +Node: Calendar Motion603637 +Node: Calendar Unit Motion604520 +Node: Move to Beginning or End606843 +Node: Specified Dates607976 +Node: Scroll Calendar608864 +Node: Mark and Region610655 +Node: General Calendar612561 +Node: LaTeX Calendar614169 +Node: Holidays616183 +Node: Sunrise/Sunset619285 +Node: Lunar Phases622328 +Node: Other Calendars623713 +Node: Calendar Systems625200 +Node: To Other Calendar628311 +Node: From Other Calendar630302 +Node: Mayan Calendar632607 +Node: Diary635802 +Node: Diary Commands637551 +Node: Format of Diary File640857 +Node: Date Formats643727 +Node: Adding to Diary646301 +Node: Special Diary Entries647932 +Node: Calendar Customization653271 +Node: Calendar Customizing654133 +Node: Holiday Customizing657352 +Node: Date Display Format663820 +Node: Time Display Format664778 +Node: Daylight Savings665916 +Node: Diary Customizing669104 +Node: Hebrew/Islamic Entries673725 +Node: Fancy Diary Display677065 +Node: Included Diary Files678962 +Node: Sexp Diary Entries679943 +Node: Appt Customizing685033 +Node: Sorting686079 +Node: Shell690885 +Node: Single Shell692178 +Node: Interactive Shell693777 +Node: Shell Mode697542 +Node: Terminal emulator700033 +Node: Term Mode702342 +Node: Paging in Term703256 +Node: Narrowing704054 +Node: Hardcopy706004 +Node: Recursive Edit706976 +Node: Dissociated Press709963 +Node: CONX712526 +Node: Amusements713550 +Node: Emulation714030 +Node: Customization715874 +Node: Minor Modes717598 +Node: Variables719230 +Node: Examining721186 +Node: Easy Customization722647 +Node: Customization Groups723661 +Node: Changing an Option726590 +Node: Face Customization732846 +Node: Specific Customization734610 +Node: Edit Options737217 +Node: Locals738801 +Node: File Variables741980 +Node: Keyboard Macros746506 +Node: Basic Kbd Macro748677 +Node: Save Kbd Macro750609 +Node: Kbd Macro Query752278 +Node: Key Bindings754220 +Node: Keymaps755094 +Node: Rebinding758944 +Node: Interactive Rebinding759640 +Node: Programmatic Rebinding761832 +Node: Key Bindings Using Strings764639 +Node: Disabling766245 +Node: Syntax768017 +Node: Syntax Entry768898 +Node: Syntax Change772982 +Node: Init File775151 +Node: Init Syntax776656 +Node: Init Examples779008 +Node: Terminal Init783198 +Node: Audible Bell784908 +Node: Faces788339 +Node: X Resources793176 +Node: Geometry Resources794797 +Node: Iconic Resources797245 +Node: Resource List797717 +Node: Face Resources804224 +Node: Widgets807901 +Node: Menubar Resources808840 +Node: Quitting809773 +Node: Lossage812751 +Node: Stuck Recursive813395 +Node: Screen Garbled814101 +Node: Text Garbled815235 +Node: Unasked-for Search815874 +Node: Emergency Escape816659 +Node: Total Frustration818438 +Node: Bugs819069 +Node: Glossary828603 +Node: Manifesto860232 +Node: Key Index883708 +Node: Command Index908228 +Node: Variable Index948948 +Node: Concept Index964899  End Tag Table diff --git a/info/xemacs.info-1 b/info/xemacs.info-1 index e3b1285..7b8b001 100644 --- a/info/xemacs.info-1 +++ b/info/xemacs.info-1 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -79,7 +79,7 @@ Fundamental Editing Commands * Help:: Commands for asking XEmacs about its commands. Important Text-Changing Commands -* Mark:: The mark: how to delimit a "region" of text. +* Mark:: The mark: how to delimit a ``region'' of text. * Mouse Selection:: Selecting text with the mouse. * Additional Mouse Operations:: @@ -139,7 +139,7 @@ Recovery from Problems. Here are some other nodes which are really inferiors of the ones already listed, mentioned here so you can get to them in one step: - -- The Detailed Node Listing -- + --- The Detailed Node Listing --- The Organization of the Frame @@ -257,7 +257,7 @@ File Handling * Version Control:: Version control systems (RCS and SCCS). * ListDir:: Listing the contents of a file directory. * Comparing Files:: Finding where two files differ. -* Dired:: "Editing" a directory to delete, rename, etc. +* Dired:: ``Editing'' a directory to delete, rename, etc. the files in it. * Misc File Ops:: Other things you can do on files. @@ -534,7 +534,7 @@ Dealing with XEmacs Trouble * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Unasked-for Search:: Spontaneous entry to incremental search. -* Emergency Escape:: Emergency escape-- +* Emergency Escape:: Emergency escape--- What to do if XEmacs stops responding. * Total Frustration:: When you are at your wits' end. @@ -880,9 +880,9 @@ commands relevant to a topic. *Note Help::. "Customizable" means you can change the definitions of XEmacs commands. For example, if you use a programming language in which comments start with `<**' and end with `**>', you can tell the XEmacs -comment manipulation commands to use those strings (*note Comments::.). -Another sort of customization is rearrangement of the command set. -For example, you can set up the four basic cursor motion commands (up, +comment manipulation commands to use those strings (*note Comments::). +Another sort of customization is rearrangement of the command set. For +example, you can set up the four basic cursor motion commands (up, down, left and right) on keys in a diamond pattern on the keyboard if you prefer. *Note Customization::. @@ -927,24 +927,24 @@ Window look at two buffers a the same time. * Below each text window's last line is a "mode line" (*note Mode - Line::.), which describes what is going on in that window. The + Line::), which describes what is going on in that window. The mode line is in inverse video if the terminal supports that. If there are several XEmacs windows in one frame, each window has its own mode line. * At the bottom of each XEmacs frame is the "echo area" or - "minibuffer window"(*note Echo Area::.). It is used by XEmacs to + "minibuffer window"(*note Echo Area::). It is used by XEmacs to exchange information with the user. There is only one echo area per XEmacs frame. * If you are running XEmacs under the X Window System, a menu bar at the top of the frame makes shortcuts to several of the commands - available (*note Pull-down Menus::.). + available (*note Pull-down Menus::). You can subdivide the XEmacs frame into multiple text windows, and -use each window for a different file (*note Windows::.). Multiple -XEmacs windows are tiled vertically on the XEmacs frame. The upper -XEmacs window is separated from the lower window by its mode line. +use each window for a different file (*note Windows::). Multiple XEmacs +windows are tiled vertically on the XEmacs frame. The upper XEmacs +window is separated from the lower window by its mode line. When there are multiple, tiled XEmacs windows on a single XEmacs frame, the XEmacs window receiving input from the keyboard has the @@ -1028,7 +1028,7 @@ The Echo Area as you type it. This behavior is designed to give confident users fast response, while giving hesitant users maximum feedback. You can change this behavior by setting a variable (*note Display - Vars::.). + Vars::). * If you issue a command that cannot be executed, XEmacs may print an "error message" in the echo area. Error messages are diff --git a/info/xemacs.info-10 b/info/xemacs.info-10 index 082ad0c..ab72b52 100644 --- a/info/xemacs.info-10 +++ b/info/xemacs.info-10 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -145,7 +145,7 @@ comment gets too long, the text of the comment is split into two comment lines. Optionally, new comment delimiters are inserted at the end of the first line and the beginning of the second, so that each line is a separate comment. The variable `comment-multi-line' controls the -choice (*note Comments::.). +choice (*note Comments::). Auto Fill mode does not refill entire paragraphs. It can break lines but cannot merge lines. Editing in the middle of a paragraph can @@ -188,7 +188,7 @@ undone with `C-_'. *Note Undo::. the region into paragraphs and fills each of them. `Meta-q' and `Meta-g' use the same criteria as `Meta-h' for finding -paragraph boundaries (*note Paragraphs::.). For more control, you can +paragraph boundaries (*note Paragraphs::). For more control, you can use `M-x fill-region-as-paragraph', which refills everything between point and mark. This command recognizes only blank lines as paragraph separators. @@ -325,31 +325,30 @@ Editing Programs Emacs has many commands designed to understand the syntax of programming languages such as Lisp and C. These commands can: - * Move over or kill balanced expressions or "sexps" (*note Lists::.). + * Move over or kill balanced expressions or "sexps" (*note Lists::). * Move over or mark top-level balanced expressions ("defuns", in Lisp; functions, in C). - * Show how parentheses balance (*note Matching::.). + * Show how parentheses balance (*note Matching::). - * Insert, kill, or align comments (*note Comments::.). + * Insert, kill, or align comments (*note Comments::). * Follow the usual indentation conventions of the language (*note - Grinding::.). + Grinding::). The commands available for words, sentences, and paragraphs are useful in editing code even though their canonical application is for editing human language text. Most symbols contain words (*note -Words::.); sentences can be found in strings and comments (*note -Sentences::.). Paragraphs per se are not present in code, but the +Words::); sentences can be found in strings and comments (*note +Sentences::). Paragraphs per se are not present in code, but the paragraph commands are useful anyway, because Lisp mode and C mode -define paragraphs to begin and end at blank lines (*note -Paragraphs::.). Judicious use of blank lines to make the program -clearer also provides interesting chunks of text for the paragraph -commands to work on. +define paragraphs to begin and end at blank lines (*note Paragraphs::). +Judicious use of blank lines to make the program clearer also provides +interesting chunks of text for the paragraph commands to work on. The selective display feature is useful for looking at the overall -structure of a function (*note Selective Display::.). This feature +structure of a function (*note Selective Display::). This feature causes only the lines that are indented less than a specified amount to appear on the screen. diff --git a/info/xemacs.info-11 b/info/xemacs.info-11 index c9ba3be..7ecfaef 100644 --- a/info/xemacs.info-11 +++ b/info/xemacs.info-11 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -95,7 +95,7 @@ broken up into files. It lists the names of the component files and the names and positions of the functions (or other named subunits) in each file. Grouping the related files makes it possible to search or replace through all the files with one command. Recording the function names -and positions makes possible the `M-.' command which finds the +and positions makes possible the `M-.' command which finds the definition of a function by looking up which of the files it is in. Tags tables are stored in files called "tags table files". The @@ -115,13 +115,14 @@ recorded is called a "tag". * Tag Syntax:: Tag syntax for various types of code and text files. * Create Tags Table:: Creating a tags table with `etags'. +* Etags Regexps:: Create arbitrary tags using regular expressions. * Select Tags Table:: How to visit a tags table. * Find Tag:: Commands to find the definition of a specific tag. * Tags Search:: Using a tags table for searching and replacing. * List Tags:: Listing and finding tags defined in a file.  -File: xemacs.info, Node: Tag Syntax, Next: Create Tags Table, Up: Tags +File: xemacs.info, Node: Tag Syntax, Next: Create Tags Table, Prev: Tags, Up: Tags Source File Tag Syntax ---------------------- @@ -129,23 +130,26 @@ Source File Tag Syntax Here is how tag syntax is defined for the most popular languages: * In C code, any C function or typedef is a tag, and so are - definitions of `struct', `union' and `enum'. `#define' macro - definitions and `enum' constants are also tags, unless you specify - `--no-defines' when making the tags table. Similarly, global - variables are tags, unless you specify `--no-globals'. Use of - `--no-globals' and `--no-defines' can make the tags table file - much smaller. + definitions of `struct', `union' and `enum'. You can tag function + declarations and external variables in addition to function + definitions by giving the `--declarations' option to `etags'. + `#define' macro definitions and `enum' constants are also tags, + unless you specify `--no-defines' when making the tags table. + Similarly, global variables are tags, unless you specify + `--no-globals'. Use of `--no-globals' and `--no-defines' can make + the tags table file much smaller. * In C++ code, in addition to all the tag constructs of C code, member functions are also recognized, and optionally member variables if you use the `--members' option. Tags for variables and functions in classes are named `CLASS::VARIABLE' and - `CLASS::FUNCTION'. + `CLASS::FUNCTION'. `operator' functions tags are named, for + example `operator+'. * In Java code, tags include all the constructs recognized in C++, - plus the `extends' and `implements' constructs. Tags for variables - and functions in classes are named `CLASS.VARIABLE' and - `CLASS.FUNCTION'. + plus the `interface', `extends' and `implements' constructs. Tags + for variables and functions in classes are named `CLASS.VARIABLE' + and `CLASS.FUNCTION'. * In LaTeX text, the argument of any of the commands `\chapter', `\section', `\subsection', `\subsubsection', `\eqno', `\label', @@ -155,7 +159,7 @@ Source File Tag Syntax Other commands can make tags as well, if you specify them in the environment variable `TEXTAGS' before invoking `etags'. The value of this environment variable should be a colon-separated list of - commands names. For example, + command names. For example, TEXTAGS="def:newcommand:newenvironment" export TEXTAGS @@ -174,6 +178,10 @@ Source File Tag Syntax Several other languages are also supported: + * In Ada code, functions, procedures, packages, tasks, and types are + tags. Use the `--packages-only' option to create tags for packages + only. + * In assembler code, labels appearing at the beginning of a line, followed by a colon, are tags. @@ -181,32 +189,36 @@ Source File Tag Syntax nonterminal it constructs. The portions of the file that contain C code are parsed as C code. - * In Cobol code, paragraphs names are the tags, i.e. any word - starting in column 8 and followed by a full stop. + * In Cobol code, tags are paragraph names; that is, any word + starting in column 8 and followed by a period. * In Erlang code, the tags are the functions, records, and macros defined in the file. - * In Fortran code, functions and subroutines are tags. + * In Fortran code, functions, subroutines and blockdata are tags. * In Objective C code, tags include Objective C definitions for - classes, class categories, methods and protocols. + classes, class categories, methods, and protocols. * In Pascal code, the tags are the functions and procedures defined in the file. - * In Perl code, the tags are the procedures defined by the `sub' - keyword. + * In Perl code, the tags are the procedures defined by the `sub', + `my' and `local' keywords. Use `--globals' if you want to tag + global variables. * In Postscript code, the tags are the functions. * In Prolog code, a tag name appears at the left margin. - You can also generate tags based on regexp matching (*note Create -Tags Table::.) to handle other formats and languages. + * In Python code, `def' or `class' at the beginning of a line + generate a tag. + + You can also generate tags based on regexp matching (*note Etags +Regexps::) to handle other formats and languages.  -File: xemacs.info, Node: Create Tags Table, Next: Select Tags Table, Prev: Tag Syntax, Up: Tags +File: xemacs.info, Node: Create Tags Table, Next: Etags Regexps, Prev: Tag Syntax, Up: Tags Creating Tags Tables -------------------- @@ -218,10 +230,18 @@ Here is how to run `etags': etags INPUTFILES... The `etags' program reads the specified files, and writes a tags table -named `TAGS' in the current working directory. `etags' recognizes the -language used in an input file based on its file name and contents. -You can specify the language with the `--language=NAME' option, -described below. +named `TAGS' in the current working directory. You can intermix +compressed and plain text source file names. `etags' knows about the +most common compression formats, and does the right thing. So you can +compress all your source files and have `etags' look for compressed +versions of its file name arguments, if it does not find uncompressed +versions. Under MS-DOS, `etags' also looks for file names like +`mycode.cgz' if it is given `mycode.c' on the command line and +`mycode.c' does not exist. + + `etags' recognizes the language used in an input file based on its +file name and contents. You can specify the language with the +`--language=NAME' option, described below. If the tags table data become outdated due to changes in the files described in the table, the way to update the tags table is the same @@ -258,7 +278,7 @@ files. tags file will contain absolute file names. This way, the tags file will still refer to the same files even if you move it, as long as the source files remain in the same place. Absolute file names start with -`/', or with `DEVICE:/' on MS-DOS and Windows. +`/', or with `DEVICE:/' on MS-DOS and MS-Windows. When you want to make a tags table from a great number of files, you may have problems listing them on the command line, because some systems @@ -274,8 +294,17 @@ the file names that follow it. Specify `--language=auto' to tell `etags' to resume guessing the language from the file names and file contents. Specify `--language=none' to turn off language-specific processing entirely; then `etags' recognizes tags by regexp matching -alone. `etags --help' prints the list of the languages `etags' knows, -and the file name rules for guessing the language. +alone (*note Etags Regexps::). + + `etags --help' prints the list of the languages `etags' knows, and +the file name rules for guessing the language. It also prints a list of +all the available `etags' options, together with a short explanation. + + +File: xemacs.info, Node: Etags Regexps, Next: Select Tags Table, Prev: Create Tags Table, Up: Tags + +Etags Regexps +------------- The `--regex' option provides a general way of recognizing tags based on regexp matching. You can freely intermix it with file names. @@ -300,9 +329,15 @@ N times. You should not match more characters with TAGREGEXP than that needed to recognize what you want to tag. If the match is such that more -characters than needed are unavoidably matched by TAGREGEXP, you may -find useful to add a NAMEREGEXP, in order to narrow the tag scope. You -can find some examples below. +characters than needed are unavoidably matched by TAGREGEXP (as will +usually be the case), you should add a NAMEREGEXP, to pick out just the +tag. This will enable Emacs to find tags more accurately and to do +completion on tag names more reliably. You can find some examples +below. + + The option `--ignore-case-regex' (or `-c') is like `--regex', except +that the regular expression provided will be matched without regard to +case, which is appropriate for various programming languages. The `-R' option deletes all the regexps defined with `--regex' options. It applies to the file names following it, as you can see @@ -317,30 +352,65 @@ additional tags in `voo.doo', and both REG1 and REG2 to recognize additional tags in `bar.ber'. `etags' uses the Lisp tags rules, and no regexp matching, to recognize tags in `los.er'. + A regular expression can be bound to a given language, by prepending +it with `{lang}'. When you do this, `etags' will use the regular +expression only for files of that language. `etags --help' prints the +list of languages recognised by `etags'. The following example tags +the `DEFVAR' macros in the Emacs source files. `etags' applies this +regular expression to C files only: + + --regex='{c}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/' + +This feature is particularly useful when storing a list of regular +expressions in a file. The following option syntax instructs `etags' +to read two files of regular expressions. The regular expressions +contained in the second file are matched without regard to case. + + --regex=@first-file --ignore-case-regex=@second-file + +A regex file contains one regular expressions per line. Empty lines, +and lines beginning with space or tab are ignored. When the first +character in a line is `@', `etags' assumes that the rest of the line +is the name of a file of regular expressions. This means that such +files can be nested. All the other lines are taken to be regular +expressions. For example, one can create a file called `emacs.tags' +with the following contents (the first line in the file is a comment): + + -- This is for GNU Emacs source files + {c}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/\1/ + +and then use it like this: + + etags --regex=@emacs.tags *.[ch] */*.[ch] + Here are some more examples. The regexps are quoted to protect them from shell interpretation. -Tag the `DEFVAR' macros in the emacs source files: + * Tag Octave files: - --regex='/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/' + etags --language=none \ + --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \ + --regex='/###key \(.*\)/\1/' \ + --regex='/[ \t]*global[ \t].*/' \ + *.m -Tag VHDL files (this example is a single long line, broken here for -formatting reasons): + Note that tags are not generated for scripts so that you have to + add a line by yourself of the form `###key ' if you + want to jump to it. - --language=none - --regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' - --regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\ - \( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/' + * Tag Tcl files: -Tag TCL files (this last example shows the usage of a NAMEREGEXP): + etags --language=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' *.tcl - --lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' + * Tag VHDL files: - For a list of the other available `etags' options, execute `etags ---help'. + --language=none \ + --regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' \ + --regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\ + \( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/'  -File: xemacs.info, Node: Select Tags Table, Next: Find Tag, Prev: Create Tags Table, Up: Tags +File: xemacs.info, Node: Select Tags Table, Next: Find Tag, Prev: Etags Regexps, Up: Tags Selecting a Tags Table ---------------------- @@ -508,7 +578,7 @@ Searching and Replacing with Tags Tables The commands in this section visit and search all the files listed in the selected tags table, one by one. For these commands, the tags table serves only to specify a sequence of files to search. A related -command is `M-x grep' (*note Compilation::.). +command is `M-x grep' (*note Compilation::). `M-x tags-search REGEXP ' Search for REGEXP through the files in the selected tags table. @@ -806,7 +876,7 @@ standard Emacs comment commands and defines some new variables. comments start with `!' and can follow other text. Because only some Fortran compilers accept this syntax, Fortran mode will not insert such comments unless you have specified to do so in advance by setting the -variable `comment-start' to `"!"' (*note Variables::.). +variable `comment-start' to `"!"' (*note Variables::). `M-;' Align comment or insert new comment (`fortran-comment-indent'). @@ -915,7 +985,7 @@ Fortran Keyword Abbrevs Fortran mode provides many built-in abbrevs for common keywords and declarations. These are the same sort of abbrevs that you can define -yourself. To use them, you must turn on Abbrev mode. *note Abbrevs::.. +yourself. To use them, you must turn on Abbrev mode. *note Abbrevs::. The built-in abbrevs are unusual in one way: they all start with a semicolon. You cannot normally use semicolon in an abbrev, but Fortran @@ -1020,7 +1090,7 @@ line is used again. The first `M-x compile' provides `make -k' as the default. The default is taken from the variable `compile-command'; if the appropriate compilation command for a file is something other than `make -k', it can be useful to have the file specify a local value for -`compile-command' (*note File Variables::.). +`compile-command' (*note File Variables::). When you start a compilation, the buffer `*compilation*' is displayed in another window but not selected. Its mode line displays @@ -1106,7 +1176,7 @@ Lisp mode Inferior Lisp mode The mode for an interactive session with an inferior Lisp process. This mode combines the special features of Lisp mode and Shell mode - (*note Shell Mode::.). + (*note Shell Mode::). Scheme mode Like Lisp mode but for Scheme programs. @@ -1123,7 +1193,7 @@ Libraries of Lisp Code for Emacs Lisp code for Emacs editing commands is stored in files whose names conventionally end in `.el'. This ending tells Emacs to edit them in -Emacs-Lisp mode (*note Lisp Modes::.). +Emacs-Lisp mode (*note Lisp Modes::). * Menu: diff --git a/info/xemacs.info-12 b/info/xemacs.info-12 index f5b2a5c..4630e51 100644 --- a/info/xemacs.info-12 +++ b/info/xemacs.info-12 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -323,7 +323,7 @@ usual Emacs editing commands are available; you can switch windows to examine the buffer that was being edited at the time of the error, and you can switch buffers, visit files, and perform any other editing operations. However, the debugger is a recursive editing level (*note -Recursive Edit::.); it is a good idea to return to the backtrace buffer +Recursive Edit::); it is a good idea to return to the backtrace buffer and explictly exit the debugger when you don't want to use it any more. Exiting the debugger kills the backtrace buffer. @@ -442,7 +442,7 @@ will go into the buffer, advancing point, and any "terminal input" for Lisp comes from text in the buffer. To give input to Lisp, go to the end of the buffer and type the input, terminated by . The `*lisp*' buffer is in Inferior Lisp mode, which has all the special -characteristics of Lisp mode and Shell mode (*note Shell Mode::.). +characteristics of Lisp mode and Shell mode (*note Shell Mode::). Use Lisp mode to run the source files of programs in external Lisps. You can select this mode with `M-x lisp-mode'. It is used automatically diff --git a/info/xemacs.info-13 b/info/xemacs.info-13 index d59e716..870d61e 100644 --- a/info/xemacs.info-13 +++ b/info/xemacs.info-13 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -50,7 +50,7 @@ character on the line. There was no need to change `C-a', as the choice of screen model does not affect beginnings of lines. Insertion of text is adapted to the quarter-plane screen model -through the use of Overwrite mode (*note Minor Modes::.). +through the use of Overwrite mode (*note Minor Modes::). Self-inserting characters replace existing text, column by column, rather than pushing existing text to the right. runs `picture-newline', which just moves to the beginning of the following @@ -73,7 +73,7 @@ below the current line. To actually delete parts of the picture, use `C-w', or with `C-c C-d' (which is defined as `delete-char', as `C-d' is in other modes), or with one of the picture rectangle commands (*note Rectangles in -Picture::.). +Picture::).  File: xemacs.info, Node: Insert in Picture, Next: Tabs in Picture, Prev: Basic Picture, Up: Picture @@ -158,7 +158,7 @@ Picture Mode Rectangle Commands Picture mode defines commands for working on rectangular pieces of the text in ways that fit with the quarter-plane model. The standard -rectangle commands may also be useful (*note Rectangles::.). +rectangle commands may also be useful (*note Rectangles::). `C-c C-k' Clear out the region-rectangle (`picture-clear-rectangle'). With @@ -725,7 +725,7 @@ the year in its entirety; that is, type `1990', not `90'. `o' (`calendar-other-month') prompts for a month and year, then centers the three-month calendar around that month. - You can return to today's date with `.' (`calendar-goto-today'). + You can return to today's date with `.' (`calendar-goto-today').  File: xemacs.info, Node: Scroll Calendar, Next: Mark and Region, Prev: Calendar Motion, Up: Calendar/Diary @@ -780,7 +780,7 @@ The Mark and the Region ----------------------- The concept of the mark applies to the calendar just as to any other -buffer, but it marks a *date*, not a *position* in the buffer. The +buffer, but it marks a _date_, not a _position_ in the buffer. The region consists of the days between the mark and point (including the starting and stopping dates). @@ -806,11 +806,11 @@ screen. This does not change the extent of the region. To determine the number of days in the region, type `M-=' (`calendar-count-days-region'). The numbers of days printed is -*inclusive*; that is, it includes the days specified by mark and point. +_inclusive_; that is, it includes the days specified by mark and point. The main use of the mark in the calendar is to remember dates that you may want to go back to. To make this feature more useful, the mark -ring (*note Mark Ring::.) operates exactly as in other buffers: Emacs +ring (*note Mark Ring::) operates exactly as in other buffers: Emacs remembers 16 previous locations of the mark. To return to a marked date, type `C-u C-SPC' (or `C-u C-@'); this is the command `calendar-set-mark' given a numeric argument. It moves point to where @@ -975,7 +975,7 @@ holidays in a different face (or places a `*' after these dates, if display with multiple faces is not available). The command applies both to the currently visible months and to other months that subsequently become visible by scrolling. To turn marking off and erase the current -marks, type `u', which also erases any diary marks (*note Diary::.). +marks, type `u', which also erases any diary marks (*note Diary::). To get even more detailed information, use the `a' command, which displays a separate buffer containing a list of all holidays in the @@ -998,8 +998,8 @@ years, and allows you to choose all the holidays or one of several categories of holidays. You can use this command even if you don't have a calendar window. - The dates used by Emacs for holidays are based on *current -practice*, not historical fact. Historically, for instance, the start + The dates used by Emacs for holidays are based on _current +practice_, not historical fact. Historically, for instance, the start of daylight savings time and even its existence have varied from year to year, but present United States law mandates that daylight savings time begins on the first Sunday in April. When the daylight savings rules @@ -1028,7 +1028,7 @@ the times of sunrise and sunset for any date. `C-u M-x sunrise-sunset' Display times of sunrise and sunset for a specified date. - Within the calendar, to display the *local times* of sunrise and + Within the calendar, to display the _local times_ of sunrise and sunset in the echo area, move point to the date you want, and type `S'. Alternatively, click `Button2' on the date, then choose `Sunrise/Sunset' from the menu that appears. The command `M-x @@ -1067,8 +1067,8 @@ The value of `calendar-time-zone' is the number of minutes difference between your local standard time and Coordinated Universal Time (Greenwich time). The values of `calendar-standard-time-zone-name' and `calendar-daylight-time-zone-name' are the abbreviations used in your -time zone. Emacs displays the times of sunrise and sunset *corrected -for daylight savings time*. *Note Daylight Savings::, for how daylight +time zone. Emacs displays the times of sunrise and sunset _corrected +for daylight savings time_. *Note Daylight Savings::, for how daylight savings time is determined. As a user, you might find it convenient to set the calendar location @@ -1117,7 +1117,7 @@ File: xemacs.info, Node: Other Calendars, Next: Calendar Systems, Prev: Lunar Conversion To and From Other Calendars -------------------------------------- - The Emacs calendar displayed is *always* the Gregorian calendar, + The Emacs calendar displayed is _always_ the Gregorian calendar, sometimes called the "new style" calendar, which is used in most of the world today. However, this calendar did not exist before the sixteenth century and was not widely used before the eighteenth century; it did @@ -1157,7 +1157,7 @@ nineteenth century. Astronomers use a simple counting of days elapsed since noon, Monday, January 1, 4713 B.C. on the Julian calendar. The number of days elapsed -is called the *Julian day number* or the *Astronomical day number*. +is called the _Julian day number_ or the _Astronomical day number_. The Hebrew calendar is used by tradition in the Jewish religion. The Emacs calendar program uses the Hebrew calendar to determine the dates @@ -1179,7 +1179,7 @@ measure similar to the metric system. The French government officially abandoned this calendar at the end of 1805. The Maya of Central America used three separate, overlapping calendar -systems, the *long count*, the *tzolkin*, and the *haab*. Emacs knows +systems, the _long count_, the _tzolkin_, and the _haab_. Emacs knows about all three of these calendars. Experts dispute the exact correlation between the Mayan calendar and our calendar; Emacs uses the Goodman-Martinez-Thompson correlation in its calculations. diff --git a/info/xemacs.info-14 b/info/xemacs.info-14 index 25967a3..3a1dcaf 100644 --- a/info/xemacs.info-14 +++ b/info/xemacs.info-14 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -149,7 +149,7 @@ other than Mayan; for the Mayan calendar, see the following section. These commands ask you for a date on the other calendar, move point to the Gregorian calendar date equivalent to that date, and display the other calendar's date in the echo area. Emacs uses strict completion -(*note Completion::.) whenever it asks you to type a month name, so you +(*note Completion::) whenever it asks you to type a month name, so you don't have to worry about the spelling of Hebrew, Islamic, or French names. @@ -227,14 +227,14 @@ date and moves point to the previous occurrence of that date. Similarly, type `g m n h' to go to the next occurrence of a haab date. The Maya also used the combination of the tzolkin date and the haab -date. This combination is a cycle of about 52 years called a *calendar -round*. If you type `g m p c', Emacs asks you for both a haab and a +date. This combination is a cycle of about 52 years called a _calendar +round_. If you type `g m p c', Emacs asks you for both a haab and a tzolkin date and then moves point to the previous occurrence of that combination. Use `g m n c' to move point to the next occurrence of a combination. These commands signal an error if the haab/tzolkin date combination you have typed is impossible. - Emacs uses strict completion (*note Completion::.) whenever it asks + Emacs uses strict completion (*note Completion::) whenever it asks you to type a Mayan name, so you don't have to worry about spelling.  @@ -271,7 +271,7 @@ of the entries. Such formatting is purely a matter of taste. Although you probably will start by creating a diary manually, Emacs provides a number of commands to let you view, add, and change diary entries. You can also share diary entries with other users (*note -Included Diary Files::.). +Included Diary Files::). * Menu: @@ -334,7 +334,7 @@ different face (or places a `+' after these dates, if display with multiple faces is not available). The command applies both to the currently visible months and to other months that subsequently become visible by scrolling. To turn marking off and erase the current marks, -type `u', which also turns off holiday marks (*note Holidays::.). +type `u', which also turns off holiday marks (*note Holidays::). To see the full diary file, rather than just some of the entries, use the `s' command. @@ -344,15 +344,14 @@ to hide entries that don't apply. The diary buffer as you see it is an illusion, so simply printing the buffer does not print what you see on your screen. There is a special -command to print hard copy of the diary buffer *as it appears*; this +command to print hard copy of the diary buffer _as it appears_; this command is `M-x print-diary-entries'. It sends the data directly to -the printer. You can customize it like `lpr-region' (*note -Hardcopy::.). +the printer. You can customize it like `lpr-region' (*note Hardcopy::). The command `M-x diary' displays the diary entries for the current date, independently of the calendar display, and optionally for the next few days as well; the variable `number-of-diary-entries' specifies how -many days to include (*note Customization::.). +many days to include (*note Customization::). If you put `(diary)' in your `.emacs' file, this automatically displays a window with the day's diary entries, when you enter Emacs. @@ -412,13 +411,13 @@ entries, but can cause confusion if you ask for more than one day's entries. You can edit the diary entries as they appear in the window, but it -is important to remember that the buffer displayed contains the *entire* +is important to remember that the buffer displayed contains the _entire_ diary file, with portions of it concealed from view. This means, for instance, that the `C-f' (`forward-char') command can put point at what appears to be the end of the line, but what is in reality the middle of some concealed line. - *Be careful when editing the diary entries!* Inserting additional + _Be careful when editing the diary entries!_ Inserting additional lines or adding/deleting characters in the middle of a visible line cannot cause problems, but editing at the end of a line may not do what you expect. Deleting a line may delete other invisible entries that @@ -466,7 +465,7 @@ any day in March of any year; so does `march *'. If you prefer the European style of writing dates--in which the day comes before the month--type `M-x european-calendar' while in the -calendar, or set the variable `european-calendar-style' to `t' *before* +calendar, or set the variable `european-calendar-style' to `t' _before_ using any calendar or diary command. This mode interprets all dates in the diary in the European manner, and also uses European style for displaying diary dates. (Note that there is no comma after the @@ -598,7 +597,7 @@ calendar style, the month and day are interchanged.) nonmarking entry, give a numeric argument to the command. For example, `C-u i a' makes a nonmarking anniversary diary entry. - Marking sexp diary entries in the calendar is *extremely* + Marking sexp diary entries in the calendar is _extremely_ time-consuming, since every date visible in the calendar window must be individually checked. So it's a good idea to make sexp diary entries nonmarking (with `&') when possible. @@ -624,7 +623,7 @@ year. based on any Emacs Lisp expression. You can use the library of built-in functions or you can write your own functions. The built-in functions include the ones shown in this section, plus a few others (*note Sexp -Diary Entries::.). +Diary Entries::). The generality of sexps lets you specify any diary entry that you can describe algorithmically. Suppose you get paid on the 21st of the month @@ -641,7 +640,7 @@ to just those dates. This example illustrates how the sexp can depend on the variable `date'; this variable is a list (MONTH DAY YEAR) that gives the Gregorian date for which the diary entries are being found. If the value of the sexp is `t', the entry applies to that date. If -the sexp evaluates to `nil', the entry does *not* apply to that date. +the sexp evaluates to `nil', the entry does _not_ apply to that date.  File: xemacs.info, Node: Calendar Customization, Prev: Diary, Up: Calendar/Diary @@ -692,7 +691,7 @@ period. The holiday list appears in a separate window. You can set the variable `mark-diary-entries-in-calendar' to `t' in order to mark any dates with diary entries. This takes effect whenever the calendar window contents are recomputed. There are two ways of -marking these dates: by changing the face (*note Faces::.), if the +marking these dates: by changing the face (*note Faces::), if the display supports that, or by placing a plus sign (`+') beside the date otherwise. @@ -738,7 +737,7 @@ default for this variable when Emacs supports multiple faces on your terminal. A similar normal hook, `today-invisible-calendar-hook' is run if the -current date is *not* visible in the window. +current date is _not_ visible in the window.  File: xemacs.info, Node: Holiday Customizing, Next: Date Display Format, Prev: Calendar Customizing, Up: Calendar Customization @@ -1051,8 +1050,8 @@ order by day and time. the standard American nor European styles suits your needs, by setting the variable `diary-date-forms'. This variable is a list of patterns for recognizing a date. Each date pattern is a list whose elements may -be regular expressions (*note Regexps::.) or the symbols `month', -`day', `year', `monthname', and `dayname'. All these elements serve as +be regular expressions (*note Regexps::) or the symbols `month', `day', +`year', `monthname', and `dayname'. All these elements serve as patterns that match certain kinds of text in the diary file. In order for the date pattern, as a whole, to match, all of its elements must match consecutively. @@ -1083,11 +1082,11 @@ standard syntax table from Fundamental mode (*note Syntax Tables: (lispref)Syntax Tables.), but with the `*' changed so that it is a word constituent. - The date patterns in the list must be *mutually exclusive* and must + The date patterns in the list must be _mutually exclusive_ and must not match any portion of the diary entry itself, just the date and one character of whitespace. If, to be mutually exclusive, the pattern must match a portion of the diary entry text--beyond the whitespace -that ends the date--then the first element of the date pattern *must* +that ends the date--then the first element of the date pattern _must_ be `backup'. This causes the date recognizer to back up to the beginning of the current word of the diary entry, after finishing the match. Even if you use `backup', the date pattern must absolutely not diff --git a/info/xemacs.info-15 b/info/xemacs.info-15 index 79ce826..ebeb838 100644 --- a/info/xemacs.info-15 +++ b/info/xemacs.info-15 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -156,7 +156,7 @@ applies to just those dates. This example illustrates how the sexp can depend on the variable `date'; this variable is a list (MONTH DAY YEAR) that gives the Gregorian date for which the diary entries are being found. If the value of the expression is `t', the entry applies to -that date. If the expression evaluates to `nil', the entry does *not* +that date. If the expression evaluates to `nil', the entry does _not_ apply to that date. The following sexp diary entries take advantage of the ability (in @@ -222,7 +222,7 @@ the Hebrew calendar in certain standard ways: scripture reading. `%%(diary-sabbath-candles)' - Make a Friday diary entry that tells the *local time* of Sabbath + Make a Friday diary entry that tells the _local time_ of Sabbath candle lighting. `%%(diary-omer)' @@ -230,7 +230,7 @@ the Hebrew calendar in certain standard ways: `%%(diary-yahrzeit MONTH DAY YEAR) NAME' Make a diary entry marking the anniversary of a date of death. - The date is the *Gregorian* (civil) date of death. The diary + The date is the _Gregorian_ (civil) date of death. The diary entry appears on the proper Hebrew calendar anniversary and on the day before. (In the European style, the order of the parameters is changed to DAY, MONTH, YEAR.) @@ -602,7 +602,7 @@ and output going to that buffer. by XEmacs directly to the subshell, as "terminal input." Any "echo" of your input is the responsibility of the subshell. (The exception is the terminal escape character, which by default is `C-c'. *note Term -Mode::..) Any "terminal output" from the subshell goes into the buffer, +Mode::.) Any "terminal output" from the subshell goes into the buffer, advancing point. Some programs (such as XEmacs itself) need to control the appearance @@ -1063,12 +1063,11 @@ ones that exist for the sake of customization. Emacs does not values, and thereby alter and control the behavior of certain Emacs commands. These variables are called "options". Most options are documented in this manual and appear in the Variable Index (*note -Variable Index::.). +Variable Index::). One example of a variable which is an option is `fill-column', which specifies the position of the right margin (as a number of characters -from the left margin) to be used by the fill commands (*note -Filling::.). +from the left margin) to be used by the fill commands (*note Filling::). * Menu: @@ -1177,7 +1176,7 @@ it. It looks like this, in part: This says that the buffer displays the contents of the `Emacs' group. The other groups are listed because they are its contents. But they -are listed differently, without indentation and dashes, because *their* +are listed differently, without indentation and dashes, because _their_ contents are not included. Each group has a single-line documentation string; the `Emacs' group also has a `[State]' line. diff --git a/info/xemacs.info-16 b/info/xemacs.info-16 index 457a018..de5c1bf 100644 --- a/info/xemacs.info-16 +++ b/info/xemacs.info-16 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -202,7 +202,7 @@ field. When the attribute is enabled, you can change the attribute value in the usual ways. Setting, saving and resetting a face work like the same operations -for options (*note Changing an Option::.). +for options (*note Changing an Option::). A face can specify different appearances for different types of display. For example, a face can make text red on a color display, but @@ -261,7 +261,7 @@ can show their contents in the usual way, by invoking `[Show]'. customize-apropos'. You specify a regular expression as argument; then all options, faces and groups whose names match this regular expression are set up in the customization buffer. If you specify an empty regular -expression, this includes *all* groups, options and faces in the +expression, this includes _all_ groups, options and faces in the customization buffer (but that takes a long time). If you change option values and then decide the change was a mistake, @@ -464,8 +464,8 @@ list. That is inappropriate. Whether you use Auto Fill mode or not is a matter of personal taste, not a matter of the contents of particular files. If you want to use Auto Fill, set up major mode hooks with your `.emacs' file to turn it on (when appropriate) for you alone (*note -Init File::.). Don't try to use a local variable list that would -impose your taste on everyone working with the file. +Init File::). Don't try to use a local variable list that would impose +your taste on everyone working with the file. XEmacs allows you to specify local variables in the first line of a file, in addition to specifying them in the `Local Variables' section @@ -604,7 +604,7 @@ one, you must give it a name using `M-x name-last-kbd-macro'. This reads a name as an argument using the minibuffer and defines that name to execute the macro. The macro name is a Lisp symbol, and defining it in this way makes it a valid command name for calling with `M-x' or for -binding a key to with `global-set-key' (*note Keymaps::.). If you +binding a key to with `global-set-key' (*note Keymaps::). If you specify a name that has a prior definition other than another keyboard macro, Emacs prints an error message and nothing is changed. @@ -618,9 +618,9 @@ This inserts some Lisp code that, when executed later, will define the same macro with the same definition it has now. You need not understand Lisp code to do this, because `insert-kbd-macro' writes the Lisp code for you. Then save the file. You can load the file with -`load-file' (*note Lisp Libraries::.). If the file you save in is your -initialization file `~/.emacs' (*note Init File::.), then the macro -will be defined each time you run Emacs. +`load-file' (*note Lisp Libraries::). If the file you save in is your +initialization file `~/.emacs' (*note Init File::), then the macro will +be defined each time you run Emacs. If you give `insert-kbd-macro' a prefix argument, it creates additional Lisp code to record the keys (if any) that you have bound to @@ -1160,7 +1160,7 @@ argument defaults to the current buffer's syntax table. 1. The first character in the string specifies the syntactic class. It is one of the characters in the previous table (*note Syntax - Entry::.). + Entry::). 2. The second character is the matching delimiter. For a character that is not an opening or closing delimiter, this should be a diff --git a/info/xemacs.info-17 b/info/xemacs.info-17 index 375032b..93f33a0 100644 --- a/info/xemacs.info-17 +++ b/info/xemacs.info-17 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -39,8 +39,8 @@ The Init File, .emacs home directory. This file, if it exists, should contain Lisp code. It is called your initialization file or "init file". Use the command line switch `-q' to tell Emacs whether to load an init file (*note -Entering Emacs::.). Use the command line switch `-user-init-file' -(*note Command Switches::.) to tell Emacs to load a different file +Entering Emacs::). Use the command line switch `-user-init-file' +(*note Command Switches::) to tell Emacs to load a different file instead of `~/.emacs'. When the `.emacs' file is read, the variable `user-init-file' says @@ -56,7 +56,7 @@ loaded. If you have a large amount of code in your `.emacs' file, you should move it into another file named `SOMETHING.el', byte-compile it (*note -Lisp Libraries::.), and load that file from your `.emacs' file using +Lisp Libraries::), and load that file from your `.emacs' file using `load'. * Menu: @@ -75,7 +75,7 @@ Init File Syntax expressions. Each consists of a function name followed by arguments, all surrounded by parentheses. For example, `(setq fill-column 60)' represents a call to the function `setq' which is used to set the -variable `fill-column' (*note Filling::.) to 60. +variable `fill-column' (*note Filling::) to 60. The second argument to `setq' is an expression for the new value of the variable. This can be a constant, a variable, or a function call @@ -191,7 +191,7 @@ Lisp expressions: When the argument to `load' is a relative pathname, not starting with `/' or `~', `load' searches the directories in `load-path' - (*note Loading::.). + (*note Loading::). * Load the compiled Lisp file `foo.elc' from your home directory. @@ -693,7 +693,7 @@ Resource List `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name Color of the top and bottom shadows for the toolbars. NOTE: These - resources do *not* have anything to do with the top and bottom + resources do _not_ have anything to do with the top and bottom toolbars (i.e. the toolbars at the top and bottom of the frame)! Rather, they affect the top and bottom shadows around the edges of all four kinds of toolbars. @@ -702,7 +702,7 @@ Resource List `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name Pixmap of the top and bottom shadows for the toolbars. If set, these resources override the corresponding color resources. NOTE: - These resources do *not* have anything to do with the top and + These resources do _not_ have anything to do with the top and bottom toolbars (i.e. the toolbars at the top and bottom of the frame)! Rather, they affect the top and bottom shadows around the edges of all four kinds of toolbars. @@ -968,9 +968,9 @@ editing level and cancel the command which invoked it. Quitting with `C-g' does not do this, and could not do this because it is used to cancel a partially typed command within the recursive editing level. Both operations are useful. For example, if you are in the Emacs -debugger (*note Lisp Debug::.) and have typed `C-u 8' to enter a -numeric argument, you can cancel that argument with `C-g' and remain in -the debugger. +debugger (*note Lisp Debug::) and have typed `C-u 8' to enter a numeric +argument, you can cancel that argument with `C-g' and remain in the +debugger. The command `M-x top-level' is equivalent to "enough" `C-]' commands to get you out of all the levels of recursive edits that you are in. @@ -1000,7 +1000,7 @@ work, and how to recognize them and correct them. * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Unasked-for Search:: Spontaneous entry to incremental search. -* Emergency Escape:: Emergency escape-- +* Emergency Escape:: Emergency escape--- What to do if Emacs stops responding. * Total Frustration:: When you are at your wits' end. diff --git a/info/xemacs.info-18 b/info/xemacs.info-18 index 896c487..f97f6ef 100644 --- a/info/xemacs.info-18 +++ b/info/xemacs.info-18 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -145,7 +145,7 @@ backtrace showing how the Lisp program in Emacs arrived at the error. To make the backtrace, you must execute the Lisp expression `(setq debug-on-error t)' before the error happens (that is to say, you must execute that expression and then make the bug happen). This causes the -Lisp debugger to run (*note Lisp Debug::.). The debugger's backtrace +Lisp debugger to run (*note Lisp Debug::). The debugger's backtrace can be copied as text into the bug report. This use of the debugger is possible only if you know how to make the bug happen again. Do note the error message the first time the bug happens, so if you can't make @@ -253,7 +253,7 @@ Backup File Balance Parentheses Emacs can balance parentheses manually or automatically. Manual balancing is done by the commands to move over balanced expressions - (*note Lists::.). Automatic balancing is done by blinking the + (*note Lists::). Automatic balancing is done by blinking the parenthesis that matches one just inserted (*note Matching Parens: Matching.). @@ -308,8 +308,8 @@ Command Command Name A command name is the name of a Lisp symbol which is a command - (*note Commands::.). You can invoke any command by its name using - `M-x' (*note M-x::.). + (*note Commands::). You can invoke any command by its name using + `M-x' (*note M-x::). Comments A comment is text in a program which is intended only for the @@ -321,8 +321,8 @@ Comments Compilation Compilation is the process of creating an executable program from source code. Emacs has commands for compiling files of Emacs Lisp - code (*note Lisp Libraries::.) and programs in C and other - languages (*note Compilation::.). + code (*note Lisp Libraries::) and programs in C and other languages + (*note Compilation::). Complete Key A complete key is a character or sequence of characters which, @@ -367,7 +367,7 @@ Current Buffer current one. *Note Buffers::. Current Line - The line point is on (*note Point::.). + The line point is on (*note Point::). Current Paragraph The paragraph that point is in. If point is between paragraphs, @@ -387,8 +387,8 @@ Cursor Customization Customization is making minor changes in the way Emacs works. It - is often done by setting variables (*note Variables::.) or by - rebinding keys (*note Keymaps::.). + is often done by setting variables (*note Variables::) or by + rebinding keys (*note Keymaps::). Default Argument The default for an argument is the value that is used if you do not @@ -781,10 +781,10 @@ Prompt A prompt is text printed to ask the user for input. Printing a prompt is called prompting. Emacs prompts always appear in the echo area (q.v.). One kind of prompting happens when the - minibuffer is used to read an argument (*note Minibuffer::.); the + minibuffer is used to read an argument (*note Minibuffer::); the echoing which happens when you pause in the middle of typing a multi-character key is also a kind of prompting (*note Echo - Area::.). + Area::). Quitting Quitting means cancelling a partially typed command or a running @@ -923,7 +923,7 @@ Termscript File explicitly instructed to do so. *Note Bugs::. Text - Text has two meanings (*note Text::.): + Text has two meanings (*note Text::): * Data consisting of a sequence of characters, as opposed to binary numbers, images, graphics commands, executable @@ -946,7 +946,7 @@ Transposition Transposing two units of text means putting each one into the place formerly occupied by the other. There are Emacs commands to transpose two adjacent characters, words, sexps (q.v.), or lines - (*note Transpose::.). + (*note Transpose::). Truncation Truncating text lines in the display means leaving out any text on diff --git a/info/xemacs.info-19 b/info/xemacs.info-19 index cc37b6d..3b4ba89 100644 --- a/info/xemacs.info-19 +++ b/info/xemacs.info-19 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -533,8 +533,8 @@ Key (Character) Index * C->: Setting Mark. * C-@ (Calendar mode): Mark and Region. * C-\: Select Input Method. -* C-] <1>: Recursive Edit. -* C-]: Quitting. +* C-] <1>: Quitting. +* C-]: Recursive Edit. * C-_: Undo. * C-a: Basic. * C-a (Calendar mode): Move to Beginning or End. @@ -622,8 +622,8 @@ Key (Character) Index * C-h C-c: Help. * C-h C-d: Help. * C-h C-w: Help. -* C-h f <1>: Help. -* C-h f: Documentation. +* C-h f <1>: Documentation. +* C-h f: Help. * C-h h: Mule Intro. * C-h I: Select Input Method. * C-h i: Help. @@ -635,20 +635,20 @@ Key (Character) Index * C-h s: Syntax Change. * C-h t <1>: Help. * C-h t: Basic. -* C-h v <1>: Help. -* C-h v <2>: Examining. -* C-h v: Documentation. +* C-h v <1>: Examining. +* C-h v <2>: Documentation. +* C-h v: Help. * C-h w: Help. * C-HOME: Basic. * C-k: Killing. -* C-l <1>: Basic. -* C-l: Scrolling. +* C-l <1>: Scrolling. +* C-l: Basic. * C-l (query-replace): Query Replace. * C-LEFT: Basic. -* C-M-@ <1>: Marking Objects. -* C-M-@: Lists. -* C-M-\ <1>: Indentation Commands. -* C-M-\: Multi-line Indent. +* C-M-@ <1>: Lists. +* C-M-@: Marking Objects. +* C-M-\ <1>: Multi-line Indent. +* C-M-\: Indentation Commands. * C-M-a: Defuns. * C-M-a (Fortran mode): Fortran Motion. * C-M-b: Lists. @@ -657,18 +657,18 @@ Key (Character) Index * C-M-e: Defuns. * C-M-e (Fortran mode): Fortran Motion. * C-M-f: Lists. -* C-M-h <1>: Marking Objects. -* C-M-h: Defuns. +* C-M-h <1>: Defuns. +* C-M-h: Marking Objects. * C-M-h (Fortran mode): Fortran Motion. -* C-M-k <1>: Killing. -* C-M-k: Lists. +* C-M-k <1>: Lists. +* C-M-k: Killing. * C-M-n: Lists. * C-M-o: Indentation Commands. * C-M-p: Lists. * C-M-q: Multi-line Indent. * C-M-q (Fortran mode): ForIndent Commands. -* C-M-t <1>: Transpose. -* C-M-t: Lists. +* C-M-t <1>: Lists. +* C-M-t: Transpose. * C-M-u: Lists. * C-M-v <1>: Other Window. * C-M-v: Minibuffer Edit. @@ -745,8 +745,8 @@ Key (Character) Index * C-x C-l: Case. * C-x C-o <1>: Killing. * C-x C-o: Blank Lines. -* C-x C-p <1>: Marking Objects. -* C-x C-p: Pages. +* C-x C-p <1>: Pages. +* C-x C-p: Marking Objects. * C-x C-q: Misc Buffer. * C-x C-q (version control): Editing with VC. * C-x C-s: Saving. @@ -802,26 +802,26 @@ Key (Character) Index * C-z: Exiting. * control key: Intro to Keystrokes. * d (Calendar mode): Diary Commands. -* DEL <1>: Basic. -* DEL <2>: Killing. +* DEL <1>: Program Modes. +* DEL <2>: Major Modes. * DEL <3>: Kill Errors. -* DEL <4>: Program Modes. -* DEL: Major Modes. +* DEL <4>: Killing. +* DEL: Basic. * DEL (isearch-mode): Incremental Search. * DEL (query-replace): Query Replace. * DOWN: Basic. * END: Basic. -* ESC <1>: Key Sequences. -* ESC: Meta Key. +* ESC <1>: Meta Key. +* ESC: Key Sequences. * ESC (query-replace): Query Replace. * g CHAR (Calendar mode): From Other Calendar. * g d (Calendar mode): Specified Dates. * g m l (Calendar mode): Mayan Calendar. * h (Calendar mode): Holidays. * HOME: Basic. -* hyper key <1>: Intro to Keystrokes. +* hyper key <1>: Super and Hyper Keys. * hyper key <2>: Representing Keystrokes. -* hyper key: Super and Hyper Keys. +* hyper key: Intro to Keystrokes. * i a (Calendar mode): Special Diary Entries. * i b (Calendar mode): Special Diary Entries. * i c (Calendar mode): Special Diary Entries. @@ -831,11 +831,11 @@ Key (Character) Index * i y (Calendar mode): Adding to Diary. * LEFT: Basic. * LFD <1>: Basic Indent. -* LFD <2>: String Key Sequences. -* LFD: Major Modes. +* LFD <2>: Major Modes. +* LFD: String Key Sequences. * LFD (TeX mode): TeX Editing. -* M (Calendar mode): Lunar Phases. * m (Calendar mode): Diary Commands. +* M (Calendar mode): Lunar Phases. * M-!: Single Shell. * M-$: Spelling. * M-%: Query Replace. @@ -864,8 +864,8 @@ Key (Character) Index * M-\ <1>: Indentation Commands. * M-\: Killing. * M-]: Paragraphs. -* M-^ <1>: Killing. -* M-^: Indentation Commands. +* M-^ <1>: Indentation Commands. +* M-^: Killing. * M-a: Sentences. * M-a (Calendar mode): Move to Beginning or End. * M-b: Words. @@ -873,9 +873,9 @@ Key (Character) Index * M-C-s: Regexp Search. * M-d <1>: Words. * M-d: Killing. -* M-DEL <1>: Killing. +* M-DEL <1>: Words. * M-DEL <2>: Kill Errors. -* M-DEL: Words. +* M-DEL: Killing. * M-e: Sentences. * M-e (Calendar mode): Move to Beginning or End. * M-ESC: Lisp Eval. @@ -884,8 +884,8 @@ Key (Character) Index * M-h <1>: Paragraphs. * M-h: Marking Objects. * M-i: Tab Stops. -* M-k <1>: Killing. -* M-k: Sentences. +* M-k <1>: Sentences. +* M-k: Killing. * M-l: Case. * M-LFD: Comments. * M-LFD (Fortran mode): ForIndent Commands. @@ -894,23 +894,23 @@ Key (Character) Index * M-n: Repetition. * M-n (isearch-mode): Incremental Search. * M-n (Shell mode): Shell Mode. -* M-p <1>: Repetition. -* M-p: Nroff Mode. +* M-p <1>: Nroff Mode. +* M-p: Repetition. * M-p (isearch-mode): Incremental Search. * M-p (Shell mode): Shell Mode. * M-q: Fill Commands. * M-r: Basic. * M-s: Fill Commands. * M-SPC: Killing. -* M-t <1>: Transpose. -* M-t: Words. +* M-t <1>: Words. +* M-t: Transpose. * M-TAB <1>: Tabs in Picture. * M-TAB: Lisp Completion. * M-TAB (customization buffer): Changing an Option. * M-TAB (isearch-mode): Incremental Search. * M-u: Case. -* M-v <1>: Basic. -* M-v: Scrolling. +* M-v <1>: Scrolling. +* M-v: Basic. * M-v (Calendar mode): Scroll Calendar. * M-w: Kill Ring. * M-x: M-x. @@ -926,10 +926,10 @@ Key (Character) Index * o (Calendar mode): Specified Dates. * p (Calendar mode): To Other Calendar. * p d (Calendar mode): General Calendar. -* PGDN: Basic. * pgdn: Scrolling. -* PGUP: Basic. +* PGDN: Basic. * pgup: Scrolling. +* PGUP: Basic. * prior: Scrolling. * q (Calendar mode): General Calendar. * RET: Basic. @@ -943,16 +943,16 @@ Key (Character) Index * SPC: Completion. * SPC (Calendar mode): General Calendar. * SPC (query-replace): Query Replace. -* super key <1>: Intro to Keystrokes. -* super key <2>: Super and Hyper Keys. -* super key: Representing Keystrokes. +* super key <1>: Super and Hyper Keys. +* super key <2>: Representing Keystrokes. +* super key: Intro to Keystrokes. * t (Calendar mode): LaTeX Calendar. -* TAB <1>: String Key Sequences. -* TAB <2>: Major Modes. -* TAB <3>: Basic Indent. -* TAB <4>: Text Mode. +* TAB <1>: Basic Indent. +* TAB <2>: Text Mode. +* TAB <3>: Indentation. +* TAB <4>: Major Modes. * TAB <5>: Completion. -* TAB: Indentation. +* TAB: String Key Sequences. * TAB (customization buffer): Changing an Option. * TAB (Shell mode): Shell Mode. * u (Calendar mode) <1>: Diary Commands. diff --git a/info/xemacs.info-2 b/info/xemacs.info-2 index 81da987..43a9b7e 100644 --- a/info/xemacs.info-2 +++ b/info/xemacs.info-2 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -135,7 +135,7 @@ manual for information on manipulating X windows. When you are working under X, each X window (that is, each XEmacs frame) has a menu bar for mouse-controlled operations (*note Pull-down -Menus::.). +Menus::). XEmacs under X is also a multi-frame XEmacs. You can use the New Frame menu item from the File menu to create a new XEmacs frame in a @@ -826,7 +826,7 @@ Clear menu items. When you select a menu item, Emacs executes the equivalent command. Most commands on the Edit menu work on a block of text, the X selection. They appear faded until you select a block of text (activate a region) with the mouse. *Note Using X Selections::, -*note Killing::., and *note Yanking::. for more information. +*note Killing::, and *note Yanking:: for more information. Undo Undoes the previous command. Undo is equivalent to the Emacs @@ -1021,12 +1021,12 @@ Customizing XEmacs Menus menu items and disabling or enabling existing menu items. The following functions are available: -`add-menu: (MENU-PATH MENU-NAME MENU-ITEMS &OPTIONAL BEFORE)' +`add-menu: (MENU-PATH MENU-NAME MENU-ITEMS &optional BEFORE)' Add a menu to the menu bar or one of its submenus. -`add-menu-item: (MENU-PATH ITEM-NAME FUNCTION ENABLED-P - &optional before)' Add a menu item to a menu, creating the menu - first if necessary. +`add-menu-item: (MENU-PATH ITEM-NAME FUNCTION' + ENABLED-P &optional BEFORE) Add a menu item to a menu, creating + the menu first if necessary. `delete-menu-item: (PATH)' Remove the menu item defined by PATH from the menu hierarchy. diff --git a/info/xemacs.info-20 b/info/xemacs.info-20 index aaede94..c212a61 100644 --- a/info/xemacs.info-20 +++ b/info/xemacs.info-20 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -37,11 +37,11 @@ Command and Function Index * Menu: -* abbrev-mode <1>: Abbrevs. -* abbrev-mode: Minor Modes. +* abbrev-mode <1>: Minor Modes. +* abbrev-mode: Abbrevs. * abbrev-prefix-mark: Expanding Abbrevs. -* abort-recursive-edit <1>: Recursive Edit. -* abort-recursive-edit: Quitting. +* abort-recursive-edit <1>: Quitting. +* abort-recursive-edit: Recursive Edit. * add-change-log-entry: Change Log. * add-global-abbrev: Defining Abbrevs. * add-menu: Menu Customization. @@ -61,11 +61,11 @@ Command and Function Index * back-to-indentation: Indentation Commands. * backward-char: Basic. * backward-delete-char-untabify: Program Modes. -* backward-kill-sentence <1>: Kill Errors. -* backward-kill-sentence <2>: Sentences. +* backward-kill-sentence <1>: Sentences. +* backward-kill-sentence <2>: Kill Errors. * backward-kill-sentence: Killing. -* backward-kill-word <1>: Kill Errors. -* backward-kill-word <2>: Words. +* backward-kill-word <1>: Words. +* backward-kill-word <2>: Kill Errors. * backward-kill-word: Killing. * backward-list: Lists. * backward-page: Pages. @@ -143,8 +143,8 @@ Command and Function Index * calendar-unmark: Holidays. * call-last-kbd-macro: Basic Kbd Macro. * cancel-debug-on-entry: Lisp Debug. -* capitalize-word <1>: Fixing Case. -* capitalize-word: Case. +* capitalize-word <1>: Case. +* capitalize-word: Fixing Case. * center-line: Fill Commands. * clear-rectangle: Rectangles. * comint-delchar-or-maybe-eof: Shell Mode. @@ -188,9 +188,9 @@ Command and Function Index * define-abbrevs: Saving Abbrevs. * define-key <1>: Programmatic Rebinding. * define-key: Interactive Rebinding. -* delete-backward-char <1>: Basic. +* delete-backward-char <1>: Kill Errors. * delete-backward-char <2>: Killing. -* delete-backward-char: Kill Errors. +* delete-backward-char: Basic. * delete-blank-lines <1>: Killing. * delete-blank-lines: Blank Lines. * delete-char <1>: Basic Picture. @@ -211,8 +211,8 @@ Command and Function Index * describe-coding-system: Coding Systems. * describe-copying: Help. * describe-distribution: Help. -* describe-function <1>: Help. -* describe-function: Documentation. +* describe-function <1>: Documentation. +* describe-function: Help. * describe-input-method: Select Input Method. * describe-key: Help. * describe-key-briefly: Help. @@ -220,16 +220,16 @@ Command and Function Index * describe-mode: Help. * describe-no-warranty: Help. * describe-syntax: Syntax Change. -* describe-variable <1>: Documentation. -* describe-variable <2>: Examining. +* describe-variable <1>: Examining. +* describe-variable <2>: Documentation. * describe-variable: Help. * diary: Diary Commands. -* diary-anniversary <1>: Special Diary Entries. -* diary-anniversary: Sexp Diary Entries. +* diary-anniversary <1>: Sexp Diary Entries. +* diary-anniversary: Special Diary Entries. * diary-astro-day-number: Sexp Diary Entries. * diary-block: Special Diary Entries. -* diary-cyclic <1>: Special Diary Entries. -* diary-cyclic: Sexp Diary Entries. +* diary-cyclic <1>: Sexp Diary Entries. +* diary-cyclic: Special Diary Entries. * diary-day-of-year: Sexp Diary Entries. * diary-float: Special Diary Entries. * diary-french-date: Sexp Diary Entries. @@ -303,8 +303,8 @@ Command and Function Index * fill-region-as-paragraph: Fill Commands. * find-alternate-file: Visiting. * find-file: Visiting. -* find-file-other-frame <1>: XEmacs under X. -* find-file-other-frame: Visiting. +* find-file-other-frame <1>: Visiting. +* find-file-other-frame: XEmacs under X. * find-file-other-window <1>: Pop Up Window. * find-file-other-window: Visiting. * find-tag: Find Tag. @@ -329,8 +329,8 @@ Command and Function Index * forward-sexp: Lists. * forward-text-line: Nroff Mode. * forward-word: Words. -* global-set-key <1>: Interactive Rebinding. -* global-set-key: Programmatic Rebinding. +* global-set-key <1>: Programmatic Rebinding. +* global-set-key: Interactive Rebinding. * goto-char: Basic. * goto-line: Basic. * hanoi: Amusements. @@ -402,8 +402,8 @@ Command and Function Index * kill-output-from-shell: Shell Mode. * kill-rectangle: Rectangles. * kill-region: Killing. -* kill-sentence <1>: Killing. -* kill-sentence: Sentences. +* kill-sentence <1>: Sentences. +* kill-sentence: Killing. * kill-sexp <1>: Lists. * kill-sexp: Killing. * kill-some-buffers: Kill Buffer. @@ -433,8 +433,8 @@ Command and Function Index * load: Loading. * load-default-sounds: Audible Bell. * load-file: Loading. -* load-library <1>: Startup Paths. -* load-library: Loading. +* load-library <1>: Loading. +* load-library: Startup Paths. * load-sound-file: Audible Bell. * local-set-key: Interactive Rebinding. * local-unset-key: Interactive Rebinding. @@ -445,8 +445,8 @@ Command and Function Index * mail-cc: Mail Mode. * mail-fill-yanked-message: Mail Mode. * mail-interactive-insert-alias: Mail Headers. -* mail-other-window <1>: Pop Up Window. -* mail-other-window: Sending Mail. +* mail-other-window <1>: Sending Mail. +* mail-other-window: Pop Up Window. * mail-send: Mail Mode. * mail-send-and-exit: Mail Mode. * mail-signature: Mail Mode. @@ -481,8 +481,8 @@ Command and Function Index * mark-page: Marking Objects. * mark-paragraph <1>: Paragraphs. * mark-paragraph: Marking Objects. -* mark-sexp <1>: Marking Objects. -* mark-sexp: Lists. +* mark-sexp <1>: Lists. +* mark-sexp: Marking Objects. * mark-whole-buffer: Marking Objects. * mark-word <1>: Words. * mark-word: Marking Objects. @@ -555,8 +555,8 @@ Command and Function Index * picture-tab-search: Tabs in Picture. * picture-yank-rectangle: Rectangles in Picture. * picture-yank-rectangle-from-register: Rectangles in Picture. -* plain-tex-mode: TeX Mode. * plain-TeX-mode: TeX Mode. +* plain-tex-mode: TeX Mode. * play-sound: Audible Bell. * point-to-register: RegPos. * prefer-coding-system: Recognize Coding. @@ -600,8 +600,8 @@ Command and Function Index * scroll-calendar-right-three-months: Scroll Calendar. * scroll-down: Scrolling. * scroll-left: Horizontal Scrolling. -* scroll-other-window <1>: Other Window. -* scroll-other-window: General Calendar. +* scroll-other-window <1>: General Calendar. +* scroll-other-window: Other Window. * scroll-right: Horizontal Scrolling. * scroll-up: Scrolling. * search-backward: Non-Incremental Search. @@ -663,13 +663,13 @@ Command and Function Index * sunrise-sunset: Sunrise/Sunset. * suspend-emacs: Exiting. * switch-to-buffer: Select Buffer. -* switch-to-buffer-other-frame <1>: XEmacs under X. -* switch-to-buffer-other-frame: Select Buffer. -* switch-to-buffer-other-window <1>: Select Buffer. -* switch-to-buffer-other-window: Pop Up Window. +* switch-to-buffer-other-frame <1>: Select Buffer. +* switch-to-buffer-other-frame: XEmacs under X. +* switch-to-buffer-other-window <1>: Pop Up Window. +* switch-to-buffer-other-window: Select Buffer. * switch-to-other-buffer: Select Buffer. -* tab-to-tab-stop <1>: Tab Stops. -* tab-to-tab-stop: Text Mode. +* tab-to-tab-stop <1>: Text Mode. +* tab-to-tab-stop: Tab Stops. * tabify: Just Spaces. * tags-apropos: List Tags. * tags-loop-continue: Tags Search. @@ -683,8 +683,8 @@ Command and Function Index * tex-insert-braces: TeX Editing. * tex-insert-quote: TeX Editing. * tex-kill-job: TeX Print. -* TeX-mode: TeX Mode. * tex-mode: TeX Mode. +* TeX-mode: TeX Mode. * tex-print: TeX Print. * tex-recenter-output-buffer: TeX Print. * tex-region: TeX Print. @@ -693,15 +693,15 @@ Command and Function Index * text-mode: Text Mode. * toggle-input-method: Select Input Method. * toggle-read-only: Misc Buffer. -* top-level <1>: Recursive Edit. -* top-level: Quitting. -* transpose-chars <1>: Basic. -* transpose-chars: Transpose. +* top-level <1>: Quitting. +* top-level: Recursive Edit. +* transpose-chars <1>: Transpose. +* transpose-chars: Basic. * transpose-lines: Transpose. * transpose-sexps <1>: Lists. * transpose-sexps: Transpose. -* transpose-words <1>: Transpose. -* transpose-words: Words. +* transpose-words <1>: Words. +* transpose-words: Transpose. * undo: Undo. * unexpand-abbrev: Expanding Abbrevs. * universal-argument: Arguments. @@ -709,8 +709,8 @@ Command and Function Index * untabify: Just Spaces. * up-list: TeX Editing. * upcase-region: Case. -* upcase-word <1>: Fixing Case. -* upcase-word: Case. +* upcase-word <1>: Case. +* upcase-word: Fixing Case. * validate-tex-buffer: TeX Editing. * vc-cancel-version: Editing with VC. * vc-create-snapshot: Making Snapshots. diff --git a/info/xemacs.info-21 b/info/xemacs.info-21 index cc7f100..06d3b1e 100644 --- a/info/xemacs.info-21 +++ b/info/xemacs.info-21 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -97,8 +97,8 @@ Variable Index * calendar-time-zone: Sunrise/Sunset. * calendar-today-marker: Calendar Customizing. * calendar-week-start-day: Move to Beginning or End. -* case-fold-search <1>: Search Case. -* case-fold-search: Replacement and Case. +* case-fold-search <1>: Replacement and Case. +* case-fold-search: Search Case. * case-replace: Replacement and Case. * christian-holidays: Holiday Customizing. * coding: Recognize Coding. @@ -178,8 +178,8 @@ Variable Index * fortran-if-indent: ForIndent Vars. * fortran-line-number-indent: ForIndent Num. * fortran-minimum-statement-indent: ForIndent Vars. -* frame-icon-title-format <1>: XEmacs under X. -* frame-icon-title-format: Command Switches. +* frame-icon-title-format <1>: Command Switches. +* frame-icon-title-format: XEmacs under X. * frame-title-format <1>: Command Switches. * frame-title-format: XEmacs under X. * general-holidays: Holiday Customizing. @@ -195,8 +195,8 @@ Variable Index * input-method-highlight-flag: Input Methods. * input-method-verbose-flag: Input Methods. * input-ring-size: Interactive Shell. -* insert-default-directory <1>: Minibuffer File. -* insert-default-directory: File Names. +* insert-default-directory <1>: File Names. +* insert-default-directory: Minibuffer File. * isearch-mode-map: Keymaps. * islamic-holidays: Holiday Customizing. * kept-new-versions: Backup Deletion. @@ -267,8 +267,8 @@ Variable Index * scroll-step: Scrolling. * search-slow-speed: Incremental Search. * search-slow-window-lines: Incremental Search. -* selective-display-ellipses <1>: Display Vars. -* selective-display-ellipses: Outline Visibility. +* selective-display-ellipses <1>: Outline Visibility. +* selective-display-ellipses: Display Vars. * sentence-end: Sentences. * shell-cd-regexp: Interactive Shell. * shell-file-name: Single Shell. @@ -337,8 +337,8 @@ Concept Index * adding menu items: Menu Customization. * adding menus: Menu Customization. * againformation: Dissociated Press. -* Apps menu <1>: Pull-down Menus. -* Apps menu: Apps Menu. +* Apps menu <1>: Apps Menu. +* Apps menu: Pull-down Menus. * apropos: Help. * architecture-specific directories: Startup Paths. * arguments (from shell): Command Switches. @@ -347,9 +347,9 @@ Concept Index * astronomical day numbers: Calendar Systems. * audible bell, changing: Audible Bell. * Auto Delete Selection menu item: Options Menu. -* Auto Fill mode <1>: Comments. -* Auto Fill mode <2>: Auto Fill. -* Auto Fill mode: Minor Modes. +* Auto Fill mode <1>: Minor Modes. +* Auto Fill mode <2>: Comments. +* Auto Fill mode: Auto Fill. * Auto-Save mode: Auto Save. * autoload: Loading. * backup file: Backup. @@ -378,8 +378,8 @@ Concept Index * calendar and LaTeX: LaTeX Calendar. * calendar, first day of week: Move to Beginning or End. * candle lighting times: Sexp Diary Entries. -* case conversion <1>: Fixing Case. -* case conversion: Case. +* case conversion <1>: Case. +* case conversion: Fixing Case. * Case Sensitive Search menu item: Options Menu. * centering: Fill Commands. * change log: Change Log. @@ -393,8 +393,8 @@ Concept Index * Clear menu item: Edit Menu. * clipboard selections: X Clipboard Selection. * coding systems: Coding Systems. -* command <1>: Commands. -* command: Key Bindings. +* command <1>: Key Bindings. +* command: Commands. * command history: Repetition. * command line arguments: Command Switches. * command name: Key Bindings. @@ -409,19 +409,19 @@ Concept Index * Coptic calendar: Calendar Systems. * Copy menu item: Edit Menu. * copying files: Misc File Ops. -* copying text <1>: Yanking. -* copying text: Accumulating Text. +* copying text <1>: Accumulating Text. +* copying text: Yanking. * core distribution: Using Packages. * crashes: Auto Save. * creating directories: File Names. * creating files: Visiting. * current buffer: Buffers. * current stack frame: Lisp Debug. -* cursor <1>: Point. -* cursor: Basic. +* cursor <1>: Basic. +* cursor: Point. * customization <1>: Customization. -* customization <2>: Commands. -* customization: Lisp Indent. +* customization <2>: Lisp Indent. +* customization: Commands. * customization buffer: Easy Customization. * customization groups: Customization Groups. * customizing faces: Face Customization. @@ -455,11 +455,11 @@ Concept Index * dribble file: Bugs. * early package hierarchies: Startup Paths. * echo area: Echo Area. -* Edit menu <1>: Pull-down Menus. -* Edit menu: Edit Menu. +* Edit menu <1>: Edit Menu. +* Edit menu: Pull-down Menus. * editable fields (customization buffer): Customization Groups. -* editing level, recursive <1>: Recursive Edit. -* editing level, recursive: Quitting. +* editing level, recursive <1>: Quitting. +* editing level, recursive: Recursive Edit. * EDT: Emulation. * Eliza: Total Frustration. * Emacs initialization file: Init File. @@ -481,12 +481,12 @@ Concept Index * expression: Lists. * file dates: Interlocking. * file directory: ListDir. -* File menu <1>: Pull-down Menus. -* File menu: File Menu. +* File menu <1>: File Menu. +* File menu: Pull-down Menus. * file names: File Names. * file protection: Interlocking. -* files <1>: Files. -* files <2>: Visiting. +* files <1>: Visiting. +* files <2>: Files. * files: Basic. * fill prefix: Fill Prefix. * filling: Filling. @@ -519,16 +519,16 @@ Concept Index * holidays: Holidays. * horizontal scrolling: Horizontal Scrolling. * ignoriginal: Dissociated Press. -* indentation <1>: Grinding. -* indentation <2>: Indentation. -* indentation: Comments. +* indentation <1>: Comments. +* indentation <2>: Grinding. +* indentation: Indentation. * inferior process: Compilation. * init file: Init File. * input methods: Input Methods. * Insert File... menu item: File Menu. * insertion: Basic. * international scripts: Mule. -* interval operator (in regexps): Create Tags Table. +* interval operator (in regexps): Etags Regexps. * invisible lines: Outline Mode. * IPA: Mule. * Islamic calendar: Calendar Systems. @@ -542,8 +542,8 @@ Concept Index * key rebinding, this session: Rebinding. * keyboard macros: Keyboard Macros. * keycode: Super and Hyper Keys. -* keymap <1>: Commands. -* keymap: Keymaps. +* keymap <1>: Keymaps. +* keymap: Commands. * keystroke: Intro to Keystrokes. * keysym: Intro to Keystrokes. * keysyms: Super and Hyper Keys. @@ -586,19 +586,19 @@ Concept Index * Mayan tzolkin calendar: Mayan Calendar. * menus <1>: Change Window. * menus: Pull-down Menus. -* message <1>: Sending Mail. -* message: Reading Mail. +* message <1>: Reading Mail. +* message: Sending Mail. * Meta: Words. -* minibuffer <1>: M-x. -* minibuffer <2>: Keymaps. +* minibuffer <1>: Keymaps. +* minibuffer <2>: M-x. * minibuffer: Minibuffer. * minor modes: Minor Modes. * mistakes, correcting <1>: Fixit. * mistakes, correcting: Undo. * mocklisp: Mocklisp. * mode hook: Program Modes. -* mode line <1>: Mode Line. -* mode line: Minor Modes. +* mode line <1>: Minor Modes. +* mode line: Mode Line. * mode, Term: Term Mode. * modified (buffer): Visiting. * modifier key: Intro to Keystrokes. @@ -621,10 +621,10 @@ Concept Index * omer count: Sexp Diary Entries. * Open File, New Frame... menu item: File Menu. * Open File... menu item: File Menu. -* option <1>: Variables. -* option: Examining. -* Options menu <1>: Pull-down Menus. -* Options menu: Options Menu. +* option <1>: Examining. +* option: Variables. +* Options menu <1>: Options Menu. +* Options menu: Pull-down Menus. * other editors: Emulation. * outlines: Outline Mode. * outragedy: Dissociated Press. @@ -669,8 +669,8 @@ Concept Index * read-only buffer: Misc Buffer. * rebinding keys, permanently: Init File. * rebinding keys, this session: Rebinding. -* rectangle <1>: RegRect. -* rectangle: Rectangles in Picture. +* rectangle <1>: Rectangles in Picture. +* rectangle: RegRect. * rectangles: Rectangles. * recursive editing level <1>: Quitting. * recursive editing level: Recursive Edit. @@ -742,11 +742,11 @@ Concept Index * TeX: TeX Mode. * text: Text. * Text mode: Text Mode. -* Tools menu <1>: Pull-down Menus. -* Tools menu: Tools Menu. +* Tools menu <1>: Tools Menu. +* Tools menu: Pull-down Menus. * top level: Mode Line. -* transposition <1>: Words. -* transposition <2>: Lists. +* transposition <1>: Lists. +* transposition <2>: Words. * transposition: Transpose. * truncation: Continuation Lines. * typos: Fixit. @@ -771,12 +771,12 @@ Concept Index * Windows menu: Change Window. * word search: Word Search. * words <1>: Case. -* words <2>: Fixing Case. -* words: Words. +* words <2>: Words. +* words: Fixing Case. * work file: Concepts of VC. * X resources: X Resources. -* yahrzeits <1>: From Other Calendar. -* yahrzeits: Sexp Diary Entries. +* yahrzeits <1>: Sexp Diary Entries. +* yahrzeits: From Other Calendar. * yanking: Yanking. diff --git a/info/xemacs.info-3 b/info/xemacs.info-3 index e663385..41e774e 100644 --- a/info/xemacs.info-3 +++ b/info/xemacs.info-3 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -91,7 +91,7 @@ normally `C-z' and `C-c'.) This Unix feature is turned off while you are in Emacs. The meanings of `C-z' and `C-x C-c' as keys in Emacs were inspired by the standard Berkeley Unix meanings of `C-z' and `C-c', but that is their only relationship with Unix. You could customize these -keys to do anything (*note Keymaps::.). +keys to do anything (*note Keymaps::).  File: xemacs.info, Node: Command Switches, Next: Startup Paths, Prev: Exiting, Up: Top @@ -221,7 +221,7 @@ order in which they appear in this table. `-debug-paths' Displays information on how XEmacs constructs the various paths - into its hierarchy on startup. (See also *note Startup Paths::..) + into its hierarchy on startup. (See also *note Startup Paths::.) `-unmapped' Do not map the initial frame. This is useful if you want to start @@ -269,7 +269,7 @@ normal processing of the other arguments by setting this variable. xemacs *.c passes each `.c' file as a separate argument to Emacs, so that Emacs -visits each file (*note Visiting::.). +visits each file (*note Visiting::). Here is an advanced example that assumes you have a Lisp program file called `hack-c-program.el' which, when loaded, performs some useful @@ -443,7 +443,7 @@ are present, they are locate the early, late, and last package hierarchies respectively. If two components are present, they locate the early and late hierarchies. If only one component is present, it locates the late hierarchy. At run time, the package path may also be -specified via the `PACKAGEPATH' environment variable. +specified via the `EMACSPACKAGEPATH' environment variable. An XEmacs package is laid out just like a normal installed XEmacs lisp directory. It may have `lisp', `etc', `info', and `lib-src' @@ -478,7 +478,7 @@ directly under `', because that is where they are in the XEmacs tarball. If XEmacs runs with the `-debug-paths' option (*note Command -Switches::.), it will print the values of these variables, hopefully +Switches::), it will print the values of these variables, hopefully aiding in debugging any problems which come up. `lisp-directory' @@ -546,7 +546,7 @@ Inserting Text To insert printing characters into the text you are editing, just type them. This inserts the characters into the buffer at the cursor -(that is, at "point"; *note Point::.). The cursor moves forward. Any +(that is, at "point"; *note Point::). The cursor moves forward. Any characters after the cursor move forward too. If the text in the buffer is `FOOBAR', with the cursor before the `B', and you type `XX', the result is `FOOXXBAR', with the cursor still before the `B'. @@ -586,7 +586,7 @@ above 200 octal, you must "quote" it by typing the character with the specified character code. A numeric argument to `C-q' specifies how many copies of the quoted -character should be inserted (*note Arguments::.). +character should be inserted (*note Arguments::). If you prefer to have text characters replace (overwrite) existing text instead of moving it to the right, you can enable Overwrite mode, a @@ -596,7 +596,7 @@ Changing the Location of Point ============================== To do more than insert characters, you have to know how to move point -(*note Point::.). Here are a few of the available commands. +(*note Point::). Here are a few of the available commands. NOTE: Many of the following commands have two versions, one that uses the function keys (e.g. or ) and one that doesn't. The @@ -744,7 +744,7 @@ from Emacs, type: The file name is given as an "argument" to the command `C-x C-f' (`find-file'). The command uses the "minibuffer" to read the argument. -You have to type to terminate the argument (*note Minibuffer::.). +You have to type to terminate the argument (*note Minibuffer::). You can also use the Open... menu item from the File menu, then type the name of the file to the prompt. @@ -765,7 +765,7 @@ which you can insert the text you want to put in the file. When you save the buffer with `C-x C-s', or by choosing Save Buffer from the File menu, the file is created. - To learn more about using files, *note Files::.. + To learn more about using files, *note Files::. Help ==== @@ -832,8 +832,8 @@ Continuation Lines curved arrow at the extreme right margin of all but the last line. The curved arrow indicates that the following screen line is not really a distinct line in the text, but just the "continuation" of a line too -long to fit the frame. You can use Auto Fill mode (*note Filling::.) -to have Emacs insert newlines automatically when a line gets too long. +long to fit the frame. You can use Auto Fill mode (*note Filling::) to +have Emacs insert newlines automatically when a line gets too long. Instead of continuation, long lines can be displayed by "truncation". This means that all the characters that do not fit in the width of the @@ -844,7 +844,7 @@ of the curved arrow inform you that truncation is in effect. To turn off continuation for a particular buffer, set the variable `truncate-lines' to non-`nil' in that buffer. Truncation instead of continuation also happens whenever horizontal scrolling is in use, and -optionally whenever side-by-side windows are in use (*note Windows::.). +optionally whenever side-by-side windows are in use (*note Windows::). Altering the value of `truncate-lines' makes it local to the current buffer; until that time, the default value is in effect. The default is initially `nil'. *Note Locals::. @@ -888,7 +888,7 @@ information, it is not displayed all the time. current page. * `M-=' (`count-lines-region') prints the number of lines in the - region (*note Mark::.). + region (*note Mark::). The command `C-x =' (`what-cursor-position') provides information about point and about the column the cursor is in. It prints a line in @@ -1127,7 +1127,7 @@ where `Find File: ' is the prompt. Typing `buffer.c' specifies the file `..'; thus, if you type `../lisp/simple.el', the file that you visit will be the one named `/u2/emacs/lisp/simple.el'. Alternatively, you can use `M-' to -kill directory names you don't want (*note Words::.). +kill directory names you don't want (*note Words::). You can also type an absolute file name, one starting with a slash or a tilde, ignoring the default directory. For example, to find the diff --git a/info/xemacs.info-4 b/info/xemacs.info-4 index 32d87d6..ca4fd3d 100644 --- a/info/xemacs.info-4 +++ b/info/xemacs.info-4 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -570,7 +570,7 @@ you are looking for commands for killing backwards and `C-h a kill-backwards ' doesn't reveal any commands, don't give up. Try just `kill', or just `backwards', or just `back'. Be persistent. Pretend you are playing Adventure. Also note that you can use a -regular expression as the argument (*note Regexps::.). +regular expression as the argument (*note Regexps::). Here is a set of arguments to give to `C-h a' that covers many classes of Emacs commands, since there are strong conventions for naming @@ -611,9 +611,9 @@ normally describes all the commands that are changed in this mode. present information about the current Emacs mode that is not covered by `C-h m'. `C-h b' displays a list of all key bindings currently in effect, with the local bindings of the current major mode first, -followed by the global bindings (*note Key Bindings::.). `C-h s' +followed by the global bindings (*note Key Bindings::). `C-h s' displays the contents of the syntax table with explanations of each -character's syntax (*note Syntax::.). +character's syntax (*note Syntax::). The other `C-h' options display various files of useful information. `C-h C-w' (`describe-no-warranty') displays details on the complete @@ -751,23 +751,23 @@ Operating on the Region Once you have created an active region, you can do many things to the text in it: - * Kill it with `C-w' (*note Killing::.). + * Kill it with `C-w' (*note Killing::). - * Save it in a register with `C-x r s' (*note Registers::.). + * Save it in a register with `C-x r s' (*note Registers::). - * Save it in a buffer or a file (*note Accumulating Text::.). + * Save it in a buffer or a file (*note Accumulating Text::). * Convert case with `C-x C-l' or `C-x C-u' - (*note Case::.). + (*note Case::). * Evaluate it as Lisp code with `M-x eval-region' (*note Lisp - Eval::.). + Eval::). - * Fill it as text with `M-q' (*note Filling::.). + * Fill it as text with `M-q' (*note Filling::). - * Print hardcopy with `M-x print-region' (*note Hardcopy::.). + * Print hardcopy with `M-x print-region' (*note Hardcopy::). - * Indent it with `C-x ' or `C-M-\' (*note Indentation::.). + * Indent it with `C-x ' or `C-M-\' (*note Indentation::).  File: xemacs.info, Node: Marking Objects, Next: Mark Ring, Prev: Using Region, Up: Mark @@ -805,12 +805,12 @@ These characters sometimes save you some typing. thus delimit an object in the buffer. `M-h' (`mark-paragraph') moves point to the beginning of the paragraph that surrounds or follows point, and puts the mark at the end of that paragraph (*note -Paragraphs::.). You can then indent, case-convert, or kill the whole +Paragraphs::). You can then indent, case-convert, or kill the whole paragraph. In the same fashion, `C-M-h' (`mark-defun') puts point before and the mark after the current or following defun (*note -Defuns::.). `C-x C-p' (`mark-page') puts point before the current page +Defuns::). `C-x C-p' (`mark-page') puts point before the current page (or the next or previous, depending on the argument), and mark at the -end (*note Pages::.). The mark goes after the terminating page +end (*note Pages::). The mark goes after the terminating page delimiter (to include it), while point goes after the preceding page delimiter (to exclude it). Finally, `C-x h' (`mark-whole-buffer') sets up the entire buffer as the region by putting point at the beginning @@ -895,7 +895,7 @@ whole lines. The selected region of text is highlighted. Once a region of text is selected, it becomes the primary X selection -(*note Using X Selections::.) as well as the Emacs selected region. You +(*note Using X Selections::) as well as the Emacs selected region. You can paste it into other X applications and use the options from the Edit pull-down menu on it. Since it is also the Emacs region, you can use Emacs region commands on it. @@ -1028,7 +1028,7 @@ distinction is made only for erasing text in the buffer.) The commands' names and individual descriptions use the words `kill' and `delete' to indicate what they do. If you perform a kill or delete command by mistake, use the `C-x u' (`undo') command to undo it (*note -Undo::.). The delete commands include `C-d' (`delete-char') and +Undo::). The delete commands include `C-d' (`delete-char') and (`delete-backward-char'), which delete only one character at a time, and those commands that delete only spaces or newlines. Commands that can destroy significant amounts of nontrivial data usually kill. @@ -1149,8 +1149,8 @@ numeric argument acts as a repeat count. A negative argument means to search backward and kill text before point. Other syntactic units can be killed: words, with `M-' and `M-d' -(*note Words::.); sexps, with `C-M-k' (*note Lists::.); and sentences, -with `C-x ' and `M-k' (*note Sentences::.). +(*note Words::); sexps, with `C-M-k' (*note Lists::); and sentences, +with `C-x ' and `M-k' (*note Sentences::).  File: xemacs.info, Node: Yanking, Next: Using X Selections, Prev: Killing, Up: Top diff --git a/info/xemacs.info-5 b/info/xemacs.info-5 index a1374e0..0923e18 100644 --- a/info/xemacs.info-5 +++ b/info/xemacs.info-5 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -517,7 +517,7 @@ Registers for later use. Text saved in a register can be copied into the buffer once or many times; a position saved in a register is used by moving point to that position. Rectangles can also be copied into and out of -registers (*note Rectangles::.). +registers (*note Rectangles::). Each register has a name, which is a single character. A register can store either a piece of text, a position, or a rectangle, but only @@ -772,7 +772,7 @@ Horizontal Scrolling that each line of text is shifted sideways in the window, and one or more characters at the beginning of each line are not displayed at all. When a window has been scrolled horizontally in this way, text lines -are truncated rather than continued (*note Continuation Lines::.), with +are truncated rather than continued (*note Continuation Lines::), with a `$' appearing in the first column when there is text truncated to the left, and in the last column when there is text truncated to the right. diff --git a/info/xemacs.info-6 b/info/xemacs.info-6 index b86f3d6..f4de8e8 100644 --- a/info/xemacs.info-6 +++ b/info/xemacs.info-6 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -358,7 +358,7 @@ Replacement occurs only after point: if you want to cover the whole buffer you must go to the beginning first. By default, all occurrences up to the end of the buffer are replaced. To limit replacement to part of the buffer, narrow to that part of the buffer before doing the -replacement (*note Narrowing::.). +replacement (*note Narrowing::). When `replace-string' exits, point is left at the last occurrence replaced. The value of point when the `replace-string' command was @@ -457,8 +457,7 @@ or a match for REGEXP are: At this point, you can type `C-r' (see below) to alter the replaced text. To undo the replacement, you can type `C-x u'. This exits the `query-replace'. If you want to do further - replacement you must use `C-x ESC' to restart (*note - Repetition::.). + replacement you must use `C-x ESC' to restart (*note Repetition::). `' to exit without doing any more replacements. @@ -624,7 +623,7 @@ characters between the words do not move. For example, `FOO, BAR' transposes into `BAR, FOO' rather than `BAR FOO,'. `C-M-t' (`transpose-sexps') is a similar command for transposing two -expressions (*note Lists::.), and `C-x C-t' (`transpose-lines') +expressions (*note Lists::), and `C-x C-t' (`transpose-lines') exchanges lines. It works like `M-t' but in determines the division of the text into syntactic units differently. @@ -730,7 +729,7 @@ rename, and append to files, and operate on file directories. * Version Control:: Version control systems (RCS and SCCS). * ListDir:: Listing the contents of a file directory. * Comparing Files:: Finding where two files differ. -* Dired:: "Editing" a directory to delete, rename, etc. +* Dired:: ``Editing'' a directory to delete, rename, etc. the files in it. * Misc File Ops:: Other things you can do on files. @@ -743,7 +742,7 @@ File Names Most Emacs commands that operate on a file require you to specify the file name. (Saving and reverting are exceptions; the buffer knows which file name to use for them.) File names are specified in the minibuffer -(*note Minibuffer::.). "Completion" is available, to make it easier to +(*note Minibuffer::). "Completion" is available, to make it easier to specify long file names. *Note Completion::. There is always a "default file name" which is used if you enter an @@ -867,10 +866,9 @@ the command with the name of the file you wish to visit, terminated by a . If you are using XEmacs under X, you can also use the Open... command from the File menu bar item. - The file name is read using the minibuffer (*note Minibuffer::.), -with defaulting and completion in the standard manner (*note File -Names::.). While in the minibuffer, you can abort `C-x C-f' by typing -`C-g'. + The file name is read using the minibuffer (*note Minibuffer::), with +defaulting and completion in the standard manner (*note File Names::). +While in the minibuffer, you can abort `C-x C-f' by typing `C-g'. `C-x C-f' has completed successfully when text appears on the screen and a new buffer name appears in the mode line. If the specified file @@ -919,7 +917,7 @@ modified). `C-x C-v' is allowed even if the current buffer is not visiting a file. If the file you specify is actually a directory, Dired is called on -that directory (*note Dired::.). To inhibit this, set the variable +that directory (*note Dired::). To inhibit this, set the variable `find-file-run-dired' to `nil'; then it is an error to try to visit a directory. diff --git a/info/xemacs.info-7 b/info/xemacs.info-7 index b085ba1..45b047d 100644 --- a/info/xemacs.info-7 +++ b/info/xemacs.info-7 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -52,7 +52,7 @@ owner is always the person who last edited the file. Occasionally there is a file whose owner should not change. Since most files should change owners, it is a good idea to use local variable lists to set `backup-by-copying-when-mismatch' for the special cases where the owner -should not change (*note File Variables::.). +should not change (*note File Variables::). Three variables control the choice of renaming or copying. Normally, renaming is done. If the variable `backup-by-copying' is @@ -160,7 +160,7 @@ result in very extensive changes, you must confirm it with `yes'. If the current buffer has been auto-saved more recently than it has been saved explicitly, `revert-buffer' offers to read the auto save file -instead of the visited file (*note Auto Save::.). Emacs asks you about +instead of the visited file (*note Auto Save::). Emacs asks you about the auto-save file before the request for confirmation of the `revert-buffer' operation, and demands `y' or `n' as an answer. If you have started to type `yes' for confirmation without realizing that the @@ -254,7 +254,7 @@ Controlling Auto-Saving Each time you visit a file, auto-saving is turned on for that file's buffer if the variable `auto-save-default' is non-`nil' (but not in -batch mode; *note Entering Emacs::.). The default for this variable is +batch mode; *note Entering Emacs::). The default for this variable is `t', so Emacs auto-saves buffers that visit files by default. You can use the command `M-x auto-save-mode' to turn auto-saving for a buffer on or off. Like other minor mode commands, `M-x auto-save-mode' turns @@ -574,7 +574,7 @@ Change Logs and VC ------------------ If you use RCS for a program and also maintain a change log file for -it (*note Change Log::.), you can generate change log entries +it (*note Change Log::), you can generate change log entries automatically from the version control log entries: `C-x v a' @@ -686,7 +686,7 @@ numbers, then compares those versions of the specified file. If you supply a directory name instead of the name of a work file, this command compares the two specified versions of all registered files in that directory and its subdirectories. You can also specify a -snapshot name (*note Snapshots::.) instead of one or both version +snapshot name (*note Snapshots::) instead of one or both version numbers. You can specify a checked-in version by its number; you can specify @@ -744,10 +744,10 @@ Renaming VC Work Files and Master Files When you rename a registered file, you must also rename its master file correspondingly to get proper results. Use `vc-rename-file' to rename the source file as you specify, and rename its master file -accordingly. It also updates any snapshots (*note Snapshots::.) that +accordingly. It also updates any snapshots (*note Snapshots::) that mention the file, so that they use the new name; despite this, the snapshot thus modified may not completely work (*note Snapshot -Caveats::.). +Caveats::). You cannot use `vc-rename-file' on a file that is locked by someone else. @@ -797,7 +797,7 @@ snapshot. Thus, you need not hesitate to create snapshots whenever they are useful. You can give a snapshot name as an argument to `C-x v =' or `C-x v -~' (*note Old Versions::.). Thus, you can use it to compare a snapshot +~' (*note Old Versions::). Thus, you can use it to compare a snapshot against the current files, or two snapshots against each other, or a snapshot against a named version. @@ -1083,11 +1083,11 @@ delete them. `#' Flag all auto-save files (files whose names start and end with `#') - for deletion (*note Auto Save::.). + for deletion (*note Auto Save::). `~' Flag all backup files (files whose names end with `~') for deletion - (*note Backup::.). + (*note Backup::). `. (Period)' Flag excess numeric backup files for deletion. The oldest and diff --git a/info/xemacs.info-8 b/info/xemacs.info-8 index 5b6078b..7f8258b 100644 --- a/info/xemacs.info-8 +++ b/info/xemacs.info-8 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -87,7 +87,7 @@ NEW. `M-x delete-file' deletes a specified file, like the `rm' command in the shell. If you are deleting many files in one directory, it may be -more convenient to use Dired (*note Dired::.). +more convenient to use Dired (*note Dired::). `M-x insert-file' inserts a copy of the contents of a specified file into the current buffer at point, leaving point unchanged before the @@ -140,7 +140,7 @@ commands do. which is displayed there, but at any time only one of the windows is selected and its chosen buffer is the selected buffer. Each window's mode line displays the name of the buffer the window is displaying -(*note Windows::.). +(*note Windows::). Each buffer has a name which can be of any length but is case-sensitive. You can select a buffer using its name. Most buffers @@ -151,7 +151,7 @@ can use for evaluating Lisp expressions in Emacs. Each buffer records what file it is visiting, whether it is modified, and what major mode and minor modes are in effect in it -(*note Major Modes::.). Any Emacs variable can be made "local to" a +(*note Major Modes::). Any Emacs variable can be made "local to" a particular buffer, meaning its value in that buffer can be different from the value in other buffers. *Note Locals::. @@ -183,7 +183,7 @@ Creating and Selecting Buffers To select a buffer named BUFNAME, type `C-x b BUFNAME '. This is the command `switch-to-buffer' with argument BUFNAME. You can use completion on an abbreviation for the buffer name you want (*note -Completion::.). An empty argument to `C-x b' specifies the most +Completion::). An empty argument to `C-x b' specifies the most recently selected buffer that is not displayed in any window. Most buffers are created when you visit files, or use Emacs commands @@ -191,9 +191,9 @@ that display text. You can also create a buffer explicitly by typing `C-x b BUFNAME ', which creates a new, empty buffer that is not visiting any file, and selects it for editing. The new buffer's major mode is determined by the value of `default-major-mode' (*note Major -Modes::.). Buffers not visiting files are usually used for making -notes to yourself. If you try to save one, you are asked for the file -name to use. +Modes::). Buffers not visiting files are usually used for making notes +to yourself. If you try to save one, you are asked for the file name +to use. The function `switch-to-buffer-other-frame' is similar to `switch-to-buffer' except that it creates a new frame in which to @@ -220,7 +220,7 @@ Listing Existing Buffers in the list shows one buffer's name, major mode, and visited file. A `*' at the beginning of a line indicates the buffer has been "modified". If several buffers are modified, it may be time to save -some with `C-x s' (*note Saving::.). A `%' indicates a read-only +some with `C-x s' (*note Saving::). A `%' indicates a read-only buffer. A `.' marks the selected buffer. Here is an example of a buffer list: @@ -277,7 +277,7 @@ you specify a name that is used by a different buffer, an error is signalled and renaming is not done. `M-x view-buffer' is similar to `M-x view-file' (*note Misc File -Ops::.), but it examines an already existing Emacs buffer. View mode +Ops::), but it examines an already existing Emacs buffer. View mode provides convenient commands for scrolling through the buffer but not for changing it. When you exit View mode, the resulting value of point remains in effect. @@ -560,7 +560,7 @@ command selects a window on the next or previous frame instead of wrapping around to the top or bottom of the current frame, when there are no more windows. - The usual scrolling commands (*note Display::.) apply to the selected + The usual scrolling commands (*note Display::) apply to the selected window only. `M-C-v' (`scroll-other-window') scrolls the window that `C-x o' would select. Like `C-v', it takes positive and negative arguments. @@ -604,12 +604,12 @@ buffer to select. `C-x 4 m' Start composing a mail message in another window. This runs `mail-other-window', and its same-window version is `C-x m' (*note - Sending Mail::.). + Sending Mail::). `C-x 4 .' Find a tag in the current tag table in another window. This runs `find-tag-other-window', the multiple-window variant of `M-.' - (*note Tags::.). + (*note Tags::). If the variable `display-buffer-function' is non-`nil', its value is the function to call to handle `display-buffer'. It receives two @@ -756,7 +756,7 @@ defaults. The language environment really represents a choice of preferred script (more or less) rather that a choice of language. The language environment controls which coding systems to recognize -when reading text (*note Recognize Coding::.). This applies to files, +when reading text (*note Recognize Coding::). This applies to files, incoming mail, netnews, and any other text you read into XEmacs. It may also specify the default coding system to use when you create a file. Each language environment also specifies a default input method. @@ -949,12 +949,12 @@ about particular coding systems. You can specify a coding system name as argument; alternatively, with an empty argument, it describes the coding systems currently selected for various purposes, both in the current buffer and as the defaults, and the priority list for -recognizing coding systems (*note Recognize Coding::.). +recognizing coding systems (*note Recognize Coding::). To display a list of all the supported coding systems, type `M-x list-coding-systems'. The list gives information about each coding system, including the letter that stands for it in the mode line (*note -Mode Line::.). +Mode Line::). Each of the coding systems that appear in this list--except for `binary', which means no conversion of any kind--specifies how and @@ -1024,7 +1024,7 @@ finds a coding system that fits the data. Then it converts the file contents assuming that they are represented in this coding system. The priority list of coding systems depends on the selected language -environment (*note Language Environments::.). For example, if you use +environment (*note Language Environments::). For example, if you use French, you probably want XEmacs to prefer Latin-1 to Latin-2; if you use Czech, you probably want Latin-2 to be preferred. This is one of the reasons to specify a language environment. @@ -1051,7 +1051,7 @@ third argument says which coding system to use for these files. You can specify the coding system for a particular file using the `-*-...-*-' construct at the beginning of a file, or a local variables -list at the end (*note File Variables::.). You do this by defining a +list at the end (*note File Variables::). You do this by defining a value for the "variable" named `coding'. XEmacs does not really have a variable `coding'; instead of setting a variable, it uses the specified coding system for the file. For example, `-*-mode: C; coding: @@ -1064,5 +1064,5 @@ system, by default, for operations that write from this buffer into a file. This includes the commands `save-buffer' and `write-region'. If you want to write files from this buffer using a different coding system, you can specify a different coding system for the buffer using -`set-buffer-file-coding-system' (*note Specify Coding::.). +`set-buffer-file-coding-system' (*note Specify Coding::). diff --git a/info/xemacs.info-9 b/info/xemacs.info-9 index c7381d1..29af4a3 100644 --- a/info/xemacs.info-9 +++ b/info/xemacs.info-9 @@ -1,5 +1,5 @@ -This is Info file ../../info/xemacs.info, produced by Makeinfo version -1.68 from the input file xemacs.texi. +This is ../info/xemacs.info, produced by makeinfo version 3.12s from +xemacs/xemacs.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY @@ -66,7 +66,7 @@ file is saved. the file. First use the command `C-x c' (`universal-coding-system-argument'); this command uses the minibuffer to read a coding system name. After you exit the minibuffer, the -specified coding system is used for *the immediately following command*. +specified coding system is used for _the immediately following command_. So if the immediately following command is `C-x C-f', for example, it reads the file using that coding system (and records the coding @@ -167,9 +167,9 @@ languages. Text mode, Nroff mode, TeX mode, and Outline mode are for editing English text. The remaining major modes are not intended for use on users' files; they are used in buffers created by Emacs for specific purposes and include Dired mode for buffers made by Dired -(*note Dired::.), Mail mode for buffers made by `C-x m' (*note Sending -Mail::.), and Shell mode for buffers used for communicating with an -inferior shell process (*note Interactive Shell::.). +(*note Dired::), Mail mode for buffers made by `C-x m' (*note Sending +Mail::), and Shell mode for buffers used for communicating with an +inferior shell process (*note Interactive Shell::). Most programming language major modes specify that only blank lines separate paragraphs. This is so that the paragraph commands remain @@ -472,15 +472,15 @@ Text Mode edit files of text in a human language. Invoke `M-x text-mode' to enter Text mode. In Text mode, runs the function `tab-to-tab-stop', which allows you to use arbitrary tab stops set with -`M-x edit-tab-stops' (*note Tab Stops::.). Features concerned with +`M-x edit-tab-stops' (*note Tab Stops::). Features concerned with comments in programs are turned off unless they are explicitly invoked. The syntax table is changed so that periods are not considered part of a word, while apostrophes, backspaces and underlines are. A similar variant mode is Indented Text mode, intended for editing text in which most lines are indented. This mode defines to run -`indent-relative' (*note Indentation::.), and makes Auto Fill indent -the lines it creates. As a result, a line made by Auto Filling, or by +`indent-relative' (*note Indentation::), and makes Auto Fill indent the +lines it creates. As a result, a line made by Auto Filling, or by , is normally indented just like the previous line. Use `M-x indented-text-mode' to select this mode. @@ -537,7 +537,7 @@ commands that are not available in Text mode: The other feature of Nroff mode is Electric Nroff newline mode. This is a minor mode that you can turn on or off with `M-x -electric-nroff-mode' (*note Minor Modes::.). When the mode is on and +electric-nroff-mode' (*note Minor Modes::). When the mode is on and you use to end a line containing an nroff command that opens a kind of grouping, Emacs automatically inserts the matching nroff command to close that grouping on the following line. For example, if @@ -666,7 +666,7 @@ paragraph that contains a mismatch, it displays point at the beginning of the paragraph for a few seconds and pushes a mark at that spot. Scanning continues until the whole buffer has been checked or until you type another key. The positions of the last several paragraphs with -mismatches can be found in the mark ring (*note Mark Ring::.). +mismatches can be found in the mark ring (*note Mark Ring::). Note that square brackets and parentheses, not just braces, are matched in TeX mode. This is wrong if you want to check TeX syntax. @@ -721,7 +721,7 @@ being printed. The console output from TeX, including any error messages, appears in a buffer called `*TeX-shell*'. If TeX gets an error, you can switch to this buffer and feed it input (this works as in Shell mode; *note -Interactive Shell::.). Without switching to this buffer, you can scroll +Interactive Shell::). Without switching to this buffer, you can scroll it so that its last line is visible by typing `C-c C-l'. Type `C-c C-k' (`tex-kill-job') to kill the TeX process if you see diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 68f4f4b..08d113c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -7,6 +7,103 @@ * update-elc.sh (ignore_dirs): Ignore lisp/utf-2000 subdirectory. +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-13 Martin Buchholz + + * etags.c: Fix warning: `_GNU_SOURCE' redefined. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-11-29 Andreas Jaeger + + * Makefile.in.in (INSTALLABLE_SCRIPTS): Removed pstogif. + pstogif: Moved to package tm. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-20 Martin Buchholz + + * process-gnu-depends.sh: Deleted. Obsolete. + * process-depends.sh: Deleted. Obsolete. + +1999-11-20 Jan Vroonhof + + * Makefile.in.in (instvardir): Added. From + Jeff Miller + +1999-11-19 Martin Buchholz + + * etags.c: Upgrade to pot etags version 13.33. + Make `etags --version' print out `XEmacs', not `GNU Emacs' + +1999-11-17 Martin Buchholz + + * etags.c (canonicalize_filename): Typo fix + +1999-11-05 Martin Buchholz + + * etags.c: + * ../etc/etags.1: + * ../etc/NEWS: + Upgrade to etags version 13.32. + etags.c has warnings removed, in addition. + +1999-11-15 Martin Buchholz + + * gnuserv.c (ipc_spawn_watchdog): Use pid_t instead of int. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-11-04 Martin Buchholz + + * gnuserv.c (handle_response): Warning suppression + +1999-09-27 Martin Buchholz + + * ellcc.c: + ANSIfy. + Remove MSDOS cruft. + Remove WINDOWS cruft. + Remove VMS cruft. + (main): The wrong number of bytes were being read during argument + processing. + Delete ANSI imitations like ellcc_strchr(). + Call functions with the right number of arguments. + Fix a typo. + Make functions static. + Remove compiler warnings. + +1999-09-22 Martin Buchholz + + * cvtmail.c (main): ANSIfy + * digest-doc.c (main): ANSIfy + * hexl.c (main): ANSIfy + + * make-path.c: Remove declaration for errno. + * mmencode.c (nextcharin): ANSIfy + * movemail.c (pop_retr): ANSIfy + +1999-07-30 Gleb Arshinov + + * pop.c (pop_quit): use CLOSESOCKET() instead of close() + + * run.c (build_cmdline): Fix NT native build unreferenced variable + warning + (WinMain): Fix release mode build unreferenced variable warning + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released @@ -56,14 +153,14 @@ * Makefile.in.in (cppflags): Add -I$(top_srcdir)/src. 1999-04-29 Andy Piper - - * make-docfile.c: build fixes for mingw32. + + * make-docfile.c: build fixes for mingw32. * movemail.c: ditto. * run.c: ditto. * yow.c: ditto. * profile.c: ditto. (gettimeofday): new function copied from nt.c. - + * fakemail.c (make_file_preface): make buildable under windows. * Makefile.in.in: fix some build targets for when we are building @@ -162,7 +259,7 @@ * pop.c: mess with includes so that it builds under native NT. From Fabrice Popineau - + 1998-12-16 Andy Piper * XEmacs 21.2.6 is released @@ -348,7 +445,7 @@ Wed Apr 22 12:59:35 1998 Andy Piper 1998-04-19 Jan Vroonhof * gnuclient.c (main): Read eval from from stdin if just "-batch" - is given. + is given. * gnudoit: Support this. * gnuserv.1: Document this behavior. @@ -420,13 +517,13 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1998-01-13 Martin Buchholz - * lib-src/add-little-package.sh: - * lib-src/add-big-package.sh: + * lib-src/add-little-package.sh: + * lib-src/add-big-package.sh: Use proper paranoid quoting for sh variables. -batch implies -q. Thu Jan 08 09:42:36 1998 - + * gnuserv.h: only set UNIX_DOMAIN_SOCKETS if HAVE_SYS_UN_H is set. @@ -570,7 +667,7 @@ Thu Jan 08 09:42:36 1998 missing a variable called "configuration. This messed up archilibdir. * Added highlighting to text suggesting to do "make gzip-el" in top - level Makefile.in. Added code to do make maybe-blessmail after a + level Makefile.in. Added code to do make maybe-blessmail after a make install is done. 1997-08-07 Jan Vroonhof @@ -638,7 +735,7 @@ Thu Jan 08 09:42:36 1998 * Makefile.in.in (INSTALLABLE_SCRIPTS): Readd Gnuattach. From Hrvoje Niksic - + 1997-06-13 Steven L Baur * update-elc.sh (mule_p): Ignore lisp/language when building diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index 9fa565b..7730260 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -54,6 +54,7 @@ bindir=@bindir@ libdir=@libdir@ srcdir=@srcdir@ datadir=@datadir@ +instvardir=@instvardir@ top_srcdir=@top_srcdir@ archlibdir=@archlibdir@ configuration=@configuration@ @@ -79,7 +80,7 @@ INSTALLABLES_BASE = etags ctags b2m ootags #else INSTALLABLES_BASE = etags ctags b2m gnuclient ootags #endif -INSTALLABLE_SCRIPTS = rcs-checkin pstogif gnudoit gnuattach +INSTALLABLE_SCRIPTS = rcs-checkin gnudoit gnuattach #ifdef HAVE_SHLIB #ifdef HAVE_MS_WINDOWS INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient ellcc diff --git a/lib-src/add-big-package.sh b/lib-src/add-big-package.sh index 7c8e3e0..da186ab 100755 --- a/lib-src/add-big-package.sh +++ b/lib-src/add-big-package.sh @@ -2,8 +2,8 @@ # add-big-package.sh --- Add multiple file package to Package Lisp Hierarchy # Copyright (C) 1997 Free Software Foundation, Inc. -# Author: SL Baur -# Maintainer: SL Baur +# Author: SL Baur +# Maintainer: SL Baur # Keywords: packages internal # This file is part of XEmacs. diff --git a/lib-src/config.values.in b/lib-src/config.values.in index 3a1cdc1..c3e3de9 100644 --- a/lib-src/config.values.in +++ b/lib-src/config.values.in @@ -1,6 +1,6 @@ ;;; Do not edit this file! ;;; This file was automatically generated, by the config.values.sh script, -;;; from configure, which was itself automatically generated from configure.in +;;; from configure, which was itself automatically generated from configure.in. ;;; ;;; See lisp/util/config.el for details on how this file is used. ;;; @@ -93,6 +93,7 @@ dynodump_arch "@dynodump_arch@" etcdir "@etcdir@" exec_prefix "@exec_prefix@" extra_objs "@extra_objs@" +have_esd_config "@have_esd_config@" includedir "@includedir@" infodir "@infodir@" infopath "@infopath@" diff --git a/lib-src/config.values.sh b/lib-src/config.values.sh index d755d0c..fc22128 100644 --- a/lib-src/config.values.sh +++ b/lib-src/config.values.sh @@ -47,7 +47,7 @@ exec < ./configure > "lib-src/config.values.in" cat <<\EOF ;;; Do not edit this file! ;;; This file was automatically generated, by the config.values.sh script, -;;; from configure, which was itself automatically generated from configure.in +;;; from configure, which was itself automatically generated from configure.in. ;;; ;;; See lisp/util/config.el for details on how this file is used. ;;; diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c index 962ec3a..768bcee 100644 --- a/lib-src/cvtmail.c +++ b/lib-src/cvtmail.c @@ -53,9 +53,7 @@ static void fatal (CONST char *s1, CONST char *s2); static void error (CONST char *s1, CONST char *s2); int -main (argc, argv) - int argc; - char *argv[]; +main (int argc, char *argv[]) { char *hd; char *md; diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c index b4f7ca2..a39ddc6 100644 --- a/lib-src/digest-doc.c +++ b/lib-src/digest-doc.c @@ -11,7 +11,7 @@ #include int -main () +main (int argc, char *argv[]) { register int ch; register int notfirst = 0; diff --git a/lib-src/ellcc.c b/lib-src/ellcc.c index acc3abe..a116c9d 100644 --- a/lib-src/ellcc.c +++ b/lib-src/ellcc.c @@ -24,8 +24,8 @@ Please mail bugs and suggestions to the XEmacs maintainer. /* Here's the scoop. We would really like this to be a shell script, but -the various Windows platforms dont have reliable scripting that suits -our needs. We dont want to reply on perl or some other such language +the various Windows platforms don't have reliable scripting that suits +our needs. We don't want to rely on perl or some other such language so we have to roll our own executable to act as a front-end for the compiler. @@ -58,87 +58,30 @@ the lines of: See the samples for more details. */ +#include <../src/config.h> #include #include - -#ifdef MSDOS -# include -# include -# include -# ifndef HAVE_CONFIG_H -# define DOS_NT -# include -# endif -#endif /* MSDOS */ - -#ifdef WINDOWSNT -# include -# include -# include -# include -# define MAXPATHLEN _MAX_PATH -# ifdef HAVE_CONFIG_H -# undef HAVE_NTGUI -# else -# define DOS_NT -# define HAVE_GETCWD -# endif /* not HAVE_CONFIG_H */ -#endif /* WINDOWSNT */ - -#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 -#endif /* HAVE_CONFIG_H */ - -#if !defined (WINDOWSNT) && defined (STDC_HEADERS) -#include #include -#endif +#include +#include +#include #ifdef HAVE_UNISTD_H # include -#else -# ifdef HAVE_GETCWD - extern char *getcwd (); -# endif #endif /* HAVE_UNISTD_H */ -#include -#include -#include -#ifndef errno - extern int errno; -#endif -#include -#include - #define EMODULES_GATHER_VERSION #include "emodules.h" #include "ellcc.h" -#if !defined (S_ISREG) && defined (S_IFREG) -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -/* Exit codes for success and failure. */ -#ifdef VMS -# define GOOD 1 -# define BAD 0 -#else -# define GOOD 0 -# define BAD 1 -#endif - #define DEBUG #ifndef HAVE_SHLIB int -main() +main (int argc, char *argv[]) { fprintf (stderr, "Dynamic modules not supported on this platform\n"); - return (BAD); + return EXIT_FAILURE; } #else @@ -163,11 +106,12 @@ main() # define xnew(n,Type) ((Type *) xmalloc ((n) * sizeof (Type))) # define xrnew(op,n,Type) ((Type *) xrealloc ((op), (n) * sizeof (Type))) #endif -long *xmalloc (), *xrealloc (); -void fatal (), pfatal (); -char *ellcc_strchr (), *ellcc_strrchr (); -void add_to_argv (); -void do_compile_mode(), do_link_mode(), do_init_mode(); +static void *xmalloc (size_t); +static void fatal (char *, char *); +static void add_to_argv (CONST char *); +static void do_compile_mode (void); +static void do_link_mode (void); +static void do_init_mode (void); #define SSTR(S) ((S)?(S):"") @@ -196,9 +140,7 @@ char *ellcc, *ellld, *ellcflags, *ellldflags, *ellpicflags, *elldllflags; STR = DFLT int -main (argc, argv) - int argc; - char *argv[]; +main (int argc, char *argv[]) { char *tmp; int i, done_mode = 0; @@ -207,11 +149,11 @@ main (argc, argv) prog_argv = argv; #if defined(MSDOS) || defined(WINDOWSNT) - tmp = ellcc_strrchr (argv[0], '\\'); + tmp = strrchr (argv[0], '\\'); if (tmp != (char *)0) tmp++; #elif !defined (VMS) - tmp = ellcc_strrchr (argv[0], '/'); + tmp = strrchr (argv[0], '/'); if (tmp != (char *)0) tmp++; #else @@ -248,7 +190,7 @@ main (argc, argv) char *modeopt = argv[i] + 7; if (done_mode && strcmp (modeopt, "verbose")) - fatal ("more than one mode specified"); + fatal ("more than one mode specified", (char *) 0); if (strcmp (modeopt, "link") == 0) { done_mode++; @@ -287,13 +229,13 @@ main (argc, argv) printf ("%s\n", ELLCC_CONFIG); return 0; } - else if (strncmp (argv[i], "--mod-name=", 10) == 0) + else if (strncmp (argv[i], "--mod-name=", 11) == 0) mod_name = argv[i] + 11; - else if (strncmp (argv[i], "--mod-title=", 11) == 0) + else if (strncmp (argv[i], "--mod-title=", 12) == 0) mod_title = argv[i] + 12; - else if (strncmp (argv[i], "--mod-version=", 13) == 0) + else if (strncmp (argv[i], "--mod-version=", 14) == 0) mod_version = argv[i] + 14; - else if (strncmp (argv[i], "--mod-output=", 12) == 0) + else if (strncmp (argv[i], "--mod-output=", 13) == 0) mod_output = argv[i] + 13; else { @@ -339,7 +281,7 @@ main (argc, argv) #endif if (exec_argc < 2) - fatal ("too few arguments"); + fatal ("too few arguments", (char *) 0); /* * Get the over-rides from the environment @@ -378,83 +320,23 @@ main (argc, argv) } /* Like malloc but get fatal error if memory is exhausted. */ -long * -xmalloc (size) - unsigned int size; +static void * +xmalloc (size_t size) { - long *result = (long *) malloc (size); + void *result = malloc (size); if (result == NULL) - fatal ("virtual memory exhausted", (char *)NULL); - return result; -} - -long * -xrealloc (ptr, size) - char *ptr; - unsigned int size; -{ - long *result = (long *) realloc (ptr, size); - if (result == NULL) - fatal ("virtual memory exhausted", (char *)NULL); + fatal ("virtual memory exhausted", (char *)0); return result; } /* Print error message and exit. */ -void -fatal (s1, s2) - char *s1, *s2; +static void +fatal (char *s1, char *s2) { fprintf (stderr, "%s: ", progname); fprintf (stderr, s1, s2); fprintf (stderr, "\n"); - exit (BAD); -} - -void -pfatal (s1) - char *s1; -{ - perror (s1); - exit (BAD); -} - -/* - * Return the ptr in sp at which the character c last - * appears; NULL if not found - * - * Identical to System V strrchr, included for portability. - */ -char * -ellcc_strrchr (sp, c) - register char *sp, c; -{ - register char *r; - - r = NULL; - do - { - if (*sp == c) - r = sp; - } while (*sp++); - return r; -} - -/* - * Return the ptr in sp at which the character c first - * appears; NULL if not found - * - * Identical to System V strchr, included for portability. - */ -char * -ellcc_strchr (sp, c) - register char *sp, c; -{ - do - { - if (*sp == c) - return sp; - } while (*sp++); - return NULL; + exit (EXIT_FAILURE); } /* @@ -462,9 +344,8 @@ ellcc_strchr (sp, c) * to the compiler or linker. We need to split individual words into * arguments, taking quoting into account. This can get ugly. */ -void -add_to_argv (str) - CONST char *str; +static void +add_to_argv (CONST char *str) { int sm = 0; CONST char *s = (CONST char *)0; @@ -557,8 +438,8 @@ add_to_argv (str) * is build up the argument vector and exec() it. We must just make sure * that we get all of the required arguments in place. */ -void -do_compile_mode() +static void +do_compile_mode (void) { int i; char ts[4096]; /* Plenty big enough */ @@ -587,8 +468,8 @@ do_compile_mode() * all of the provided arguments, then the final post arguments. Once * all of this has been done, the argument vector is ready to run. */ -void -do_link_mode() +static void +do_link_mode (void) { int i,x; char *t, ts[4096]; /* Plenty big enough */ @@ -648,8 +529,8 @@ do_link_mode() * the header information first, as make-doc will append to the file by * special dispensation. */ -void -do_init_mode() +static void +do_init_mode (void) { int i; char ts[4096]; /* Plenty big enough */ diff --git a/lib-src/etags.c b/lib-src/etags.c index e9ce59f..35a161e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1,5 +1,5 @@ /* Tags file maker to go with GNU Emacs - Copyright (C) 1984, 87, 88, 89, 93, 94, 95, 98 + Copyright (C) 1984, 87, 88, 89, 93, 94, 95, 98, 99 Free Software Foundation, Inc. and Ken Arnold This file is not considered part of GNU Emacs. @@ -28,10 +28,11 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * Francesco Potorti` reorganised C and C++ based on work by Joe Wells. * Regexp tags by Tom Tromey. * - * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer. + * Francesco Potorti` (pot@gnu.org) is the current maintainer. + * Ansified by Martin Buchholz, 19991105. */ -char pot_etags_version[] = "@(#) pot revision number is 13.7"; +char pot_etags_version[] = "@(#) pot revision number is 13.33"; #define TRUE 1 #define FALSE 0 @@ -40,6 +41,19 @@ char pot_etags_version[] = "@(#) pot revision number is 13.7"; # define DEBUG FALSE #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 _GNU_SOURCE +# define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ +#endif + #ifdef MSDOS # include # include @@ -60,19 +74,12 @@ char pot_etags_version[] = "@(#) pot revision number is 13.7"; # undef HAVE_NTGUI # else # define DOS_NT -# define HAVE_GETCWD # endif /* not HAVE_CONFIG_H */ +# ifndef HAVE_GETCWD +# define HAVE_GETCWD +# endif /* undef HAVE_GETCWD */ #endif /* WINDOWSNT */ -#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 */ - #if !defined (WINDOWSNT) && defined (STDC_HEADERS) #include #include @@ -176,7 +183,6 @@ typedef void Lang_function (); typedef struct { char *suffix; - int sufflen; char *command; /* Takes one arg and decompresses to stdout */ } compressor; @@ -190,83 +196,6 @@ typedef struct extern char *getenv (); -/* Many compilers barf on this: - Lang_function Asm_labels; - so let's write it this way */ -void Asm_labels (); -void C_entries (); -void default_C_entries (); -void plain_C_entries (); -void Cjava_entries (); -void Cobol_paragraphs (); -void Cplusplus_entries (); -void Cstar_entries (); -void Erlang_functions (); -void Fortran_functions (); -void Yacc_entries (); -void Lisp_functions (); -void Pascal_functions (); -void Perl_functions (); -void Postscript_functions (); -void Prolog_functions (); -void Python_functions (); -void Scheme_functions (); -void TeX_functions (); -void just_read_file (); - -compressor *get_compressor_from_suffix (); -language *get_language_from_name (); -language *get_language_from_interpreter (); -language *get_language_from_suffix (); -int total_size_of_entries (); -long readline (), readline_internal (); -#ifdef ETAGS_REGEXPS -void analyse_regex (); -void add_regex (); -void free_patterns (); -#endif /* ETAGS_REGEXPS */ -void error (); -void suggest_asking_for_help (); -void fatal (), pfatal (); -void add_node (); - -void init (); -void initbuffer (); -void find_entries (); -void free_tree (); -void pfnote (), new_pfnote (); -void process_file (); -void put_entries (); -void takeprec (); - -char *concat (); -char *skip_spaces (), *skip_non_spaces (); -char *savenstr (), *savestr (); -char *etags_strchr (), *etags_strrchr (); -char *etags_getcwd (); -char *relative_filename (), *absolute_filename (), *absolute_dirname (); -bool filename_is_absolute (); -void canonicalize_filename (); -void grow_linebuffer (); -long *xmalloc (), *xrealloc (); - - -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 */ - -char *curfile; /* current input file name */ -language *curlang; /* current language */ - -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 */ - typedef struct node_st { /* sorting structure */ char *name; /* function or type name */ @@ -279,8 +208,6 @@ typedef struct node_st struct node_st *left, *right; /* left and right sons */ } node; -node *head; /* the head of the binary tree of tags */ - /* * A `linebuffer' is a structure which holds a line of text. * `readline_internal' reads a line from a stream into a linebuffer @@ -295,6 +222,97 @@ typedef struct char *buffer; } linebuffer; +/* Many compilers barf on this: + Lang_function Ada_funcs; + so let's write it this way */ +void Ada_funcs (FILE *inf); +void Asm_labels (FILE *inf); +void C_entries (int c_ext, FILE *inf); +void default_C_entries (FILE *inf); +void plain_C_entries (FILE *inf); +void Cjava_entries (FILE *inf); +void Cobol_paragraphs (FILE *inf); +void Cplusplus_entries (FILE *inf); +void Cstar_entries (FILE *inf); +void Erlang_functions (FILE *inf); +void Fortran_functions (FILE *inf); +void Yacc_entries (FILE *inf); +void Lisp_functions (FILE *inf); +void Pascal_functions (FILE *inf); +void Perl_functions (FILE *inf); +void Postscript_functions (FILE *inf); +void Prolog_functions (FILE *inf); +void Python_functions (FILE *inf); +void Scheme_functions (FILE *inf); +void TeX_functions (FILE *inf); +void just_read_file (FILE *inf); + +compressor *get_compressor_from_suffix (char *file, char **extptr); +language *get_language_from_name (char *name); +language *get_language_from_interpreter (char *interpreter); +language *get_language_from_suffix (char *file); +int total_size_of_entries (register node *np); +long readline (linebuffer *lbp, FILE *stream); +long readline_internal (linebuffer *lbp, register FILE *stream); +void get_tag (register char *bp); + +#ifdef ETAGS_REGEXPS +void analyse_regex (char *regex_arg, bool ignore_case); +void add_regex (char *regexp_pattern, bool ignore_case, language *lan); +void free_patterns (void); +#endif /* ETAGS_REGEXPS */ +void error (const char *s1, const char *s2); +void suggest_asking_for_help (void); +void fatal (char *s1, char *s2); +void pfatal (char *s1); +void add_node (node *np, node **cur_node_p); + +void init (void); +void initbuffer (linebuffer *lbp); +void find_entries (char *file, FILE *inf); +void free_tree (register node *np); +void pfnote (char *name, bool is_func, char *linestart, int linelen, int lno, long int cno); +void new_pfnote (char *name, int namelen, bool is_func, char *linestart, int linelen, int lno, long int cno); +void process_file (char *file); +void put_entries (register node *np); +void takeprec (void); + +char *concat (char *s1, char *s2, char *s3); +char *skip_spaces (char *cp); +char *skip_non_spaces (char *cp); +char *savenstr (char *cp, int len); +char *savestr (char *cp); +char *etags_strchr (char *sp, char c); +char *etags_strrchr (char *sp, char c); +char *etags_getcwd (void); +char *relative_filename (char *file, char *dir); +char *absolute_filename (char *file, char *dir); +char *absolute_dirname (char *file, char *dir); +bool filename_is_absolute (char *fn); +void canonicalize_filename (register char *fn); +void grow_linebuffer (linebuffer *lbp, int toksize); +long *xmalloc (unsigned int size); +long *xrealloc (char *ptr, unsigned int size); + + +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 */ + +char *curfile; /* current input file name */ +language *curlang; /* current language */ + +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 */ + +node *head; /* the head of the binary tree of tags */ + linebuffer lb; /* the current line */ linebuffer token_name; /* used by C_entries as a temporary area */ struct @@ -319,13 +337,14 @@ char 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 typedefs */ +bool typedefs; /* -t: create tags for C and Ada typedefs */ bool typedefs_and_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 */ /* 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 */ @@ -334,37 +353,41 @@ 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[] = { - { "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' }, - { "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' }, -#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' }, - { 0 } + { "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' }, + { NULL } }; #endif /* LONG_OPTIONS */ @@ -382,17 +405,22 @@ typedef struct pattern bool error_signaled; } pattern; -/* Array of all regexps. */ +/* 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[] = { - { "z", 1, "gzip -d -c"}, - { "Z", 1, "gzip -d -c"}, - { "gz", 2, "gzip -d -c"}, - { "GZ", 2, "gzip -d -c"}, - { "bz2", 3, "bzip2 -d -c" }, + { "z", "gzip -d -c"}, + { "Z", "gzip -d -c"}, + { "gz", "gzip -d -c"}, + { "GZ", "gzip -d -c"}, + { "bz2", "bzip2 -d -c" }, { NULL } }; @@ -403,6 +431,10 @@ compressor compressors[] = /* Non-NULL if language fixed. */ language *forced_lang = NULL; +/* Ada code */ +char *Ada_suffixes [] = + { "ads", "adb", "ada", NULL }; + /* Assembly code */ char *Asm_suffixes [] = { "a", /* Unix assembler */ "asm", /* Microcontroller assembly */ @@ -459,7 +491,7 @@ char *plain_C_suffixes [] = NULL }; char *Postscript_suffixes [] = - { "ps", NULL }; + { "ps", "psw", NULL }; /* .psw is for PSWrap */ char *Prolog_suffixes [] = { "prolog", NULL }; @@ -486,6 +518,7 @@ char *Yacc_suffixes [] = language lang_names [] = { + { "ada", Ada_funcs, Ada_suffixes, NULL }, { "asm", Asm_labels, Asm_suffixes, NULL }, { "c", default_C_entries, default_C_suffixes, NULL }, { "c++", Cplusplus_entries, Cplusplus_suffixes, NULL }, @@ -509,7 +542,7 @@ language lang_names [] = { NULL, NULL } /* end of list */ }; -void +static void print_language_names () { language *lang; @@ -534,20 +567,26 @@ Fortran is tried first; if no tags are found, C is tried next.\n\ Compressed files are supported using gzip and bzip2."); } +#ifdef XEMACS +# define EMACS_NAME "XEmacs" +#else +# define EMACS_NAME "GNU Emacs" +#endif + #ifndef VERSION # define VERSION "20" #endif -void +static void print_version () { - printf ("%s (GNU Emacs %s)\n", (CTAGS) ? "ctags" : "etags", VERSION); - puts ("Copyright (C) 1996 Free Software Foundation, Inc. and Ken Arnold"); + printf ("%s (" EMACS_NAME " %s)\n", (CTAGS) ? "ctags" : "etags", VERSION); + puts ("Copyright (C) 1999 Free Software Foundation, Inc. and Ken Arnold"); puts ("This program is distributed under the same terms as Emacs"); exit (GOOD); } -void +static void print_help () { printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ @@ -568,6 +607,9 @@ Relative ones are stored relative to the output file's directory."); puts ("-a, --append\n\ Append tag entries to existing tags file."); + puts ("--packages-only\n\ + For Ada files, only generate tags for packages ."); + if (CTAGS) puts ("-B, --backward-search\n\ Write the search commands for the tag entries using '?', the\n\ @@ -576,6 +618,14 @@ Relative ones are stored relative to the output file's directory."); puts ("-C, --c++\n\ Treat files whose name suffix defaults to C language as C++ files."); + puts ("--declarations\n\ + In C and derived languages, create tags for function declarations,"); + if (CTAGS) + puts ("\tand create tags for extern variables if --globals is used."); + else + puts + ("\tand create tags for extern variables unless --no-globals is used."); + if (CTAGS) puts ("-d, --defines\n\ Create tag entries for C #define constants and enum constants, too."); @@ -607,12 +657,15 @@ Relative ones are stored relative to the output file's directory."); #ifdef ETAGS_REGEXPS puts ("-r /REGEXP/, --regex=/REGEXP/ or --regex=@regexfile\n\ - Make a tag for each line matching pattern REGEXP in the\n\ - following files. regexfile is a file containing one REGEXP\n\ - per line. REGEXP is anchored (as if preceded by ^).\n\ - The form /REGEXP/NAME/ creates a named tag. For example Tcl\n\ - named tags can be created with:\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\ + 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."); puts ("-R, --no-regex\n\ Don't create tags from regexps for the following files."); #endif /* ETAGS_REGEXPS */ @@ -627,7 +680,7 @@ Relative ones are stored relative to the output file's directory."); if (CTAGS) { puts ("-t, --typedefs\n\ - Generate tag entries for C typedefs."); + Generate tag entries for C and Ada typedefs."); puts ("-T, --typedefs-and-c++\n\ Generate tag entries for C typedefs, C struct/enum/union tags,\n\ and C++ member functions."); @@ -660,7 +713,7 @@ Relative ones are stored relative to the output file's directory."); print_language_names (); puts (""); - puts ("Report bugs to bug-gnu-emacs@prep.ai.mit.edu"); + puts ("Report bugs to bug-gnu-emacs@gnu.org"); exit (GOOD); } @@ -670,7 +723,8 @@ enum argument_type { at_language, at_regexp, - at_filename + at_filename, + at_icregexp }; /* This structure helps us allow mixing of --lang and file names. */ @@ -839,12 +893,15 @@ main (argc, argv) #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 is to find macro constants, enum constants and - * global variables. + * global variables. */ if (!CTAGS) { @@ -859,7 +916,7 @@ main (argc, argv) char *optstring; #ifdef ETAGS_REGEXPS - optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhH"; + optstring = "-aCdDf:Il:o:r:c:RStTi:BuvxwVhH"; #else optstring = "-aCdDf:Il:o:StTi:BuvxwVhH"; #endif /* ETAGS_REGEXPS */ @@ -896,7 +953,7 @@ main (argc, argv) case 'o': if (tagfile) { - error ("-%c option may only be given once.", opt); + error ("-o option may only be given once.", (char *)NULL); suggest_asking_for_help (); } tagfile = optarg; @@ -927,6 +984,11 @@ main (argc, argv) 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 (); @@ -969,7 +1031,7 @@ main (argc, argv) if (nincluded_files == 0 && file_count == 0) { - error ("no input files specified.", 0); + error ("no input files specified.", (char *)NULL); suggest_asking_for_help (); } @@ -1025,7 +1087,10 @@ main (argc, argv) break; #ifdef ETAGS_REGEXPS case at_regexp: - analyse_regex (argbuffer[i].what); + analyse_regex (argbuffer[i].what, FALSE); + break; + case at_icregexp: + analyse_regex (argbuffer[i].what, TRUE); break; #endif case at_filename: @@ -1117,23 +1182,43 @@ main (argc, argv) /* - * Return a compressor given the file name. + * Return a compressor given the file name. If EXTPTR is non-zero, + * return a pointer into FILE where the compressor-specific + * extension begins. If no compressor is found, NULL is returned + * and EXTPTR is not significant. * Idea by Vladimir Alexiev */ compressor * -get_compressor_from_suffix (file) +get_compressor_from_suffix (file, extptr) char *file; + char **extptr; { compressor *compr; - char *suffix; + char *slash, *suffix; + /* This relies on FN to be after canonicalize_filename, + so we don't need to consider backslashes on DOS_NT. */ + slash = etags_strrchr (file, '/'); suffix = etags_strrchr (file, '.'); - if (suffix == NULL) + if (suffix == NULL || suffix < slash) return NULL; + if (extptr != NULL) + *extptr = suffix; suffix += 1; - for (compr = compressors; compr->suffix != NULL; compr++) - if (streq (compr->suffix, suffix)) - return compr; + /* Let those poor souls who live with DOS 8+3 file name limits get + some solace by treating foo.cgz as if it were foo.c.gz, etc. + Only the first do loop is run if not MSDOS */ + do + { + for (compr = compressors; compr->suffix != NULL; compr++) + if (streq (compr->suffix, suffix)) + return compr; +#ifndef MSDOS + break; +#endif + if (extptr != NULL) + *extptr = ++suffix; + } while (*suffix != '\0'); return NULL; } @@ -1220,7 +1305,8 @@ process_file (file) FILE *inf; compressor *compr; char *compressed_name, *uncompressed_name; - char *real_name; + char *ext, *real_name; + canonicalize_filename (file); if (streq (file, tagfile) && !streq (tagfile, "-")) @@ -1228,7 +1314,7 @@ process_file (file) error ("skipping inclusion of %s in self.", file); return; } - if ((compr = get_compressor_from_suffix (file)) == NULL) + if ((compr = get_compressor_from_suffix (file, &ext)) == NULL) { compressed_name = NULL; real_name = uncompressed_name = savestr (file); @@ -1236,8 +1322,29 @@ process_file (file) else { real_name = compressed_name = savestr (file); - uncompressed_name = savenstr (file, strlen(file) - compr->sufflen - 1); + 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 + { + 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; + } + if (stat (real_name, &stat_buf) != 0) { /* Reset real_name and try with a different name. */ @@ -1253,7 +1360,25 @@ process_file (file) { compressed_name = concat (file, ".", compr->suffix); if (stat (compressed_name, &stat_buf) != 0) - free (compressed_name); + { +#ifdef MSDOS + char *suf = compressed_name + strlen (file); + size_t suflen = strlen (compr->suffix) + 1; + for ( ; suf[1]; suf++, suflen--) + { + memmove (suf, suf + 1, suflen); + if (stat (compressed_name, &stat_buf) == 0) + { + real_name = compressed_name; + break; + } + } + if (real_name != NULL) + break; +#endif + free (compressed_name); + compressed_name = NULL; + } else { real_name = compressed_name; @@ -1279,7 +1404,7 @@ process_file (file) inf = popen (cmd, "r"); free (cmd); } - else + else inf = fopen (real_name, "r"); if (inf == NULL) { @@ -1543,7 +1668,7 @@ new_pfnote (name, namelen, is_func, linestart, linelen, lno, cno) named = FALSE; /* use unnamed tag */ } } - + if (named) name = savenstr (name, namelen); else @@ -1705,7 +1830,7 @@ put_entries (np) } /* Length of a number's decimal representation. */ -int +static int number_len (num) long num; { @@ -1757,7 +1882,7 @@ enum sym_type st_C_ignore, st_C_javastruct, st_C_operator, - st_C_struct, st_C_enum, st_C_define, st_C_typedef, st_C_typespec + st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef, st_C_typespec }; /* Feed stuff between (but not including) %[ and %] lines to: @@ -1765,6 +1890,11 @@ enum sym_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 @@ -1780,6 +1910,7 @@ 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 @@ -1795,7 +1926,6 @@ signed, 0, st_C_typespec unsigned, 0, st_C_typespec auto, 0, st_C_typespec void, 0, st_C_typespec -extern, 0, st_C_typespec static, 0, st_C_typespec const, 0, st_C_typespec volatile, 0, st_C_typespec @@ -1814,113 +1944,152 @@ PSEUDO, 0, st_C_gnumacro %] and replace lines between %< and %> with its output. */ /*%<*/ -/* C code produced by gperf version 2.5 (GNU C++ version) */ +/* 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; }; -#define TOTAL_KEYWORDS 41 -#define MIN_WORD_LENGTH 3 +#define TOTAL_KEYWORDS 46 +#define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 15 -#define MIN_HASH_VALUE 20 -#define MAX_HASH_VALUE 136 -/* maximum key range = 117, duplicates = 0 */ +#define MIN_HASH_VALUE 13 +#define MAX_HASH_VALUE 123 +/* maximum key range = 111, duplicates = 0 */ +#ifdef __GNUC__ +__inline +#endif static unsigned int hash (str, len) - register char *str; - register int unsigned len; + register const char *str; + register unsigned int len; { static unsigned char asso_values[] = { - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 58, 137, 137, 137, 38, 37, - 45, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 62, 137, 137, 14, 16, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 26, 16, 51, - 18, 61, 5, 19, 137, 23, 137, 137, 32, 63, - 54, 10, 26, 137, 24, 42, 30, 18, 46, 137, - 137, 137, 137, 137, 137, 137, 137, 137, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 3, 124, 124, 124, 43, 6, + 11, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 11, 124, 124, 58, 7, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 57, 7, 42, + 4, 14, 52, 0, 124, 53, 124, 124, 29, 11, + 6, 35, 32, 124, 29, 34, 59, 58, 51, 24, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124 }; - return len + asso_values[str[2]] + asso_values[str[0]]; + register int hval = len; + + switch (hval) + { + default: + case 3: + hval += asso_values[(unsigned char)str[2]]; + case 2: + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval; } -struct C_stab_entry * +#ifdef __GNUC__ +__inline +#endif +static struct C_stab_entry * in_word_set (str, len) - register char *str; + register const char *str; register unsigned int len; { static struct C_stab_entry wordlist[] = { - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"",}, {"",}, - {"float", 0, st_C_typespec}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"define", 0, st_C_define}, - {"bool", C_PLPL, st_C_typespec}, - {"",}, {"",}, {"",}, - {"friend", C_PLPL, st_C_ignore}, - {"SYSCALL", 0, st_C_gnumacro}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"double", 0, st_C_typespec}, - {"",}, {"",}, {"",}, - {"union", 0, st_C_struct}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"import", C_JAVA, st_C_ignore}, - {"int", 0, st_C_typespec}, - {"short", 0, st_C_typespec}, - {"ENTRY", 0, st_C_gnumacro}, - {"implements", C_JAVA, st_C_javastruct}, - {"auto", 0, st_C_typespec}, - {"",}, - {"interface", C_JAVA, st_C_struct}, - {"typedef", 0, st_C_typedef}, - {"typename", C_PLPL, st_C_typespec}, - {"",}, {"",}, - {"signed", 0, st_C_typespec}, - {"unsigned", 0, st_C_typespec}, - {"",}, {"",}, {"",}, - {"struct", 0, st_C_struct}, - {"void", 0, st_C_typespec}, - {"static", 0, st_C_typespec}, - {"",}, {"",}, {"",}, {"",}, - {"operator", C_PLPL, st_C_operator}, - {"",}, - {"char", 0, st_C_typespec}, - {"class", C_PLPL, st_C_struct}, - {"enum", 0, st_C_enum}, - {"package", C_JAVA, st_C_ignore}, - {"",}, - {"volatile", 0, st_C_typespec}, - {"domain", C_STAR, st_C_struct}, - {"DEFUN", 0, st_C_gnumacro}, - {"",}, - {"long", 0, st_C_typespec}, - {"@protocol", 0, st_C_objprot}, - {"",}, {"",}, {"",}, - {"explicit", C_PLPL, st_C_typespec}, - {"",}, - {"extern", 0, st_C_typespec}, - {"extends", C_JAVA, st_C_javastruct}, - {"",}, - {"mutable", C_PLPL, st_C_typespec}, - {"",}, {"",}, {"",}, {"",}, - {"PSEUDO", 0, st_C_gnumacro}, - {"",}, {"",}, {"",}, {"",}, - {"const", 0, st_C_typespec}, - {"",}, {"",}, {"",}, {"",}, {"",}, - {"@end", 0, st_C_objend}, - {"",}, {"",}, {"",}, {"",}, {"",}, - {"@interface", 0, st_C_objprot}, - {"",}, {"",}, {"",}, - {"namespace", C_PLPL, st_C_struct}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"@implementation", 0, st_C_objimpl}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"@end", 0, st_C_objend}, + {""}, {""}, {""}, {""}, + {"ENTRY", 0, st_C_gnumacro}, + {"@interface", 0, st_C_objprot}, + {""}, + {"domain", C_STAR, st_C_struct}, + {""}, + {"PSEUDO", 0, st_C_gnumacro}, + {""}, {""}, + {"namespace", C_PLPL, st_C_struct}, + {""}, {""}, + {"@implementation",0, st_C_objimpl}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"long", 0, st_C_typespec}, + {"signed", 0, st_C_typespec}, + {"@protocol", 0, st_C_objprot}, + {""}, {""}, {""}, {""}, + {"bool", C_PLPL, st_C_typespec}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"const", 0, st_C_typespec}, + {"explicit", C_PLPL, st_C_typespec}, + {"if", 0, st_C_ignore}, + {""}, + {"operator", C_PLPL, st_C_operator}, + {""}, + {"DEFUN", 0, st_C_gnumacro}, + {""}, {""}, + {"define", 0, st_C_define}, + {""}, {""}, {""}, {""}, {""}, + {"double", 0, st_C_typespec}, + {"struct", 0, st_C_struct}, + {""}, {""}, {""}, {""}, + {"short", 0, st_C_typespec}, + {""}, + {"enum", 0, st_C_enum}, + {"mutable", C_PLPL, st_C_typespec}, + {""}, + {"extern", 0, st_C_extern}, + {"extends", C_JAVA, st_C_javastruct}, + {"package", C_JAVA, st_C_ignore}, + {"while", 0, st_C_ignore}, + {""}, + {"for", 0, st_C_ignore}, + {""}, {""}, {""}, + {"volatile", 0, st_C_typespec}, + {""}, {""}, + {"import", C_JAVA, st_C_ignore}, + {"float", 0, st_C_typespec}, + {"switch", 0, st_C_ignore}, + {"return", 0, st_C_ignore}, + {"implements", C_JAVA, st_C_javastruct}, + {""}, + {"static", 0, st_C_typespec}, + {"typedef", 0, st_C_typedef}, + {"typename", C_PLPL, st_C_typespec}, + {"unsigned", 0, st_C_typespec}, + {""}, {""}, + {"char", 0, st_C_typespec}, + {"class", C_PLPL, st_C_struct}, + {""}, {""}, {""}, + {"void", 0, st_C_typespec}, + {""}, {""}, + {"friend", C_PLPL, st_C_ignore}, + {""}, {""}, {""}, + {"int", 0, st_C_typespec}, + {"union", 0, st_C_struct}, + {""}, {""}, {""}, + {"auto", 0, st_C_typespec}, + {"interface", C_JAVA, st_C_struct}, + {""}, + {"SYSCALL", 0, st_C_gnumacro} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -1929,9 +2098,9 @@ in_word_set (str, len) if (key <= MAX_HASH_VALUE && key >= 0) { - register char *s = wordlist[key].name; + register const char *s = wordlist[key].name; - if (*s == *str && !strncmp (str + 1, s + 1, len - 1)) + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) return &wordlist[key]; } } @@ -1939,7 +2108,7 @@ in_word_set (str, len) } /*%>*/ -enum sym_type +static enum sym_type C_symtype (str, len, c_ext) char *str; int len; @@ -1968,6 +2137,7 @@ enum vignore /* var-like: ignore until ';' */ } fvdef; +bool fvextern; /* func or var: extern keyword seen; */ /* * typedefs are recognized using a simple finite automaton. @@ -1976,7 +2146,8 @@ enum enum { tnone, /* nothing seen */ - ttypedseen, /* typedef keyword seen */ + tkeyseen, /* typedef keyword seen */ + ttypeseen, /* defined type seen */ tinbody, /* inside typedef body */ tend, /* just before typedef tag */ tignore /* junk after typedef tag */ @@ -2093,7 +2264,7 @@ int methodlen; * next_token_is_func IN OUT */ -bool +static bool consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) register char *str; /* IN: token pointer */ register int len; /* IN: token length */ @@ -2149,20 +2320,20 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) if (toktype == st_C_typedef) { if (typedefs) - typdef = ttypedseen; + typdef = tkeyseen; + fvextern = FALSE; fvdef = fvnone; return FALSE; } break; - case ttypedseen: + case tkeyseen: switch (toktype) { case st_none: case st_C_typespec: - typdef = tend; - break; case st_C_struct: case st_C_enum: + typdef = ttypeseen; break; } /* Do not return here, so the structdef stuff has a chance. */ @@ -2196,7 +2367,7 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) return FALSE; case st_C_struct: case st_C_enum: - if (typdef == ttypedseen + if (typdef == tkeyseen || (typedefs_and_cplusplus && cblev == 0 && structdef == snone)) { structdef = skeyseen; @@ -2217,16 +2388,14 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) return TRUE; } - /* Avoid entering fvdef stuff if typdef is going on. */ if (typdef != tnone) - { - definedef = dnone; - return FALSE; - } + definedef = dnone; /* Detect GNU macros. - DEFUN note for writers of emacs C code: + Writers of emacs code are recommended to put the + first two args of a DEFUN on the same line. + The DEFUN macro, used in emacs C source code, has a first arg that is a string (the lisp function name), and a second arg that is a C function name. Since etags skips strings, the second arg @@ -2236,8 +2405,7 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) removing the initial 'F' character and substituting '-' for '_'. Anyway, this assumes that the conventions of naming lisp functions will never change. Currently, this method is not - implemented, so writers of emacs code are recommended to put the - first two args of a DEFUN on the same line. */ + implemented. */ if (definedef == dnone && toktype == st_C_gnumacro) { next_token_is_func = TRUE; @@ -2326,11 +2494,15 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) /* 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 */ + 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: @@ -2338,6 +2510,12 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) *is_func_or_var = TRUE; return TRUE; case st_none: + if ((c_ext & C_PLPL) && strneq (str+len-10, "::operator", 10)) + { + fvdef = foperator; + *is_func_or_var = TRUE; + return TRUE; + } if (constantypedefs && structdef == sinbody && structtype == st_C_enum) return TRUE; if (fvdef == fvnone) @@ -2346,6 +2524,7 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) *is_func_or_var = TRUE; return TRUE; } + break; } return FALSE; @@ -2355,7 +2534,7 @@ consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var) * C_entries () * This routine finds functions, variables, typedefs, * #define's, enum constants and struct/union/enum definitions in - * #C syntax and adds them to the list. + * C syntax and adds them to the list. */ #define current_lb_is_new (newndx == curndx) #define switch_line_buffers() (curndx = 1 - curndx) @@ -2390,7 +2569,7 @@ do { \ } while (0) -void +static void make_C_tag (isfun) bool isfun; { @@ -2434,7 +2613,7 @@ C_entries (c_ext, inf) int cblev; /* current curly brace level */ int parlev; /* current parenthesis level */ bool incomm, inquote, inchar, quotednl, midtoken; - bool cplpl, cjava; + bool purec, cplpl, cjava; token savetok; /* token saved during preprocessor handling */ @@ -2445,13 +2624,14 @@ C_entries (c_ext, inf) lp = curlb.buffer; *lp = 0; - fvdef = fvnone; typdef = tnone; structdef = snone; - definedef = dnone; objdef = onone; + fvdef = fvnone; fvextern = FALSE; typdef = tnone; + structdef = snone; definedef = dnone; objdef = onone; next_token_is_func = yacc_rules = FALSE; midtoken = inquote = inchar = incomm = quotednl = FALSE; tok.valid = savetok.valid = FALSE; cblev = 0; parlev = 0; + purec = !(c_ext & ~YACC); /* no extensions (apart from possibly yacc) */ cplpl = (c_ext & C_PLPL) == C_PLPL; cjava = (c_ext & C_JAVA) == C_JAVA; if (cjava) @@ -2530,12 +2710,18 @@ C_entries (c_ext, inf) case '"': inquote = TRUE; if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) - fvdef = fvnone; + { + fvextern = FALSE; + fvdef = fvnone; + } continue; case '\'': inchar = TRUE; if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) - fvdef = fvnone; + { + fvextern = FALSE; + fvdef = fvnone; + } continue; case '/': if (*lp == '*') @@ -2556,7 +2742,7 @@ C_entries (c_ext, inf) { /* entering or exiting rules section in yacc file */ lp++; - definedef = dnone; fvdef = fvnone; + definedef = dnone; fvdef = fvnone; fvextern = FALSE; typdef = tnone; structdef = snone; next_token_is_func = FALSE; midtoken = inquote = inchar = incomm = quotednl = FALSE; @@ -2598,7 +2784,7 @@ C_entries (c_ext, inf) if ((definedef != dnone || (cblev == 0 && structdef != scolonseen) || (cblev == 1 && cplpl && structdef == sinbody) - || (structdef == sinbody && structtype == st_C_enum)) + || (structdef == sinbody && purec)) && typdef != tignore && definedef != dignorerest && fvdef != finlist) @@ -2607,42 +2793,46 @@ C_entries (c_ext, inf) { if (endtoken (c)) { - if (c == ':' && cplpl && *lp == ':' && begtoken(*(lp + 1))) + bool funorvar = FALSE; + + if (c == ':' && cplpl && *lp == ':' && begtoken (lp[1])) { /* * This handles :: in the middle, but not at the - * beginning of an identifier. + * beginning of an identifier. Also, space-separated + * :: is not recognised. */ lp += 2; - toklen += 3; + toklen += 2; + c = lp[-1]; + goto intok; } else { - bool funorvar = FALSE; - if (yacc_rules || consider_token (newlb.buffer + tokoff, toklen, c, c_ext, cblev, parlev, &funorvar)) { + if (fvdef == foperator) + { + char *oldlp = lp; + lp = skip_spaces (lp-1); + if (*lp != '\0') + lp += 1; + while (*lp != '\0' + && !isspace (*lp) && *lp != '(') + lp += 1; + c = *lp++; + toklen += lp - oldlp; + } tok.named = FALSE; - if (structdef == sinbody + if (!purec + && funorvar && definedef == dnone - && funorvar) + && structdef == sinbody) /* function or var defined in C++ class body */ { - int len; - if (fvdef == foperator) - { - char *oldlp = lp; - lp = skip_spaces (lp-1); - while (*lp != '\0' - && !isspace (*lp) && *lp != '(') - lp += 1; - c = *lp++; - toklen += lp - oldlp; - } - - len = strlen (structtag) + qlen + toklen; + int len = strlen (structtag) + qlen + toklen; grow_linebuffer (&token_name, len + 1); strcpy (token_name.buffer, structtag); strcat (token_name.buffer, qualifier); @@ -2677,11 +2867,15 @@ C_entries (c_ext, inf) newlb.buffer + tokoff, toklen); token_name.buffer[toklen] = '\0'; token_name.len = toklen; - /* Name macros. */ + /* Name macros and members. */ tok.named = (structdef == stagseen + || typdef == ttypeseen || typdef == tend || (funorvar - && definedef == dignorerest)); + && definedef == dignorerest) + || (funorvar + && definedef == dnone + && structdef == sinbody)); } tok.lineno = lineno; tok.linelen = tokoff + toklen + 1; @@ -2706,6 +2900,7 @@ C_entries (c_ext, inf) } } /* if (endtoken (c)) */ else if (intoken (c)) + intok: { toklen++; continue; @@ -2781,6 +2976,7 @@ C_entries (c_ext, inf) } break; case fstartlist: + fvextern = FALSE; fvdef = fvnone; break; } @@ -2802,10 +2998,19 @@ C_entries (c_ext, inf) case fignore: break; case fvnameseen: - if ((globals && cblev == 0) || (members && cblev == 1)) + if ((members && cblev == 1) + || (globals && cblev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ + fvextern = FALSE; + fvdef = fvnone; + tok.valid = FALSE; + break; + case flistseen: + if (declarations && (cblev == 0 || cblev == 1)) + make_C_tag (TRUE); /* a function declaration */ /* FALLTHRU */ default: + fvextern = FALSE; fvdef = fvnone; /* The following instruction invalidates the token. Probably the token should be invalidated in all @@ -2834,7 +3039,8 @@ C_entries (c_ext, inf) case vignore: break; case fvnameseen: - if ((globals && cblev == 0) || (members && cblev == 1)) + if ((members && cblev == 1) + || (globals && cblev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ break; default: @@ -2860,7 +3066,8 @@ C_entries (c_ext, inf) case vignore: break; case fvnameseen: - if ((globals && cblev == 0) || (members && cblev == 1)) + if ((members && cblev == 1) + || (globals && cblev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ /* FALLTHRU */ default: @@ -2876,23 +3083,19 @@ C_entries (c_ext, inf) objdef = oparenseen; switch (fvdef) { - case fvnone: - switch (typdef) - { - case ttypedseen: - case tend: - if (tok.valid && *lp != '*') - { - /* This handles constructs like: - typedef void OperatorFun (int fun); */ - make_C_tag (FALSE); - typdef = tignore; - } - break; - } /* switch (typdef) */ - break; - case foperator: /* operator() is not handled */ case fvnameseen: + if (typdef == ttypeseen + && tok.valid + && *lp != '*' + && structdef != sinbody) + { + /* This handles constructs like: + typedef void OperatorFun (int fun); */ + make_C_tag (FALSE); + typdef = tignore; + } + /* FALLTHRU */ + case foperator: fvdef = fstartlist; break; case flistseen: @@ -2918,7 +3121,7 @@ C_entries (c_ext, inf) fvdef = flistseen; break; } - if (cblev == 0 && typdef == tend) + if (cblev == 0 && (typdef == tend)) { typdef = tignore; make_C_tag (FALSE); /* a typedef */ @@ -2930,7 +3133,7 @@ C_entries (c_ext, inf) case '{': if (definedef != dnone) break; - if (typdef == ttypedseen) + if (typdef == ttypeseen) typdef = tinbody; switch (structdef) { @@ -3015,7 +3218,8 @@ C_entries (c_ext, inf) case vignore: break; case fvnameseen: - if ((globals && cblev == 0) || (members && cblev == 1)) + if ((members && cblev == 1) + || (globals && cblev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ /* FALLTHRU */ default: @@ -3114,7 +3318,7 @@ Yacc_entries (inf) C_entries (YACC, inf); } -/* A useful macro. */ +/* A useful macro. */ #define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer) \ for (lineno = charno = 0; /* loop initialization */ \ !feof (file_pointer) /* loop test */ \ @@ -3142,15 +3346,15 @@ just_read_file (inf) /* Fortran parsing */ -bool +static bool tail (cp) char *cp; { register int len = 0; - while (*cp && lowcase(*cp) == lowcase(dbp[len])) + while (*cp != '\0' && lowcase (*cp) == lowcase (dbp[len])) cp++, len++; - if (*cp == '\0' && !intoken(dbp[len])) + if (*cp == '\0' && !intoken (dbp[len])) { dbp += len; return TRUE; @@ -3181,7 +3385,7 @@ takeprec () while (isdigit (*dbp)); } -void +static void getit (inf) FILE *inf; { @@ -3199,11 +3403,9 @@ getit (inf) dbp += 6; dbp = skip_spaces (dbp); } - if (!isalpha (*dbp) - && *dbp != '_' - && *dbp != '$') + if (!isalpha (*dbp) && *dbp != '_' && *dbp != '$') return; - for (cp = dbp + 1; *cp && intoken (*cp); cp++) + for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++) continue; pfnote (savenstr (dbp, cp-dbp), TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); @@ -3268,10 +3470,6 @@ Fortran_functions (inf) if (tail ("entry")) getit (inf); continue; - case 'p': - if (tail ("program") || tail ("procedure")) - getit (inf); - continue; case 'b': if (tail ("blockdata") || tail ("block data")) { @@ -3288,6 +3486,171 @@ Fortran_functions (inf) } /* + * Philippe Waroquiers , 1998-04-24 + * Ada parsing + */ +/* Once we are positioned after an "interesting" keyword, let's get + the real tag value necessary. */ +static void +adagetit (inf, name_qualifier) + FILE *inf; + char *name_qualifier; +{ + register char *cp; + char *name; + char c; + + while (!feof (inf)) + { + dbp = skip_spaces (dbp); + if (*dbp == '\0' + || (dbp[0] == '-' && dbp[1] == '-')) + { + lineno++; + linecharno = charno; + charno += readline (&lb, inf); + dbp = lb.buffer; + } + switch (*dbp) + { + case 'b': + case 'B': + if (tail ("body")) + { + /* Skipping body of procedure body or package body or .... + resetting qualifier to body instead of spec. */ + name_qualifier = "/b"; + continue; + } + break; + case 't': + case 'T': + /* Skipping type of task type or protected type ... */ + if (tail ("type")) + continue; + break; + } + if (*dbp == '"') + { + dbp += 1; + for (cp = dbp; *cp != '\0' && *cp != '"'; cp++) + continue; + } + else + { + dbp = skip_spaces (dbp); + for (cp = dbp; + (*cp != '\0' + && (isalpha (*cp) || isdigit (*cp) || *cp == '_' || *cp == '.')); + cp++) + continue; + if (cp == dbp) + return; + } + c = *cp; + *cp = '\0'; + name = concat (dbp, name_qualifier, ""); + *cp = c; + pfnote (name, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + if (c == '"') + dbp = cp + 1; + return; + } +} + +void +Ada_funcs (inf) + FILE *inf; +{ + bool inquote = FALSE; + + LOOP_ON_INPUT_LINES (inf, lb, dbp) + { + while (*dbp != '\0') + { + /* Skip a string i.e. "abcd". */ + if (inquote || (*dbp == '"')) + { + dbp = etags_strchr ((inquote) ? dbp : dbp+1, '"'); + if (dbp != NULL) + { + inquote = FALSE; + dbp += 1; + continue; /* advance char */ + } + else + { + inquote = TRUE; + break; /* advance line */ + } + } + + /* Skip comments. */ + if (dbp[0] == '-' && dbp[1] == '-') + break; /* advance line */ + + /* Skip character enclosed in single quote i.e. 'a' + and skip single quote starting an attribute i.e. 'Image. */ + if (*dbp == '\'') + { + dbp++ ; + if (*dbp != '\0') + dbp++; + continue; + } + + /* Search for beginning of a token. */ + if (!begtoken (*dbp)) + { + dbp++; + continue; /* advance char */ + } + + /* We are at the beginning of a token. */ + switch (*dbp) + { + case 'f': + case 'F': + if (!packages_only && tail ("function")) + adagetit (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"); + else + break; /* from switch */ + continue; /* advance char */ + case 't': + case 'T': + if (!packages_only && tail ("task")) + adagetit (inf, "/k"); + else if (typedefs && !packages_only && tail ("type")) + { + adagetit (inf, "/t"); + while (*dbp != '\0') + dbp += 1; + } + else + break; /* from switch */ + continue; /* advance char */ + } + + /* Look for the end of the token. */ + while (!endtoken (*dbp)) + dbp++; + + } /* advance char */ + } /* advance line */ +} + +/* * Bob Weiner, Motorola Inc., 4/3/94 * Unix and microcontroller assembly tag handling * look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]' @@ -3311,7 +3674,7 @@ Asm_labels (inf) if (*cp == ':' || isspace (*cp)) { /* Found end of label, so copy it and add it to the table. */ - pfnote ((CTAGS) ? savenstr(lb.buffer, cp-lb.buffer) : NULL, TRUE, + pfnote (savenstr(lb.buffer, cp-lb.buffer), TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } } @@ -3345,7 +3708,7 @@ Perl_functions (inf) cp++; pfnote (savenstr (sp, cp-sp), TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); - } + } } else if (globals /* only if tagging global vars is enabled */ && ((cp = lb.buffer, @@ -3377,7 +3740,7 @@ Perl_functions (inf) while (*cp != '\0' && *cp != ';' && *cp != '=' && *cp != ')') cp++; } - + /* 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, @@ -3498,8 +3861,8 @@ Pascal_functions (inf) inparms = FALSE; /* found '(' after "proc" */ verify_tag = FALSE; /* check if "extern" is ahead */ - - while (!feof (inf)) /* long main loop to get next char */ + + while (!feof (inf)) /* long main loop to get next char */ { c = *dbp++; if (c == '\0') /* if end of line */ @@ -3640,7 +4003,7 @@ Pascal_functions (inf) * lisp tag functions * look for (def or (DEF, quote or QUOTE */ -int +static int L_isdef (strp) register char *strp; { @@ -3649,7 +4012,7 @@ L_isdef (strp) && (strp[3] == 'f' || strp[3] == 'F')); } -int +static int L_isquote (strp) register char *strp; { @@ -3661,7 +4024,7 @@ L_isquote (strp) && isspace (*++strp)); } -void +static void L_getit () { register char *cp; @@ -3678,7 +4041,7 @@ L_getit () } for (cp = dbp /*+1*/; - *cp != '\0' && *cp != '(' && *cp != ' ' && *cp != ')'; + *cp != '\0' && *cp != '(' && !isspace(*cp) && *cp != ')'; cp++) continue; if (cp == dbp) @@ -3731,8 +4094,10 @@ Lisp_functions (inf) * Postscript tag functions * Just look for lines where the first character is '/' * Richard Mlynarik + * Also look at "defineps" for PSWrap + * suggested by Masatake YAMATO */ -void +void Postscript_functions (inf) FILE *inf; { @@ -3746,9 +4111,15 @@ Postscript_functions (inf) *ep != '\0' && *ep != ' ' && *ep != '{'; ep++) continue; - pfnote ((CTAGS) ? savenstr (bp, ep-bp) : NULL, TRUE, + 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); + } } } @@ -3761,54 +4132,38 @@ Postscript_functions (inf) * look for (set! xyzzy */ -void get_scheme (); - void Scheme_functions (inf) FILE *inf; { - LOOP_ON_INPUT_LINES (inf, lb, dbp) + register char *bp; + + LOOP_ON_INPUT_LINES (inf, lb, bp) { - if (dbp[0] == '(' - && (dbp[1] == 'D' || dbp[1] == 'd') - && (dbp[2] == 'E' || dbp[2] == 'e') - && (dbp[3] == 'F' || dbp[3] == 'f')) + if (bp[0] == '(' + && (bp[1] == 'D' || bp[1] == 'd') + && (bp[2] == 'E' || bp[2] == 'e') + && (bp[3] == 'F' || bp[3] == 'f')) { - dbp = skip_non_spaces (dbp); + bp = skip_non_spaces (bp); /* Skip over open parens and white space */ - while (isspace (*dbp) || *dbp == '(') - dbp++; - get_scheme (); + while (isspace (*bp) || *bp == '(') + bp++; + get_tag (bp); } - if (dbp[0] == '(' - && (dbp[1] == 'S' || dbp[1] == 's') - && (dbp[2] == 'E' || dbp[2] == 'e') - && (dbp[3] == 'T' || dbp[3] == 't') - && (dbp[4] == '!' || dbp[4] == '!') - && (isspace (dbp[5]))) + 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] == '!') + && (isspace (bp[5]))) { - dbp = skip_non_spaces (dbp); - dbp = skip_spaces (dbp); - get_scheme (); + bp = skip_non_spaces (bp); + bp = skip_spaces (bp); + get_tag (bp); } } } - -void -get_scheme () -{ - register char *cp; - - if (*dbp == '\0') - return; - /* Go till you get to white space or a syntactic break */ - for (cp = dbp + 1; - *cp != '\0' && *cp != '(' && *cp != ')' && !isspace (*cp); - cp++) - continue; - pfnote (savenstr (dbp, cp-dbp), TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); -} /* Find tags in TeX and LaTeX input files. */ @@ -3830,9 +4185,9 @@ char *TEX_defenv = "\ :chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\ :part:appendix:entry:index"; -void TEX_mode (); -struct TEX_tabent *TEX_decode_env (); -int TEX_Token (); +void TEX_mode (FILE *inf); +struct TEX_tabent *TEX_decode_env (char *evarname, char *defenv); +int TEX_Token (char *cp); char TEX_esc = '\\'; char TEX_opgrp = '{'; @@ -3996,11 +4351,11 @@ TEX_Token (cp) * Prolog support (rewritten) by Anders Lindgren, Mar. 96 * * Assumes that the predicate starts at column 0. - * Only the first clause of a predicate is added. + * Only the first clause of a predicate is added. */ -int prolog_pred (); -void prolog_skip_comment (); -int prolog_atom (); +int prolog_pred (char *s, char *last); +void prolog_skip_comment (linebuffer *plb, FILE *inf); +int prolog_atom (char *s, int pos); void Prolog_functions (inf) @@ -4091,8 +4446,7 @@ prolog_pred (s, last) || len != (int)strlen (last) || !strneq (s, last, len)) { - pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE, - s, pos, lineno, linecharno); + pfnote (savenstr (s, len), TRUE, s, pos, lineno, linecharno); return len; } } @@ -4131,7 +4485,7 @@ prolog_atom (s, pos) { pos++; - while (1) + while (1) { if (s[pos] == '\'') { @@ -4158,16 +4512,16 @@ prolog_atom (s, pos) return -1; } -/* +/* * Support for Erlang -- Anders Lindgren, Feb 1996. * * Generates tags for functions, defines, and records. * * Assumes that Erlang functions start at column 0. */ -int erlang_func (); -void erlang_attribute (); -int erlang_atom (); +int erlang_func (char *s, char *last); +void erlang_attribute (char *s); +int erlang_atom (char *s, int pos); void Erlang_functions (inf) @@ -4198,7 +4552,7 @@ Erlang_functions (inf) } else if ((len = erlang_func (cp, last)) > 0) { - /* + /* * Function. Store the function name so that we only * generates a tag for the first clause. */ @@ -4245,8 +4599,7 @@ erlang_func (s, last) || len != (int)strlen (last) || !strneq (s, last, len))) { - pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE, - s, pos, lineno, linecharno); + pfnote (savenstr (s, len), TRUE, s, pos, lineno, linecharno); return len; } @@ -4255,7 +4608,7 @@ erlang_func (s, last) /* - * Handle attributes. Currently, tags are generated for defines + * Handle attributes. Currently, tags are generated for defines * and records. * * They are on the form: @@ -4273,12 +4626,12 @@ erlang_attribute (s) if (strneq (s, "-define", 7) || strneq (s, "-record", 7)) { pos = skip_spaces (s + 7) - s; - if (s[pos++] == '(') + if (s[pos++] == '(') { pos = skip_spaces (s + pos) - s; len = erlang_atom (s, pos); if (len != 0) - pfnote ((CTAGS) ? savenstr (& s[pos], len) : NULL, TRUE, + pfnote (savenstr (& s[pos], len), TRUE, s, pos + len, lineno, linecharno); } } @@ -4311,7 +4664,7 @@ erlang_atom (s, pos) { pos++; - while (1) + while (1) { if (s[pos] == '\'') { @@ -4344,7 +4697,7 @@ erlang_atom (s, pos) an unquoted separator. Also turns "\t" into a Tab character. Returns pointer to terminating separator. Works in place. Null terminates name string. */ -char * +static char * scan_separators (name) char *name; { @@ -4384,8 +4737,9 @@ 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. */ void -analyse_regex (regex_arg) +analyse_regex (regex_arg, ignore_case) char *regex_arg; + bool ignore_case; { if (regex_arg == NULL) free_patterns (); /* --no-regex: remove existing regexps */ @@ -4416,7 +4770,7 @@ analyse_regex (regex_arg) } initbuffer (®exbuf); while (readline_internal (®exbuf, regexfp) > 0) - analyse_regex (regexbuf.buffer); + analyse_regex (regexbuf.buffer, ignore_case); free (regexbuf.buffer); fclose (regexfp); } @@ -4439,13 +4793,13 @@ analyse_regex (regex_arg) lang = get_language_from_name (lang_name); if (lang == NULL) return; - add_regex (cp + 1, lang); + add_regex (cp + 1, ignore_case, lang); } break; /* Regexp to be used for any language. */ default: - add_regex (regex_arg, NULL); + add_regex (regex_arg, ignore_case, NULL); break; } } @@ -4453,8 +4807,9 @@ analyse_regex (regex_arg) /* Turn a name, which is an ed-style (but Emacs syntax) regular expression, into a real regular expression by compiling it. */ void -add_regex (regexp_pattern, lang) +add_regex (regexp_pattern, ignore_case, lang) char *regexp_pattern; + bool ignore_case; language *lang; { char *name; @@ -4477,7 +4832,8 @@ add_regex (regexp_pattern, lang) (void) scan_separators (name); patbuf = xnew (1, struct re_pattern_buffer); - patbuf->translate = NULL; + /* Translation table to fold case if appropriate. */ + patbuf->translate = (ignore_case) ? lc_trans : NULL; patbuf->fastmap = NULL; patbuf->buffer = NULL; patbuf->allocated = 0; @@ -4503,7 +4859,7 @@ add_regex (regexp_pattern, lang) * Do the substitutions indicated by the regular expression and * arguments. */ -char * +static char * substitute (in, out, regs) char *in, *out; struct re_registers *regs; @@ -4567,6 +4923,23 @@ free_patterns () return; } +void +get_tag (bp) + register char *bp; +{ + register char *cp; + + if (*bp == '\0') + return; + /* Go till you get to white space or a syntactic break */ + for (cp = bp + 1; + *cp != '\0' && *cp != '(' && *cp != ')' && !isspace (*cp); + cp++) + continue; + pfnote (savenstr (bp, cp-bp), TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); +} + #endif /* ETAGS_REGEXPS */ /* Initialize a linebuffer for use */ void @@ -4704,7 +5077,7 @@ readline (lbp, stream) } } #endif /* ETAGS_REGEXPS */ - + return result; } @@ -4830,7 +5203,7 @@ suggest_asking_for_help () /* Print error message. `s1' is printf control string, `s2' is arg for it. */ void error (s1, s2) - char *s1, *s2; + const char *s1, *s2; { fprintf (stderr, "%s: ", progname); fprintf (stderr, s1, s2); @@ -4919,6 +5292,10 @@ relative_filename (file, dir) while (*fp++ == *dp++) continue; fp--, dp--; /* back to the first differing char */ +#ifdef DOS_NT + if (fp == afn && afn[0] != '/') /* cannot build a relative name */ + return afn; +#endif do /* look at the equal chars until '/' */ fp--, dp--; while (*fp != '/'); @@ -4993,7 +5370,7 @@ absolute_filename (file, dir) slashp = etags_strchr (slashp + 1, '/'); } - + if (res[0] == '\0') return savestr ("/"); else @@ -5041,6 +5418,10 @@ canonicalize_filename (fn) register char *fn; { #ifdef DOS_NT + /* Canonicalize drive letter case. */ + if (islower (fn[0])) + fn[0] = toupper (fn[0]); + /* Convert backslashes to slashes. */ for (; *fn != '\0'; fn++) if (*fn == '\\') *fn = '/'; diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c index ddce69c..6b1364e 100644 --- a/lib-src/gnuserv.c +++ b/lib-src/gnuserv.c @@ -73,7 +73,7 @@ main () #ifdef SYSV_IPC int ipc_qid = 0; /* ipc message queue id */ -int ipc_wpid = 0; /* watchdog task pid */ +pid_t ipc_wpid = 0; /* watchdog task pid */ /* @@ -111,7 +111,7 @@ ipc_spawn_watchdog (void) { if ((ipc_wpid = fork ()) == 0) { /* child process */ - int ppid = getppid (); /* parent's process id */ + pid_t ppid = getppid (); /* parent's process id */ setpgrp(); /* gnu kills process group on exit */ @@ -323,7 +323,7 @@ handle_response (void) char buf[GSERV_BUFSZ+1]; int offset=0; int s; - int len; + int len = 0; int result_len; /* read in "n/m:" (n=client fd, m=message length) */ diff --git a/lib-src/gzip-el.sh b/lib-src/gzip-el.sh index 9d1563a..c1eb776 100755 --- a/lib-src/gzip-el.sh +++ b/lib-src/gzip-el.sh @@ -2,8 +2,8 @@ ### gzip-el.sh --- compress superfluous installed source lisp # Author: Jeff Miller -# Author: Hrvoje Niksic -# Maintainer: Steve Baur +# Author: Hrvoje Niksic +# Maintainer: Steve Baur # Created: 13 Feb 1997 # Version: 1.0 # Keywords: internal diff --git a/lib-src/hexl.c b/lib-src/hexl.c index 58855a0..0a88b00 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -29,9 +29,7 @@ char *progname; void usage (void); int -main(argc, argv) - int argc; - char *argv[]; +main (int argc, char *argv[]) { register long address; char string[18]; diff --git a/lib-src/make-path.c b/lib-src/make-path.c index b3de190..a8093e8 100644 --- a/lib-src/make-path.c +++ b/lib-src/make-path.c @@ -35,8 +35,6 @@ Boston, MA 02111-1307, USA. */ #include #include -extern int errno; - char *prog_name; static int touchy_mkdir (char *path) diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c index 8ba79d4..6287ca2 100644 --- a/lib-src/mmencode.c +++ b/lib-src/mmencode.c @@ -18,6 +18,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. #include #include #include +#include static void output64chunk(int c1, int c2, int c3, int pads, FILE *outfile); @@ -52,9 +53,7 @@ char c; static int InNewline=0; static int -nextcharin(infile, PortableNewlines) -FILE *infile; -int PortableNewlines; +nextcharin (FILE *infile, int PortableNewlines) { int c; diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 19793a3..9a1a3c6 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -150,7 +150,8 @@ static char *concat (char *, char *, char *); static long *xmalloc (unsigned int); #ifdef MAIL_USE_POP static int popmail (char *, char *, char *); -static int pop_retr (popserver server, int msgno, int (*action)(), void *arg); +static int pop_retr (popserver server, int msgno, + int (*action)(char *, FILE *), void *arg); static int mbx_write (char *, FILE *); static int mbx_delimit_begin (FILE *); static int mbx_delimit_end (FILE *); @@ -730,7 +731,7 @@ popmail (char *user, char *outfile, char *password) } static int -pop_retr (popserver server, int msgno, int (*action)(), void *arg) +pop_retr (popserver server, int msgno, int (*action)(char *, FILE *), void *arg) { char *line; int ret; diff --git a/lib-src/pop.c b/lib-src/pop.c index bbec8ab..c50fc14 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -922,7 +922,7 @@ pop_quit (popserver server) ret = -1; } - close (server->file); + CLOSESOCKET (server->file); } if (server->buffer) diff --git a/lib-src/process-depends.sh b/lib-src/process-depends.sh deleted file mode 100644 index 258d606..0000000 --- a/lib-src/process-depends.sh +++ /dev/null @@ -1,68 +0,0 @@ -## Process the output of makedepend. -## Copyright (c) 1994 Amdahl Corporation. -## Written by Ben Wing, December 1994. - -## This file is used as part of 'make depend', to produce the -## dependency list for src/Makefile.in.in. - -## Unfortunately, makedepend (at least the one that comes as part -## of Open Windows under Solaris) is stupid and doesn't follow the -## documented behavior. So we have to force the definitions of -## certain options through -D flags (even though it's supposed to -## pick this up), and post-process the output to get rid of stuff -## we don't want. - -## The sed stage gets rid of include files in other directories, -## except for lwlib.h (makedepend puts system include files in, -## which is pretty stupid). We also get rid of some standard -## include files that are in every or pretty much every file -## and where changes in those files don't usually merit -## recompilation of everything. Finally, we eliminate entirely -## the dependencies for some files (such as unex*.c) that get -## screwed up by makedepend. We just put those in by hand at -## the top of the dependency list. - -## For Mule, we need to do some additional processing: conversion -## to MULESRCDIR (at least so that the include files don't get -## wiped out by the next stage) and removing the mule/ prefix -## from the object file names. - -## The awk stage puts one dependency per line. Then we pass -## the result through sort and uniq (makedepend is supposed -## to not put in duplicate dependencies, but it does so -## occasionally). - -## After running 'make depend', verify that the output (in -## depend.out) is reasonable and then replace the stuff in -## Makefile.in.in marked "generated by 'make depend'". - -sed -e ' -1d -s/ \/[^ ]*\/lwlib\// $(LWLIBSRCDIR)\//g -s/\.\.\/etc\//${srcdir}\/${etcdir}/g -s/^mule\///g -s/ mule\// $(MULESRCDIR)\/mule\//g -s/ \/[^ ]*\.h//g -s/ \/[^ ]*gray//g -s/ [a-z][^ ]*\/[^ ]*\.h//g -s/ lisp\.h//g -s/ lisp-union\.h//g -s/ lisp-disunion\.h//g -s/ lrecord\.h//g -s/ emacsfns\.h//g -s/ symeval\.h//g -s/ symsinit\.h//g -s/ syssignal\.h//g -s/ intl\.h//g -s/ tt_c\.h//g -s/ descrip\.h//g -/^unex/d -/^sgiplay/d -/^Extern/d -/^extw/d -/^[^ ]*\.o:$/d -' | awk ' -{ for (i = 2; i <= NF; i++) - printf ("%s %s\n", $1, $i) -} -' | sort | uniq diff --git a/lib-src/process-gnu-depends.sh b/lib-src/process-gnu-depends.sh deleted file mode 100755 index b08a916..0000000 --- a/lib-src/process-gnu-depends.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -perl -e ' -while (<>) -{ - chop; - $foo .= $_; - if (!/\\$/) - { - @foo = split (/[ \\:\n]+/, $foo); - $filename = $foo[0]; - if (($filename =~ /^unex/) || - ($filename =~ /^sgiplay/) || - ($filename =~ /^Extern/) || - ($filename =~ /^extw/)) - { - $foo = ""; - next; - } - @foo = grep (!/\.c$/, @foo); - @foo = grep ((s/\/.*lwlib\//\$(LWLIBSRCDIR)\//, 1), @foo); - @foo = grep (!/lisp\.h/, @foo); - @foo = grep (!/lisp\.h/, @foo); - @foo = grep (!/lisp-union\.h/, @foo); - @foo = grep (!/lisp-disunion\.h/, @foo); - @foo = grep (!/lrecord\.h/, @foo); - @foo = grep (!/emacsfns\.h/, @foo); - @foo = grep (!/symeval\.h/, @foo); - @foo = grep (!/symsinit\.h/, @foo); - @foo = grep (!/syssignal\.h/, @foo); - @foo = grep (!/intl\.h/, @foo); - @foo = grep (!/tt_c\.h/, @foo); - @foo = grep (!/descrip\.h/, @foo); - shift @foo; - if (!$#foo) - { - next; - } - foreach $i (0 .. $#foo) - { - $foo[$i] = $filename . ": " . $foo[$i]; - } - print $filename . ": config.h\n"; - print join ("\n", @foo); - print "\n"; - $foo = ""; - } -} -' | sort | uniq \ No newline at end of file diff --git a/lib-src/pstogif b/lib-src/pstogif deleted file mode 100755 index 7ddbcd3..0000000 --- a/lib-src/pstogif +++ /dev/null @@ -1,189 +0,0 @@ -: # -*-Perl-*- -eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge - if 0; -# -# pstogif.pl v1.0, July 1994, by Nikos Drakos -# Computer Based Learning Unit, University of Leeds. -# -# Accompanies LaTeX2HTML Version 96.1 -# -# Script to convert an arbitrary PostScript image to a cropped GIF image -# suitable for incorporation into HTML documents as inlined images to be -# viewed with WWW browsers. -# -# This is based on the pstoepsi script -# by Doug Crabill dgc@cs.purdue.edu -# -# Please note the following: -# - The source PostScript file must end -# in a .ps extention. This is a GhostScript requirement, not mine... -# - The -density argument has no effect unless the -# color depth (set with the -depth argument) is equal to 1. -# - Valid arguments for -depth are 1,8, or 24. -# -# This software is provided as is without any guarantee. -# -# Nikos Drakos (ND), nikos@cbl.leeds.ac.uk -# Computer Based Learning Unit, University of Leeds. -# -# 15 Jan 96 HS Call ppmquant only if needed. Fixed bug relative to -# V 95.3 . -# -# 15 Dec 95 HS (Herbert Swan Added support for -# the flip=option. This allows images to be oriented differently -# in the paper versus the electronic media -# -# 1 Nov 95 jmn - modified for use with gs ppm driver - from jhrg's patches -# note that ppmtops.ps and ppmtops3.ps are no longer needed -# -# 20 JUL 94 ND Converted to Perl and made several changes eg it now accepts -# parameters from environment variables or from command line or will use -# default ones. -# -# 1 APR 94 ND Changed the suffixes of multi-page files from xbm to gif (oops!) -# -# - -##################################################################### -$| =1; -&read_args; - -### You may need to specify some pathnames here if you want to -### run the script without LaTeX2HTML - -# Ghostscript -$GS= $ENV{'GS'} || 'gs'; - -# Comes with LaTeX2HTML (For ghostscript versions greater than 3.0 -# you need the newer pstoppm.ps) -#$PSTOPPM= $ENV{'PSTOPPM'} || -# 'pstoppm.ps'; - -# Available in the PBMPLUS library -$PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ; - -# Also in PBMPLUS -$PNMFLIP=$ENV{'PNMFLIP'} || 'pnmflip' ; - -# Also in PBMPPLUS -$PPMTOGIF=$ENV{'PPMTOGIF'} || 'ppmtogif' ; - -# Also in PBMPPLUS -$REDUCE_COLOR=$ENV{'PPMQUANT'} || 'ppmquant 256' ; - -$OUTFILE = $ENV{'OUTFILE'} || $out; - -# Valid choices for $COLOR_DEPTH are 1, 8 or 24. -$DEPTH = $ENV{'DEPTH'} || $depth || 24; - -#Default density is 72 -$DENSITY = $ENV{'DENSITY'} || $density || 72; - -# Valid choices are any numbers greater than zero -# Useful choices are numbers between 0.1 - 5 -# Large numbers may generate very large intermediate files -# and will take longer to process -$SCALE = $ENV{'SCALE'} || $scale; # No default value - -$PAPERSIZE = $ENV{'PAPERSIZE'} || $papersize; # No default value; - -$DEBUG = $ENV{'DEBUG'} || $DEBUG || 0; - -###################################################################### - -&main; - -sub read_args { - local($_); - local($color); - while ($ARGV[0] =~ /^-/) { - $_ = shift @ARGV; - if (/^-h(elp)?$/) { - &usage; exit} - elsif (/^-out$/) { - $out = shift @ARGV; - } - elsif (/^-(.*)$/) { - eval "\$$1 = shift \@ARGV"; # Create and set a flag $ - } - } -} - -sub main { - local($base, $outfile, $i, $j); - $base = &test_args; - $outfile = $OUTFILE || "$base.gif"; - open(STDERR, ">/dev/null") unless $DEBUG; - &convert($base); - if (-f "$base.ppm") { - &crop_scale_etc("$base.ppm", $outfile); - } - else { - foreach $i (<$base.[1-9]*ppm>) { - $j = $i; - $j =~ s/\.(.*)ppm/$1.gif/; - &crop_scale_etc($i, $j)} - } - &cleanup($base); -} - -sub crop_scale_etc { - local($in, $out) = @_; - local($tmp) = $in . ".tmp"; - open(STDERR, ">/dev/null") unless $DEBUG; - - if ($flip) { - rename($tmp, $in) unless system("$PNMFLIP -$flip $in > $tmp"); - } - system("$PNMCROP $in > $tmp"); - - if (system("$PPMTOGIF $tmp > $out")) { - print "Running ppmquant for $out\n"; - system("$REDUCE_COLOR < $tmp|$PPMTOGIF - > $out"); - } - unlink $tmp; - print "Writing $out\n"; -} - -sub test_args { - local($file) = $ARGV[0]; - if (! ($file =~ s/\.ps$//)) { - print "The name of the input file must end in '.ps'\n"; - exit} - elsif (! ( -f "$file.ps")) { - print "Cannot find file $file.ps\n."; - exit} - elsif (! ($DEPTH =~ /^(1|8|24)$/)) { - print "The color depth must be 1 or 8 or 24. You specified $DEPTH\n"; - exit - } - if (defined $SCALE) { - if ($SCALE > 0) { - $DENSITY = int($SCALE * $DENSITY)} - else { - print "Error: The scale must be greater than 0.\n" . - "You specified $SCALE\n"; - exit} - } - $file; -} - -sub convert { - local($base) = @_; - local($paperopt) = "-sPAPERSIZE=$PAPERSIZE" if $PAPERSIZE; - local($ppmtype) = join('', "ppm",$DEPTH,"run"); - local($density) = "-r$DENSITY" if ($DENSITY != 72); - open (GS, "|$GS -q -dNOPAUSE -dNO_PAUSE -sDEVICE=ppmraw $density -sOutputFile=$base.ppm $paperopt $base.ps"); - close GS; -} - -sub cleanup { - local($base) = @_; - unlink <$base[0-9.]*ppm>; -} - -sub usage { - print "Usage: pstogif [-h(elp)] [-out ] [-depth ] [-flip ] [-density ] .ps\n\n"; -} - - diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 2a9e7d1..8fa12d9 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -28,7 +28,7 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.37 1997/03/21 22:19:30 eggert Exp $' +Id='$Id: rcs2log,v 1.2 1997/07/09 04:31:03 steve Exp $' # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. diff --git a/lib-src/run.c b/lib-src/run.c index 86830ba..b808c4a 100644 --- a/lib-src/run.c +++ b/lib-src/run.c @@ -65,10 +65,14 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) char execpath[MAX_PATH]; char* argv[MAX_ARGS+1]; /* leave extra slot for compact_invocation argv[0] */ int argc; - int i,j; + int i; char exec[MAX_PATH + FILENAME_MAX + 100]; char cmdline2[MAX_ARGS * MAX_PATH]; +#ifdef Debug + int j; +#endif + compact_invocation = get_exec_name_and_path(execname,execpath); if (compact_invocation) @@ -157,7 +161,9 @@ void xemacs_special(char* exec) char* p; char* p2; char exec2[MAX_PATH + FILENAME_MAX + 100]; +#if defined(__CYGWIN__) char tmp[MAX_PATH + FILENAME_MAX + 100]; +#endif strcpy(exec2,exec); /* this depends on short-circuit evaluation */ if ( ((p = strrchr(exec2,'\\')) && stricmp(p,"\\xemacs") == 0) || diff --git a/lib-src/update-autoloads.sh b/lib-src/update-autoloads.sh index ee56e65..9eb1ffe 100644 --- a/lib-src/update-autoloads.sh +++ b/lib-src/update-autoloads.sh @@ -58,6 +58,7 @@ REAL="$EMACS_DIR/`basename $EMACS`" echo "Rebuilding autoloads in $CANON_PWD" echo " with $REAL..." +#### echon really sucks! if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then echon() { diff --git a/lib-src/update-elc.sh b/lib-src/update-elc.sh index b109e8d..fdc5edc 100644 --- a/lib-src/update-elc.sh +++ b/lib-src/update-elc.sh @@ -48,6 +48,7 @@ export EMACS echo " (using $EMACS)" # fuckin' sysv, man... +# Nuke this function... if [ "`uname -r | sed 's/[^0-9]*\([0-9]*\).*/\1/'`" -gt 4 ]; then echon() { diff --git a/lisp/.cvsignore b/lisp/.cvsignore index a7ad904..c7d7e3f 100644 --- a/lisp/.cvsignore +++ b/lisp/.cvsignore @@ -1 +1,2 @@ +ChangeLog.font-menu finder-inf.el diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f76e04..5b336c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-01-12 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `mojikyo-pj-[1 .. 21]' in UTF-2000. + 2000-01-14 MORIOKA Tomohiko * mule/mule-charset.el (default-coded-charset-priority-list): Add @@ -1202,6 +1207,684 @@ * files.el (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-12 Gunnar Evermann + + * about.el (about-hackers): Update my email address. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-11-06 Jason R Mastaler + + * package-get.el (package-get-download-sites): Removed several + defunct download sites, added many new ones, and corrected a few + incorrect directory-on-site entries. Added physical locations to + site-description. + +1999-11-30 Gunnar Evermann + + * finder.el (finder-commentary): add DOC string and fix + interactive spec + +1999-12-04 Hrvoje Niksic + + * help.el (describe-function): Don't forget to intern the string + completing-read returns. + (describe-variable): Ditto. + +1999-11-16 Adrian Aichner + + * hyper-apropos.el (hyper-apropos-this-symbol): Handle + `hyper-apropos-help-mode' here to find symbol to customize + irregardless of cursor position and simplify + `hyper-apropos-set-variable', `hyper-apropos-find-function', and + `hyper-apropos-popup-menu'. + +1999-11-21 Yoshiki Hayashi + + * apropos.el (apropos-mode-map): Add return to call + apropos-follow. + (apropos-print): Call apropos-mode to have better + command reference. Put keymap text-poperty to + symbole name. + +1999-11-22 Alastair Burt + + * help.el: (describe-bindings-1): Added handling of keymaps for + the extents at point. + +1999-12-02 Mark Thomas + + * gutter-items.el (buffers-tab-items): Wrap the function in a + save-match-data + +1999-12-04 Hrvoje Niksic + + * help.el (describe-function): Use the DEFAULT argument to + completing-read. + (describe-variable): Ditto. + +1999-11-26 Yoshiki Hayashi + + * minibuf.el (read-from-minibuffer): Add optional argument + DEFAULT to have better mini-buffer history support. + (completing-read): Pass default to read-from-minibuffer. + (read-buffer): Pass default to completing-read. + +1999-12-04 Hrvoje Niksic + + * font-lock.el (font-lock-doc-string-face): Document the + `font-lock-lisp-like' property. + +1999-11-29 Hrvoje Niksic + + * lisp-mode.el: Specify `font-lock-lisp-like'. + + * font-lock.el (font-lock-lisp-like): New function. + (font-lock-fontify-syntactically-region): Use it. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-18 Yoshiki Hayashi + + * minibuf.el (read-coding-system): Accept symbol and + coding-system object as a default-coding-system. + +1999-11-16 Yoshiki Hayashi + + * minibuf.el (read-coding-system): Accept symbol as + a default-coding-system. + +1999-10-06 Yoshiki Hayashi + + * apropos.el (apropos-documentation): Use insert instead + of princ. + +1999-11-07 William M. Perry + + * gpm.el: New gpm-minor-mode to turn GPM mouse support on & off + for the linux console. + + * mouse.el (mouse-consolidated-yank): Allow the mouse-yanking + stuff to work when you are not on a window system, since the GPM + mouse support now allows pasting from outside of XEmacs. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-11-06 Hrvoje Niksic + + * setup-paths.el (paths-default-info-directories): Add + /usr/share/info and /usr/local/share/info. + +1999-10-30 Hrvoje Niksic + + * about.el: Updated Vladimir Ivanovic's info. + +11999-08-28 Jan Vroonhof + + * auto-show.el (auto-show-truncationp): Remove. + + * auto-show.el (auto-show-should-take-action-p): Use window-truncated-p + +999-09-23 Gunnar Evermann + + * indent.el (indent-line-to): fix bug: spaces were not replaced + with tab if column is multiple of tab-width + From dhn@qedinc.com + +1999-10-24 Jan Vroonhof + + * mule/mule-cmds.el (read-input-method-name): Accept symbols + correctly. Patch from Mikio Nakajima + + * package-get.el (package-get-package-provider): Be verbose when + interactive. Patch from Robert Pluim + +1999-08-23 Mike McEwan + + * info.el (Info-suffix-list): Add ".info.bz2" to the recognised + info file suffixes. + +1999-08-19 Stephen Tse + + * process.el (open-network-stream): Add a new optional parameter + PROTOCOL to support udp; fix a minor typo and add an explanation + in docstring for udp programming. + + * code-process.el (open-network-stream): Add a new optional + parameter PROTOCOL to support udp; fix a minor typo and add an + explanation in docstring for udp programming. + +1999-10-18 Andy Piper + + * gui.el (make-gui-button): be more precise about how we call + callbacks. + + * wid-edit.el (widget-push-button-value-create): Use the new form + of native gui-button. + +1999-10-14 Yoshiki Hayashi + + * info.el (Info-page-prev): Don't do (sit-for 0). + +1999-10-13 Andy Piper + + * gutter-items.el (progress-abort-glyph): new glyph for showing + abort status. + (append-progress): dispatch-event rather than sit-for. + (abort-progress): new function. Show the abort glyph with an + appropriate message. + (raw-append-progress): dispatch-event rather than sit-for. + (display-progress): cope with aborts. + + * gui.el (make-gui-button): Use native widgets for buttons + unconditionally. + (insert-gui-button): ditto. + (gui-button-p): ditto. + + * xbm-button.el: remove from core. + + * xpm-button.el: remove from core. + +1999-10-07 Olivier Galibert + + * faces.el (init-device-faces): Don't initialize the random faces + on the stream device. + +1999-10-06 Andy Piper + + * files.el (recover-file): Don't use ls under windows for revert buffer. + +1999-09-25 Adrian Aichner + + * package-get.el (package-get-download-menu): Make menu really + toggle download sites. + (package-get-download-sites): Add autoload cookie. + +1999-09-29 Michael Sperber [Mr. Preprocessor] + + * setup-paths.el (paths-find-module-directory): Ditto. + +1999-09-29 Werner Fink + + * setup-paths.el (paths-find-exec-directory): Add missing nil + parameter for environment. + +1999-09-27 Martin Buchholz + + * modeline.el (modeline-format): + Only purecopy the strings. Else + (nsublis '(("%p" . "%P")) (default-value 'modeline-format) :test 'equal) + barfs. + +1999-08-28 Mike Woolley + + * winnt.el: Removed nt-shell-mode-hook, which was preventing the + user setting comint-completion-addsuffix and + comint-process-echoes. + +1999-09-22 Andy Piper + + * gutter-items.el (update-tab-in-gutter): use + last-nonminibuf-window instead of selected-window. + +1999-09-18 Andy Piper + + * gnuserv.el (gnuserv-edit-files): select frame we are going to + display on. + + * subr.el (record-buffer-hook): new variable so that the hook gets + some documentation. + +1999-09-16 Andy Piper + + * gutter-items.el (update-tab-in-gutter): only update when the + gutter is visible. + (remove-buffer-from-gutter-tab): ditto. + +1999-09-17 Hrvoje Niksic + + * simple.el (do-auto-fill): Commented out part of Kinsoku + processing. + +1999-09-14 Hrvoje Niksic + + * isearch-mode.el (isearch-highlightify-region): Give the + highlighting extents a high priority. + (isearch-make-extent): Give the main highlighting extent an even + higher priority. + +1999-09-13 Michael Sperber [Mr. Preprocessor] + + * packages.el (packages-compute-package-locations): Fix typo from + -u rationalization. + +1999-09-11 Michael Sperber [Mr. Preprocessor] + + * setup-paths.el (paths-find-doc-directory): Respect value of + `configure-doc-directory.' + + * find-paths.el (paths-find-architecture-directory): Give + precendence `default' argument (which typically comes from + configure). + +1999-09-05 Michael Sperber [Mr. Preprocessor] + + * startup.el (command-line-early): Added options -user-init-file + and -user-init-directory. + + * files.el (user-init-file): Default to NIL so we can recognize + when it's set. + +1999-08-30 Michael Sperber [Mr. Preprocessor] + + * obsolete.el (init-file-user): + * startup.el: + * packages.el (packages-compute-package-locations): + * package-get.el (package-get-user-index-filename): + * menubar-items.el (maybe-add-init-button): + * info.el (Info-annotations-path): + * dump-paths.el: + Change `user-init-directory' to be an absolute path. + Use `user-init-directory' where appropriate. + Zap `init-file-user' and its uses. + +1999-09-09 Hrvoje Niksic + + * subr.el (copy-symbol): New function. + +1999-09-08 Hrvoje Niksic + + * isearch-mode.el (isearch-done): Be sure to restore invisible + extents in the proper buffer. + (isearch-pre-command-hook): Set this-command to the correct value + in case the buffer has changed and old overriding-local-map was + used. + (isearch-restore-extent): Use remprop instead of setting the + property to nil. + +1999-09-08 Hrvoje Niksic + + * cmdloop.el (execute-extended-command): Update zmacs region + before the delay. + (execute-extended-command): Make the message gettext-friendly. + +1999-09-07 Andy Piper + + * gutter-items.el (progress-gauge-glyph): renamed from + progress-glyph. + (progress-text-glyph): new variable. + (progress-layout-glyph): use layouts and text glyphs. + (progress-area-buffer): removed. + (progress-text-and-extent): new variable. + (progress-displayed-p): dynamically create gutter area buffer. + (clear-progress): ditto. + (raw-append-progress): ditto. + (append-progress): use new glyph names. + (raw-append-progress): only create the extent when needed. set + properties more optimally. + (progress): remove args. + +1999-09-07 Hrvoje Niksic + + * isearch-mode.el (isearch-range-invisible): Use mapc instead of + mapcar where the return value is unused. + (isearch-restore-invisible-extents): Ditto. + (isearch-highlight-all-cleanup): Ditto. + (isearch-delete-extents-in-range): Traverse the extents only once. + (isearch-highlight-all-update): Don't start over if the search + string has changed and more input is pending. + +1999-09-07 Hrvoje Niksic + + * packages.el (packages-find-package-data-path): Ditto. + + * cl.el: Use mapcar at top-level -- mapc is no longer a subr. + + * subr.el (mapc-internal): Don't make obsolete. + + * cl-extra.el (mapc): Resurrect. + +1999-09-03 Hrvoje Niksic + + * obsolete.el (isearch-yank-x-clipboard): Define it as an obsolete + alias. + + * isearch-mode.el (isearch-top-state): Restore isearch-word. + (isearch-yank-clipboard): Renamed from isearch-yank-x-clipboard. + (isearch-yank-clipboard): Use get-clipboard instead of + x-get-clipboard. + (isearch-yank-selection): Fix docstring. + +1999-09-02 Martin Buchholz + + * cl-extra.el: Obsolete hash-table-type in favor of hash-table-weakness. + +1999-09-02 Hrvoje Niksic + + * cl-macs.el (extent-start-position): Fix setf method. + (extent-end-position): Ditto. + +1999-09-02 Hrvoje Niksic + + * isearch-mode.el: End merge with FSF 20.4. + + * isearch-mode.el (search-invisible): New variable. + (isearch-hide-immediately): Ditto. + (isearch-unhidden-extents): Ditto. + (isearch-range-invisible): New function. + (isearch-unhide-extent): Ditto. + (isearch-restore-invisible-extents): Ditto. + (isearch-restore-extent): Ditto. + + * isearch-mode.el (isearch-ring-advance-edit): Use FSF + implementation. + (isearch-ring-retreat-edit): Ditto. + (isearch-forward): New argument NO-RECURSIVE-EDIT. + (isearch-forward-regexp): New arguments NOT-REGEXP and + NO-RECURSIVE-EDIT. + (isearch-backward): New argument NO-RECURSIVE-EDIT. + (isearch-backward-regexp): New arguments NOT-REGEXP and + NO-RECURSIVE-EDIT. + (isearch-mode): Return isearch-success. + (isearch-update): Use unread-command-events instead of + unread-command-event. + (isearch-abort): If an invalid regexp is encountered, keep popping + states. + (isearch-*-char): Use FSF implementation. + (isearch-whitespace-chars): Use the more robust FSF's + implementation. + (isearch-within-brackets): New variable. + (isearch-mode): Initialize it. + (isearch-edit-string): Bind it. + (isearch-search-and-update): Set it. + (isearch-push-state): Push it. + (isearch-top-state): Pop it. + (isearch-search): Set it. + (isearch-printing-char): When called by isearch-whitespace-chars, + handle M-SPC gracefully. + (isearch-message-prefix): New argument ELLIPSIS. + (isearch-message-suffix): Ditto. + (isearch-message): Use the ELLIPSIS argument when calling + isearch-message-prefix and isearch-message-suffix. + (isearch-message-prefix): Distinguish between "wrapped" and + "overwrapped" search, FWIW. + +1999-09-01 Hrvoje Niksic + + * isearch-mode.el (isearch-edit-string): Use the head of the + search ring instead of search-last-string and search-last-regexp. + (search-highlight): Renamed from isearch-highlight. + (isearch-exit): Use the new name. + (isearch-highlight): Ditto. + (isearch-dehighlight): Ditto. + (isearch-update-ring): New function. + (isearch-done): Call it. + (isearch-done): New argument EDIT. + (isearch-repeat): If search string is empty, look up at the car of + the search ring; ignore the yank pointer. + (isearch-abort): Call isearch-done with NOPUSH. + (isearch-cancel): New function. + (isearch-mode-map): Bind it to ESC ESC ESC. + + * isearch-mode.el: Begin merge with FSF 20.4. + +1999-09-01 Andy Piper + + * x-select.el (x-get-clipboard): obsolete. + (x-yank-clipboard-selection): obsolete + + * select.el (disown-selection): need to be careful to disown the + clipboard if we set it via selection. + (get-clipboard): move from x-select.el + (yank-clipboard-selection): ditto. + +1999-09-01 Hrvoje Niksic + + * isearch-mode.el (isearch-exit): Bind isearch-highlight and + isearch-highlight-all-matches to nil. + (isearch-fixed-case): New variable. + (isearch-mode): Initialize it. + (isearch-edit-string): Save it. + (isearch-toggle-case-fold): Set it. + (isearch-fix-case): Make sure isearch-toggle-case-fold works -- + need to check isearch-fixed-case. + (isearch-toggle-case-fold): Update highlighting of all matches + before the pause. + (isearch-edit-string): + +1999-09-01 Hrvoje Niksic + + * isearch-mode.el (isearch-edit-string): Call isearch-message + before reading the event so that the prompt is displayed properly. + (isearch-message): Use isearch-nonincremental when calling + isearch-message-prefix. + (minibuffer-local-isearch-map): Bind up and down to do the same as + M-p and M-n respectively. + (isearch-done): New arg NOPUSH. + (isearch-edit-string): Use it. + (isearch-edit-string): Don't bind isearch-string. + (isearch-ring-adjust): Edit string, *then* push state. + +1999-08-31 Hrvoje Niksic + + * faces.el (isearch-secondary): Make isearch-secondary look + different than default. + +1999-08-30 Hrvoje Niksic + + * isearch-mode.el (isearch-yank): Use progn instead of the inner + save-excursion. + (isearch-dehighlight): Remove TOTALLY. Simplify. + (isearch-update): Call isearch-dehighlight without arguments. + (isearch-done): Ditto. + + * isearch-mode.el (isearch-fix-case): If the search string has no + upper-case letters, allow the folding to be reenabled. + Previously, once disabled, the folding would remain that way until + the end of isearch. + (isearch-top-state): Call isearch-fix-case. + + * isearch-mode.el (isearch-yank): Use progn instead of the inner + save-excursion. + (isearch-dehighlight): Remove TOTALLY. Simplify. + +1999-08-31 Jan Vroonhof + + * xpm-button.el: + xbm-button.el: Need to exist in core because gui.el depends on + them. + +1999-08-31 Andy Piper + + * gutter-items.el (buffers-tab-face): new customizable variable. + (buffers-tab-default-buffer-line-length): new specifier for + maximum viewable characters. + (progress-stack): new variable for implementing widget-based + progress messages. + (progress-area-buffer): ditto. + (progress-glyph-height): ditto. + (progress-stop-callback): ditto. + (progress-quit-function): new function. + (progress-glyph): new variable. + (progress-layout-glyph): ditto. + (progress-displayed-p): new function, see message-displayed-p for + details. + (clear-progress): ditto. + (remove-progress): ditto. + (append-progress): ditto. + (raw-append-progress): ditto. + (display-progress): ditto. + (current-progress): ditto. + (current-progress-label): ditto. + (progress): ditto. + (lprogress): ditto. + + +1999-08-29 Hrvoje Niksic + + * obsolete.el (isearch-yank-x-selection): Define obsolete alias. + + * isearch-mode.el (isearch-yank-x-selection): Renamed to + `isearch-yank-selection'. + (isearch-mode-map): Use it. + (isearch-yank-selection): Use `get-selection' instead of + `get-x-selection'. + +1999-08-29 Hrvoje Niksic + + * faces.el (isearch-secondary): Create face here. + + * isearch-mode.el: Rewrote the "lazy highlighting" code not to use + timers. + +1999-08-27 Hrvoje Niksic + + * subr.el (buffer-string): More robust backward compatibility + check, courtesy William Perry. + +1999-08-26 Hrvoje Niksic + + * replace.el (perform-replace): Stop the search after the search + limit has been reached. + +1999-08-23 Andy Piper + + * gutter-items.el (update-tab-in-gutter): call add-tab-to-gutter + here if we don't have one. + +1999-08-15 Oscar Figueiredo + + * ldap.el (ldap-coding-system): Default to nil until we get + efficient UTF8 support + (ldap-decode-string): Guard against `decode-coding-string' not + being defined + (ldap-encode-string): Guard against `encode-coding-string' not + being defined + +1999-08-23 Didier Verna + + * rect.el: Cosmetics suggested by Dave Love . + Some doc strings improvements, and add a star to the `interactive' + calls. + +1999-08-18 Stef Epardaud + + * font-lock.el (java-font-lock-keywords-3): introduced new + keywords and regexpes for javadoc syntax 1.2. + +1999-08-17 Andy Piper + + * gutter-items.el (buffers-tab-format-buffer-line-function): use + format-buffers-tab-line. + (buffers-tab-max-buffer-line-length): new variable. + (format-buffers-tab-line): new function. truncate names if over + buffers-tab-max-buffer-line-length. + +1999-08-13 Charles G Waldman + + * cus-start.el: Customize the variable `bell-inhibit-time'. + +1999-08-16 Andy Piper + + * gutter-items.el (remove-buffer-from-gutter-tab): take a + brute-force approach to deleting the last buffer. + (buffers-tab-grouping-regexp): new customizable variable. + (select-buffers-tab-buffers-by-mode): use it. + +1999-08-13 Andy Piper + + * gutter-items.el (remove-buffer-from-gutter-tab): fix *scratch* + deletion problem. + +1999-07-30 Didier Verna + + * cus-edit.el (custom-save-variables): I said, use prin1 instead + of princ to output symbols. + (custom-save-face-internal): ditto. + (custom-save-resets): ditto. + +1999-08-09 Didier Verna + + * gutter-items.el (select-buffers-tab-buffers-by-mode): use + `regexp-quote' to protect the major mode name for use as a regular + expression (c++ needs this for instance). + +1999-08-08 Andy Piper + + * gutter-items.el (select-buffers-tab-buffers-by-mode): beef up to + cope with similar mode names. + + * gutter-items.el (buffers-tab-selection-function): new selection + function. + (select-buffers-tab-buffers-by-mode): new function. + (buffers-tab-items): use it if set to only display buffers in the + tab in the current buffer's group.. + (update-tab-in-gutter): use new api. + (remove-buffer-from-gutter-tab): ditto. + + * gutter-items.el (buffers-tab-max-size): set custom selection + default to 6. + (buffers-tab-switch-to-buffer): just switch window if the window is visible. + (add-tab-to-gutter): set face as default. + +1999-07-07 Jan Vroonhof + + * faces.el (frob-face-property): Merge the fall-back specifier + with the target, not replace it. + +1999-08-05 Andy Piper + + * gutter-items.el (update-tab-in-gutter): add frame argument for + buffer-items. + (update-tab-in-gutter): use it. + + * gutter-items.el (record-buffer-hook): set. + + * buffer.el (switch-to-buffer): back out switch-to-buffer-hook + change. + (switch-to-buffer-hook) deleted. + +1999-08-04 Andy Piper + + * gutter-items.el (update-tab-in-gutter): make sure this will work + as an argument to create-frame-hook. + +1999-07-30 Hrvoje Niksic + + * isearch-mode.el: Modified Bob and Darryl's code to use itimers + instead of timer emulation. + +1999-07-30 Darryl Okahata + + * isearch-mode.el: Merged Bob Glickstein's GNU + Emacs isearch enhancements. + +1999-07-28 Andy Piper + + * gutter-items.el (add-tab-to-gutter): put in specifier specs for + all devices that support tab controls. + (remove-buffer-from-gutter-tab): new function. to be used as a + value for kill-buffer-hook. + +1999-07-21 Sean MacLennan + + * auto-show.el (auto-show-truncationp): changed to match + `window_translation_on' + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released @@ -1231,8 +1914,8 @@ 1999-07-23 Jan Vroonhof - * custom.el: - * cus-face.el: + * custom.el: + * cus-face.el: * cus-edit.el: Massive custom Theme API changes. @@ -1264,7 +1947,7 @@ 1999-06-25 Karl M. Hegbloom - * files.el (interpreter-mode-alist): add `make', `guile', and + * files.el (interpreter-mode-alist): add `make', `guile', and `emacs' entries. (#!/usr/bin/make -f ought to send a file into makefile-mode, guile is a scheme, and someday XEmacs will be modular enough to use as an efficient scripting tool.) @@ -1448,7 +2131,7 @@ * mule/mule-cmds.el (set-language-info): Don't set up menus at all. (set-language-info-alist): Set up menus here. - + 1999-06-28 MORIOKA Tomohiko * minibuf.el (completing-read): Add new optional argument diff --git a/lisp/about.el b/lisp/about.el index 9fcddb2..4448a0d 100644 --- a/lisp/about.el +++ b/lisp/about.el @@ -4,7 +4,7 @@ ;; Keywords: extensions ;; Version: 2.4 -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; This file is part of XEmacs. @@ -25,8 +25,8 @@ ;;; Synched up with: Not in FSF. -;; Original code: Jamie Zawinski -;; Text: Ben Wing , Jamie Zawinski +;; Original code: Jamie Zawinski +;; Text: Ben Wing , Jamie Zawinski ;; Hard: Amiga 1000, Progressive Peripherals Frame Grabber. ;; Soft: FG 2.0, DigiPaint 3.0, pbmplus (dec 91), xv 3.0. ;; Modified for 19.11 by Eduardo Pelegri-Llopart @@ -35,7 +35,7 @@ ;; 19.13 and 19.14 updating done by Chuck Thompson. ;; 19.15 and 20.0 updating done by Steve Baur and Martin Buchholz. -;; Completely rewritten for 20.3 by Hrvoje Niksic . +;; Completely rewritten for 20.3 by Hrvoje Niksic . ;; The original had no version numbers; I numbered the rewrite as 2.0. ;; Many things in this file are to gag. Ideally, we should just use @@ -57,19 +57,19 @@ (defvar xemacs-hackers '((ajc "Andrew Cosgriff" "ajc@bing.wattle.id.au") (baw "Barry Warsaw" "bwarsaw@python.org") - (bw "Bob Weiner" "weiner@altrasoft.com") + (bw "Bob Weiner" "weiner@beopen.com") (chr "Christian Nybø" "chr@mediascience.no") (cthomp "Chuck Thompson" "cthomp@xemacs.org") (dmoore "David Moore" "dmoore@ucsd.edu") (dkindred "Darrell Kindred" "dkindred@cmu.edu") (dv "Didier Verna" "verna@inf.enst.fr") - (hniksic "Hrvoje Niksic" "hniksic@srce.hr") + (hniksic "Hrvoje Niksic" "hniksic@xemacs.org") (jareth "Jareth Hein" "jareth@camelot.co.jp") (jason "Jason Mastaler" "jason@xemacs.org") (jens "Jens Lautenbacher" "jens@lemcbed.lem.uni-karlsruhe.de") (jmiller "Jeff Miller" "jmiller@smart.net") (juhp "Jens-Ulrik Holger Petersen" "petersen@kurims.kyoto-u.ac.jp") - (jwz "Jamie Zawinski" "jwz@netscape.com") + (jwz "Jamie Zawinski" "jwz@jwz.org") (kazz "IENAGA Kazuyuki" "ienaga@jsys.co.jp") (kyle "Kyle Jones" "kyle_jones@wonderworks.com") (larsi "Lars Magne Ingebrigtsen" "larsi@gnus.org") @@ -89,7 +89,7 @@ (stig "Jonathan Stigelman" "stig@hackvan.com") (stigb "Stig Bjorlykke" "stigb@tihlde.hist.no") (thiessel "Marcus Thiessel" "marcus@xemacs.org") - (vladimir "Vladimir Ivanovic" "vladimir@mri.com") + (vladimir "Vladimir Ivanovic" "vladimir@acm.com") (wing "Ben Wing" "ben@xemacs.org") (wmperry "William Perry" "wmperry@aventail.com")) "Alist of XEmacs hackers.") @@ -98,29 +98,29 @@ ;; It is preferred to a simple string, because it makes maintenance ;; easier. Please add new URLs to this list. (defvar about-url-alist - '((ajc . "http://www-personal.monash.edu.au/~ajc/") - (altrasoft . "http://www.altrasoft.com/") - (ben . "http://www.666.com/ben/") + '((ajc . "http://www-personal.monash.edu.au/~ajc/") + (beopen . "http://www.beopen.com/") + (ben . "http://www.666.com/ben/") (ben-xemacs . "http://www.666.com/xemacs/") - (baw . "http://www.python.org/~bwarsaw/") - (cc-mode . "http://www.python.org/ftp/emacs/") - (chr . "http://www.xemacs.org/faq/") - (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") - (dmoore . "http://oj.egbt.org/dmoore/") - (jason . "http://www.mastaler.com/") - (juhp . "http://www.kurims.kyoto-u.ac.jp/~petersen/") - (jwz . "http://people.netscape.com/jwz/") - (kazz . "http://www.imasy.or.jp/~kazz/") - (kyle . "http://www.wonderworks.com/kyle/") - (larsi . "http://www.ifi.uio.no/~larsi/") - (marcpa . "http://www.positron911.com/products/power.htm") - (ograf . "http://www.fga.de/~ograf/") - (pez . "http://www.dwwc.com/") - (piper . "http://www.xemacs.freeserve.co.uk/") - (vin . "http://www.upa.org/") - (stigb . "http://www.tihlde.hist.no/~stigb/") - (wget . "ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/") - (xemacs . "http://www.xemacs.org/")) + (baw . "http://www.python.org/~bwarsaw/") + (cc-mode . "http://www.python.org/ftp/emacs/") + (chr . "http://www.xemacs.org/faq/") + (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") + (dmoore . "http://oj.egbt.org/dmoore/") + (jason . "http://www.mastaler.com/") + (juhp . "http://www.kurims.kyoto-u.ac.jp/~petersen/") + (jwz . "http://www.jwz.org/") + (kazz . "http://www.imasy.or.jp/~kazz/") + (kyle . "http://www.wonderworks.com/kyle/") + (larsi . "http://www.ifi.uio.no/~larsi/") + (marcpa . "http://www.positron911.com/products/power.htm") + (ograf . "http://www.fga.de/~ograf/") + (pez . "http://www.dwwc.com/") + (piper . "http://www.xemacs.freeserve.co.uk/") + (vin . "http://www.upa.org/") + (stigb . "http://www.tihlde.hist.no/~stigb/") + (wget . "ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/") + (xemacs . "http://www.xemacs.org/")) "Some of the more important URLs.") (defvar about-left-margin 3) @@ -659,8 +659,8 @@ Come visit his glorified .plan file at\n\n") (widget-insert "Cars are evil. Ride a bike.\n")) (vladimir (widget-insert "\ -Former technical lead for XEmacs at Sun. He is now with Microtec -Research Inc., working on embedded systems development tools.\n")) +Former technical lead for XEmacs at Sun. He is now with a startup +marketing embedded Java databases.\n")) (stig (widget-insert "\ Stig is sort of a tool fetishist. He has a hate/love relationship @@ -717,12 +717,12 @@ MS Windows operating systems.\n")) (widget-insert "\ Author of the Hyperbole everyday information management hypertext system and the OO-Browser multi-language code browser. He also -designed the Altrasoft InfoDock integrated development environment +designed the BeOpen InfoDock integrated development environment for software engineers. It runs atop XEmacs and is available from -his firm, Altrasoft, which offers distributions, custom development, +his firm, BeOpen, which offers distributions, custom development, support, and training packages for corporate users of XEmacs, GNU Emacs and InfoDock. See ") - (about-url-link 'altrasoft "Visit Altrasoft WWW page") + (about-url-link 'beopen "Visit BeOpen WWW page") (widget-insert ". His interests include user interfaces, information management, @@ -1042,8 +1042,8 @@ Like most free software, XEmacs is a collaborative effort. These are some of the contributors. We have no doubt forgotten someone; we apologize! You can see some of our faces under the links.\n\n") (about-show-linked-info 'vladimir "\ -Former technical lead for XEmacs at Sun Microsystems. He is now with -Microtec Research Inc., working on embedded systems development tools.\n") +Former technical lead for XEmacs at Sun. He is now with a startup +marketing embedded Java databases.\n") (about-show-linked-info 'stig "\ Peripatetic uninominal Emacs hacker. Stig sometimes operates out of a big white van set up for nomadic living and hacking. Implemented the @@ -1063,9 +1063,9 @@ to cygwin under MS-Windows.\n") (about-show-linked-info 'bw "\ Author of the Hyperbole everyday information management hypertext system and the OO-Browser multi-language code browser. He also -designed the Altrasoft InfoDock integrated development environment +designed the BeOpen InfoDock integrated development environment for software engineers. It runs atop XEmacs and is available from -his firm, Altrasoft, which offers custom development and support packages +his firm, BeOpen, which offers custom development and support packages for corporate users of XEmacs, GNU Emacs and InfoDock. His interests include user interfaces, information management, CASE tools, communications and enterprise integration.\n") @@ -1313,7 +1313,7 @@ above. We couldn't have done it without them.\n\n" (print-short "Jonathan Edwards" "edwards@intranet.com") (print-short "Eric Eide" "eeide@asylum.cs.utah.edu") (print-short "EKR" "ekr@terisa.com") - (print-short "Gunnar Evermann" "Gunnar.Evermann@nats.informatik.uni-hamburg.de") + (print-short "Gunnar Evermann" "ge204@eng.cam.ac.uk") (print-short "Oscar Figueiredo" "Oscar.Figueiredo@di.epfl.ch") (print-short "David Fletcher" "frodo@tsunami.com") (print-short "Paul Flinders" "ptf@delcam.co.uk") diff --git a/lisp/apropos.el b/lisp/apropos.el index 5839194..9dee743 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -4,7 +4,7 @@ ;; Author: Joe Wells ;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 -;; Maintainer: SL Baur +;; Maintainer: SL Baur ;; Keywords: help ;; This file is part of XEmacs. @@ -107,6 +107,7 @@ This looks good, but slows down the commands several times.") (defvar apropos-mode-map (let ((map (make-sparse-keymap))) (define-key map [(control m)] 'apropos-follow) + (define-key map [return] 'apropos-follow) (define-key map [(button2up)] 'apropos-mouse-follow) (define-key map [(button2)] 'undefined) map) @@ -377,7 +378,7 @@ Returns list of symbols and documentation found." (defun apropos-documentation-check-doc-file () (let (type symbol (sepa 2) sepb beg end) - (princ ?\^_) + (insert ?\^_) (backward-char) (insert-file-contents (concat doc-directory internal-doc-file-name)) (forward-char) @@ -508,6 +509,9 @@ found." (let ((p apropos-accumulator) (old-buffer (current-buffer)) symbol item point1 point2) + ;; Mostly useless but to provide better keymap + ;; explanation. help-mode-map will be used instead. + (use-local-map apropos-mode-map) ;; XEmacs change from (if window-system (if (device-on-window-system-p) (progn @@ -575,6 +579,8 @@ found." apropos-item)) (if apropos-symbol-face (put-text-property point1 point2 'face apropos-symbol-face)) + ;; Add text-property on symbol, too. + (put-text-property point1 point2 'keymap apropos-mode-map) (apropos-print-doc 'describe-function 1 (if (commandp symbol) "Command" diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index 01510e5..eceb685 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -572,7 +572,9 @@ If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value." t nil) +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) (autoload 'customize-set-variable "cus-edit" "\ Set the default for VARIABLE to VALUE. VALUE is a Lisp object. @@ -587,7 +589,9 @@ If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " t nil) +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) (autoload 'customize-save-variable "cus-edit" "\ Set the default for VARIABLE to VALUE, and save it for future sessions. @@ -601,7 +605,9 @@ If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " t nil) +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) (autoload 'customize "cus-edit" "\ Select a customization buffer which you can use to set user options. @@ -698,7 +704,7 @@ The format is suitable for use with `easy-menu-define'." nil nil) ;;;*** -;;;### (autoloads (custom-set-faces custom-set-face-update-spec custom-declare-face) "cus-face" "lisp/cus-face.el") +;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-theme-face-value custom-theme-set-faces custom-set-faces custom-set-face-update-spec custom-declare-face) "cus-face" "lisp/cus-face.el") (autoload 'custom-declare-face "cus-face" "\ Like `defface', but FACE is evaluated as a normal argument." nil nil) @@ -709,15 +715,35 @@ Customize the FACE for display types matching DISPLAY, merging (autoload 'custom-set-faces "cus-face" "\ Initialize faces according to user preferences. +This asociates the setting with the USER theme. The arguments should be a list where each entry has the form: - (FACE SPEC [NOW]) + (FACE SPEC [NOW [COMMENT]]) SPEC will be stored as the saved value for FACE. If NOW is present and non-nil, FACE will also be created according to SPEC. +COMMENT is a string comment about FACE. See `defface' for the format of SPEC." nil nil) +(autoload 'custom-theme-set-faces "cus-face" "\ +Initialize faces according to settings specified by args. +Records the settings as belonging to THEME. + +See `custom-set-faces' for a description of the arguments ARGS." nil nil) + +(autoload 'custom-theme-face-value "cus-face" "\ +Return spec of FACE in THEME if the THEME modifies the +FACE. Nil otherwise." nil nil) + +(autoload 'custom-theme-reset-faces "cus-face" nil nil nil) + +(autoload 'custom-reset-faces "cus-face" "\ +Reset the value of the face to values previously defined. +Assosiate this setting with the 'user' theme. + +ARGS is defined as for `custom-theme-reset-faces'" nil nil) + ;;;*** ;;;### (autoloads (disassemble) "disass" "lisp/disass.el") @@ -1057,11 +1083,11 @@ This can take a while for large buffers." t nil) ;;;*** -;;;### (autoloads (mswindows-font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el") +;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el") -(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'x) +(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) -(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'x) +(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) (fset 'install-font-menus 'reset-device-font-menus) @@ -1077,7 +1103,7 @@ or if you change your font path, you can call this to re-initialize the menus." (autoload 'font-menu-size-constructor "font-menu" nil nil nil) -(autoload 'mswindows-font-menu-weight-constructor "font-menu" nil nil nil) +(autoload 'font-menu-weight-constructor "font-menu" nil nil nil) ;;;*** @@ -1262,7 +1288,7 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (capitalize (match-string 2 name))) (setq size (string-to-int (match-string 4 name)))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 2 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 4 truename)))) (setq slant (capitalize (match-string 5 truename)))) (vector entry family size weight slant))) +(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (match-string 1 name)) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (match-string 1 truename)) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from mswindows-font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (match-string 2 name)) (setq size (string-to-int (match-string 4 name)))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (match-string 2 truename))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 4 truename)))) (setq slant (match-string 5 truename))) (vector entry family size weight slant))) ;;;*** @@ -1335,6 +1361,8 @@ recent to least recent -- in other words, the version names don't have to be lexically ordered. It is debatable if it makes sense to have more than one version of a package available.") +(defcustom package-get-download-sites '(("xemacs.org" "ftp.xemacs.org" "pub/xemacs/packages") ("cso.uiuc.edu" "ftp.cso.uiuc.edu" "pub/packages/xemacs/packages") ("unicamp.br" "ftp.unicamp.br" "pub/xemacs/packages") ("sunsite.cnlab-switch.ch" "sunsite.cnlab-switch.ch" "mirror/xemacs/packages") ("tu-darmstadt.de" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") ("sunsite.auc.dk" "sunsite.auc.dk" "pub/emacs/xemacs/packages") ("pasteur.fr" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("cenatls.cena.dgac.fr" "ftp.cenatls.cena.dgac.fr" "pub/Emacs/xemacs/packages") ("kfki.hu" "ftp.kfki.hu" "pub/packages/xemacs/packages") ("uniroma2.it" "ftp.uniroma2.it" "unix/misc/dist/XEMACS/packages") ("icm.edu.pl" "ftp.icm.edu.pl" "pub/unix/editors/xemacs/packages") ("sunet.se" "ftp.sunet.se" "pub/gnu/xemacs/packages") ("doc.ic.ac.uk" "sunsite.doc.ic.ac.uk" "packages/xemacs/packages") ("srcc.msu.su" "ftp1.srcc.msu.su" "mirror/ftp.xemacs.org/packages") ("usyd.edu.au" "ftp.usyd.edu.au" "pub/Xemacs/packages") ("netlab.is.tsukuba.ac.jp" "ftp.netlab.is.tsukuba.ac.jp" "pub/GNU/xemacs/packages") ("jaist.ac.jp" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") ("ring.aist.go.jp" "ring.aist.go.jp" "pub/text/xemacs/packages") ("ring.asahi-net.or.jp" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("SunSITE.sut.ac.jp" "SunSITE.sut.ac.jp" "pub/archives/packages/xemacs/packages") ("dti.ad.jp" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("kreonet.re.kr" "ftp.kreonet.re.kr" "pub/tools/emacs/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 hostname directory)) :group 'package-get) + (autoload 'package-get-download-menu "package-get" "\ Build the `Add Download Site' menu." nil nil) @@ -1512,29 +1540,38 @@ they are not defaultly assigned to keys." t nil) ;;;*** -;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") +;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle extract-rectangle delete-extract-rectangle delete-rectangle kill-rectangle) "rect" "lisp/rect.el") + +(defvar killed-rectangle nil "\ +Rectangle for `yank-rectangle' to insert.") + +(autoload 'kill-rectangle "rect" "\ +Delete the region-rectangle and save it as the last killed one. +You might prefer to use `delete-extract-rectangle' from a program. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." t nil) (autoload 'delete-rectangle "rect" "\ -Delete (don't save) text in rectangle with point and mark as corners. +Delete the text in the region-rectangle without saving it. The same range of columns is deleted in each line starting with the line -where the region begins and ending with the line where the region ends." t nil) +where the region begins and ending with the line where the region ends. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." t nil) (autoload 'delete-extract-rectangle "rect" "\ -Delete contents of rectangle and return it as a list of strings. -Arguments START and END are the corners of the rectangle. -The value is list of strings, one for each line of the rectangle." nil nil) +Delete the contents of the rectangle with corners at START and END, and +return it as a list of strings, one for each line of the rectangle. -(autoload 'extract-rectangle "rect" "\ -Return contents of rectangle with corners at START and END. -Value is list of strings, one for each line of the rectangle." nil nil) +With an optional FILL argument, also fill lines where nothing has to be +deleted." nil nil) -(defvar killed-rectangle nil "\ -Rectangle for yank-rectangle to insert.") - -(autoload 'kill-rectangle "rect" "\ -Delete rectangle with corners at point and mark; save as last killed one. -Calling from program, supply two args START and END, buffer positions. -But in programs you might prefer to use `delete-extract-rectangle'." t nil) +(autoload 'extract-rectangle "rect" "\ +Return the contents of the rectangle with corners at START and END, +as a list of strings, one for each line of the rectangle." nil nil) (autoload 'yank-rectangle "rect" "\ Yank the last killed rectangle with upper left corner at point." t nil) @@ -1548,21 +1585,26 @@ After this command, the mark is at the upper left corner and point is at the lower right corner." nil nil) (autoload 'open-rectangle "rect" "\ -Blank out rectangle with corners at point and mark, shifting text right. -The text previously in the region is not overwritten by the blanks, -but instead winds up to the right of the rectangle." t nil) +Blank out the region-rectangle, shifting text right. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, fill with blanks even if there is no text +on the right side of the rectangle." t nil) (autoload 'string-rectangle "rect" "\ Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. -This command does not delete or overwrite any existing text. +The left edge of the rectangle specifies the column for insertion. This +command does not delete or overwrite any existing text. -Called from a program, takes three args; START, END and STRING." t nil) +When called from a program, the rectangle's corners are START and END." t nil) (autoload 'clear-rectangle "rect" "\ -Blank out rectangle with corners at point and mark. -The text previously in the region is overwritten by the blanks. -When called from a program, requires two args which specify the corners." t nil) +Blank out the region-rectangle. +The text previously in the region is overwritten with blanks. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill with blanks the parts of the +rectangle which were empty." t nil) ;;;*** @@ -1767,7 +1809,7 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) +(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) ;;;*** diff --git a/lisp/auto-save.el b/lisp/auto-save.el index bbda85d..ec7fdae 100644 --- a/lisp/auto-save.el +++ b/lisp/auto-save.el @@ -79,7 +79,7 @@ ;;; Acknowledgement: ;; This code is loosely derived from autosave-in-tmp.el by Jamie -;; Zawinski (the version I had was last modified 22 +;; Zawinski (the version I had was last modified 22 ;; dec 90 jwz) and code submitted to ange-ftp-lovers on Sun, 5 Apr ;; 92 23:20:47 EDT by drw@BOURBAKI.MIT.EDU (Dale R. Worley). ;; auto-save.el tries to cover the functionality of those two diff --git a/lisp/auto-show.el b/lisp/auto-show.el index 9e44467..ec7ee29 100644 --- a/lisp/auto-show.el +++ b/lisp/auto-show.el @@ -92,17 +92,6 @@ visible. Setting this to 0 disables this feature." :type 'number :group 'auto-show) -(defun auto-show-truncationp () - "True if line truncation is enabled for the selected window." - ;; XEmacs change (use specifiers) - ;; ### There should be a more straightforward way to do this from elisp. - (or truncate-lines - (and truncate-partial-width-windows - (< (+ (window-width) - (specifier-instance left-margin-width) - (specifier-instance right-margin-width)) - (frame-width))))) - (defun auto-show-mode (arg) "Turn automatic horizontal scroll mode on or off. With arg, turn auto scrolling on if arg is positive, off otherwise. @@ -128,7 +117,7 @@ This normally includes the horizontal scrollbar commands.") ;; XEmacs addition: (defun auto-show-should-take-action-p () - (and auto-show-mode (auto-show-truncationp) + (and auto-show-mode (window-truncated-p) (equal (window-buffer) (current-buffer)) (not (memq this-command auto-show-inhibiting-commands)))) diff --git a/lisp/backquote.el b/lisp/backquote.el index 1232603..38def61 100644 --- a/lisp/backquote.el +++ b/lisp/backquote.el @@ -44,7 +44,7 @@ ;; (b) ",.foo" is the same as ". ,foo" ;; (c) because RMS isn't interested in using this version of backquote.el ;; -;; wing@666.com; added ,. support back in: +;; ben@xemacs.org added ,. support back in: ;; (a) yes, it is in CLtl2. Read closely on page 529. ;; (b) RMS in 19.30 adds C support for ,. even if it's not really ;; handled. diff --git a/lisp/buffer.el b/lisp/buffer.el index e7920c0..c829284 100644 --- a/lisp/buffer.el +++ b/lisp/buffer.el @@ -32,9 +32,6 @@ ;;; Code: -(defvar switch-to-buffer-hooks nil - "Hooks to run after a recorded buffer switch.") - (defun switch-to-buffer (bufname &optional norecord) "Select buffer BUFNAME in the current window. BUFNAME may be a buffer or a buffer name and is created if it did not exist. @@ -68,8 +65,6 @@ the window-buffer correspondences." (next-window (minibuffer-window)) (selected-window)) buf) - ;; XEmacs change - (or norecord (run-hook-with-args 'switch-to-buffer-hooks buf)) buf)) (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) diff --git a/lisp/byte-optimize.el b/lisp/byte-optimize.el index 95e7cb4..9d34537 100644 --- a/lisp/byte-optimize.el +++ b/lisp/byte-optimize.el @@ -2,7 +2,7 @@ ;;; Copyright (c) 1991, 1994 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Hallvard Furuseth ;; Keywords: internal diff --git a/lisp/bytecomp-runtime.el b/lisp/bytecomp-runtime.el index 95d8c31..f146c69 100644 --- a/lisp/bytecomp-runtime.el +++ b/lisp/bytecomp-runtime.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1992, 1997 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Author: Hallvard Furuseth ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el index df74963..50416c2 100644 --- a/lisp/bytecomp.el +++ b/lisp/bytecomp.el @@ -3,7 +3,7 @@ ;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc. ;;; Copyright (C) 1996 Ben Wing. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Hallvard Furuseth ;; Keywords: internal diff --git a/lisp/check-features.el b/lisp/check-features.el index 9596ff7..59c1567 100644 --- a/lisp/check-features.el +++ b/lisp/check-features.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1998 by Free Software Foundation, Inc. -;; Author: SL Baur +;; Author: SL Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/cl-extra.el b/lisp/cl-extra.el index 8c97ea0..ea99b9d 100644 --- a/lisp/cl-extra.el +++ b/lisp/cl-extra.el @@ -183,16 +183,14 @@ the elements themselves." (nreverse cl-res)))) -;; mapc is now in C, renamed from `mapc-internal'. - -;(defun mapc (cl-func cl-seq &rest cl-rest) -; "Like `mapcar', but does not accumulate values returned by the function." -; (if cl-rest -; (apply 'map nil cl-func cl-seq cl-rest) -; ;; XEmacs change: we call mapc-internal, which really doesn't -; ;; accumulate any results. -; (mapc-internal cl-func cl-seq)) -; cl-seq) +(defun mapc (cl-func cl-seq &rest cl-rest) + "Like `mapcar', but does not accumulate values returned by the function." + (if cl-rest + (apply 'map nil cl-func cl-seq cl-rest) + ;; XEmacs change: in the simplest case we call mapc-internal, + ;; which really doesn't accumulate any results. + (mapc-internal cl-func cl-seq)) + cl-seq) (defun mapl (cl-func cl-list &rest cl-rest) "Like `maplist', but does not accumulate values returned by the function." @@ -674,13 +672,13 @@ PROPLIST is a list of the sort returned by `symbol-plist'." ;; The `regular' Common Lisp hash-table stuff has been moved into C. ;; Only backward compatibility stuff remains here. (defun make-hashtable (size &optional test) - (make-hash-table :size size :test test :type 'non-weak)) + (make-hash-table :test test :size size)) (defun make-weak-hashtable (size &optional test) - (make-hash-table :size size :test test :type 'weak)) + (make-hash-table :test test :size size :weakness t)) (defun make-key-weak-hashtable (size &optional test) - (make-hash-table :size size :test test :type 'key-weak)) + (make-hash-table :test test :size size :weakness 'key)) (defun make-value-weak-hashtable (size &optional test) - (make-hash-table :size size :test test :type 'value-weak)) + (make-hash-table :test test :size size :weakness 'value)) (define-obsolete-function-alias 'hashtablep 'hash-table-p) (define-obsolete-function-alias 'hashtable-fullness 'hash-table-count) @@ -693,6 +691,7 @@ PROPLIST is a list of the sort returned by `symbol-plist'." (make-obsolete 'make-weak-hashtable 'make-hash-table) (make-obsolete 'make-key-weak-hashtable 'make-hash-table) (make-obsolete 'make-value-weak-hashtable 'make-hash-table) +(make-obsolete 'hash-table-type 'hash-table-weakness) (when (fboundp 'x-keysym-hash-table) (make-obsolete 'x-keysym-hashtable 'x-keysym-hash-table)) diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el index db30575..04e2f97 100644 --- a/lisp/cl-macs.el +++ b/lisp/cl-macs.el @@ -1647,12 +1647,12 @@ Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." (defsetf extent-priority set-extent-priority) (defsetf extent-property (x y &optional ignored-arg) (arg) (list 'set-extent-property x y arg)) -(defsetf extent-end-position (ext) (store) - (list 'progn (list 'set-extent-endpoints (list 'extent-start-position ext) - store) store)) (defsetf extent-start-position (ext) (store) - (list 'progn (list 'set-extent-endpoints store - (list 'extent-end-position ext)) store)) + `(progn (set-extent-endpoints ,ext ,store (extent-end-position ,ext)) + ,store)) +(defsetf extent-end-position (ext) (store) + `(progn (set-extent-endpoints ,ext (extent-start-position ,ext) ,store) + ,store)) (defsetf face-background (f &optional s) (x) (list 'set-face-background f x s)) (defsetf face-background-pixmap (f &optional s) (x) (list 'set-face-background-pixmap f x s)) diff --git a/lisp/cl.el b/lisp/cl.el index 41a5955..4bddff6 100644 --- a/lisp/cl.el +++ b/lisp/cl.el @@ -680,9 +680,9 @@ FUNC is not added if it already appears on the list stored in HOOK." ;(load "cl-defs") ;;; Define data for indentation and edebug. -(mapc +(mapcar #'(lambda (entry) - (mapc + (mapcar #'(lambda (func) (put func 'lisp-indent-function (nth 1 entry)) (put func 'lisp-indent-hook (nth 1 entry)) diff --git a/lisp/cleantree.el b/lisp/cleantree.el index 17f4680..6592491 100644 --- a/lisp/cleantree.el +++ b/lisp/cleantree.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997 by Free Software Foundation, Inc. -;; Author: Steven L Baur +;; Author: Steven L Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/cmdloop.el b/lisp/cmdloop.el index e5b4be0..a9ae8b2 100644 --- a/lisp/cmdloop.el +++ b/lisp/cmdloop.el @@ -319,23 +319,36 @@ when called from Lisp." (if (and teach-extended-commands-p (interactive-p)) - ;; We need to fiddle with keys: remember the keys, run the - ;; command, and show the keys (if any). + ;; Remember the keys, run the command, and show the keys (if + ;; any). The funny variable names are a poor man's guarantee + ;; that we don't get tripped by this-command doing something + ;; funny. Quoth our forefathers: "We want lexical scope!" (let ((_execute_command_keys_ (where-is-internal this-command)) (_execute_command_name_ this-command)) ; the name can change (command-execute this-command t) - (when (and _execute_command_keys_ - ;; Wait for a while, so the user can see a message - ;; printed, if any. - (sit-for 1)) - (display-message - 'no-log - (format "Command `%s' is bound to key%s: %s" - _execute_command_name_ - (if (cdr _execute_command_keys_) "s" "") - (sorted-key-descriptions _execute_command_keys_))) - (sit-for teach-extended-commands-timeout) - (clear-message 'no-log))) + (when _execute_command_keys_ + ;; Normally the region is adjusted in post_command_hook; + ;; however, it is not called until after we finish. It + ;; looks ugly for the region to get updated after the + ;; delays, so we do it now. The code below is a Lispified + ;; copy of code in event-stream.c:post_command_hook(). + (if (and (not zmacs-region-stays) + (or (not (eq (selected-window) (minibuffer-window))) + (eq (zmacs-region-buffer) (current-buffer)))) + (zmacs-deactivate-region) + (zmacs-update-region)) + ;; Wait for a while, so the user can see a message printed, + ;; if any. + (when (sit-for 1) + (display-message + 'no-log + (format (if (cdr _execute_command_keys_) + "Command `%s' is bound to keys: %s" + "Command `%s' is bound to key: %s") + _execute_command_name_ + (sorted-key-descriptions _execute_command_keys_))) + (sit-for teach-extended-commands-timeout) + (clear-message 'no-log)))) ;; Else, just run the command. (command-execute this-command t))) diff --git a/lisp/code-process.el b/lisp/code-process.el index d96ecea..526639d 100644 --- a/lisp/code-process.el +++ b/lisp/code-process.el @@ -198,9 +198,9 @@ or a cons of coding systems which are used as above. See also the function `find-operation-coding-system'.") -(defun open-network-stream (name buffer host service) +(defun open-network-stream (name buffer host service &optional protocol) "Open a TCP connection for a service to a host. -Returns a subprocess-object to represent the connection. +Return a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. Args are NAME BUFFER HOST SERVICE. NAME is name for process. It is modified if necessary to make it unique. @@ -211,7 +211,17 @@ BUFFER is the buffer (or buffer-name) to associate with the process. with any buffer Third arg is name of the host to connect to, or its IP address. Fourth arg SERVICE is name of the service desired, or an integer - specifying a port number to connect to." + specifying a port number to connect to. +Fifth argument PROTOCOL is a network protocol. Currently 'tcp + (Transmission Control Protocol) and 'udp (User Datagram Protocol) are + supported. When omitted, 'tcp is assumed. + +Ouput via `process-send-string' and input via buffer or filter (see +`set-process-filter') are stream-oriented. That means UDP datagrams are +not guaranteed to be sent and received in discrete packets. (But small +datagrams around 500 bytes that are not truncated by `process-send-string' +are usually fine.) Note further that UDP protocol does not guard against +lost packets." (let (cs-r cs-w) (let (ret) (catch 'found @@ -245,6 +255,6 @@ Fourth arg SERVICE is name of the service desired, or an integer (or coding-system-for-read cs-r)) (coding-system-for-write (or coding-system-for-write cs-w))) - (open-network-stream-internal name buffer host service)))) + (open-network-stream-internal name buffer host service protocol)))) ;;; mule-process.el ends here diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 8a05073..cf9fa27 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -4,8 +4,8 @@ ;; ;; Author: Per Abrahamsen , then ;; Richard Stallman , then -;; Hrvoje Niksic (rewritten for XEmacs) -;; Maintainer: Hrvoje Niksic +;; Hrvoje Niksic (rewritten for XEmacs) +;; Maintainer: Hrvoje Niksic ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 5851776..897dd49 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Keywords: help, faces ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ @@ -3280,7 +3280,7 @@ Leave point at the location of the call, or after the last expression." (when (or (and spec (eq (car spec) 'user) (eq (second spec) 'set)) comment) (princ "\n '(") - (princ symbol) + (prin1 symbol) (princ " ") ;; This comment stuf is in the way #### ;; Is (eq (third spec) (car saved-value)) ???? @@ -3313,7 +3313,7 @@ Leave point at the location of the call, or after the last expression." (eq (car theme-spec) 'user) (eq (second theme-spec) 'set)) comment) (princ "\n '(") - (princ symbol) + (prin1 symbol) (princ " ") (prin1 (get symbol 'saved-face)) (if (or comment now) @@ -3358,7 +3358,7 @@ Leave point at the location of the call, or after the last expression." (princ "(") (princ (quote ,setter)) (princ "\n '(") - (princ object) + (prin1 object) (princ " ") (prin1 (third spec)) (princ ")"))))))) diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 18f2d38..36e2d32 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Keywords: help, faces ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ diff --git a/lisp/cus-load.el b/lisp/cus-load.el index 28bef12..67796a8 100644 --- a/lisp/cus-load.el +++ b/lisp/cus-load.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997 by Free Software Foundation, Inc. -;; Author: Steven L Baur +;; Author: Steven L Baur ;; Keywords: internal, help, faces ;; This file is part of XEmacs. diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 8dc92d8..49685ca 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -63,6 +63,7 @@ ;; integer (auto-save-interval auto-save integer) (bell-volume sound integer) + (bell-inhibit-time sound integer) (echo-keystrokes keyboard integer) (gc-cons-threshold alloc integer) (next-screen-context-lines display integer) diff --git a/lisp/custom-load.el b/lisp/custom-load.el index 54b38b3..a5b0c03 100644 --- a/lisp/custom-load.el +++ b/lisp/custom-load.el @@ -15,7 +15,7 @@ (custom-add-loads 'menu '("menubar-items")) (custom-add-loads 'minibuffer '("simple" "minibuf")) (custom-add-loads 'log-message '("simple")) -(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound")) +(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter-items" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound")) (custom-add-loads 'sound '("sound")) (custom-add-loads 'pui '("package-ui")) (custom-add-loads 'terminals '("gnuserv")) @@ -55,20 +55,21 @@ (custom-add-loads 'widget-button '("wid-edit")) (custom-add-loads 'paren-blinking '("simple")) (custom-add-loads 'find-file '("files")) -(custom-add-loads 'font-menu '("x-font-menu")) +(custom-add-loads 'font-menu '("font-menu")) (custom-add-loads 'files '("files")) (custom-add-loads 'build '("build-report")) (custom-add-loads 'font-lock '("font-lock")) (custom-add-loads 'external '("process" "cus-edit")) (custom-add-loads 'development '("process" "lisp-mode" "cus-edit")) (custom-add-loads 'gnuserv '("gnuserv")) +(custom-add-loads 'gutter '("gutter-items")) (custom-add-loads 'fill-comments '("simple")) (custom-add-loads 'windows '("window" "window-xemacs")) (custom-add-loads 'widget-faces '("wid-edit")) (custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock")) (custom-add-loads 'fill '("simple" "fill")) (custom-add-loads 'custom-magic-faces '("cus-edit")) -(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show")) +(custom-add-loads 'display '("toolbar" "scrollbar" "gutter-items" "auto-show")) (custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit")) (custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) (custom-add-loads 'processes '("process" "gnuserv")) @@ -78,10 +79,11 @@ (custom-add-loads 'isearch '("isearch-mode")) (custom-add-loads 'font-lock-faces '("font-lock")) (custom-add-loads 'modeline '("modeline")) -(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "dragdrop" "cus-edit")) +(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "cus-edit" "dragdrop")) (custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos")) (custom-add-loads 'i18n '("cus-edit")) (custom-add-loads 'info '("toolbar-items" "info")) -(custom-add-loads 'x '("x-faces" "x-font-menu")) +(custom-add-loads 'x '("x-faces" "font-menu")) +(custom-add-loads 'buffers-tab '("gutter-items")) ;;; custom-load.el ends here diff --git a/lisp/custom.el b/lisp/custom.el index b27b551..316e925 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Keywords: help, faces, dumped ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ diff --git a/lisp/disass.el b/lisp/disass.el index 9992f07..60bef2c 100644 --- a/lisp/disass.el +++ b/lisp/disass.el @@ -3,8 +3,8 @@ ;;; Copyright (C) 1986, 1991-1994 Free Software Foundation, Inc. ;; Author: Doug Cutting -;; Jamie Zawinski -;; Maintainer: Jamie Zawinski +;; Jamie Zawinski +;; Maintainer: XEmacs Development Team ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/dump-paths.el b/lisp/dump-paths.el index 10117d5..780f3ad 100644 --- a/lisp/dump-paths.el +++ b/lisp/dump-paths.el @@ -39,7 +39,12 @@ (princ (format "XEmacs thinks the roots of its hierarchy are:\n%S\n" roots))) - (let ((stuff (packages-find-packages roots))) + (let* ((package-locations + (packages-compute-package-locations + ;; temporary kludge: + ;; this should be synched with startup.el + (paths-construct-path '("~" ".xemacs")))) + (stuff (packages-find-packages roots package-locations))) (setq late-packages (car (cdr stuff)))) (setq late-package-load-path (packages-find-package-load-path late-packages)) diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 9c4a59a..ead38e0 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -1,3 +1,4 @@ + (setq preloaded-file-list (assemble-list "backquote" ; needed for defsubst etc. diff --git a/lisp/etags.el b/lisp/etags.el index 00180d6..f727c19 100644 --- a/lisp/etags.el +++ b/lisp/etags.el @@ -52,7 +52,7 @@ ;; Kyle Jones ;; added "Exact match, then inexact" code ;; added support for include directive. -;; Hrvoje Niksic +;; Hrvoje Niksic ;; various changes. diff --git a/lisp/faces.el b/lisp/faces.el index b9dc478..265ce26 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -31,7 +31,7 @@ ;; This file is dumped with XEmacs. ;; face implementation #1 (used Lisp vectors and parallel C vectors; -;; FSFmacs still uses this) authored by Jamie Zawinski +;; FSFmacs still uses this) authored by Jamie Zawinski ;; pre Lucid-Emacs 19.0. ;; face implementation #2 (used one face object per frame per face) @@ -834,12 +834,12 @@ substituted for the specification." ;; happen if that locale has no instantiators. So signal ;; an error to indicate this. - (setq temp-sp - (if (and (or (eq locale 'global) (eq locale 'all) (not locale)) - (not (face-property face property 'global))) - (copy-specifier (face-property 'default property) - nil 'global) - sp)) + + (setq temp-sp (copy-specifier sp)) + (if (and (or (eq locale 'global) (eq locale 'all) (not locale)) + (not (face-property face property 'global))) + (copy-specifier (face-property 'default property) + temp-sp 'global)) (if (and (valid-specifier-locale-p locale) (not (specifier-specs temp-sp locale))) (error "Property must have a specification in locale %S" locale)) @@ -1410,7 +1410,8 @@ and 'global)." (mswindows-init-device-faces device)) ;; Nothing to do for TTYs? ) - (init-other-random-faces device))) + (or (eq 'stream (device-type device)) + (init-other-random-faces device)))) (defun init-frame-faces (frame) (when init-face-from-resources @@ -1618,6 +1619,7 @@ in that frame; otherwise change each frame." (set-face-underline-p 'underline t 'global '(default))) (make-face 'zmacs-region "Used on highlightes region between point and mark.") (make-face 'isearch "Used on region matched by isearch.") +(make-face 'isearch-secondary "Face to use for highlighting all matches.") (make-face 'list-mode-item-selected "Face for the selected list item in list-mode.") (make-face 'highlight "Highlight face.") @@ -1707,6 +1709,13 @@ in that frame; otherwise change each frame." ((mswindows default color) . "green")) 'global) +;; #### This should really, I mean *really*, be converted to some form +;; of `defface' one day. +(set-face-foreground 'isearch-secondary + '(((x default color) . "red3") + ((mswindows default color) . "red3")) + 'global) + ;; Define some logical color names to be used when reading the pixmap files. (if (featurep 'xpm) (setq xpm-color-symbols diff --git a/lisp/files.el b/lisp/files.el index 0b23435..f5d25be 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1275,7 +1275,7 @@ When checking `inhibit-first-line-modes-regexps', we first discard from the end of the file name anything that matches one of these regexps.") (defvar user-init-file - "" ; set by command-line + nil ; set by command-line "File name including directory of user's initialization file.") (defun set-auto-mode (&optional just-from-file-name) @@ -2756,11 +2756,12 @@ non-nil, it is called instead of rereading visited file contents." (not (file-exists-p file-name))) (error "Auto-save file %s not current" file-name)) ((save-window-excursion - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (call-process "ls" nil standard-output nil - (if (file-symlink-p file) "-lL" "-l") - file file-name)) + (if (not (eq system-type 'windows-nt)) + (with-output-to-temp-buffer "*Directory*" + (buffer-disable-undo standard-output) + (call-process "ls" nil standard-output nil + (if (file-symlink-p file) "-lL" "-l") + file file-name))) (yes-or-no-p (format "Recover auto save file %s? " file-name))) (switch-to-buffer (find-file-noselect file t)) (let ((buffer-read-only nil)) diff --git a/lisp/fill.el b/lisp/fill.el index 748cba4..181bcc8 100644 --- a/lisp/fill.el +++ b/lisp/fill.el @@ -33,7 +33,7 @@ ;; 97/3/14 Jareth Hein (jhod@po.iijnet.or.jp) added functions for kinsoku (asian text ;; line break processing) -;; 97/06/11 Steve Baur (steve@altair.xemacs.org) converted broken +;; 97/06/11 Steve Baur (steve@xemacs.org) converted broken ;; following-char/preceding-char calls to char-after/char-before. ;;; Code: diff --git a/lisp/find-paths.el b/lisp/find-paths.el index f5be624..9118e94 100644 --- a/lisp/find-paths.el +++ b/lisp/find-paths.el @@ -218,13 +218,13 @@ If ENFORCE-VERSION is non-nil, the directory must contain the XEmacs version." ;; from more to less specific (paths-find-version-directory roots (concat base system-configuration) - envvar) + envvar default) (paths-find-version-directory roots base envvar) (paths-find-version-directory roots system-configuration - envvar default))) + envvar))) (defun construct-emacs-version-name () "Construct the raw XEmacs version number." diff --git a/lisp/finder.el b/lisp/finder.el index 8c9594a..b0fa4de 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -285,8 +285,12 @@ arguments compiles from `load-path'." found))) (defun finder-commentary (file) - (interactive) - (let* ((str (lm-commentary (finder-find-library file)))) + "Display FILE's commentary section. +FILE should be in a form suitable for passing to `locate-library'." + (interactive "sLibrary name: ") + (let* ((str (lm-commentary (or (finder-find-library file) + (finder-find-library (concat file ".el")) + (error "Can't find library %s" file))))) (if (null str) (error "Can't find any Commentary section")) (pop-to-buffer "*Finder*") diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ea1e1cb..be8df46 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -4,7 +4,7 @@ ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1996 Ben Wing. -;; Author: Jamie Zawinski , for the LISPM Preservation Society. +;; Author: Jamie Zawinski , for the LISPM Preservation Society. ;; Minimally merged with FSF 19.34 by Barry Warsaw ;; Then (partially) synched with FSF 19.30, leading to: ;; Next Author: RMS @@ -611,7 +611,11 @@ This is normally set via `font-lock-defaults'.") '((((class color) (background dark)) (:foreground "light coral")) (((class color) (background light)) (:foreground "green4")) (t (:bold t))) - "Font Lock mode face used to highlight documentation strings." + "Font Lock mode face used to highlight documentation strings. +This is currently supported only in Lisp-like modes, which are those +with \"lisp\" or \"scheme\" in their name. You can explicitly make +a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property +on the major mode's symbol." :group 'font-lock-faces) (defface font-lock-keyword-face @@ -1284,6 +1288,16 @@ This can take a while for large buffers." ; ;; Clean up. ; (and prev (remove-text-properties prev end '(face nil))))) +(defun font-lock-lisp-like (mode) + ;; Note: (or (get mode 'font-lock-lisp-like) (string-match ...)) is + ;; not enough because the property needs to be able to specify a nil + ;; value. + (if (plist-member (symbol-plist mode) 'font-lock-lisp-like) + (get mode 'font-lock-lisp-like) + ;; If the property is not specified, guess. Similar logic exists + ;; in add-log, but I think this encompasses more modes. + (string-match "lisp\\|scheme" (symbol-name mode)))) + (defun font-lock-fontify-syntactically-region (start end &optional loudly) "Put proper face on each string and comment between START and END. START should be at the beginning of a line." @@ -1296,21 +1310,24 @@ START should be at the beginning of a line." (font-lock-unfontify-region start end loudly) (goto-char start) (if (> end (point-max)) (setq end (point-max))) - (syntactically-sectionize - #'(lambda (s e context depth) - (let (face) - (cond ((eq context 'string) - ;;#### Should only do this is Lisp-like modes! - (setq face - (if (= depth 1) - ;; really we should only use this if - ;; in position 3 depth 1, but that's - ;; too expensive to compute. - 'font-lock-doc-string-face - 'font-lock-string-face))) - ((or (eq context 'comment) - (eq context 'block-comment)) - (setq face 'font-lock-comment-face) + (let ((lisp-like (font-lock-lisp-like major-mode))) + (syntactically-sectionize + #'(lambda (s e context depth) + (let (face) + (cond ((eq context 'string) + (setq face + ;; #### It would be nice if we handled + ;; Python and other non-Lisp languages with + ;; docstrings correctly. + (if (and lisp-like (= depth 1)) + ;; really we should only use this if + ;; in position 3 depth 1, but that's + ;; too expensive to compute. + 'font-lock-doc-string-face + 'font-lock-string-face))) + ((or (eq context 'comment) + (eq context 'block-comment)) + (setq face 'font-lock-comment-face) ; ;; Don't fontify whitespace at the beginning of lines; ; ;; otherwise comment blocks may not line up with code. ; ;; (This is sometimes a good idea, sometimes not; in any @@ -1323,9 +1340,9 @@ START should be at the beginning of a line." ; (skip-chars-forward " \t\n") ; (setq s (point))) )) - (font-lock-set-face s e face))) - start end) - )) + (font-lock-set-face s e face))) + start end) + ))) ;;; Additional text property functions. @@ -2444,11 +2461,11 @@ The name is assumed to begin with a capital letter.") (goto-char (match-end 1)) (goto-char (match-end 0)) (1 font-lock-variable-name-face)))))) - + ;; Modifier keywords and Java doc tags (setq java-font-lock-keywords-3 (append - + '( ;; Feature scoping: ;; These must come first or the Modifiers from keywords-1 will @@ -2458,11 +2475,11 @@ The name is assumed to begin with a capital letter.") ("\\" 0 font-lock-preprocessor-face) ("\\" 0 font-lock-reference-face)) java-font-lock-keywords-2 - + (list ;; Java doc tags - '("@\\(author\\|exception\\|param\\|return\\|see\\|version\\)\\s " + '("@\\(author\\|exception\\|throws\\|deprecated\\|param\\|return\\|see\\|since\\|version\\)\\s " 0 font-lock-keyword-face t) ;; Doc tag - Parameter identifiers @@ -2470,7 +2487,17 @@ The name is assumed to begin with a capital letter.") 1 'font-lock-variable-name-face t) ;; Doc tag - Exception types - (list (concat "@exception\\ s*" + (list (concat "@exception\\s +" + java-font-lock-identifier-regexp) + '(1 (if (equal (char-after (match-end 0)) ?.) + font-lock-reference-face font-lock-type-face) t) + (list (concat "\\=\\." java-font-lock-identifier-regexp) + '(goto-char (match-end 0)) nil + '(1 (if (equal (char-after (match-end 0)) ?.) + 'font-lock-reference-face 'font-lock-type-face) t))) + + ;; Doc tag - Exception types + (list (concat "@exception\\s +" java-font-lock-identifier-regexp) '(1 (if (equal (char-after (match-end 0)) ?.) font-lock-reference-face font-lock-type-face) t) @@ -2482,7 +2509,14 @@ The name is assumed to begin with a capital letter.") ;; Doc tag - Cross-references, usually to methods '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)" 1 font-lock-function-name-face t) - + + ;; Doc tag - Links + '("{@link\\s +\\([^}]*\\)}" + 0 font-lock-keyword-face t) + ;; Doc tag - Links + '("{@link\\s +\\(\\S +\\s +\\S +\\)}" + 1 font-lock-function-name-face t) + ))) ) diff --git a/lisp/gnuserv.el b/lisp/gnuserv.el index b670e8d..8da403c 100644 --- a/lisp/gnuserv.el +++ b/lisp/gnuserv.el @@ -3,9 +3,9 @@ ;; Version: 3.11 ;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el -;; Hrvoje Niksic +;; Hrvoje Niksic ;; Maintainer: Jan Vroonhof , -;; Hrvoje Niksic +;; Hrvoje Niksic ;; Keywords: environment, processes, terminals ;; This file is part of XEmacs. @@ -73,7 +73,7 @@ ;; Jan Vroonhof ;; Customized. ;; -;; Hrvoje Niksic May/1997 +;; Hrvoje Niksic May/1997 ;; Completely rewritten. Now uses `defstruct' and other CL stuff ;; to define clients cleanly. Many thanks to Dave Gillespie! ;; @@ -440,6 +440,7 @@ If a flag is `view', view the files read-only." (client (make-gnuclient :id gnuserv-current-client :device device :frame new-frame))) + (select-frame frame) (setq gnuserv-current-client nil) ;; If the device was created by this client, push it to the list. (and (/= old-device-num (length (device-list))) diff --git a/lisp/gui.el b/lisp/gui.el index d23ea03..9eb0c79 100644 --- a/lisp/gui.el +++ b/lisp/gui.el @@ -83,7 +83,7 @@ Normally it also has no modelines, menubars, or toolbars." "True if OBJECT is a GUI button." (and (vectorp object) (> (length object) 0) - (eq 'gui-button (aref object 0)))) + (eq 'button (aref object 0)))) (make-face 'gui-button-face "Face used for gui buttons") (if (not (face-differs-from-default-p 'gui-button-face)) @@ -98,26 +98,15 @@ Normally it also has no modelines, menubars, or toolbars." "Make a GUI button whose label is STRING and whose action is ACTION. If the button is inserted in a buffer and then clicked on, and ACTION is non-nil, ACTION will be called with one argument, USER-DATA." - (vector 'gui-button - (if (featurep 'xpm) - (xpm-button-create - string gui-button-shadow-thickness - (color-instance-name (face-foreground-instance 'gui-button-face)) - (color-instance-name (face-background-instance 'gui-button-face))) - (xbm-button-create string gui-button-shadow-thickness)) - action user-data)) + (vector 'button + :descriptor string + :face 'gui-button-face + :callback `(funcall (quote ,action) (quote ,user-data)))) (defun insert-gui-button (button &optional pos buffer) "Insert GUI button BUTTON at POS in BUFFER." (check-argument-type 'gui-button-p button) - (let ((annotation - (make-annotation (make-glyph (car (aref button 1))) - pos 'text buffer nil - (make-glyph (cadr (aref button 1))))) - (action (aref button 2))) - (and action - (progn - (set-annotation-action annotation action) - (set-annotation-data annotation (aref button 3)))))) + (make-annotation (make-glyph button) + pos 'text buffer nil)) ;;; gui.el ends here diff --git a/lisp/gutter-items.el b/lisp/gutter-items.el index 3d83dd1..6b0b8f0 100644 --- a/lisp/gutter-items.el +++ b/lisp/gutter-items.el @@ -70,7 +70,7 @@ If this is 10, then only the ten most-recently-selected buffers will be shown. If this is nil, then all buffers will be shown. Setting this to a large number or nil will slow down tab responsiveness." :type '(choice (const :tag "Show all" nil) - (integer 10)) + (integer 6)) :group 'buffers-tab) (defcustom buffers-tab-switch-to-buffer-function 'buffers-tab-switch-to-buffer @@ -91,18 +91,102 @@ begins with a space)." function) :group 'buffers-tab) -(defcustom buffers-tab-format-buffer-line-function 'format-buffers-menu-line +(defcustom buffers-tab-selection-function 'select-buffers-tab-buffers-by-mode + "*If non-nil, a function specifying the buffers to select from the +buffers tab. This is passed two buffers and should return non-nil if +the second buffer should be selected. The default value +`select-buffers-tab-buffers-by-mode' groups buffers by major mode and +by `buffers-tab-grouping-regexp'." + + :type '(choice (const :tag "None" nil) + function) + :group 'buffers-tab) + +(defcustom buffers-tab-face 'default + "*Face to use for displaying the buffers tab." + :type 'face + :group 'buffers-tab) + +(defcustom buffers-tab-grouping-regexp + '("^\\(gnus-\\|message-mode\\|mime/viewer-mode\\)" + "^\\(emacs-lisp-\\|lisp-\\)") + "*If non-nil, a list of regular expressions for buffer grouping. +Each regular expression is applied to the current major-mode symbol +name and mode-name, if it matches then any other buffers that match +the same regular expression be added to the current group." + :type '(choice (const :tag "None" nil) + sexp) + :group 'buffers-tab) + +(defcustom buffers-tab-format-buffer-line-function 'format-buffers-tab-line "*The function to call to return a string to represent a buffer in the -buffers tab. The function is passed a buffer and should return a string. -The default value `format-buffers-menu-line' just returns the name of -the buffer. Also check out `slow-format-buffers-menu-line' which -returns a whole bunch of info about a buffer." +buffers tab. The function is passed a buffer and should return a +string. The default value `format-buffers-tab-line' just returns the +name of the buffer, optionally truncated to +`buffers-tab-max-buffer-line-length'. Also check out +`slow-format-buffers-menu-line' which returns a whole bunch of info +about a buffer." :type 'function :group 'buffers-tab) +(defvar buffers-tab-default-buffer-line-length + (make-specifier-and-init 'generic '((global ((default) . 25))) t) + "*Maximum length of text which may appear in a \"Buffers\" tab. +This is a specifier, use set-specifier to modify it.") + +(defcustom buffers-tab-max-buffer-line-length + (specifier-instance buffers-tab-default-buffer-line-length) + "*Maximum length of text which may appear in a \"Buffers\" tab. +Buffer names over this length will be truncated with elipses. +If this is 0, then the full buffer name will be shown." + :type '(choice (const :tag "Show all" 0) + (integer 25)) + :group 'buffers-tab + :set #'(lambda (var val) + (set-specifier buffers-tab-default-buffer-line-length val) + (setq buffers-tab-max-buffer-line-length val))) + (defun buffers-tab-switch-to-buffer (buffer) "For use as a value for `buffers-tab-switch-to-buffer-function'." - (switch-to-buffer buffer t)) + (unless (eq (window-buffer) buffer) + (if (> (length (windows-of-buffer buffer)) 0) + (select-window (car (windows-of-buffer buffer))) + (switch-to-buffer buffer t)))) + +(defun select-buffers-tab-buffers-by-mode (buf1 buf2) + "For use as a value of `buffers-tab-selection-function'. +This selects buffers by major mode `buffers-tab-grouping-regexp'." + (let ((mode1 (symbol-name (symbol-value-in-buffer 'major-mode buf1))) + (mode2 (symbol-name (symbol-value-in-buffer 'major-mode buf2))) + (modenm1 (symbol-value-in-buffer 'mode-name buf1)) + (modenm2 (symbol-value-in-buffer 'mode-name buf2))) + (cond ((or (eq mode1 mode2) + (eq modenm1 modenm2) + (and (string-match "^[^-]+-" mode1) + (string-match + (concat "^" (regexp-quote + (substring mode1 0 (match-end 0)))) + mode2)) + (and buffers-tab-grouping-regexp + (find-if #'(lambda (x) + (or + (and (string-match x mode1) + (string-match x mode2)) + (and (string-match x modenm1) + (string-match x modenm2)))) + buffers-tab-grouping-regexp))) + t) + (t nil)))) + +(defun format-buffers-tab-line (buffer) + "For use as a value of `buffers-tab-format-buffer-line-function'. +This just returns the buffer's name, optionally truncated." + (let ((len (specifier-instance buffers-tab-default-buffer-line-length))) + (if (and (> len 0) + (> (length (buffer-name buffer)) len)) + (concat (substring (buffer-name buffer) + 0 (- len 3)) "...") + (buffer-name buffer)))) (defsubst build-buffers-tab-internal (buffers) (let (line) @@ -114,21 +198,32 @@ returns a whole bunch of info about a buffer." (buffer-name buffer)))) buffers))) -(defun buffers-tab-items () +(defun buffers-tab-items (&optional in-deletion frame) "This is the tab filter for the top-level buffers \"Buffers\" tab. It dynamically creates a list of buffers to use as the contents of the tab. Only the most-recently-used few buffers will be listed on the tab, for efficiency reasons. You can control how many buffers will be shown by setting `buffers-tab-max-size'. You can control the text of the tab items by redefining the function `format-buffers-menu-line'." - (let ((buffers (delete-if buffers-tab-omit-function (buffer-list)))) - (and (integerp buffers-tab-max-size) - (> buffers-tab-max-size 1) - (> (length buffers) buffers-tab-max-size) - ;; shorten list of buffers - (setcdr (nthcdr buffers-tab-max-size buffers) nil)) - (setq buffers (build-buffers-tab-internal buffers)) - buffers)) + (save-match-data + (let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame))) + (first-buf (car buffers))) + ;; if we're in deletion ignore the current buffer + (when in-deletion + (setq buffers (delq (current-buffer) buffers)) + (setq first-buf (car buffers))) + ;; group buffers by mode + (when buffers-tab-selection-function + (delete-if-not #'(lambda (buf) + (funcall buffers-tab-selection-function + first-buf buf)) buffers)) + (and (integerp buffers-tab-max-size) + (> buffers-tab-max-size 1) + (> (length buffers) buffers-tab-max-size) + ;; shorten list of buffers + (setcdr (nthcdr buffers-tab-max-size buffers) nil)) + (setq buffers (build-buffers-tab-internal buffers)) + buffers))) (defun add-tab-to-gutter () "Put a tab control in the gutter area to hold the most recent buffers." @@ -137,24 +232,308 @@ items by redefining the function `format-buffers-menu-line'." (make-extent 0 0 gutter-string) (setq gutter-buffers-tab (make-glyph - (vector 'tab-control :descriptor "Buffers" + (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face :properties (list :items (buffers-tab-items)))))) ;; This looks better than a 3d border - (set-specifier default-gutter-border-width 0 'global 'mswindows) - (set-specifier default-gutter gutter-string 'global 'mswindows))) + (mapcar '(lambda (x) + (when (valid-image-instantiator-format-p 'tab-control x) + (set-specifier default-gutter-border-width 0 'global x) + (set-specifier default-gutter gutter-string 'global x))) + (console-type-list)))) -(defun update-tab-in-gutter (&optional notused) +(defun update-tab-in-gutter (&optional frame-or-buffer) "Update the tab control in the gutter area." - (when (valid-image-instantiator-format-p 'tab-control) - (set-image-instance-property (glyph-image-instance gutter-buffers-tab) - :items - (buffers-tab-items)) - (resize-subwindow (glyph-image-instance gutter-buffers-tab) - (gutter-pixel-width) nil))) - -(add-tab-to-gutter) -(add-hook 'switch-to-buffer-hooks 'update-tab-in-gutter) + (let ((locale (if (framep frame-or-buffer) frame-or-buffer))) + (when (specifier-instance default-gutter-visible-p locale) + (unless gutter-buffers-tab + (add-tab-to-gutter)) + (when (valid-image-instantiator-format-p 'tab-control) + (let ((inst (glyph-image-instance + gutter-buffers-tab + (when (framep frame-or-buffer) + (last-nonminibuf-window frame-or-buffer))))) + (set-image-instance-property inst :items + (buffers-tab-items + nil locale)) + (resize-subwindow inst (gutter-pixel-width) nil)) + )))) + +(defun remove-buffer-from-gutter-tab () + "Remove the current buffer from the tab control in the gutter area." + (when (and (valid-image-instantiator-format-p 'tab-control) + (specifier-instance default-gutter-visible-p)) + (let ((inst (glyph-image-instance gutter-buffers-tab)) + (buffers (buffers-tab-items t))) + (unless buffers + (setq buffers (build-buffers-tab-internal + (list + (get-buffer-create "*scratch*"))))) + (set-image-instance-property inst :items buffers) + (resize-subwindow inst (gutter-pixel-width) nil) + ))) + +(add-hook 'kill-buffer-hook 'remove-buffer-from-gutter-tab) (add-hook 'create-frame-hook 'update-tab-in-gutter) +(add-hook 'record-buffer-hook 'update-tab-in-gutter) + +;; +;; progress display +;; ripped off from message display +;; +(defvar progress-stack nil + "An alist of label/string pairs representing active progress gauges. +The first element in the list is currently displayed in the gutter area. +Do not modify this directly--use the `progress' or +`display-progress'/`clear-progress' functions.") + +(defvar progress-glyph-height 32 + "Height of the gutter area for progress messages.") + +(defvar progress-stop-callback 'progress-quit-function + "Function to call to stop the progress operation.") + +(defun progress-quit-function () + "Default function to call for the stop button in a progress gauge. +This just removes the progress gauge and calls quit." + (interactive) + (clear-progress) + (keyboard-quit)) + +;; private variables +(defvar progress-gauge-glyph + (make-glyph + (vector 'progress-gauge + :pixel-height (- progress-glyph-height 8) + :pixel-width 250 + :descriptor "Progress"))) + +(defvar progress-text-glyph + (make-glyph [string :data ""])) + +(defvar progress-layout-glyph + (make-glyph + (vector + 'layout :orientation 'vertical :justify 'left + :items (list + progress-text-glyph + (make-glyph + (vector + 'layout :pixel-height progress-glyph-height + :orientation 'horizontal + :items (list + progress-gauge-glyph + (vector + 'button :pixel-height (- progress-glyph-height 8) + :descriptor " Stop " + :callback '(funcall progress-stop-callback))))))))) + +(defvar progress-abort-glyph + (make-glyph + (vector 'layout :orientation 'vertical :justify 'left + :items (list progress-text-glyph + (make-glyph + (vector 'layout + :pixel-height progress-glyph-height + :orientation 'horizontal)))))) + +(defvar progress-extent-text "") +(defvar progress-extent nil) + +(defun progress-displayed-p (&optional return-string frame) + "Return a non-nil value if a progress gauge is presently displayed in the +gutter area. If optional argument RETURN-STRING is non-nil, +return a string containing the message, otherwise just return t." + (let ((buffer (get-buffer-create " *Gutter Area*"))) + (and (< (point-min buffer) (point-max buffer)) + (if return-string + (buffer-substring nil nil buffer) + t)))) + +;;; Returns the string which remains in the echo area, or nil if none. +;;; If label is nil, the whole message stack is cleared. +(defun clear-progress (&optional label frame no-restore) + "Remove any progress gauge with the given LABEL from the progress gauge-stack, +erasing it from the gutter area if it's currently displayed there. +If a message remains at the head of the progress-stack and NO-RESTORE +is nil, it will be displayed. The string which remains in the gutter +area will be returned, or nil if the progress-stack is now empty. +If LABEL is nil, the entire progress-stack is cleared. + +Unless you need the return value or you need to specify a label, +you should just use (progress nil)." + (or frame (setq frame (selected-frame))) + (remove-progress label frame) + (let ((inhibit-read-only t) + (zmacs-region-stays zmacs-region-stays)) ; preserve from change + (erase-buffer " *Echo Area*") + (erase-buffer (get-buffer-create " *Gutter Area*"))) + (if no-restore + nil ; just preparing to put another msg up + (if progress-stack + (let ((oldmsg (cdr (car progress-stack)))) + (raw-append-progress oldmsg frame) + oldmsg) + ;; nothing to display so get rid of the gauge + (set-specifier bottom-gutter-border-width 0 frame) + (set-specifier bottom-gutter-visible-p nil frame)))) + +(defun remove-progress (&optional label frame) + ;; If label is nil, we want to remove all matching progress gauges. + (while (and progress-stack + (or (null label) ; null label means clear whole stack + (eq label (car (car progress-stack))))) + (setq progress-stack (cdr progress-stack))) + (let ((s progress-stack)) + (while (cdr s) + (let ((msg (car (cdr s)))) + (if (eq label (car msg)) + (progn + (setcdr s (cdr (cdr s)))) + (setq s (cdr s))))))) + +(defun append-progress (label message &optional value frame) + (or frame (setq frame (selected-frame))) + ;; Add a new entry to the message-stack, or modify an existing one + (let* ((top (car progress-stack)) + (tmsg (cdr top))) + (if (eq label (car top)) + (progn + (setcdr top message) + (if (eq tmsg message) + (set-image-instance-property + (glyph-image-instance progress-gauge-glyph) + :percent value) + (raw-append-progress message value frame)) + (redisplay-gutter-area) + (when (input-pending-p) + (dispatch-event (next-command-event)))) + (push (cons label message) progress-stack) + (raw-append-progress message value frame)) + (when (eq value 100) + (sit-for 0.5 nil) + (clear-progress label)))) + +(defun abort-progress (label message &optional frame) + (or frame (setq frame (selected-frame))) + ;; Add a new entry to the message-stack, or modify an existing one + (let* ((top (car progress-stack)) + (inhibit-read-only t) + (zmacs-region-stays zmacs-region-stays)) + (if (eq label (car top)) + (setcdr top message) + (push (cons label message) progress-stack)) + (unless (equal message "") + (insert-string message (get-buffer-create " *Gutter Area*")) + ;; Do what the device is able to cope with. + (if (not (valid-image-instantiator-format-p 'progress-gauge frame)) + (progn + (insert-string message " *Echo Area*") + (if (not executing-kbd-macro) + (redisplay-echo-area))) + ;; do some funky display here. + (unless progress-extent + (setq progress-extent (make-extent 0 0 progress-extent-text))) + (let ((bglyph (extent-begin-glyph progress-extent))) + (set-extent-begin-glyph progress-extent progress-abort-glyph) + ;; fixup the gutter specifiers + (set-specifier bottom-gutter progress-extent-text frame) + (set-specifier bottom-gutter-border-width 2 frame) + (set-image-instance-property + (glyph-image-instance progress-text-glyph) :data message) + (set-specifier bottom-gutter-height 'autodetect frame) + (set-specifier bottom-gutter-visible-p t frame) + ;; we have to do this so redisplay is up-to-date and so + ;; redisplay-gutter-area performs optimally. + (redisplay-gutter-area) + (sit-for 0.5 nil) + (clear-progress label) + (set-extent-begin-glyph progress-extent bglyph) + ))))) + +(defun raw-append-progress (message &optional value frame) + (unless (equal message "") + (let ((inhibit-read-only t) + (zmacs-region-stays zmacs-region-stays) + (val (or value 0))) ; preserve from change + (insert-string message (get-buffer-create " *Gutter Area*")) + ;; Do what the device is able to cope with. + (if (not (valid-image-instantiator-format-p 'progress-gauge frame)) + (progn + (insert-string + (concat message (if (eq val 100) "done.") + (make-string (/ val 5) ?.)) + " *Echo Area*") + (if (not executing-kbd-macro) + (redisplay-echo-area))) + ;; do some funky display here. + (unless progress-extent + (setq progress-extent (make-extent 0 0 progress-extent-text)) + (set-extent-begin-glyph progress-extent progress-layout-glyph)) + ;; fixup the gutter specifiers + (set-specifier bottom-gutter progress-extent-text frame) + (set-specifier bottom-gutter-border-width 2 frame) + (set-image-instance-property + (glyph-image-instance progress-gauge-glyph) :percent val) + (set-image-instance-property + (glyph-image-instance progress-text-glyph) :data message) + (if (and (eq (specifier-instance bottom-gutter-height frame) + 'autodetect) + (specifier-instance bottom-gutter-visible-p frame)) + (progn + ;; if the gauge is already visible then just draw the gutter + ;; checking for user events + (redisplay-gutter-area) + (when (input-pending-p) + (dispatch-event (next-command-event)))) + ;; otherwise make the gutter visible and redraw the frame + (set-specifier bottom-gutter-height 'autodetect frame) + (set-specifier bottom-gutter-visible-p t frame) + ;; we have to do this so redisplay is up-to-date and so + ;; redisplay-gutter-area performs optimally. + (redisplay-frame) + ))))) + +(defun display-progress (label message &optional value frame) + "Display a progress gauge and message in the bottom gutter area. + First argument LABEL is an identifier for this message. MESSAGE is +the string to display. Use `clear-progress' to remove a labelled +message." + (clear-progress label frame t) + (if (eq value 'abort) + (abort-progress label message frame) + (append-progress label message value frame))) + +(defun current-progress (&optional frame) + "Return the current progress gauge in the gutter area, or nil. +The FRAME argument is currently unused." + (cdr (car progress-stack))) + +;;; may eventually be frame-dependent +(defun current-progress-label (&optional frame) + (car (car progress-stack))) + +(defun progress (fmt &optional value &rest args) + "Print a progress gauge and message in the bottom gutter area of the frame. +The arguments are the same as to `format'. + +If the only argument is nil, clear any existing progress gauge." + (if (and (null fmt) (null args)) + (prog1 nil + (clear-progress nil)) + (let ((str (apply 'format fmt args))) + (display-progress 'progress str value) + str))) + +(defun lprogress (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'." + (if (and (null fmt) (null args)) + (prog1 nil + (clear-progress label nil)) + (let ((str (apply 'format fmt args))) + (display-progress label str value) + str))) (provide 'gutter-items) ;;; gutter-items.el ends here. diff --git a/lisp/help.el b/lisp/help.el index abe3bfc..8651aab 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -305,8 +305,8 @@ otherwise it is killed." "Return the command invoked by KEY. Like `key-binding', but handles menu events and toolbar presses correctly. KEY is any value returned by `next-command-event'. -MENU-FLAG is a symbol that should be set to T if KEY is a menu event, - or NIL otherwise" +MENU-FLAG is a symbol that should be set to t if KEY is a menu event, + or nil otherwise" (let (defn) (and menu-flag (set menu-flag nil)) ;; If the key typed was really a menu selection, grab the form out @@ -657,9 +657,20 @@ then only the mouse bindings are displayed." (gettext "key binding\n--- -------\n"))) (buffer (current-buffer)) (minor minor-mode-map-alist) + (extent-maps (mapcar-extents + 'extent-keymap + nil (current-buffer) (point) (point) nil 'keymap)) (local (current-local-map)) (shadow '())) (set-buffer standard-output) + (while extent-maps + (insert "Bindings for Text Region:\n" + heading) + (describe-bindings-internal + (car extent-maps) nil shadow prefix mouse-only-p) + (insert "\n") + (setq shadow (cons (car extent-maps) shadow) + extent-maps (cdr extent-maps))) (while minor (let ((sym (car (car minor))) (map (cdr (car minor)))) @@ -937,8 +948,9 @@ When run interactively, it defaults to any function found by (format (gettext "Describe function (default %s): ") fn) (gettext "Describe function: ")) - obarray 'fboundp t nil 'function-history)))) - (list (if (equal val "") fn (intern val))))) + obarray 'fboundp t nil 'function-history + (symbol-name fn))))) + (list (intern val)))) (with-displaying-help-buffer (lambda () (describe-function-1 function) @@ -1226,8 +1238,9 @@ part of the documentation of internal subroutines." (if v (format "Describe variable (default %s): " v) (gettext "Describe variable: ")) - obarray 'boundp t nil 'variable-history)))) - (list (if (equal val "") v (intern val))))) + obarray 'boundp t nil 'variable-history + (symbol-name v))))) + (list (intern val)))) (with-displaying-help-buffer (lambda () (let ((origvar variable) diff --git a/lisp/hyper-apropos.el b/lisp/hyper-apropos.el index 1e34bfa..af739d8 100644 --- a/lisp/hyper-apropos.el +++ b/lisp/hyper-apropos.el @@ -60,7 +60,7 @@ ;; ### The maintainer is supposed to be stig, but I haven't seen him ;; around for ages. The real maintainer for the moment is Hrvoje -;; Niksic . +;; Niksic . ;;; Code: @@ -1079,6 +1079,12 @@ Deletes lines which match PATTERN." nil (forward-char 3) (read (point-marker)))) + ((and + (eq major-mode 'hyper-apropos-help-mode) + (> (point) (point-min))) + (save-excursion + (goto-char (point-min)) + (hyper-apropos-this-symbol))) (t (let* ((st (progn (skip-syntax-backward "w_") @@ -1121,11 +1127,6 @@ Deletes lines which match PATTERN." (interactive (let ((var (hyper-apropos-this-symbol))) (or (and var (boundp var)) - (and (setq var (and (eq major-mode 'hyper-apropos-help-mode) - (save-excursion - (goto-char (point-min)) - (hyper-apropos-this-symbol)))) - (boundp var)) (setq var nil)) (list var (hyper-apropos-read-variable-value var)))) (and var @@ -1175,7 +1176,10 @@ Deletes lines which match PATTERN." (defun hyper-apropos-customize-variable () (interactive) (let ((var (hyper-apropos-this-symbol))) - (customize-variable var))) + (and + (or (and var (boundp var)) + (setq var nil)) + (customize-variable var)))) ;; ---------------------------------------------------------------------- ;; @@ -1197,11 +1201,6 @@ window. (See also `find-function'.)" (interactive (let ((fn (hyper-apropos-this-symbol))) (or (fboundp fn) - (and (setq fn (and (eq major-mode 'hyper-apropos-help-mode) - (save-excursion - (goto-char (point-min)) - (hyper-apropos-this-symbol)))) - (fboundp fn)) (setq fn nil)) (list fn))) (if fn @@ -1257,11 +1256,7 @@ window. (See also `find-function'.)" (defun hyper-apropos-popup-menu (event) (interactive "e") (mouse-set-point event) - (let* ((sym (or (hyper-apropos-this-symbol) - (and (eq major-mode 'hyper-apropos-help-mode) - (save-excursion - (goto-char (point-min)) - (hyper-apropos-this-symbol))))) + (let* ((sym (hyper-apropos-this-symbol)) (notjunk (not (null sym))) (command-p (if (commandp sym) t)) (variable-p (and sym (boundp sym))) diff --git a/lisp/indent.el b/lisp/indent.el index f93f413..adf2485 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -93,7 +93,7 @@ only if necessary. It leaves point at end of indentation." (back-to-indentation) (let ((cur-col (current-column))) (cond ((< cur-col column) - (if (> (- column (* (/ cur-col tab-width) tab-width)) tab-width) + (if (>= (- column (* (/ cur-col tab-width) tab-width)) tab-width) (delete-region (point) (progn (skip-chars-backward " ") (point)))) (indent-to column)) diff --git a/lisp/info.el b/lisp/info.el index 6d4e22f..d96c5ba 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -459,6 +459,7 @@ heading." ;; Is this right for NT? .zip, with -c for to stdout, right? (defvar Info-suffix-list '( ("" . nil) (".info" . nil) + (".info.bz2" . "bzip2 -dc %s") (".info.gz" . "gzip -dc %s") (".info-z" . "gzip -dc %s") (".info.Z" . "uncompress -c %s") @@ -501,9 +502,12 @@ Marker points nowhere if file has no tag table.") "List of possible matches for last Info-index command.") (defvar Info-index-first-alternative nil) -(defcustom Info-annotations-path '("~/.xemacs/info.notes" - "~/.infonotes" - "/usr/lib/info.notes") +(defcustom Info-annotations-path + (list + (paths-construct-path (list user-init-directory "info.notes")) + (paths-construct-path '("~" ".infonotes")) + (paths-construct-path '("usr" "lib" "info.notes") + (char-to-string directory-sep-char))) "*Names of files that contain annotations for different Info nodes. By convention, the first one should reside in your personal directory. The last should be a world-writable \"public\" annotations file." @@ -2060,11 +2064,9 @@ A positive or negative prefix argument moves by multiple screenfuls." (progn (Info-global-prev) (message "Node: %s" Info-current-node) - (sit-for 0) - ;;(scroll-up 1) ; work around bug in pos-visible-in-window-p - ;;(scroll-down 1) - (while (not (pos-visible-in-window-p (point-max))) - (scroll-up))) + (goto-char (point-max)) + (recenter -1) + (move-to-window-line 0)) (scroll-down))))) (defun Info-scroll-prev (arg) diff --git a/lisp/isearch-mode.el b/lisp/isearch-mode.el index cc5b3fa..3eef6c9 100644 --- a/lisp/isearch-mode.el +++ b/lisp/isearch-mode.el @@ -1,6 +1,6 @@ ;;; isearch-mode.el --- Incremental search minor mode. -;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1992,93,94,95,96,97,98,1999 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte ;; Maintainer: XEmacs Development Team @@ -19,35 +19,29 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the +;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;;; Synched up with: Not synched with FSF. +;;; Synched up with: FSF 20.4. ;;; Commentary: -;; LCD Archive Entry: -;; isearch-mode|Daniel LaLiberte|liberte@cs.uiuc.edu -;; |A minor mode replacement for isearch.el. - -;;==================================================================== ;; Instructions -;; Searching with isearch-mode.el should work just like isearch.el, -;; except it is done in a temporary minor mode that terminates when -;; you finish searching. +;; Searching with isearch-mode.el should work just like isearch.el +;; [the one from Emacs 18], except it is done in a temporary minor +;; mode that terminates when you finish searching. -;; Semi-modal searching is supported, using a recursive edit. If -;; isearching is started non-interactively by calling one of the -;; isearch commands (e.g. (isearch-forward), but not like gnus does -;; it: (call-interactively 'isearch-forward)), isearch-mode does not -;; return until the search is completed. You should still be able -;; switch buffers, so be careful not to get things confused. +;; For programmed use of isearch-mode, e.g. calling (isearch-forward), +;; isearch-mode behaves modally and does not return until the search +;; is completed. It uses a recursive-edit to behave this way. In +;; that case, you should still be able switch buffers, so be careful +;; not to get things confused. ;; The key bindings active within isearch-mode are defined below in ;; `isearch-mode-map' which is given bindings close to the default -;; characters of isearch.el for version 19. With `isearch-mode', +;; characters of the original isearch.el. With `isearch-mode', ;; however, you can bind multi-character keys and it should be easier ;; to add new commands. One bug though: keys with meta-prefix cannot ;; be longer than two chars. Also see minibuffer-local-isearch-map @@ -63,16 +57,18 @@ ;; Exiting immediately from isearch uses isearch-edit-string instead ;; of nonincremental-search, if search-nonincremental-instead is non-nil. ;; The name of this option should probably be changed if we decide to -;; keep the behavior. One difference is that isearch-edit-string does -;; not support word search yet; perhaps isearch-mode should support it -;; even for incremental searches, but how? +;; keep the behavior. No point in forcing nonincremental search until +;; the last possible moment. -;;==================================================================== -;;; Change History: +;; TODO +;; - Integrate generalized command history to isearch-edit-string. +;; - Think about incorporating query-replace. +;; - Hooks and options for failed search. + +;;; Change Log: + +;; Changes before those recorded in ChangeLog: -;; Header: /import/kaplan/kaplan/liberte/Isearch/RCS/isearch-mode.el,v 1.3 92/06/29 13:10:08 liberte Exp Locker: liberte -;; Log: isearch-mode.el,v -;; ;; 20-aug-92 Hacked by jwz for Lucid Emacs 19.3. ;; ;; Revision 1.3 92/06/29 13:10:08 liberte @@ -83,7 +79,7 @@ ;; Renamed all regex to regexp. ;; Got rid of found-start and found-point globals. ;; Generalized handling of upper-case chars. - + ;; Revision 1.2 92/05/27 11:33:57 liberte ;; Emacs version 19 has a search ring, which is supported here. ;; Other fixes found in the version 19 isearch are included here. @@ -100,38 +96,20 @@ ;;; Code: -(defgroup isearch nil - "Incremental search" - :prefix "search-" - :group 'matching) - - -(defun isearch-char-to-string (c) - (if (eventp c) - (make-string 1 (event-to-character c nil nil t)) - (make-string 1 c))) - -;(defun isearch-text-char-description (c) -; (isearch-char-to-string c)) - -(define-function 'isearch-text-char-description 'text-char-description) - ;;;========================================================================= ;;; User-accessible variables -(defvar search-last-string "" - "Last string search for by a search command. -This does not include direct calls to the primitive search functions, -and does not include searches that are aborted.") +(defgroup isearch nil + "Incremental search minor mode." + :prefix "search-" + :group 'matching) -(defvar search-last-regexp "" - "Last string searched for by a regexp search command. -This does not include direct calls to the primitive search functions, -and does not include searches that are aborted.") -(defconst search-exit-option t - "Non-nil means random control characters terminate incremental search.") +(defcustom search-exit-option t + "*Non-nil means random control characters terminate incremental search." + :type 'boolean + :group 'isearch) (defcustom search-slow-window-lines 1 "*Number of lines in slow search display windows. @@ -148,16 +126,70 @@ that the search has reached." :type 'integer :group 'isearch) +;; We have `search-caps-disable-folding'. +;(defcustom search-upper-case 'not-yanks +; "*If non-nil, upper case chars disable case fold searching. +;That is, upper and lower case chars must match exactly. +;This applies no matter where the chars come from, but does not +;apply to chars in regexps that are prefixed with `\\'. +;If this value is `not-yanks', yanked text is always downcased." +; :type '(choice (const :tag "off" nil) +; (const not-yanks) +; (other :tag "on" t)) +; :group 'isearch) + (defcustom search-nonincremental-instead t - "*If non-nil, do a nonincremental search instead if exiting immediately." + "*If non-nil, do a nonincremental search instead if exiting immediately. +Actually, `isearch-edit-string' is called to let you enter the search +string, and RET terminates editing and does a nonincremental search." :type 'boolean :group 'isearch) - -(defcustom search-whitespace-regexp "\\(\\s \\|[\n\r]\\)+" + +;; FSF default is "\\s-+", but I think our default is better so I'm +;; leaving it. +(defcustom search-whitespace-regexp "\\(\\s-\\|[\n\r]\\)+" "*If non-nil, regular expression to match a sequence of whitespace chars." :type 'regexp :group 'isearch) +(defcustom search-highlight t + "*Whether incremental search and query-replace should highlight +the text that currently matches the search string." + :type 'boolean + :group 'isearch) + +;; I think the name `search-highlight' makes more sense, both because +;; of consistency with other search-* variables above, and because it +;; also applies to query-replace. +(define-obsolete-variable-alias 'isearch-highlight 'search-highlight) + +(defcustom search-invisible 'open + "If t incremental search can match hidden text. +nil means don't match invisible text. +If the value is `open', if the text matched is made invisible by +an overlay having an `invisible' property and that overlay has a property +`isearch-open-invisible', then incremental search will show the contents. +\(This applies when using `outline.el' and `hideshow.el'.)" + :type '(choice (const :tag "Match hidden text" t) + (const :tag "Open overlays" open) + (const :tag "Don't match hidden text" nil)) + :group 'isearch) + +(defcustom isearch-hide-immediately t + "If non-nil, re-hide an invisible match right away. +This variable makes a difference when `search-invisible' is set to `open'. +It means that after search makes some invisible text visible +to show the match, it makes the text invisible again when the match moves. +Ordinarily the text becomes invisible again at the end of the search." + :type 'boolean + :group 'isearch) + +(defvar isearch-mode-hook nil + "Function(s) to call after starting up an incremental search.") + +(defvar isearch-mode-end-hook nil + "Function(s) to call after terminating an incremental search.") + ;;;================================================================== ;;; Search ring. @@ -175,22 +207,34 @@ that the search has reached." :type 'integer :group 'isearch) +;; The important difference between pre-20.4-merge yank-pointers and +;; current code is that the yank pointers positions used to be +;; preserved across the isearch sessions. I changed this because I +;; think the FSF code is closer to how the feature is supposed to +;; behave (read: to minibuffer histories.) (defvar search-ring-yank-pointer nil - "The tail of the search ring whose car is the last thing searched for.") + "Index in `search-ring' of last string reused. +nil if none yet.") (defvar regexp-search-ring-yank-pointer nil - "The tail of the regular expression search ring whose car is the last -thing searched for.") + "Index in `regexp-search-ring' of last string reused. +nil if none yet.") + +(defcustom search-ring-update nil + "*Non-nil if advancing or retreating in the search ring should cause search. +Default nil means edit the string from the search ring first." + :type 'boolean + :group 'isearch) ;;;==================================================== ;;; Define isearch-mode keymap. -(defvar isearch-mode-map +(defvar isearch-mode-map (let ((map (make-keymap))) (set-keymap-name map 'isearch-mode-map) ;; Bind all printing characters to `isearch-printing-char'. - ;; This isn't normally necessary, but if a printing character were - ;; bound to something other than self-insert-command in global-map, + ;; This isn't normally necessary, but if a printing character were + ;; bound to something other than self-insert-command in global-map, ;; then it would terminate the search and be executed without this. (let ((i 32) (str (make-string 1 0))) @@ -198,7 +242,10 @@ thing searched for.") (aset str 0 i) (define-key map str 'isearch-printing-char) (setq i (1+ i)))) - (define-key map "\t" 'isearch-printing-char) + + ;; Here FSF sets up various kludges to handle local bindings with + ;; meta char prefix keys. We don't need isearch-other-meta-char + ;; because we handle things differently (via pre-command-hook). ;; Several non-printing chars change the searching behavior. ;; @@ -207,26 +254,29 @@ thing searched for.") (define-key map "\C-r" 'isearch-repeat-backward) (define-key map "\C-g" 'isearch-abort) + ;; I wish this worked... + ;(define-key map [escape escape escape] 'isearch-cancel) + (define-key map [(meta escape) escape] 'isearch-cancel) + (define-key map "\C-q" 'isearch-quote-char) (define-key map "\C-m" 'isearch-exit) (define-key map "\C-j" 'isearch-printing-char) (define-key map "\t" 'isearch-printing-char) + ;; I prefer our default. + ;(define-key map " " 'isearch-whitespace-chars) + (define-key map "\M- " 'isearch-whitespace-chars) (define-key map "\C-w" 'isearch-yank-word) (define-key map "\C-y" 'isearch-yank-line) (define-key map "\M-y" 'isearch-yank-kill) - ;; Define keys for regexp chars * ? | + ;; Define keys for regexp chars * ? |. + ;; Nothing special for + because it matches at least once. (define-key map "*" 'isearch-*-char) (define-key map "?" 'isearch-*-char) (define-key map "|" 'isearch-|-char) - ;; Some bindings you may want to put in your isearch-mode-hook. - ;; Suggest some alternates... - ;; (define-key map "\C-t" 'isearch-toggle-regexp) - ;; (define-key map "\C-^" 'isearch-edit-string) - ;; delete and backspace delete backward, f1 is help, and C-h can be either (define-key map 'delete 'isearch-delete-char) (define-key map 'backspace 'isearch-delete-char) @@ -236,15 +286,23 @@ thing searched for.") (define-key map "\M-n" 'isearch-ring-advance) (define-key map "\M-p" 'isearch-ring-retreat) - (define-key map "\M- " 'isearch-whitespace-chars) (define-key map "\M-\t" 'isearch-complete) - (define-key map 'button2 'isearch-yank-x-selection) + ;; I find this binding somewhat unintuitive, because it doesn't + ;; work if the mouse pointer is over the echo area -- it has to be + ;; over the search window. + (define-key map 'button2 'isearch-yank-selection) map) "Keymap for isearch-mode.") -(defvar minibuffer-local-isearch-map +;; Some bindings you may want to put in your isearch-mode-hook. +;; Suggest some alternates... +;; (define-key isearch-mode-map "\C-t" 'isearch-toggle-case-fold) +;; (define-key isearch-mode-map "\C-t" 'isearch-toggle-regexp) +;; (define-key isearch-mode-map "\C-^" 'isearch-edit-string) + +(defvar minibuffer-local-isearch-map (let ((map (make-sparse-keymap))) ;; #### - this should also be minor-mode-ified (set-keymap-parents map (list minibuffer-local-map)) @@ -254,6 +312,8 @@ thing searched for.") (define-key map "\r" 'isearch-nonincremental-exit-minibuffer) (define-key map "\M-n" 'isearch-ring-advance-edit) (define-key map "\M-p" 'isearch-ring-retreat-edit) + (define-key map 'down 'isearch-ring-advance-edit) + (define-key map 'up 'isearch-ring-retreat-edit) (define-key map "\M-\t" 'isearch-complete-edit) (define-key map "\C-s" 'isearch-forward-exit-minibuffer) (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) @@ -262,7 +322,8 @@ thing searched for.") ;;;======================================================== ;; Internal variables declared globally for byte-compiler. -;; These are all bound locally while editing the search string. +;; These are all set with setq while isearching +;; and bound locally while editing the search string. (defvar isearch-forward nil) ; Searching in the forward direction. (defvar isearch-regexp nil) ; Searching for a regexp. @@ -274,6 +335,7 @@ thing searched for.") (defvar isearch-success t) ; Searching is currently successful. (defvar isearch-invalid-regexp nil) ; Regexp not well formed. +(defvar isearch-within-brackets nil) ; Regexp has unclosed [. (defvar isearch-other-end nil) ; Start (end) of match if forward (backward). (defvar isearch-wrapped nil) ; Searching restarted from the top (bottom). (defvar isearch-barrier 0) @@ -282,6 +344,12 @@ thing searched for.") (defvar isearch-case-fold-search nil) +;; Need this for toggling case in isearch-toggle-case-fold. When this +;; is non-nil, the case-sensitiveness of the search is set by the +;; user, and is may no longer be dynamically changed as per +;; search-caps-disable-folding. +(defvar isearch-fixed-case nil) + (defvar isearch-adjusted nil) (defvar isearch-slow-terminal-mode nil) ;;; If t, using a small window. @@ -308,12 +376,9 @@ thing searched for.") ;; New value of isearch-forward after isearch-edit-string. (defvar isearch-new-forward nil) +;; Accumulate here the extents unhidden during searching. +(defvar isearch-unhidden-extents nil) ; in FSF: isearch-opened-overlays -(defvar isearch-mode-hook nil - "Function(s) to call after starting up an incremental search.") - -(defvar isearch-mode-end-hook nil - "Function(s) to call after terminating an incremental search.") ;;;============================================================== ;; Minor-mode-alist changes - kind of redundant with the @@ -321,21 +386,28 @@ thing searched for.") (add-minor-mode 'isearch-mode 'isearch-mode) -(defvar isearch-mode nil) +(defvar isearch-mode nil) ;; Name of the minor mode, if non-nil. (make-variable-buffer-local 'isearch-mode) +;; We bind these in keydefs.el. +;(define-key global-map "\C-s" 'isearch-forward) +;(define-key global-map "\C-r" 'isearch-backward) +;(define-key global-map "\M-\C-s" 'isearch-forward-regexp) +;(define-key global-map "\M-\C-r" 'isearch-backward-regexp) + ;;;=============================================================== ;;; Entry points to isearch-mode. ;;; These four functions should replace those in loaddefs.el -;;; An alternative is to fset isearch-forward etc to isearch-mode, -;;; and look at the last command to set the options accordingly. +;;; An alternative is to defalias isearch-forward etc to isearch-mode, +;;; and look at this-command to set the options accordingly. -(defun isearch-forward (&optional regexp-p) - "Do incremental search forward. +(defun isearch-forward (&optional regexp-p no-recursive-edit) + "\ +Do incremental search forward. With a prefix argument, do an incremental regular expression search instead. \\ As you type characters, they add to the search string and are found. -The following non-printing keys are bound in `isearch-mode-map'. +The following non-printing keys are bound in `isearch-mode-map'. Type \\[isearch-delete-char] to cancel characters from end of search string. Type \\[isearch-exit] to exit, leaving point at location found. @@ -346,6 +418,8 @@ Type \\[isearch-yank-word] to yank word from buffer onto end of search\ string and search for it. Type \\[isearch-yank-line] to yank rest of line onto end of search string\ and search for it. +Type \\[isearch-yank-kill] to yank last killed text onto end of search string\ + and search for it. Type \\[isearch-quote-char] to quote control character to search for it. Type \\[isearch-whitespace-chars] to match all whitespace chars in regexp. \\[isearch-abort] while searching or when search has failed cancels input\ @@ -377,36 +451,38 @@ The bindings, more precisely: ;; Type \\[isearch-edit-string] to edit the search string in the minibuffer. ;; Terminate editing and return to incremental searching with CR. - (interactive "_P") - (isearch-mode t (not (null regexp-p)) nil (not (interactive-p)))) + (interactive "_P\np") + (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) -(defun isearch-forward-regexp () +(defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) "\ Do incremental search forward for regular expression. +With a prefix argument, do a regular string search instead. Like ordinary incremental search except that your input is treated as a regexp. See \\[isearch-forward] for more info." - (interactive "_") - (isearch-mode t t nil (not (interactive-p)))) + (interactive "_P\np") + (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) -(defun isearch-backward (&optional regexp-p) +(defun isearch-backward (&optional regexp-p no-recursive-edit) "\ Do incremental search backward. -With a prefix argument, do an incremental regular expression search instead. +With a prefix argument, do a regular expression search instead. See \\[isearch-forward] for more information." - (interactive "_P") - (isearch-mode nil (not (null regexp-p)) nil (not (interactive-p)))) + (interactive "_P\np") + (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) -(defun isearch-backward-regexp () +(defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) "\ Do incremental search backward for regular expression. +With a prefix argument, do a regular string search instead. Like ordinary incremental search except that your input is treated as a regexp. See \\[isearch-forward] for more info." - (interactive "_") - (isearch-mode nil t nil (not (interactive-p)))) + (interactive "_P\np") + (isearch-mode nil (null not-regexp) nil (not no-recursive-edit))) -;; This function is way wrong, because you can't scroll the help -;; screen; as soon as you press a key, it's gone. I don't know of a -;; good way to fix it, though. -hniksic +;; The problem here is that you can't scroll the help screen; as soon +;; as you press a key, it's gone. I don't know of a good way to fix +;; it, though. -hniksic (defun isearch-mode-help () (interactive "_") (let ((w (selected-window))) @@ -420,7 +496,9 @@ is treated as a regexp. See \\[isearch-forward] for more info." ;; All the work is done by the isearch-mode commands. (defun isearch-mode (forward &optional regexp op-fun recursive-edit word-p) - "Start isearch minor mode. Called by isearch-forward, etc." + "Start isearch minor mode. Called by `isearch-forward', etc. + +\\{isearch-mode-map}" (if executing-kbd-macro (setq recursive-edit nil)) @@ -433,6 +511,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-word word-p isearch-op-fun op-fun isearch-case-fold-search case-fold-search + isearch-fixed-case nil isearch-string "" isearch-message "" isearch-cmds nil @@ -442,6 +521,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-adjusted nil isearch-yank-flag nil isearch-invalid-regexp nil + isearch-within-brackets nil isearch-slow-terminal-mode (and (<= (device-baud-rate) search-slow-speed) (> (window-height) @@ -451,10 +531,14 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-just-started t isearch-opoint (point) + search-ring-yank-pointer nil + regexp-search-ring-yank-pointer nil + isearch-opened-extents nil isearch-window-configuration (current-window-configuration) - ;; #### Should we remember the old value of - ;; overriding-local-map? + ;; #### What we really need is a buffer-local + ;; overriding-local-map. See isearch-pre-command-hook for + ;; more details. overriding-local-map (progn (set-keymap-parents isearch-mode-map (nconc (current-minor-mode-maps) @@ -463,7 +547,6 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-mode-map) isearch-selected-frame (selected-frame) - isearch-mode (gettext " Isearch") ) ;; XEmacs change: without clearing the match data, sometimes old values @@ -471,7 +554,10 @@ is treated as a regexp. See \\[isearch-forward] for more info." (store-match-data nil) (add-hook 'pre-command-hook 'isearch-pre-command-hook) - (set-buffer-modified-p (buffer-modified-p)) ; update modeline + + (setq isearch-mode (gettext " Isearch")) + (redraw-modeline) + (isearch-push-state) ) ; inhibit-quit is t before here @@ -479,26 +565,26 @@ is treated as a regexp. See \\[isearch-forward] for more info." (isearch-update) (run-hooks 'isearch-mode-hook) - ;; isearch-mode can be made modal (in the sense of not returning to - ;; the calling function until searching is completed) by entering + ;; isearch-mode can be made modal (in the sense of not returning to + ;; the calling function until searching is completed) by entering ;; a recursive-edit and exiting it when done isearching. (if recursive-edit (let ((isearch-recursive-edit t)) (recursive-edit))) - ) + isearch-success) ;;;==================================================== ;; Some high level utilities. Others below. (defun isearch-update () - ;; Called after each command to update the display. - (if (null unread-command-event) + ;; Called after each command to update the display. + (if (null unread-command-events) (progn (if (not (input-pending-p)) (isearch-message)) (if (and isearch-slow-terminal-mode - (not (or isearch-small-window + (not (or isearch-small-window (pos-visible-in-window-p)))) (let ((found-point (point))) (setq isearch-small-window t) @@ -520,27 +606,24 @@ is treated as a regexp. See \\[isearch-forward] for more info." (if (< isearch-other-end (point)) (isearch-highlight isearch-other-end (point)) (isearch-highlight (point) isearch-other-end)) - (if (extentp isearch-extent) - (isearch-dehighlight nil))) + (isearch-dehighlight)) )) (setq ;; quit-flag nil not for isearch-mode isearch-adjusted nil isearch-yank-flag nil) + (isearch-highlight-all-update) ) -(defun isearch-done () +(defun isearch-done (&optional nopush edit) ;; Called by all commands that terminate isearch-mode. (let ((inhibit-quit t)) ; danger danger! (if (and isearch-buffer (buffer-live-p isearch-buffer)) - (save-excursion - ;; Some loser process filter might have switched the - ;; window's buffer, so be sure to set these variables back - ;; in the buffer we frobbed them in. But only if the buffer - ;; is still alive. - (set-buffer isearch-buffer) - ;; #### Should we restore the old value of - ;; overriding-local-map? + ;; Some loser process filter might have switched the window's + ;; buffer, so be sure to set these variables back in the + ;; buffer we frobbed them in. But only if the buffer is still + ;; alive. + (with-current-buffer isearch-buffer (setq overriding-local-map nil) ;; Use remove-hook instead of just setting it to our saved value ;; in case some process filter has created a buffer and modified @@ -549,8 +632,11 @@ is treated as a regexp. See \\[isearch-forward] for more info." (remove-hook 'pre-command-hook 'isearch-pre-command-hook) (set-keymap-parents isearch-mode-map nil) (setq isearch-mode nil) - (set-buffer-modified-p (buffer-modified-p));; update modeline - (isearch-dehighlight t))) + (redraw-modeline) + (isearch-dehighlight) + (isearch-highlight-all-cleanup) + (isearch-restore-invisible-extents nil nil) + )) ;; it's not critical that this be inside inhibit-quit, but leaving ;; things in small-window-mode would be bad. @@ -568,37 +654,41 @@ is treated as a regexp. See \\[isearch-forward] for more info." ;; Maybe should test difference between and set mark iff > threshold. (if (and (buffer-live-p isearch-buffer) (/= (point isearch-buffer) isearch-opoint)) + ;; #### FSF doesn't do this if the region is active. Should + ;; we do the same? (progn (push-mark isearch-opoint t nil isearch-buffer) (or executing-kbd-macro (> (minibuffer-depth) 0) - (display-message 'command "Mark saved where search started")))) - ) + (display-message 'command "Mark saved where search started"))))) (setq isearch-buffer nil) ) ; inhibit-quit is t before here - (if (> (length isearch-string) 0) + (if (and (> (length isearch-string) 0) (not nopush)) ;; Update the ring data. - (if isearch-regexp - (if (not (setq regexp-search-ring-yank-pointer - (member isearch-string regexp-search-ring))) - (progn - (setq regexp-search-ring - (cons isearch-string regexp-search-ring) - regexp-search-ring-yank-pointer regexp-search-ring) - (if (> (length regexp-search-ring) regexp-search-ring-max) - (setcdr (nthcdr (1- regexp-search-ring-max) regexp-search-ring) - nil)))) - (if (not (setq search-ring-yank-pointer - ;; really need equal test instead of eq. - (member isearch-string search-ring))) - (progn - (setq search-ring (cons isearch-string search-ring) - search-ring-yank-pointer search-ring) - (if (> (length search-ring) search-ring-max) - (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) + (isearch-update-ring isearch-string isearch-regexp)) (run-hooks 'isearch-mode-end-hook) - (if isearch-recursive-edit (exit-recursive-edit))) + + (and (not edit) isearch-recursive-edit (exit-recursive-edit))) + +(defun isearch-update-ring (string &optional regexp) + "Add STRING to the beginning of the search ring. +REGEXP says which ring to use." + (if regexp + (if (or (null regexp-search-ring) + (not (string= string (car regexp-search-ring)))) + (progn + (setq regexp-search-ring + (cons string regexp-search-ring)) + (if (> (length regexp-search-ring) regexp-search-ring-max) + (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) + nil)))) + (if (or (null search-ring) + (not (string= string (car search-ring)))) + (progn + (setq search-ring (cons string search-ring)) + (if (> (length search-ring) search-ring-max) + (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) ;;;==================================================== @@ -607,12 +697,16 @@ is treated as a regexp. See \\[isearch-forward] for more info." (defun isearch-exit () "Exit search normally. However, if this is the first command after starting incremental -search and `search-nonincremental-instead' is non-nil, do an -incremental search via `isearch-edit-string'." +search and `search-nonincremental-instead' is non-nil, do a +nonincremental search instead via `isearch-edit-string'." (interactive) - (if (and search-nonincremental-instead + (if (and search-nonincremental-instead (= 0 (length isearch-string))) - (let ((isearch-nonincremental t)) + (let ((isearch-nonincremental t) + ;; Highlighting only gets in the way of nonincremental + ;; search. + (search-highlight nil) + (isearch-highlight-all-matches nil)) (isearch-edit-string)) (isearch-done))) @@ -621,115 +715,112 @@ incremental search via `isearch-edit-string'." "Edit the search string in the minibuffer. The following additional command keys are active while editing. \\ -\\[exit-minibuffer] to exit editing and resume incremental searching. +\\[exit-minibuffer] to resume incremental searching with the edited string. +\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. \\[isearch-forward-exit-minibuffer] to resume isearching forward. -\\[isearch-backward-exit-minibuffer] to resume isearching backward. -\\[isearch-ring-advance-edit] to replace the search string with the next\ - item in the search ring. -\\[isearch-ring-retreat-edit] to replace the search string with the next\ - item in the search ring. -\\[isearch-complete-edit] to complete the search string from the search ring." +\\[isearch-reverse-exit-minibuffer] to resume isearching backward. +\\[isearch-ring-advance-edit] to replace the search string with the next item in the search ring. +\\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring. +\\[isearch-complete-edit] to complete the search string using the search ring. +\\ +If first char entered is \\[isearch-yank-word], then do word search instead." + ;; This code is very hairy for several reasons, explained in the code. + ;; Mainly, isearch-mode must be terminated while editing and then restarted. + ;; If there were a way to catch any change of buffer from the minibuffer, + ;; this could be simplified greatly. ;; Editing doesn't back up the search point. Should it? (interactive) (condition-case nil - (let ((minibuffer-local-map minibuffer-local-isearch-map) - isearch-nonincremental ; should search nonincrementally? - isearch-new-string - isearch-new-message - (isearch-new-forward isearch-forward) - - ;; Locally bind all isearch global variables to protect them - ;; from recursive isearching. - (isearch-string isearch-string) - (isearch-message isearch-message) - (isearch-forward isearch-forward) ; set by commands below. - - (isearch-forward isearch-forward) - (isearch-regexp isearch-regexp) - (isearch-word isearch-word) - (isearch-op-fun isearch-op-fun) - (isearch-cmds isearch-cmds) - (isearch-success isearch-success) - (isearch-wrapped isearch-wrapped) - (isearch-barrier isearch-barrier) - (isearch-adjusted isearch-adjusted) - (isearch-yank-flag isearch-yank-flag) - (isearch-invalid-regexp isearch-invalid-regexp) - (isearch-other-end isearch-other-end) - (isearch-opoint isearch-opoint) - (isearch-slow-terminal-mode isearch-slow-terminal-mode) - (isearch-small-window isearch-small-window) - (isearch-recursive-edit isearch-recursive-edit) - (isearch-window-configuration (current-window-configuration)) - (isearch-selected-frame (selected-frame)) - ) - ;; Actually terminate isearching until editing is done. - ;; This is so that the user can do anything without failure, - ;; like switch buffers and start another isearch, and return. + (progn + (let ((isearch-nonincremental isearch-nonincremental) + + ;; Locally bind all isearch global variables to protect them + ;; from recursive isearching. + ;; isearch-string -message and -forward are not bound + ;; so they may be changed. Instead, save the values. + (isearch-new-string isearch-string) + (isearch-new-message isearch-message) + (isearch-new-forward isearch-forward) + (isearch-new-word isearch-word) + + (isearch-regexp isearch-regexp) + (isearch-op-fun isearch-op-fun) + (isearch-cmds isearch-cmds) + (isearch-success isearch-success) + (isearch-wrapped isearch-wrapped) + (isearch-barrier isearch-barrier) + (isearch-adjusted isearch-adjusted) + (isearch-fixed-case isearch-fixed-case) + (isearch-yank-flag isearch-yank-flag) + (isearch-invalid-regexp isearch-invalid-regexp) + (isearch-within-brackets isearch-within-brackets) + ;;; Don't bind this. We want isearch-search, below, to set it. + ;;; And the old value won't matter after that. + ;;; (isearch-other-end isearch-other-end) + (isearch-opoint isearch-opoint) + (isearch-slow-terminal-mode isearch-slow-terminal-mode) + (isearch-small-window isearch-small-window) + (isearch-recursive-edit isearch-recursive-edit) + (isearch-window-configuration (current-window-configuration)) + (isearch-selected-frame (selected-frame)) + ) + ;; Actually terminate isearching until editing is done. + ;; This is so that the user can do anything without failure, + ;; like switch buffers and start another isearch, and return. ;; (condition-case nil - (isearch-done) + (isearch-done t t) ;;#### What does this mean? There is no such condition! -;; (exit nil)) ; was recursive editing - - (unwind-protect - (let ((prompt (isearch-message-prefix nil t)) - event) - ;; If the first character the user types when we prompt them - ;; for a string is the yank-word character, then go into - ;; word-search mode. Otherwise unread that character and - ;; read a string the normal way. - (let ((cursor-in-echo-area t)) - (display-message 'prompt prompt) - (setq event (next-command-event)) - (if (eq 'isearch-yank-word - (lookup-key isearch-mode-map (vector event))) - (setq isearch-word t) - (setq unread-command-event event))) - (setq isearch-new-string -;; (if (fboundp 'gmhist-old-read-from-minibuffer) -;; ;; Eschew gmhist crockery -;; (gmhist-old-read-from-minibuffer prompt isearch-string) - (read-string - prompt isearch-string - 't ;does its own history (but shouldn't) -;; (if isearch-regexp -;; ;; The search-rings aren't exactly minibuffer -;; ;; histories, but they are close enough -;; (cons 'regexp-search-ring -;; (- (length regexp-search-ring-yank-pointer) -;; (length regexp-search-ring))) -;; (cons 'search-ring -;; (- (length search-ring-yank-pointer) -;; (length search-ring)))) - ) -;; ) - isearch-new-message (mapconcat - 'isearch-text-char-description - isearch-new-string "")) - ) - ;; Always resume isearching by restarting it. - (isearch-mode isearch-forward - isearch-regexp - isearch-op-fun - isearch-recursive-edit - isearch-word) - ) - - ;; Copy new values in outer locals to isearch globals - (setq isearch-string isearch-new-string - isearch-message isearch-new-message - isearch-forward isearch-new-forward) +;; (exit nil)) ; was recursive editing - ;; Empty isearch-string means use default. - (if (= 0 (length isearch-string)) - (setq isearch-string (if isearch-regexp search-last-regexp - search-last-string)) - ;; Set last search string now so it is set even if we fail. - (if search-last-regexp - (setq search-last-regexp isearch-string) - (setq search-last-string isearch-string))) + (unwind-protect + (progn + ;; Fake the prompt message for the sake of + ;; next-command-event below. + (isearch-message) + ;; If the first character the user types when we + ;; prompt them for a string is the yank-word + ;; character, then go into word-search mode. + ;; Otherwise unread that character and read a string + ;; the normal way. + (let* ((cursor-in-echo-area t) + (event (next-command-event))) + (if (eq 'isearch-yank-word + (lookup-key isearch-mode-map (vector event))) + (setq isearch-word t;; so message-prefix is right + isearch-new-word t) + (setq unread-command-event event))) + (setq isearch-new-string + (read-from-minibuffer + (isearch-message-prefix nil isearch-nonincremental) + isearch-string + minibuffer-local-isearch-map + nil + 't ;does its own history (but shouldn't) + ) + isearch-new-message (mapconcat + 'isearch-text-char-description + isearch-new-string ""))) + ;; Always resume isearching by restarting it. + (isearch-mode isearch-forward + isearch-regexp + isearch-op-fun + isearch-recursive-edit + isearch-word) + + ;; Copy new values in outer locals to isearch globals + (setq isearch-string isearch-new-string + isearch-message isearch-new-message + isearch-forward isearch-new-forward + isearch-word isearch-new-word)) + + ;; Empty isearch-string means use default. + (if (= 0 (length isearch-string)) + (setq isearch-string (or (car (if isearch-regexp + regexp-search-ring + search-ring)) + "")))) ;; Reinvoke the pending search. (isearch-push-state) @@ -756,25 +847,33 @@ The following additional command keys are active while editing. (setq isearch-new-forward nil) (exit-minibuffer)) +(defun isearch-cancel () + "Terminate the search and go back to the starting point." + (interactive) + (goto-char isearch-opoint) + (isearch-done t) + (signal 'quit '(isearch))) ; and pass on quit signal (defun isearch-abort () - "Quit incremental search mode if searching is successful, signalling quit. + "Abort incremental search mode if searching is successful, signaling quit. Otherwise, revert to previous successful search and continue searching. -Use `isearch-exit' to quit without signalling." +Use `isearch-exit' to quit without signaling." (interactive) -;; (ding) signal instead below, if quiting +;; (ding) signal instead below, if quitting (discard-input) (if isearch-success ;; If search is successful, move back to starting point ;; and really do quit. (progn (goto-char isearch-opoint) - (isearch-done) ; exit isearch + (setq isearch-success nil) + (isearch-done t) ; exit isearch (signal 'quit '(isearch))) ; and pass on quit signal - ;; If search is failing, rub out until it is once more successful. - (while (not isearch-success) (isearch-pop-state)) + ;; If search is failing, or has an incomplete regexp, + ;; rub out until it is once more successful. + (while (or (not isearch-success) isearch-invalid-regexp) + (isearch-pop-state)) (isearch-update))) - (defun isearch-repeat (direction) ;; Utility for isearch-repeat-forward and -backward. (if (eq isearch-forward (eq direction 'forward)) @@ -783,35 +882,30 @@ Use `isearch-exit' to quit without signalling." ;; If search string is empty, use last one. (setq isearch-string (or (if isearch-regexp - (if regexp-search-ring-yank-pointer - (car regexp-search-ring-yank-pointer) - (car regexp-search-ring)) - (if search-ring-yank-pointer - (car search-ring-yank-pointer) - (car search-ring))) + (car regexp-search-ring) + (car search-ring)) "") isearch-message (mapconcat 'isearch-text-char-description isearch-string "")) ;; If already have what to search for, repeat it. (or isearch-success - (progn - + (progn (goto-char (if isearch-forward (point-min) (point-max))) (setq isearch-wrapped t)))) ;; C-s in reverse or C-r in forward, change direction. (setq isearch-forward (not isearch-forward))) (setq isearch-barrier (point)) ; For subsequent \| if regexp. + (if (equal isearch-string "") (setq isearch-success t) - (if (and (equal (match-end 0) (match-beginning 0)) - isearch-success + (if (and isearch-success (equal (match-end 0) (match-beginning 0)) (not isearch-just-started)) ;; If repeating a search that found ;; an empty string, ensure we advance. (if (if isearch-forward (eobp) (bobp)) - ;; nowhere to advance to, so fail (and wrap next time) + ;; If there's nowhere to advance to, fail (and wrap next time). (progn (setq isearch-success nil) (and executing-kbd-macro @@ -821,6 +915,7 @@ Use `isearch-exit' to quit without signalling." (forward-char (if isearch-forward 1 -1)) (isearch-search)) (isearch-search))) + (isearch-push-state) (isearch-update)) @@ -845,18 +940,21 @@ Use `isearch-exit' to quit without signalling." (defun isearch-toggle-case-fold () "Toggle case folding in searching on or off." (interactive) - (setq isearch-case-fold-search - (if isearch-case-fold-search nil 'yes)) - (message "%s%s [case %ssensitive]" - (isearch-message-prefix) - isearch-message - (if isearch-case-fold-search "in" "")) + (setq isearch-case-fold-search (if isearch-case-fold-search nil 'yes) + isearch-fixed-case t) + (lmessage 'progress "%s%s [case %ssensitive]" + (isearch-message-prefix) + isearch-message + (if isearch-case-fold-search "in" "")) (setq isearch-adjusted t) + ;; Update the highlighting here so that it gets done before the + ;; one-second pause. + (isearch-highlight-all-update) (sit-for 1) (isearch-update)) (defun isearch-delete-char () - "Discard last input item and move point back. + "Discard last input item and move point back. If no previous match was done, just beep." (interactive) (if (null (cdr isearch-cmds)) @@ -876,6 +974,7 @@ backwards." (isearch-delete-char) (isearch-mode-help))) +;; This is similar to FSF isearch-yank-string, but more general. (defun isearch-yank (chunk) ;; Helper for isearch-yank-* functions. CHUNK can be a string or a ;; function. @@ -886,7 +985,7 @@ backwards." (goto-char isearch-other-end)) (buffer-substring (point) - (save-excursion + (progn (funcall chunk) (point))))))) ;; if configured so that typing upper-case characters turns off case @@ -904,7 +1003,6 @@ backwards." isearch-yank-flag t)) (isearch-search-and-update)) - (defun isearch-yank-word () "Pull next word from buffer into search string." (interactive) @@ -925,30 +1023,34 @@ backwards." (interactive) (isearch-yank 'forward-sexp)) -(defun isearch-yank-x-selection () - "Pull the current X selection into the search string." +(defun isearch-yank-selection () + "Pull the current selection into the search string." (interactive) - (isearch-yank (x-get-selection))) + (isearch-yank (get-selection))) -(defun isearch-yank-x-clipboard () - "Pull the current X clipboard selection into the search string." +(defun isearch-yank-clipboard () + "Pull the current clipboard selection into the search string." (interactive) - (isearch-yank (x-get-clipboard))) + (isearch-yank (get-clipboard))) (defun isearch-fix-case () - (if (and isearch-case-fold-search search-caps-disable-folding) - (setq isearch-case-fold-search + ;; The commented-out (and ...) form implies that, once + ;; isearch-case-fold-search becomes nil due to a capital letter + ;; typed in, it can never be restored to the original value. In + ;; that case, it's impossible to revert a case-sensitive search back + ;; to case-insensitive. + (if ;(and isearch-case-fold-search search-caps-disable-folding) + (and case-fold-search + ;; Make sure isearch-toggle-case-fold works. + (not isearch-fixed-case) + search-caps-disable-folding) + (setq isearch-case-fold-search (no-upper-case-p isearch-string isearch-regexp))) (setq isearch-mode (if case-fold-search (if isearch-case-fold-search " Isearch" ;As God Intended Mode " ISeARch") ;Warn about evil case via StuDLYcAps. - "Isearch" -; (if isearch-case-fold-search -; " isearch" ;Presumably case-sensitive losers -; ;will notice this 1-char difference. -; " Isearch") ;Weenie mode. - ))) + " Isearch"))) (defun isearch-search-and-update () ;; Do the search and update the display. @@ -972,16 +1074,17 @@ backwards." (regexp-quote isearch-string))))) (error nil)) (or isearch-yank-flag - (<= (match-end 0) + (<= (match-end 0) (min isearch-opoint isearch-barrier)))) - (setq isearch-success t + (setq isearch-success t isearch-invalid-regexp nil + isearch-within-brackets nil isearch-other-end (match-end 0)) ;; Not regexp, not reverse, or no match at point. (if (and isearch-other-end (not isearch-adjusted)) (goto-char (if isearch-forward isearch-other-end - (min isearch-opoint - isearch-barrier + (min isearch-opoint + isearch-barrier (1+ isearch-other-end))))) (isearch-search) )) @@ -991,31 +1094,34 @@ backwards." ;; *, ?, and | chars can make a regexp more liberal. -;; They can make a regexp match sooner -;; or make it succeed instead of failing. +;; They can make a regexp match sooner or make it succeed instead of failing. ;; So go back to place last successful search started ;; or to the last ^S/^R (barrier), whichever is nearer. +;; + needs no special handling because the string must match at least once. (defun isearch-*-char () "Handle * and ? specially in regexps." (interactive) - (if isearch-regexp - - (progn - (setq isearch-adjusted t) - (let ((cs (nth (if isearch-forward - 5 ; isearch-other-end - 2) ; saved (point) - (car (cdr isearch-cmds))))) + (if isearch-regexp + (let ((idx (length isearch-string))) + (while (and (> idx 0) + (eq (aref isearch-string (1- idx)) ?\\)) + (setq idx (1- idx))) + (when (= (mod (- (length isearch-string) idx) 2) 0) + (setq isearch-adjusted t) + ;; Get the isearch-other-end from before the last search. + ;; We want to start from there, + ;; so that we don't retreat farther than that. ;; (car isearch-cmds) is after last search; ;; (car (cdr isearch-cmds)) is from before it. - (setq cs (or cs isearch-barrier)) - (goto-char - (if isearch-forward - (max cs isearch-barrier) - (min cs isearch-barrier)))))) + (let ((cs (nth 5 (car (cdr isearch-cmds))))) + (setq cs (or cs isearch-barrier)) + (goto-char + (if isearch-forward + (max cs isearch-barrier) + (min cs isearch-barrier))))))) (isearch-process-search-char last-command-event)) - + (defun isearch-|-char () @@ -1027,42 +1133,59 @@ backwards." (goto-char isearch-barrier))) (isearch-process-search-char last-command-event)) +;; FSF: +;(defalias 'isearch-other-control-char 'isearch-other-meta-char) +; +;(defun isearch-other-meta-char () +;... +; + (defun isearch-quote-char () "Quote special characters for incremental search." (interactive) + ;; #### Here FSF does some special conversion of chars in 0200-0377 + ;; range. Maybe we should do the same. (isearch-process-search-char (read-quoted-char (isearch-message t)))) - (defun isearch-return-char () "Convert return into newline for incremental search. Obsolete." (interactive) (isearch-process-search-char ?\n)) - (defun isearch-printing-char () - "Any other printing character => add it to the search string and search." + "Add this ordinary printing character to the search string and search." (interactive) - (isearch-process-search-char last-command-event)) - + (let ((event last-command-event)) + ;; If we are called by isearch-whitespace-chars because the + ;; context disallows whitespace search (e.g. within brackets), + ;; replace M-SPC with a space. FSF has similar code. + (and (eq this-command 'isearch-whitespace-chars) + (null (event-to-character event)) + (setq event (character-to-event ?\ ))) + (isearch-process-search-char event))) (defun isearch-whitespace-chars () "Match all whitespace chars, if in regexp mode." + ;; FSF docstring adds: "If you want to search for just a space, type + ;; C-q SPC." But we don't need the addition because we have a + ;; different (better) default for the variable. (interactive) - (if (and isearch-regexp search-whitespace-regexp) - (isearch-process-search-string search-whitespace-regexp " ") - (beep) - (isearch-process-search-char ?\ ) -; (if isearch-word -; nil -; (setq isearch-word t) -; (goto-char isearch-other-end) -; (isearch-process-search-char ?\ )) - )) + (if isearch-regexp + (if (and search-whitespace-regexp (not isearch-within-brackets) + (not isearch-invalid-regexp)) + (isearch-process-search-string search-whitespace-regexp " ") + (isearch-printing-char)) + (progn + ;; This way of doing word search doesn't correctly extend current search. + ;; (setq isearch-word t) + ;; (setq isearch-adjusted t) + ;; (goto-char isearch-barrier) + (isearch-printing-char)))) (defun isearch-process-search-char (char) ;; Append the char to the search string, update the message and re-search. - (isearch-process-search-string (isearch-char-to-string char) + (isearch-process-search-string (isearch-char-to-string char) (isearch-text-char-description char))) (defun isearch-process-search-string (string message) @@ -1074,12 +1197,6 @@ Obsolete." ;;=========================================================== ;; Search Ring -(defcustom search-ring-update nil - "*Non-nil if advancing or retreating in the search ring should cause search. -Default nil means edit the string from the search ring first." - :type 'boolean - :group 'isearch) - (defun isearch-ring-adjust1 (advance) ;; Helper for isearch-ring-adjust (let* ((ring (if isearch-regexp regexp-search-ring search-ring)) @@ -1092,25 +1209,25 @@ Default nil means edit the string from the search ring first." () (set yank-pointer-name (setq yank-pointer - (nthcdr (% (+ (- length (length yank-pointer)) - (if advance (1- length) 1)) - length) ring))) - (setq isearch-string (car yank-pointer) + (mod (+ (or yank-pointer 0) + (if advance -1 1)) + length))) + (setq isearch-string (nth yank-pointer ring) isearch-message (mapconcat 'isearch-text-char-description isearch-string ""))))) (defun isearch-ring-adjust (advance) ;; Helper for isearch-ring-advance and isearch-ring-retreat - (if (cdr isearch-cmds) ;; is there more than one thing on stack? - (isearch-pop-state)) +; (if (cdr isearch-cmds) ;; is there more than one thing on stack? +; (isearch-pop-state)) (isearch-ring-adjust1 advance) - (isearch-push-state) (if search-ring-update (progn (isearch-search) (isearch-update)) (isearch-edit-string) - )) + ) + (isearch-push-state)) (defun isearch-ring-advance () "Advance to the next search string in the ring." @@ -1123,30 +1240,59 @@ Default nil means edit the string from the search ring first." (interactive) (isearch-ring-adjust nil)) -(defun isearch-ring-adjust-edit (advance) - "Use the next or previous search string in the ring while in minibuffer." - (isearch-ring-adjust1 advance) - (erase-buffer) - (insert isearch-string)) +(defun isearch-ring-advance-edit (n) + "Insert the next element of the search history into the minibuffer." + (interactive "p") + (let* ((yank-pointer-name (if isearch-regexp + 'regexp-search-ring-yank-pointer + 'search-ring-yank-pointer)) + (yank-pointer (eval yank-pointer-name)) + (ring (if isearch-regexp regexp-search-ring search-ring)) + (length (length ring))) + (if (zerop length) + () + (set yank-pointer-name + (setq yank-pointer + (mod (- (or yank-pointer 0) n) + length))) -(defun isearch-ring-advance-edit () - (interactive) - (isearch-ring-adjust-edit 'advance)) + (erase-buffer) + (insert (nth yank-pointer ring)) + (goto-char (point-max))))) -(defun isearch-ring-retreat-edit () - "Retreat to the previous search string in the ring while in the minibuffer." - (interactive) - (isearch-ring-adjust-edit nil)) +(defun isearch-ring-retreat-edit (n) + "Inserts the previous element of the search history into the minibuffer." + (interactive "p") + (isearch-ring-advance-edit (- n))) + +;; Merging note: FSF comments out these functions and implements them +;; differently (see above), presumably because the versions below mess +;; with isearch-string, while what we really want them to do is simply +;; to insert the correct string to the minibuffer. + +;;(defun isearch-ring-adjust-edit (advance) +;; "Use the next or previous search string in the ring while in minibuffer." +;; (isearch-ring-adjust1 advance) +;; (erase-buffer) +;; (insert isearch-string)) + +;;(defun isearch-ring-advance-edit () +;; (interactive) +;; (isearch-ring-adjust-edit 'advance)) + +;;(defun isearch-ring-retreat-edit () +;; "Retreat to the previous search string in the ring while in the minibuffer." +;; (interactive) +;; (isearch-ring-adjust-edit nil)) (defun isearch-complete1 () ;; Helper for isearch-complete and isearch-complete-edit - ;; Return t if completion OK, + ;; Return t if completion OK, nil if no completion exists. (let* ((ring (if isearch-regexp regexp-search-ring search-ring)) (alist (mapcar (function (lambda (string) (list string))) ring)) (completion-ignore-case case-fold-search) - (completion (try-completion isearch-string alist)) - ) + (completion (try-completion isearch-string alist))) (cond ((eq completion t) ;; isearch-string stays the same @@ -1154,12 +1300,14 @@ Default nil means edit the string from the search ring first." ((or completion ; not nil, must be a string (= 0 (length isearch-string))) ; shouldn't have to say this (if (equal completion isearch-string) ;; no extension? - (if completion-auto-help - (with-output-to-temp-buffer "*Isearch completions*" - (display-completion-list - (all-completions isearch-string alist)))) - (setq isearch-string completion)) - t) + (progn + (if completion-auto-help + (with-output-to-temp-buffer "*Isearch completions*" + (display-completion-list + (all-completions isearch-string alist)))) + t) + (and completion + (setq isearch-string completion)))) (t (temp-minibuffer-message "No completion") nil)))) @@ -1186,32 +1334,61 @@ If there is no completion possible, say so and continue searching." ;;;============================================================== -;; The search status stack (and isearch window-local variables, not used). +;; The search status stack. (defun isearch-top-state () -;; (fetch-window-local-variables) (let ((cmd (car isearch-cmds))) + ;; #### Grr, this is so error-prone. If you add something to + ;; isearch-push-state, don't forget to update this. I thout I'd + ;; make a list of variables, and just do (mapcar* #'set vars + ;; values), but the (point) thing would spoil it, leaving to more + ;; complication. (setq isearch-string (car cmd) isearch-message (car (cdr cmd)) isearch-success (nth 3 cmd) isearch-forward (nth 4 cmd) isearch-other-end (nth 5 cmd) - isearch-invalid-regexp (nth 6 cmd) - isearch-wrapped (nth 7 cmd) - isearch-barrier (nth 8 cmd)) + isearch-word (nth 6 cmd) + isearch-invalid-regexp (nth 7 cmd) + isearch-wrapped (nth 8 cmd) + isearch-barrier (nth 9 cmd) + isearch-within-brackets (nth 10 cmd)) (goto-char (car (cdr (cdr cmd)))))) (defun isearch-pop-state () -;; (fetch-window-local-variables) - (setq isearch-cmds (cdr isearch-cmds)) + (pop isearch-cmds) (isearch-top-state) - ) + + ;; Make sure isearch-case-fold-search gets the correct value. FSF + ;; simply stores isearch-case-fold-search to isearch-cmds. We + ;; should probably do the same. + (isearch-fix-case) + + ;; Here, as well as in isearch-search we must deal with the point + ;; landing at an invisible area which may need unhiding. + (if (or (not (eq search-invisible 'open)) + (not isearch-hide-immediately)) + ;; If search-invisible is t, invisible text is just like any + ;; other text. If it is nil, it is always skipped and we can't + ;; land inside. In both cases, we don't need to do anything. + ;; + ;; Similarly, if isearch-hide-immediately is nil, needn't + ;; re-hide the area here, and neither can we land back into a + ;; hidden one. + nil + (when isearch-other-end + ;; This will unhide the extents. + (isearch-range-invisible (point) isearch-other-end)) + (isearch-restore-invisible-extents (point) + (or isearch-other-end (point))))) (defun isearch-push-state () - (setq isearch-cmds + (setq isearch-cmds (cons (list isearch-string isearch-message (point) - isearch-success isearch-forward isearch-other-end - isearch-invalid-regexp isearch-wrapped isearch-barrier) + isearch-success isearch-forward isearch-other-end + isearch-word + isearch-invalid-regexp isearch-wrapped isearch-barrier + isearch-within-brackets) isearch-cmds))) @@ -1222,27 +1399,41 @@ If there is no completion possible, say so and continue searching." ;; Generate and print the message string. (let ((cursor-in-echo-area ellipsis) (m (concat - (isearch-message-prefix c-q-hack) + (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental) isearch-message - (isearch-message-suffix c-q-hack) + (isearch-message-suffix c-q-hack ellipsis) ))) - (if c-q-hack m (display-message 'progress (format "%s" m))))) + (if c-q-hack + m + (display-message 'progress (format "%s" m))))) -(defun isearch-message-prefix (&optional c-q-hack nonincremental) +(defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) ;; If about to search, and previous search regexp was invalid, ;; check that it still is. If it is valid now, ;; let the message we display while searching say that it is valid. - (and isearch-invalid-regexp + (and isearch-invalid-regexp ellipsis (condition-case () (progn (re-search-forward isearch-string (point) t) - (setq isearch-invalid-regexp nil)) + (setq isearch-invalid-regexp nil + isearch-within-brackets nil)) (error nil))) - ;; #### - Yo! Emacs assembles strings all over the place, they can't all - ;; be internationalized in the manner proposed below... Add an explicit - ;; call to `gettext' and have the string snarfer pluck the english - ;; strings out of the comment below. XEmacs is on a purespace diet! -Stig + ;; If currently failing, display no ellipsis. + (or isearch-success (setq ellipsis nil)) + ;; #### - ! Emacs assembles strings all over the place, they can't + ;; all be internationalized in the manner proposed below... Add an + ;; explicit call to `gettext' and have the string snarfer pluck the + ;; english strings out of the comment below. XEmacs is on a + ;; purespace diet! -Stig + + ;; The comment below is dead and buried, but it can be rebuilt if + ;; necessary. -hniksic (let ((m (concat (if isearch-success nil "failing ") - (if isearch-wrapped "wrapped ") + (if (and isearch-wrapped + (if isearch-forward + (> (point) isearch-opoint) + (< (point) isearch-opoint))) + "overwrapped " + (if isearch-wrapped "wrapped ")) (if isearch-word "word ") (if isearch-regexp "regexp ") (if nonincremental "search" "I-search") @@ -1252,14 +1443,12 @@ If there is no completion possible, say so and continue searching." (aset m 0 (upcase (aref m 0))) (gettext m))) -(defun isearch-message-suffix (&optional c-q-hack) +(defun isearch-message-suffix (&optional c-q-hack ellipsis) (concat (if c-q-hack "^Q" "") (if isearch-invalid-regexp (concat " [" isearch-invalid-regexp "]") ""))) -;;;;; #### - yuck...this is soooo lame. Is this really worth 4k of purespace??? -;;; ;;;(let ((i (logior (if isearch-success 32 0) ;;; (if isearch-wrapped 16 0) ;;; (if isearch-word 8 0) @@ -1268,68 +1457,7 @@ If there is no completion possible, say so and continue searching." ;;; (if isearch-forward 1 0)))) ;;; (cond ;;; ((= i 63) (gettext "Wrapped word regexp search: ")) ; 111111 -;;; ((= i 62) (gettext "Wrapped word regexp search backward: ")) ; 111110 -;;; ((= i 61) (gettext "Wrapped word regexp I-search: ")) ; 111101 -;;; ((= i 60) (gettext "Wrapped word regexp I-search backward: ")) ; 111100 -;;; ((= i 59) (gettext "Wrapped word search: ")) ; 111011 -;;; ((= i 58) (gettext "Wrapped word search backward: ")) ; 111010 -;;; ((= i 57) (gettext "Wrapped word I-search: ")) ; 111001 -;;; ((= i 56) (gettext "Wrapped word I-search backward: ")) ; 111000 -;;; ((= i 55) (gettext "Wrapped regexp search: ")) ; 110111 -;;; ((= i 54) (gettext "Wrapped regexp search backward: ")) ; 110110 -;;; ((= i 53) (gettext "Wrapped regexp I-search: ")) ; 110101 -;;; ((= i 52) (gettext "Wrapped regexp I-search backward: ")) ; 110100 -;;; ((= i 51) (gettext "Wrapped search: ")) ; 110011 -;;; ((= i 50) (gettext "Wrapped search backward: ")) ; 110010 -;;; ((= i 49) (gettext "Wrapped I-search: ")) ; 110001 -;;; ((= i 48) (gettext "Wrapped I-search backward: ")) ; 110000 -;;; ((= i 47) (gettext "Word regexp search: ")) ; 101111 -;;; ((= i 46) (gettext "Word regexp search backward: ")) ; 101110 -;;; ((= i 45) (gettext "Word regexp I-search: ")) ; 101101 -;;; ((= i 44) (gettext "Word regexp I-search backward: ")) ; 101100 -;;; ((= i 43) (gettext "Word search: ")) ; 101011 -;;; ((= i 42) (gettext "Word search backward: ")) ; 101010 -;;; ((= i 41) (gettext "Word I-search: ")) ; 101001 -;;; ((= i 40) (gettext "Word I-search backward: ")) ; 101000 -;;; ((= i 39) (gettext "Regexp search: ")) ; 100111 -;;; ((= i 38) (gettext "Regexp search backward: ")) ; 100110 -;;; ((= i 37) (gettext "Regexp I-search: ")) ; 100101 -;;; ((= i 36) (gettext "Regexp I-search backward: ")) ; 100100 -;;; ((= i 35) (gettext "Search: ")) ; 100011 -;;; ((= i 34) (gettext "Search backward: ")) ; 100010 -;;; ((= i 33) (gettext "I-search: ")) ; 100001 -;;; ((= i 32) (gettext "I-search backward: ")) ; 100000 -;;; ((= i 31) (gettext "Failing wrapped word regexp search: ")) ; 011111 -;;; ((= i 30) (gettext "Failing wrapped word regexp search backward: ")) ; 011110 -;;; ((= i 29) (gettext "Failing wrapped word regexp I-search: ")) ; 011101 -;;; ((= i 28) (gettext "Failing wrapped word regexp I-search backward: ")) ; 011100 -;;; ((= i 27) (gettext "Failing wrapped word search: ")) ; 011011 -;;; ((= i 26) (gettext "Failing wrapped word search backward: ")) ; 011010 -;;; ((= i 25) (gettext "Failing wrapped word I-search: ")) ; 011001 -;;; ((= i 24) (gettext "Failing wrapped word I-search backward: ")) ; 011000 -;;; ((= i 23) (gettext "Failing wrapped regexp search: ")) ; 010111 -;;; ((= i 22) (gettext "Failing wrapped regexp search backward: ")) ; 010110 -;;; ((= i 21) (gettext "Failing wrapped regexp I-search: ")) ; 010101 -;;; ((= i 20) (gettext "Failing wrapped regexp I-search backward: ")) ; 010100 -;;; ((= i 19) (gettext "Failing wrapped search: ")) ; 010011 -;;; ((= i 18) (gettext "Failing wrapped search backward: ")) ; 010010 -;;; ((= i 17) (gettext "Failing wrapped I-search: ")) ; 010001 -;;; ((= i 16) (gettext "Failing wrapped I-search backward: ")) ; 010000 -;;; ((= i 15) (gettext "Failing word regexp search: ")) ; 001111 -;;; ((= i 14) (gettext "Failing word regexp search backward: ")) ; 001110 -;;; ((= i 13) (gettext "Failing word regexp I-search: ")) ; 001101 -;;; ((= i 12) (gettext "Failing word regexp I-search backward: ")) ; 001100 -;;; ((= i 11) (gettext "Failing word search: ")) ; 001011 -;;; ((= i 10) (gettext "Failing word search backward: ")) ; 001010 -;;; ((= i 9) (gettext "Failing word I-search: ")) ; 001001 -;;; ((= i 8) (gettext "Failing word I-search backward: ")) ; 001000 -;;; ((= i 7) (gettext "Failing regexp search: ")) ; 000111 -;;; ((= i 6) (gettext "Failing regexp search backward: ")) ; 000110 -;;; ((= i 5) (gettext "Failing regexp I-search: ")) ; 000101 -;;; ((= i 4) (gettext "Failing regexp I-search backward: ")) ; 000100 -;;; ((= i 3) (gettext "Failing search: ")) ; 000011 -;;; ((= i 2) (gettext "Failing search backward: ")) ; 000010 -;;; ((= i 1) (gettext "Failing I-search: ")) ; 000001 +;;; ...and so on, ad nauseam... ;;; ((= i 0) (gettext "Failing I-search backward: ")) ; 000000 ;;; (t (error "Something's rotten"))))) @@ -1343,6 +1471,7 @@ If there is no completion possible, say so and continue searching." (put 'isearch-repeat-backward 'isearch-command t) (put 'isearch-delete-char 'isearch-command t) (put 'isearch-help-or-delete-char 'isearch-command t) +(put 'isearch-cancel 'isearch-command t) (put 'isearch-abort 'isearch-command t) (put 'isearch-quote-char 'isearch-command t) (put 'isearch-exit 'isearch-command t) @@ -1371,6 +1500,8 @@ If there is no completion possible, say so and continue searching." (put 'isearch-forward-exit-minibuffer 'isearch-command t) (put 'isearch-reverse-exit-minibuffer 'isearch-command t) (put 'isearch-nonincremental-exit-minibuffer 'isearch-command t) +(put 'isearch-yank-selection 'isearch-command t) +(put 'isearch-yank-clipboard 'isearch-command t) (put 'isearch-yank-x-selection 'isearch-command t) (put 'isearch-yank-x-clipboard 'isearch-command t) @@ -1408,11 +1539,24 @@ If there is no completion possible, say so and continue searching." ;; (cond ((not (eq (current-buffer) isearch-buffer)) ;; If the buffer (likely meaning "frame") has changed, bail. - ;; This can also happen if a proc filter has popped up another - ;; buffer, which is arguably a bad thing for it to have done, - ;; but the way in which isearch would have hosed you in that - ;; case is unarguably even worse. -jwz - (isearch-done)) + ;; This can happen if the user types something into another + ;; frame. It can also happen if a proc filter has popped up + ;; another buffer, which is arguably a bad thing for it to + ;; have done, but the way in which isearch would have hosed + ;; you in that case is unarguably even worse. -jwz + (isearch-done) + + ;; `this-command' is set according to the value of + ;; `overriding-local-map', set by isearch-mode. This is + ;; wrong because that keymap makes sense only in isearch + ;; buffer. To make sure the right command is called, adjust + ;; `this-command' to the appropriate value, now that + ;; `isearch-done' has set `overriding-local-map' to nil. + + ;; FSF does similar magic in `isearch-other-meta-char', which + ;; is horribly complex. I *hope* what we do works in all + ;; cases. + (setq this-command (key-binding (this-command-keys)))) (t (isearch-maybe-frob-keyboard-macros) (if (and this-command @@ -1453,15 +1597,10 @@ If there is no completion possible, say so and continue searching." ;;;======================================================== ;;; Highlighting -(defcustom isearch-highlight t - "*Whether isearch and query-replace should highlight the text which -currently matches the search-string.") - (defvar isearch-extent nil) -;; this face is initialized by x-faces.el since isearch is preloaded. -;; this face is now created in initialize-faces -;;(make-face 'isearch) +;; this face is initialized by faces.el since isearch is preloaded. +;(make-face 'isearch) (defun isearch-make-extent (begin end) (let ((x (make-extent begin end (current-buffer)))) @@ -1469,28 +1608,28 @@ currently matches the search-string.") ;; highlighted extents we may be passing through, since isearch, being ;; modal, is more interesting (there's nothing they could do with a ;; mouse-highlighted extent while in the midst of a search anyway). - (set-extent-priority x (1+ mouse-highlight-priority)) + (set-extent-priority x (+ mouse-highlight-priority 2)) (set-extent-face x 'isearch) (setq isearch-extent x))) (defun isearch-highlight (begin end) - (if (null isearch-highlight) + (if (null search-highlight) nil ;; make sure isearch-extent is in the current buffer - (or (extentp isearch-extent) + (or (and (extentp isearch-extent) + (extent-live-p isearch-extent)) (isearch-make-extent begin end)) (set-extent-endpoints isearch-extent begin end (current-buffer)))) -(defun isearch-dehighlight (totally) - (if (and isearch-highlight isearch-extent) - (if totally - (let ((inhibit-quit t)) - (if (extentp isearch-extent) - (delete-extent isearch-extent)) - (setq isearch-extent nil)) - (if (extentp isearch-extent) - (detach-extent isearch-extent) - (setq isearch-extent nil))))) +;; This used to have a TOTALLY flag that also deleted the extent. I +;; don't think this is necessary any longer, as isearch-highlight can +;; simply move the extent to another buffer. The IGNORED argument is +;; for the code that calls this function with an argument. --hniksic +(defun isearch-dehighlight (&optional ignored) + (and search-highlight + (extentp isearch-extent) + (extent-live-p isearch-extent) + (detach-extent isearch-extent))) ;;;======================================================== @@ -1502,33 +1641,54 @@ currently matches the search-string.") (isearch-fix-case) (condition-case lossage (let ((inhibit-quit nil) - (case-fold-search isearch-case-fold-search)) + (case-fold-search isearch-case-fold-search) + (retry t)) (if isearch-regexp (setq isearch-invalid-regexp nil)) - (setq isearch-success - (funcall - (cond (isearch-word - (if isearch-forward - 'word-search-forward 'word-search-backward)) - (isearch-regexp - (if isearch-forward - 're-search-forward 're-search-backward)) - (t - (if isearch-forward 'search-forward 'search-backward))) - isearch-string nil t)) + (setq isearch-within-brackets nil) + (while retry + (setq isearch-success + (funcall + (cond (isearch-word + (if isearch-forward + 'word-search-forward 'word-search-backward)) + (isearch-regexp + (if isearch-forward + 're-search-forward 're-search-backward)) + (t + (if isearch-forward 'search-forward 'search-backward))) + isearch-string nil t)) + ;; Clear RETRY unless we matched some invisible text + ;; and we aren't supposed to do that. + (if (or (eq search-invisible t) + (not isearch-success) + (bobp) (eobp) + (= (match-beginning 0) (match-end 0)) + (not (isearch-range-invisible + (match-beginning 0) (match-end 0)))) + (setq retry nil))) (setq isearch-just-started nil) - (if isearch-success - (setq isearch-other-end - (if isearch-forward (match-beginning 0) (match-end 0))))) - - (quit (setq unread-command-event (character-to-event (quit-char))) + (when isearch-success + (setq isearch-other-end + (if isearch-forward (match-beginning 0) (match-end 0))) + (and isearch-hide-immediately + (isearch-restore-invisible-extents (match-beginning 0) + (match-end 0))))) + + (quit (setq unread-command-events (nconc unread-command-events + (character-to-event (quit-char)))) (setq isearch-success nil)) - (invalid-regexp + (invalid-regexp (setq isearch-invalid-regexp (car (cdr lossage))) + (setq isearch-within-brackets (string-match "\\`Unmatched \\[" + isearch-invalid-regexp)) (if (string-match "\\`Premature \\|\\`Unmatched \\|\\`Invalid " isearch-invalid-regexp) - (setq isearch-invalid-regexp (gettext "incomplete input"))))) + (setq isearch-invalid-regexp (gettext "incomplete input")))) + (error + ;; stack overflow in regexp search. + (setq isearch-invalid-regexp (car (cdr lossage))))) (if isearch-success nil @@ -1548,59 +1708,79 @@ currently matches the search-string.") (ding nil 'isearch-failed)) (goto-char (nth 2 (car isearch-cmds))))) -;;;================================================= -;; This is called from incremental-search -;; if the first input character is the exit character. - -;; We store the search string in `isearch-string' -;; which has been bound already by `isearch-search' -;; so that, when we exit, it is copied into `search-last-string'. - +;; Replaced with isearch-edit-string. ;(defun nonincremental-search (forward regexp) -; ;; This may be broken. Anyway, it is replaced by the isearch-edit-string. -; ;; Missing features: word search option, command history. -; (setq isearch-forward forward -; isearch-regexp regexp) -; (let (char function -; inhibit-quit -; (cursor-in-echo-area t)) -; ;; Prompt assuming not word search, -; (setq isearch-message -; (if isearch-regexp -; (if isearch-forward "Regexp search: " -; "Regexp search backward: ") -; (if isearch-forward "Search: " "Search backward: "))) -; (message "%s" isearch-message) -; ;; Read 1 char and switch to word search if it is ^W. -; (setq char (read-char)) -; (if (eq char search-yank-word-char) -; (setq isearch-message (if isearch-forward "Word search: " -; "Word search backward: ")) -; ;; Otherwise let that 1 char be part of the search string. -; (setq unread-command-event (character-to-event char)) -; ) -; (setq function -; (if (eq char search-yank-word-char) -; (if isearch-forward 'word-search-forward 'word-search-backward) -; (if isearch-regexp -; (if isearch-forward 're-search-forward 're-search-backward) -; (if isearch-forward 'search-forward 'search-backward)))) -; ;; Read the search string with corrected prompt. -; (setq isearch-string (read-string isearch-message isearch-string)) -; ;; Empty means use default. -; (if (= 0 (length isearch-string)) -; (setq isearch-string search-last-string) -; ;; Set last search string now so it is set even if we fail. -; (setq search-last-string isearch-string)) -; ;; Since we used the minibuffer, we should be available for redo. -; (setq command-history -; (cons (list function isearch-string) command-history)) -; ;; Go ahead and search. -; (if search-caps-disable-folding -; (setq isearch-case-fold-search -; (no-upper-case-p isearch-string isearch-regexp))) -; (let ((case-fold-search isearch-case-fold-search)) -; (funcall function isearch-string)))) +;... + +(defun isearch-unhide-extent (extent) + ;; Store the values for the `invisible' and `intangible' + ;; properties, and then set them to nil. This way the text hidden + ;; by this extent becomes visible. + (put extent 'isearch-invisible (get extent 'invisible)) + (put extent 'isearch-intangible (get extent 'intangible)) + (put extent 'invisible nil) + (put extent 'intangible nil)) + +(defun isearch-range-invisible (beg end) + "Return t if all the text from BEG to END is invisible. +Before that, if search-invisible is `open', unhide the extents with an +`isearch-open-invisible' property." + ;; isearch-search uses this to skip the extents that are invisible, + ;; but don't have `isearch-open-invisible' set. It is unclear + ;; what's supposed to happen if only a part of [BEG, END) overlaps + ;; the extent. + (let (to-be-unhidden) + (if (map-extents + (lambda (extent ignored) + (if (and (<= (extent-start-position extent) beg) + (>= (extent-end-position extent) end)) + ;; All of the region is covered by the extent. + (if (and (eq search-invisible 'open) + (get extent 'isearch-open-invisible)) + (progn + (push extent to-be-unhidden) + nil) ; keep mapping + ;; We can't or won't unhide this extent, so we must + ;; skip the whole match. We return from map-extents + ;; immediately. + t) + ;; Else, keep looking. + nil)) + nil beg end nil 'all-extents-closed 'invisible) + ;; The whole match must be skipped. Signal it by returning t + ;; to the caller. + t + ;; If any extents need to be unhidden, unhide them. + (mapc #'isearch-unhide-extent to-be-unhidden) + ;; Will leave this assert for some time, to catch bugs. + (assert (null (intersection to-be-unhidden isearch-unhidden-extents))) + (setq isearch-unhidden-extents (nconc to-be-unhidden + isearch-unhidden-extents)) + nil))) + +(defun isearch-restore-extent (extent) + (put extent 'invisible (get extent 'isearch-invisible)) + (put extent 'intangible (get extent 'isearch-intangible)) + (remprop extent 'isearch-invisible) + (remprop extent 'isearch-intangible)) + +;; FSF calls this function `isearch-clean-overlays'. +(defun isearch-restore-invisible-extents (beg end) + (cond + ((null beg) + ;; Delete all -- this is called at the end of isearch. + (mapc #'isearch-restore-extent isearch-unhidden-extents) + (setq isearch-unhidden-extents nil)) + (t + ;; Extents that do not overlap the match area can be safely + ;; restored to their hidden state. + (setq isearch-unhidden-extents + (delete-if (lambda (extent) + (unless (extent-in-region-p extent beg end + 'all-extents-closed) + (isearch-restore-extent extent) + t)) + isearch-unhidden-extents))))) (defun isearch-no-upper-case-p (string) "Return t if there are no upper case chars in string. @@ -1611,6 +1791,18 @@ have special meaning in a regexp." (not (string-match "\\(^\\|[^\\]\\)[A-Z]" string)))) (make-obsolete 'isearch-no-upper-case-p 'no-upper-case-p) +;; Portability functions to support various Emacs versions. + +(defun isearch-char-to-string (c) + (if (eventp c) + (make-string 1 (event-to-character c nil nil t)) + (make-string 1 c))) + +;(defun isearch-text-char-description (c) +; (isearch-char-to-string c)) + +(define-function 'isearch-text-char-description 'text-char-description) + ;; Used by etags.el and info.el (defmacro with-caps-disable-folding (string &rest body) "\ Eval BODY with `case-fold-search' let to nil if STRING contains @@ -1624,4 +1816,204 @@ uppercase letters and `search-caps-disable-folding' is t." (put 'with-caps-disable-folding 'lisp-indent-function 1) (put 'with-caps-disable-folding 'edebug-form-spec '(form body)) + +;;;======================================================== +;;; Advanced highlighting + +;; When active, *every* visible match for the current search string is +;; highlighted: the current one using the normal isearch match color +;; and all the others using the `isearch-secondary' face. The extra +;; highlighting makes it easier to anticipate where the cursor will +;; land each time you press C-s or C-r to repeat a pending search. +;; Only the matches visible at any point are highlighted -- when you +;; move through the buffer, the highlighting is readjusted. + +;; This is based on ideas from Bob Glickstein's `ishl' package. It +;; has been merged with XEmacs by Darryl Okahata, and then completely +;; rewritten by Hrvoje Niksic. + +;; The code makes the following assumptions about the rest of this +;; file, so be careful when modifying it. + +;; * `isearch-highlight-all-update' should get called when the search +;; string changes, or when the search advances. This is done from +;; `isearch-update'. +;; * `isearch-highlight-all-cleanup' should get called when the search +;; is done. This is performed in `isearch-done'. +;; * `isearch-string' is expected to contain the current search string +;; as entered by the user. +;; * `isearch-opoint' is expected to contain the location where the +;; current search began. +;; * the type of the current search is expected to be given by +;; `isearch-word' and `isearch-regexp'. +;; * the variable `isearch-invalid-regexp' is expected to be true iff +;; `isearch-string' is an invalid regexp. + +(defcustom isearch-highlight-all-matches search-highlight + "*Non-nil means highlight all visible matches." + :type 'boolean + :group 'isearch) + +;; We can't create this face here, as isearch.el is preloaded. +;; #### Think up a better name for this! +;(defface isearch-secondary '((t (:foreground "red3"))) +; "Face to use for highlighting all matches." +; :group 'isearch) + +(defvar isearch-highlight-extents nil) +(defvar isearch-window-start nil) +(defvar isearch-window-end nil) +;; We compare isearch-string and isearch-case-fold-search to saved +;; values for better efficiency. +(defvar isearch-highlight-last-string nil) +(defvar isearch-highlight-last-case-fold-search nil) +(defvar isearch-highlight-last-regexp nil) + +(defun isearch-delete-extents-in-range (start end) + ;; Delete all highlighting extents that overlap [START, END). + (setq isearch-highlight-extents + (delete-if (lambda (extent) + (when (extent-in-region-p extent start end) + (delete-extent extent) + t)) + isearch-highlight-extents))) + +(defun isearch-highlight-all-cleanup () + ;; Stop lazily highlighting and remove extra highlighting from + ;; buffer. + (mapc #'delete-extent isearch-highlight-extents) + (setq isearch-highlight-extents nil) + (setq isearch-highlight-all-start nil + isearch-window-end nil + isearch-highlight-last-string nil)) + +(defun isearch-highlight-all-update () + ;; Update the highlighting if necessary. This needs to check if the + ;; search string has changed, or if the window has changed position + ;; in the buffer. + (let ((need-start-over nil)) + ;; NB: we don't check for isearch-success because if the point is + ;; after the last match, the search can be unsuccessful, and yet + ;; there are things to highlight. + (cond ((not isearch-highlight-all-matches)) + ((or (equal isearch-string "") + isearch-invalid-regexp) + (isearch-highlight-all-cleanup)) + ((not (eq isearch-case-fold-search + isearch-highlight-last-case-fold-search)) + ;; This case is usually caused by search string being + ;; changed, which would be caught below, but it can also be + ;; tripped using isearch-toggle-case-fold. + (setq need-start-over t)) + ((not (eq isearch-regexp isearch-highlight-last-regexp)) + ;; Ditto for isearch-toggle-regexp. + (setq need-start-over t)) + ((equal isearch-string isearch-highlight-last-string) + ;; The search string is the same. We need to do something + ;; if our position has changed. + + ;; It would be nice if we didn't have to do this; however, + ;; window-start doesn't support a GUARANTEE flag, so we must + ;; force redisplay to get the correct valye for start and end + ;; of window. + (sit-for 0) + + ;; Check whether our location has changed. + (let ((start (window-start)) + (end (min (window-end) (point-max)))) + (cond ((and (= start isearch-window-start) + (= end isearch-window-end)) + ;; Our position is unchanged -- do nothing. + ) + ((and (> start isearch-window-start) + (> end isearch-window-end) + (<= start isearch-window-end)) + ;; We've migrated downward, but we overlap the old + ;; region. Delete the old non-overlapping extents + ;; and fill in the rest. + (isearch-delete-extents-in-range isearch-window-start start) + (isearch-highlightify-region isearch-window-end end) + (setq isearch-window-start start + isearch-window-end end)) + ((and (<= start isearch-window-start) + (<= end isearch-window-end) + (> end isearch-window-start)) + ;; We've migrated upward, but we overlap the old + ;; region. Delete the old non-overlapping extents + ;; and fill in the rest. + (isearch-delete-extents-in-range + end isearch-window-end) + (isearch-highlightify-region start isearch-window-start) + (setq isearch-window-start start + isearch-window-end end)) + (t + ;; The regions don't overlap, or they overlap in a + ;; weird way. + (setq need-start-over t))))) + (t + ;; The search string has changed. + + ;; If more input is pending, don't start over because + ;; starting over forces redisplay, and that slows down + ;; typing. + (unless (input-pending-p) + (setq need-start-over t)))) + (when need-start-over + ;; Force redisplay before removing the old extents, in order to + ;; avoid flicker. + (sit-for 0) + (isearch-highlight-all-cleanup) + (setq isearch-window-start (window-start) + isearch-window-end (min (window-end) (point-max))) + (isearch-highlightify-region isearch-window-start isearch-window-end)) + + (setq isearch-highlight-last-string isearch-string + isearch-highlight-last-case-fold-search isearch-case-fold-search + isearch-highlight-last-regexp isearch-regexp))) + +(defun isearch-highlight-advance (string forwardp) + ;; Search ahead for the next or previous match. This is the same as + ;; isearch-search, but without the extra baggage. Maybe it should + ;; be in a separate function. + (let ((case-fold-search isearch-case-fold-search)) + (funcall (cond (isearch-word (if forwardp + 'word-search-forward + 'word-search-backward)) + (isearch-regexp (if forwardp + 're-search-forward + 're-search-backward)) + (t (if forwardp + 'search-forward + 'search-backward))) + string nil t))) + +(defun isearch-highlightify-region (start end) + ;; Highlight all occurrences of isearch-string between START and + ;; END. To do this right, we have to search forward as long as + ;; there are matches that overlap [START, END), and then search + ;; backward the same way. + (save-excursion + (goto-char isearch-opoint) + (let ((lastpoint (point))) + (while (and (isearch-highlight-advance isearch-string t) + (/= lastpoint (point)) + (< (match-beginning 0) end)) + (let ((extent (make-extent (match-beginning 0) + (match-end 0)))) + (set-extent-priority extent (1+ mouse-highlight-priority)) + (put extent 'face 'isearch-secondary) + (push extent isearch-highlight-extents)) + (setq lastpoint (point)))) + (goto-char isearch-opoint) + (let ((lastpoint (point))) + (while (and (isearch-highlight-advance isearch-string nil) + (/= lastpoint (point)) + (>= (match-end 0) start)) + (let ((extent (make-extent (match-beginning 0) + (match-end 0)))) + (set-extent-priority extent (1+ mouse-highlight-priority)) + (put extent 'face 'isearch-secondary) + (push extent isearch-highlight-extents)) + (setq lastpoint (point)))))) + ;;; isearch-mode.el ends here diff --git a/lisp/iso8859-1.el b/lisp/iso8859-1.el index 50bd40a..dbfe12f 100644 --- a/lisp/iso8859-1.el +++ b/lisp/iso8859-1.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1992, 1997 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Created: 19-aug-92 ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped diff --git a/lisp/itimer.el b/lisp/itimer.el index aab95e4..32f93ff 100644 --- a/lisp/itimer.el +++ b/lisp/itimer.el @@ -20,6 +20,8 @@ (provide 'itimer) +(require 'lisp-float-type) + ;; `itimer' feature means Emacs-Lisp programmers get: ;; itimerp ;; itimer-live-p @@ -46,7 +48,7 @@ ;; ;; See the doc strings of these functions for more information. -(defvar itimer-version "1.07" +(defvar itimer-version "1.08" "Version number of the itimer package.") (defvar itimer-list nil @@ -62,7 +64,7 @@ is not being used to drive the system.") (defvar itimer-timer-last-wakeup nil "The time the timer driver function last ran.") -(defvar itimer-short-interval (if (featurep 'lisp-float-type) 1e-3 1) +(defvar itimer-short-interval 1e-3 "Interval used for scheduling an event a very short time in the future. Used internally to make the scheduler wake up early. Unit is seconds.") @@ -159,7 +161,7 @@ This is a macro." ;; Functions to access and modify itimer attributes. (defun itimerp (obj) - "Return t if OBJ is an itimer." + "Return non-nil if OBJ is an itimer." (and (consp obj) (eq (length obj) 8))) (defun itimer-live-p (obj) @@ -181,7 +183,7 @@ Itimers started with `start-itimer' are automatically active." (defun itimer-restart (itimer) "Return the value to which ITIMER will be set at restart. -Return nil if this itimer doesn't restart." +The value nil is returned if this itimer isn't set to restart." (check-itimer itimer) (nth 2 itimer)) @@ -194,8 +196,8 @@ This function is called each time ITIMER expires." (defun itimer-is-idle (itimer) "Return non-nil if ITIMER is an idle timer. Normal timers expire after a set interval. Idle timers expire -only after Emacs has been idle for a specific interval. -``Idle'' means no command events occur within the interval." +only after Emacs has been idle for a specific interval. ``Idle'' +means no command events have occurred within the interval." (check-itimer itimer) (nth 4 itimer)) @@ -208,7 +210,7 @@ The arguments themselves are retrievable with `itimer-function-arguments'." (defun itimer-function-arguments (itimer) "Return the function arguments of ITIMER as a list. -ITIMER's function is called with these argument each time ITIMER expires." +ITIMER's function is called with these arguments each time ITIMER expires." (check-itimer itimer) (nth 6 itimer)) @@ -302,7 +304,7 @@ minibuffer as initial user input." (get-itimer (completing-read prompt itimer-list nil 'confirm initial-input))) (defun delete-itimer (itimer) - "Delete ITIMER. ITIMER may be an itimer or the name of one." + "Deletes ITIMER. ITIMER may be an itimer or the name of one." (check-itimer-coerce-string itimer) (setq itimer-list (delq itimer itimer-list))) @@ -327,13 +329,13 @@ VALUE is the number of seconds until this itimer expires. must be an integer. Optional fourth arg RESTART non-nil means that this itimer should be restarted automatically after its function is called. Normally an itimer - is deleted at expiration after its function has returned. - If non-nil, RESTART should be a number indicating the value at which - the itimer should be set at restart time. + is deleted at expiration after its function has returned. + If non-nil RESTART should be a number indicating the value at which the + itimer should be set at restart time. Optional fifth arg IS-IDLE specifies if this is an idle timer. Normal timers expire after a set interval. Idle timers expire - only after Emacs has been idle for specific interval. - ``Idle'' means no command events occur within the interval. + only after Emacs has been idle for specific interval. ``Idle'' + means no command events have occurred within the interval. Returns the newly created itimer." (interactive (list (completing-read "Start itimer: " itimer-list) @@ -717,7 +719,12 @@ x start a new itimer (inhibit-quit nil) ;; for FSF Emacs timer.el emulation under XEmacs. ;; eldoc expect this to be done, apparently. - (this-command nil)) + (this-command nil) + ;; bind these variables so that the + ;; itimer function can't screw with + ;; them. + last-event-time next-wakeup + itimer itimers time-elapsed) (if (itimer-uses-arguments current-itimer) (apply (itimer-function current-itimer) (itimer-function-arguments current-itimer)) @@ -837,11 +844,9 @@ x start a new itimer secs (+ secs 65536)) (setq carry 0)) (setq 65536-secs (- (nth 0 t1) (nth 0 t2) carry)) - ;; loses for interval larger than the maximum signed Lisp integer. - ;; can't really be helped. - (+ (* 65536-secs 65536) + (+ (* 65536-secs 65536.0) secs - (/ usecs (if (featurep 'lisp-float-type) 1e6 1000000))))) + (/ usecs 1000000.0)))) (defun itimer-timer-driver (&rest ignored) ;; inhibit quit because if the user quits at an inopportune diff --git a/lisp/ldap.el b/lisp/ldap.el index 4006514..a0eaddf 100644 --- a/lisp/ldap.el +++ b/lisp/ldap.el @@ -5,7 +5,7 @@ ;; Author: Oscar Figueiredo ;; Maintainer: Oscar Figueiredo ;; Created: Jan 1998 -;; Version: $Revision: 1.7.2.3 $ +;; Version: $Revision: 1.7.2.6 $ ;; Keywords: help comm ;; This file is part of XEmacs @@ -155,9 +155,7 @@ Valid properties include: :type 'symbol :group 'ldap) -(defcustom ldap-coding-system (if (featurep 'mule) - 'utf-8 - nil) +(defcustom ldap-coding-system nil "*Coding system of LDAP string values. LDAP v3 specifies the coding system of strings to be UTF-8. Mule support is needed for this." @@ -395,10 +393,12 @@ This table is built from RFC2252 Section 5 and RFC2256 Section 5") (error "Invalid country string: %s" str))) (defun ldap-decode-string (str) - (decode-coding-string str ldap-coding-system)) + (if (fboundp 'decode-coding-string) + (decode-coding-string str ldap-coding-system))) (defun ldap-encode-string (str) - (encode-coding-string str ldap-coding-system)) + (if (fboundp 'encode-coding-string) + (encode-coding-string str ldap-coding-system))) (defun ldap-decode-address (str) (mapconcat 'ldap-decode-string diff --git a/lisp/lisp-mnt.el b/lisp/lisp-mnt.el index 76feeb2..ab1aa09 100644 --- a/lisp/lisp-mnt.el +++ b/lisp/lisp-mnt.el @@ -6,7 +6,7 @@ ;; Maintainer: Eric S. Raymond ;; Created: 14 Jul 1992 ;; Keywords: docs, maint -;; X-Modified-by: Bob Weiner , 4/14/95, to support +;; X-Modified-by: Bob Weiner , 4/14/95, to support ;; InfoDock headers. ;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out! diff --git a/lisp/lisp-mode.el b/lisp/lisp-mode.el index e5e97ec..fee10bd 100644 --- a/lisp/lisp-mode.el +++ b/lisp/lisp-mode.el @@ -290,6 +290,8 @@ if that value is non-nil." (lisp-mode-variables nil) (run-hooks 'emacs-lisp-mode-hook)) +(put 'emacs-lisp-mode 'font-lock-lisp-like t) + (defvar lisp-mode-map () "Keymap for ordinary Lisp mode. All commands in `shared-lisp-mode-map' are inherited by this map.") diff --git a/lisp/make-docfile.el b/lisp/make-docfile.el index e6c0cf8..3b77495 100644 --- a/lisp/make-docfile.el +++ b/lisp/make-docfile.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc. ;; Author: Unknown -;; Maintainer: Steven L Baur +;; Maintainer: Steven L Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index b284749..0750bc8 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -990,7 +990,7 @@ Adds `Load .emacs' button to menubar when starting up with -q." ;; by Stig@hackvan.com (cond - (init-file-user nil) + (load-user-init-file-p nil) ((file-exists-p (expand-file-name ".emacs" "~")) (add-menu-button nil ["Load .emacs" @@ -1108,7 +1108,7 @@ returns a whole bunch of info about a buffer." 'sort-buffers-menu-by-mode-then-alphabetically "*If non-nil, a function to sort the list of buffers in the buffers menu. It will be passed two arguments (two buffers to compare) and should return -T if the first is \"less\" than the second. One possible value is +t if the first is \"less\" than the second. One possible value is `sort-buffers-menu-alphabetically'; another is `sort-buffers-menu-by-mode-then-alphabetically'." :type '(choice (const :tag "None" nil) diff --git a/lisp/minibuf.el b/lisp/minibuf.el index 0061576..7b83a3c 100644 --- a/lisp/minibuf.el +++ b/lisp/minibuf.el @@ -344,7 +344,8 @@ minibuffer history if its length is less than that value." keymap readp history - abbrev-table) + abbrev-table + default) "Read a string from the minibuffer, prompting with string PROMPT. If optional second arg INITIAL-CONTENTS is non-nil, it is a string to be inserted into the minibuffer before reading input. @@ -366,6 +367,8 @@ Fifth arg HISTORY, if non-nil, specifies a history list Positions are counted starting from 1 at the beginning of the list. Sixth arg ABBREV-TABLE, if non-nil, becomes the value of `local-abbrev-table' in the minibuffer. +Seventh arg DEFAULT, if non-nil, will be returned when user enters + an empty string. See also the variable completion-highlight-first-word-only for control over completion display." @@ -490,8 +493,13 @@ See also the variable completion-highlight-first-word-only for control over (let* ((val (progn (set-buffer buffer) (if minibuffer-exit-hook (run-hooks 'minibuffer-exit-hook)) - (buffer-string))) - (histval val) + (if (and (eq (char-after (point-min)) nil) + default) + default + (buffer-string)))) + (histval (if (and default (string= val "")) + default + val)) (err nil)) (if readp (condition-case e @@ -784,7 +792,9 @@ Completion ignores case if the ambient value of minibuffer-local-completion-map minibuffer-local-must-match-map) nil - history)) + history + nil + default)) (if (and (string= ret "") default) default @@ -1434,7 +1444,8 @@ only existing buffer names are allowed." result) (while (progn (setq result (completing-read prompt alist nil require-match - nil 'buffer-history)) + nil 'buffer-history + (if default (buffer-name default)))) (cond ((not (equal result "")) nil) ((not require-match) @@ -2116,9 +2127,15 @@ On mswindows devices, this uses `mswindows-color-list'." (defun read-coding-system (prompt &optional default-coding-system) "Read a coding-system (or nil) from the minibuffer. Prompting with string PROMPT. -If the user enters null input, return second argument DEFAULT-CODING-SYSTEM." +If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. +DEFAULT-CODING-SYSTEM can be a string, symbol, or coding-system object." (intern (completing-read prompt obarray 'find-coding-system t nil nil - default-coding-system))) + (cond ((symbolp default-coding-system) + (symbol-name default-coding-system)) + ((coding-system-p default-coding-system) + (symbol-name (coding-system-name default-coding-system))) + (t + default-coding-system))))) (defun read-non-nil-coding-system (prompt) "Read a non-nil coding-system from the minibuffer. diff --git a/lisp/modeline.el b/lisp/modeline.el index 5311486..ea16c56 100644 --- a/lisp/modeline.el +++ b/lisp/modeline.el @@ -595,13 +595,14 @@ Normally nil in most modes, since there is no process to display.") (purecopy " ") 'global-mode-string (purecopy " %[(") - (cons modeline-minor-mode-extent (list "" 'mode-name 'minor-mode-alist)) - (cons modeline-narrowed-extent "%n") + (cons modeline-minor-mode-extent + (list (purecopy "") 'mode-name 'minor-mode-alist)) + (cons modeline-narrowed-extent (purecopy "%n")) 'modeline-process (purecopy ")%]----") - (purecopy '(line-number-mode "L%l--")) - (purecopy '(column-number-mode "C%c--")) - (purecopy '(-3 . "%p")) + (list 'line-number-mode (purecopy "L%l--")) + (list 'column-number-mode (purecopy "C%c--")) + (cons -3 (purecopy "%p")) (purecopy "-%-"))) ;;; Added for XEmacs 20.3. Provide wrapper for vc since it may not always be diff --git a/lisp/mouse.el b/lisp/mouse.el index 54dafc7..4a0a22c 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -84,10 +84,13 @@ If set to `symbol', double-click will always attempt to highlight a "Function that is called upon by `mouse-yank' to actually insert text.") (defun mouse-consolidated-yank () - "Insert the current selection or, if there is none under X insert the X cutbuffer. -A mark is pushed, so that the inserted text lies between point and mark." + "Insert the current selection or, if there is none under X insert +the X cutbuffer. A mark is pushed, so that the inserted text lies +between point and mark." (interactive) - (if (not (console-on-window-system-p)) + (if (and (not (console-on-window-system-p)) + (and (featurep 'gpm) + (not gpm-minor-mode))) (yank) (push-mark) (if (region-active-p) @@ -225,9 +228,10 @@ This functions has to be improved. Currently it is just a (working) test." (if (click-inside-extent-p event zmacs-region-extent) ;; okay, this is a drag (cond ((featurep 'offix) - (offix-start-drag-region event - (extent-start-position zmacs-region-extent) - (extent-end-position zmacs-region-extent))) + (offix-start-drag-region + event + (extent-start-position zmacs-region-extent) + (extent-end-position zmacs-region-extent))) ((featurep 'cde) ;; should also work with CDE (cde-start-drag-region event diff --git a/lisp/mule/mule-category.el b/lisp/mule/mule-category.el index deb9efc..31bc242 100644 --- a/lisp/mule/mule-category.el +++ b/lisp/mule/mule-category.el @@ -29,7 +29,7 @@ ;; type of char table. Some function names / arguments should be ;; parallel with syntax tables. -;; Written by Ben Wing . The initialization code +;; Written by Ben Wing . The initialization code ;; at the end of this file comes from Mule. ;; Some bugfixes by Jareth Hein diff --git a/lisp/mule/mule-ccl.el b/lisp/mule/mule-ccl.el index b0c44cd..ae0a188 100644 --- a/lisp/mule/mule-ccl.el +++ b/lisp/mule/mule-ccl.el @@ -299,7 +299,7 @@ ;;;###autoload (defun ccl-program-p (obj) - "T if OBJECT is a valid CCL compiled code." + "Return t if OBJECT is a valid CCL compiled code." (and (vectorp obj) (let ((i 0) (len (length obj)) (flag t)) (if (> len 1) diff --git a/lisp/mule/mule-charset.el b/lisp/mule/mule-charset.el index 92fab64..e32e075 100644 --- a/lisp/mule/mule-charset.el +++ b/lisp/mule/mule-charset.el @@ -268,10 +268,10 @@ DESCRIPTION (string) is the description string of the charset." cyrillic-iso8859-5 greek-iso8859-7 thai-tis620 - japanese-jisx0208-1990 japanese-jisx0208 japanese-jisx0208-1978 japanese-jisx0212 + japanese-jisx0208-1990 chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3 @@ -292,6 +292,27 @@ DESCRIPTION (string) is the description string of the charset." ethiopic ucs-bmp arabic-iso8859-6 + mojikyo-pj-1 + mojikyo-pj-2 + mojikyo-pj-3 + mojikyo-pj-4 + mojikyo-pj-5 + mojikyo-pj-6 + mojikyo-pj-7 + mojikyo-pj-8 + mojikyo-pj-9 + mojikyo-pj-10 + mojikyo-pj-11 + mojikyo-pj-12 + mojikyo-pj-13 + mojikyo-pj-14 + mojikyo-pj-15 + mojikyo-pj-16 + mojikyo-pj-17 + mojikyo-pj-18 + mojikyo-pj-19 + mojikyo-pj-20 + mojikyo-pj-21 ideograph-daikanwa))) ;;; mule-charset.el ends here diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index 332e7f8..ea10c61 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -787,6 +787,8 @@ The return value is a string." (input-method (completing-read prompt input-method-alist nil t nil 'input-method-history default))) + (if (and input-method (symbolp input-method)) + (setq input-method (symbol-name input-method))) (if (> (length input-method) 0) input-method (if inhibit-null diff --git a/lisp/mule/mule-help.el b/lisp/mule/mule-help.el index dd51dc7..e889207 100644 --- a/lisp/mule/mule-help.el +++ b/lisp/mule/mule-help.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997 by Free Software Foundation, Inc. -;; Author: SL Baur +;; Author: SL Baur ;; Keywords: help, internal, mule ;; This file is part of XEmacs. diff --git a/lisp/mule/mule-x-init.el b/lisp/mule/mule-x-init.el index 8bb351c..b67f7e7 100644 --- a/lisp/mule/mule-x-init.el +++ b/lisp/mule/mule-x-init.el @@ -1,6 +1,6 @@ ;;; mule-x-init.el --- initialization code for X Windows under MULE ;; Copyright (C) 1994 Free Software Foundation, Inc. -;; Copyright (C) 1996 Ben Wing +;; Copyright (C) 1996 Ben Wing ;; Author: various ;; Keywords: mule X11 diff --git a/lisp/obsolete.el b/lisp/obsolete.el index e71fa7a..4dc0fe5 100644 --- a/lisp/obsolete.el +++ b/lisp/obsolete.el @@ -171,6 +171,10 @@ If you want to change the locations where XEmacs looks for info files, set Info-directory-list.") (make-obsolete-variable 'Info-default-directory-list 'Info-directory-list) +(defvar init-file-user nil + "This used to be the name of the user whose init file was read at startup.") +(make-obsolete-variable 'init-file-user 'load-user-init-file-p) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; hooks (make-compatible-variable 'lisp-indent-hook 'lisp-indent-function) @@ -242,6 +246,11 @@ set Info-directory-list.") (define-compatible-function-alias 'byte-code-function-p 'compiled-function-p) ;FSFmacs +(define-obsolete-function-alias 'isearch-yank-x-selection + 'isearch-yank-selection) +(define-obsolete-function-alias 'isearch-yank-x-clipboard + 'isearch-yank-clipboard) + ;; too bad there's not a way to check for aref, assq, and nconc ;; being called on the values of functions known to return keymaps, ;; or known to return vectors of events instead of strings... diff --git a/lisp/package-admin.el b/lisp/package-admin.el index d5603ec..aff6025 100644 --- a/lisp/package-admin.el +++ b/lisp/package-admin.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997 by Free Software Foundation, Inc. -;; Author: SL Baur +;; Author: SL Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/package-get.el b/lisp/package-get.el index 64bdc3e..ab3654e 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -180,37 +180,56 @@ order until the package is found. As a special case, `site-name' can be (list :tag "Remote" host-name directory) )) :group 'package-get) +;;;###autoload (defcustom package-get-download-sites '( ;; North America ("xemacs.org" "ftp.xemacs.org" "pub/xemacs/packages") - ("cso.uiuc.edu" "ftp.cso.uiuc.edu" "pub/packages/xemacs/packages") + ("crc.ca (Canada)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") + ("ualberta.ca (Canada)" "sunsite.ualberta.ca" "pub/Mirror/xemacs/packages") + ("uiuc.edu (United States)" "uiarchive.uiuc.edu" "pub/packages/xemacs/packages") + ("unc.edu (United States)" "metalab.unc.edu" "pub/packages/editors/xemacs/packages") + ("utk.edu (United States)" "ftp.sunsite.utk.edu" "pub/xemacs/packages") ;; South America - ("unicamp.br" "ftp.unicamp.br" "pub/xemacs/packages") + ("unicamp.br (Brazil)" "ftp.unicamp.br" "pub/xemacs/packages") ;; Europe - ("sunsite.cnlab-switch.ch" "sunsite.cnlab-switch.ch" "mirror/xemacs/packages") - ("tu-darmstadt.de" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") - ("sunsite.auc.dk" "sunsite.auc.dk" "pub/emacs/xemacs/packages") - ("pasteur.fr" "ftp.pasteur.fr" "pub/computing/xemacs/packages") - ("cenatls.cena.dgac.fr" "ftp.cenatls.cena.dgac.fr" "pub/Emacs/xemacs/packages") - ("kfki.hu" "ftp.kfki.hu" "pub/packages/xemacs/packages") - ("uniroma2.it" "ftp.uniroma2.it" "unix/misc/dist/XEMACS/packages") - ("icm.edu.pl" "ftp.icm.edu.pl" "pub/unix/editors/xemacs/packages") - ("sunet.se" "ftp.sunet.se" "pub/gnu/xemacs/packages") - ("doc.ic.ac.uk" "sunsite.doc.ic.ac.uk" "packages/xemacs/packages") - ("srcc.msu.su" "ftp1.srcc.msu.su" "mirror/ftp.xemacs.org/packages") + ("tuwien.ac.at (Austria)" "gd.tuwien.ac.at" "editors/xemacs/packages") + ("auc.dk (Denmark)" "sunsite.auc.dk" "pub/emacs/xemacs/packages") + ("doc.ic.ac.uk (England)" "sunsite.doc.ic.ac.uk" "packages/xemacs/packages") + ("funet.fi (Finland)" "ftp.funet.fi" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") + ("cenatls.cena.dgac.fr (France)" "ftp.cenatls.cena.dgac.fr" "Emacs/xemacs/packages") + ("pasteur.fr (France)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") + ("tu-darmstadt.de (Germany)" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") + ("kfki.hu (Hungary)" "ftp.kfki.hu" "pub/packages/xemacs/packages") + ("eunet.ie (Ireland)" "ftp.eunet.ie" "mirrors/ftp.xemacs.org/pub/xemacs/packages") + ("uniroma2.it (Italy)" "ftp.uniroma2.it" "unix/misc/dist/XEMACS/packages") + ("uio.no (Norway)" "sunsite.uio.no" "pub/xemacs/packages") + ("icm.edu.pl (Poland)" "ftp.icm.edu.pl" "pub/unix/editors/xemacs/packages") + ("srcc.msu.su (Russia)" "ftp.srcc.msu.su" "mirror/ftp.xemacs.org/packages") + ("sunet.se (Sweden)" "ftp.sunet.se" "pub/gnu/xemacs/packages") + ("cnlab-switch.ch (Switzerland)" "sunsite.cnlab-switch.ch" "mirror/xemacs/packages") ;; Asia - ("usyd.edu.au" "ftp.usyd.edu.au" "pub/Xemacs/packages") - ("netlab.is.tsukuba.ac.jp" "ftp.netlab.is.tsukuba.ac.jp" "pub/GNU/xemacs/packages") - ("jaist.ac.jp" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") - ("ring.aist.go.jp" "ring.aist.go.jp" "pub/text/xemacs/packages") - ("ring.asahi-net.or.jp" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") - ("SunSITE.sut.ac.jp" "SunSITE.sut.ac.jp" "pub/archives/packages/xemacs/packages") - ("dti.ad.jp" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") - ("kreonet.re.kr" "ftp.kreonet.re.kr" "pub/tools/emacs/xemacs/packages") + ("aist.go.jp (Japan)" "ring.aist.go.jp" "pub/text/xemacs/packages") + ("asahi-net.or.jp (Japan)" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") + ("dti.ad.jp (Japan)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") + ("jaist.ac.jp (Japan)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") + ("nucba.ac.jp (Japan)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") + ("sut.ac.jp (Japan)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages") + ("tsukuba.ac.jp (Japan)" "ftp.netlab.is.tsukuba.ac.jp" "pub/GNU/xemacs/packages") + ("kreonet.re.kr (Korea)" "ftp.kreonet.re.kr" "pub/tools/emacs/xemacs/packages") + ("nctu.edu.tw (Taiwan)" "coda.nctu.edu.tw" "Editors/xemacs/packages") + + ;; Africa + ("sun.ac.za (South Africa)" "ftp.sun.ac.za" "xemacs/packages") + + ;; Middle East + ("isu.net.sa (Saudi Arabia)" "ftp.isu.net.sa" "pub/mirrors/ftp.xemacs.org/packages") + + ;; Australia + ("aarnet.edu.au (Australia)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ) "*List of remote sites available for downloading packages. List format is '(site-description site-name directory-on-site). @@ -224,7 +243,7 @@ variable actually used to specify package download sites." :group 'package-get) (defcustom package-get-remove-copy t - "*After copying and installing a package, if this is T, then remove the + "*After copying and installing a package, if this is t, then remove the copy. Otherwise, keep it around." :type 'boolean :group 'package-get) @@ -239,6 +258,10 @@ with respect to `package-get-remote', or an absolute path." :type 'file :group 'package-get) +(defvar package-get-user-index-filename + (paths-construct-path (list user-init-directory package-get-base-filename)) + "Name for the user-specific location of the package-get database file.") + (defcustom package-get-always-update nil "*If Non-nil always make sure we are using the latest package index (base). Otherwise respect the `force-current' argument of `package-get-require-base'." @@ -261,11 +284,16 @@ When nil, updates which are not PGP signed are allowed without confirmation." (defun package-get-download-menu () "Build the `Add Download Site' menu." (mapcar (lambda (site) - (vector (car site) - `(package-ui-add-site (quote ,(cdr site))) - :style 'toggle :selected - `(member (quote ,(cdr site)) package-get-remote))) - package-get-download-sites)) + (vector (car site) + `(if (member (quote ,(cdr site)) + package-get-remote) + (setq package-get-remote + (delete (quote ,(cdr site)) package-get-remote)) + (package-ui-add-site (quote ,(cdr site)))) + :style 'toggle + :selected `(member (quote ,(cdr site)) + package-get-remote))) + package-get-download-sites)) ;;;###autoload (defun package-get-require-base (&optional force-current) @@ -328,23 +356,21 @@ If NO-REMOTE is non-nil never search remote locations." "Locate the package-get index file. Do not return remote paths if NO-REMOTE is non-nil." (or (package-get-locate-file package-get-base-filename t no-remote) - (locate-data-file package-get-base-filename) - package-get-base-filename)) - -(defvar package-get-user-package-location user-init-directory) + (if (file-exists-p package-get-user-index-filename) + package-get-user-index-filename))) (defun package-get-maybe-save-index (filename) "Offer to save the current buffer as the local package index file, if different." (let ((location (package-get-locate-index-file t))) (unless (and filename (equal filename location)) - (unless (equal (md5 (current-buffer)) - (with-temp-buffer - (insert-file-contents location) - (md5 (current-buffer)))) - (unless (file-writable-p location) - (setq location (expand-file-name package-get-base-filename - (expand-file-name "etc/" package-get-user-package-location)))) + (unless (and location + (equal (md5 (current-buffer)) + (with-temp-buffer + (insert-file-contents-literally location) + (md5 (current-buffer))))) + (unless (and location (file-writable-p location)) + (setq location package-get-user-index-filename)) (when (y-or-n-p (concat "Update package index in" location "? ")) (write-file location)))))) @@ -1001,6 +1027,10 @@ lead to Emacs accessing remote sites." (package-get-info-prop (car this-package) 'version)))) (setq this-package (cdr this-package))))) (setq packages (cdr packages))) + (when (interactive-p) + (if found + (message "%S" found) + (message "No appropriate package found"))) found)) ;; diff --git a/lisp/package-info.el b/lisp/package-info.el index 4a9aa2c..e3be100 100644 --- a/lisp/package-info.el +++ b/lisp/package-info.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1998 by Free Software Foundation, Inc. -;; Author: SL Baur +;; Author: SL Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/packages.el b/lisp/packages.el index 03d001b..2d1eaf3 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -2,8 +2,8 @@ ;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Author: Steven L Baur -;; Maintainer: Steven L Baur +;; Author: Steven L Baur +;; Maintainer: Steven L Baur ;; Keywords: internal, lisp, dumped ;; This file is part of XEmacs. @@ -84,17 +84,8 @@ (defvar last-package-load-path nil "Load path for packages last in the load path.") -(defvar package-locations - (list - (list (paths-construct-path '("~" ".xemacs" "mule-packages")) - 'early #'(lambda () (featurep 'mule))) - (list (paths-construct-path '("~" ".xemacs" "xemacs-packages")) - 'early #'(lambda () t)) - (list "site-packages" 'late #'(lambda () t)) - (list "infodock-packages" 'late #'(lambda () (featurep 'infodock))) - (list "mule-packages" 'late #'(lambda () (featurep 'mule))) - (list "xemacs-packages" 'late #'(lambda () t))) - "Locations of the various package directories. +(defun packages-compute-package-locations (user-init-directory) + "Compute locations of the various package directories. This is a list each of whose elements describes one directory. A directory description is a three-element list. The first element is either an absolute path or a subdirectory @@ -103,7 +94,16 @@ The second component is one of the symbols EARLY, LATE, LAST, depending on the load-path segment the hierarchy is supposed to show up in. The third component is a thunk which, if it returns NIL, causes -the directory to be ignored.") +the directory to be ignored." + (list + (list (paths-construct-path (list user-init-directory "mule-packages")) + 'early #'(lambda () (featurep 'mule))) + (list (paths-construct-path (list user-init-directory "xemacs-packages")) + 'early #'(lambda () t)) + (list "site-packages" 'late #'(lambda () t)) + (list "infodock-packages" 'late #'(lambda () (featurep 'infodock))) + (list "mule-packages" 'late #'(lambda () (featurep 'mule))) + (list "xemacs-packages" 'late #'(lambda () t)))) (defun package-get-key-1 (info key) "Locate keyword `key' in list." @@ -429,7 +429,7 @@ DEFAULT is a default list of packages." (setq package-locations (cdr package-locations))) packages))) -(defun packages-find-packages (roots) +(defun packages-find-packages (roots package-locations) "Find the packages." (let ((envvar-value (getenv "EMACSPACKAGEPATH"))) (if envvar-value @@ -494,7 +494,7 @@ PACKAGES is a list of package directories." (defun packages-load-package-lisps (package-load-path base) "Load all Lisp files of a certain name along a load path. BASE is the base name of the files." - (mapc #'(lambda (dir) + (mapcar #'(lambda (dir) (let ((file-name (expand-file-name base dir))) (condition-case error (load file-name t t) @@ -513,7 +513,7 @@ BASE is the base name of the files." (defun packages-handle-package-dumped-lisps (handle package-load-path) "Load dumped-lisp.el files along a load path. Call HANDLE on each file off definitions of PACKAGE-LISP there." - (mapc #'(lambda (dir) + (mapcar #'(lambda (dir) (let ((file-name (expand-file-name "dumped-lisp.el" dir))) (if (file-exists-p file-name) (let (package-lisp @@ -522,7 +522,7 @@ Call HANDLE on each file off definitions of PACKAGE-LISP there." (load file-name) ;; dumped-lisp.el could have set this ... (if package-lisp - (mapc #'(lambda (base) + (mapcar #'(lambda (base) (funcall handle base)) package-lisp)))))) package-load-path)) diff --git a/lisp/process.el b/lisp/process.el index 749f99d..0e3d478 100644 --- a/lisp/process.el +++ b/lisp/process.el @@ -299,7 +299,7 @@ Third arg is program file name. It is searched for as in the shell. Remaining arguments are strings to give program as arguments." (apply 'start-process-internal name buffer program program-args)) -(defun open-network-stream (name buffer host service) +(defun open-network-stream (name buffer host service &optional protocol) "Open a TCP connection for a service to a host. Returns a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. @@ -312,8 +312,18 @@ BUFFER is the buffer (or buffer-name) to associate with the process. with any buffer Third arg is name of the host to connect to, or its IP address. Fourth arg SERVICE is name of the service desired, or an integer - specifying a port number to connect to." - (open-network-stream-internal name buffer host service)) + specifying a port number to connect to. +Fifth argument PROTOCOL is a network protocol. Currently 'tcp + (Transmission Control Protocol) and 'udp (User Datagram Protocol) are + supported. When omitted, 'tcp is assumed. + +Ouput via `process-send-string' and input via buffer or filter (see +`set-process-filter') are stream-oriented. That means UDP datagrams are +not guaranteed to be sent and received in discrete packets. (But small +datagrams around 500 bytes that are not truncated by `process-send-string' +are usually fine.) Note further that UDP protocol does not guard against +lost packets." + (open-network-stream-internal name buffer host service protocol)) (defun shell-quote-argument (argument) "Quote an argument for passing as argument to an inferior shell." diff --git a/lisp/rect.el b/lisp/rect.el index 737e1d3..757a254 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -26,7 +26,7 @@ ;;; Commentary: -;; This package provides the operations on rectangles that are ocumented +;; This package provides the operations on rectangles that are documented ;; in the XEmacs Reference Manual. ;; ### NOTE: this file has been almost completely rewritten by Didier Verna @@ -86,10 +86,10 @@ Point is at the end of the segment of this line within the rectangle." ;; The replacement for `operate-on-rectangle' -- dv (defun apply-on-rectangle (function start end &rest args) - "Call FUNCTION for each line of rectangle with corners at START, END. + "Call FUNCTION for each line of rectangle with corners at START and END. FUNCTION is called with two arguments: the start and end columns of the -rectangle, plus ARGS extra arguments. Point is at the beginning of line when -the function is called." +rectangle, plus ARGS extra arguments. Point is at the beginning of line +when the function is called." (let (startcol startpt endcol endpt) (save-excursion (goto-char start) @@ -134,17 +134,17 @@ the function is called." ;;;###autoload (defvar killed-rectangle nil - "Rectangle for yank-rectangle to insert.") + "Rectangle for `yank-rectangle' to insert.") ;;;###autoload (defun kill-rectangle (start end &optional fill) - "Delete the rectangle with corners at point and mark (START and END when -called from a program) and save it as the last killed one. You might prefer to -use `delete-extract-rectangle' from a program. + "Delete the region-rectangle and save it as the last killed one. +You might prefer to use `delete-extract-rectangle' from a program. -With a prefix (or a FILL) argument, also fill lines where nothing has to be +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be deleted." - (interactive "r\nP") + (interactive "*r\nP") (when buffer-read-only (setq killed-rectangle (extract-rectangle start end)) (barf-if-buffer-read-only)) @@ -152,14 +152,14 @@ deleted." ;;;###autoload (defun delete-rectangle (start end &optional fill) - "Delete (don't save) text in rectangle with corners at point and mark (START -and END when called from a program). The same range of columns is deleted in -each line starting with the line where the region begins and ending with the -line where the region ends. + "Delete the text in the region-rectangle without saving it. +The same range of columns is deleted in each line starting with the line +where the region begins and ending with the line where the region ends. -With a prefix (or a FILL) argument, also fill lines where nothing has to be +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be deleted." - (interactive "r\nP") + (interactive "*r\nP") (apply-on-rectangle 'delete-rectangle-line start end fill)) (defun delete-rectangle-line (startcol endcol fill) @@ -240,7 +240,7 @@ as a list of strings, one for each line of the rectangle." ;;;###autoload (defun yank-rectangle () "Yank the last killed rectangle with upper left corner at point." - (interactive) + (interactive "*") (insert-rectangle killed-rectangle)) ;; This function is untouched --dv @@ -268,14 +268,12 @@ and point is at the lower right corner." ;;;###autoload (defun open-rectangle (start end &optional fill) - "Blank out rectangle with corners at point and mark (START and END when -called from a program), shifting text right. The text previously in the region -is not overwritten by the blanks, but instead winds up to the right of the -rectangle. + "Blank out the region-rectangle, shifting text right. -With a prefix (or a FILL) argument, fill with blanks even if there is no text +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, fill with blanks even if there is no text on the right side of the rectangle." - (interactive "r\nP") + (interactive "*r\nP") (apply-on-rectangle 'open-rectangle-line start end fill) (goto-char start)) @@ -289,11 +287,12 @@ on the right side of the rectangle." ;;;###autoload (defun string-rectangle (start end string) - "Insert STRING on each line of the rectangle with corners at point and mark -(START and END when called from a program), shifting text right. The left edge -of the rectangle specifies the column for insertion. This command does not -delete or overwrite any existing text." - (interactive "r\nsString rectangle: ") + "Insert STRING on each line of the region-rectangle, shifting text right. +The left edge of the rectangle specifies the column for insertion. This +command does not delete or overwrite any existing text. + +When called from a program, the rectangle's corners are START and END." + (interactive "*r\nsString rectangle: ") (apply-on-rectangle 'string-rectangle-line start end string)) (defun string-rectangle-line (startcol endcol string) @@ -302,13 +301,13 @@ delete or overwrite any existing text." ;;;###autoload (defun clear-rectangle (start end &optional fill) - "Blank out the rectangle with corners at point and mark (START and END when -called from a program). The text previously in the region is overwritten with -blanks. + "Blank out the region-rectangle. +The text previously in the region is overwritten with blanks. -With a prefix (or a FILL) argument, also fill with blanks the parts of the +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill with blanks the parts of the rectangle which were empty." - (interactive "r\nP") + (interactive "*r\nP") (apply-on-rectangle 'clear-rectangle-line start end fill)) (defun clear-rectangle-line (startcol endcol fill) diff --git a/lisp/replace.el b/lisp/replace.el index 3b6165e..71b8054 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -679,6 +679,7 @@ When searching for a match, this function use `replace-search-function' and `rep ;; Loop finding occurrences that perhaps should be replaced. (while (and keep-going (not (eobp)) + (or (null limit) (< (point) limit)) (let ((case-fold-search qr-case-fold-search)) (funcall search-function search-string limit)) ;; If the search string matches immediately after @@ -688,7 +689,8 @@ When searching for a match, this function use `replace-search-function' and `rep (and regexp-flag (eq lastrepl (match-beginning 0)) (not match-again))) - (if (eobp) + (if (or (eobp) + (and limit (>= (point) limit))) nil ;; Don't replace the null string ;; right after end of previous replacement. diff --git a/lisp/select.el b/lisp/select.el index f21d440..ef3072e 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -66,10 +66,17 @@ set the clipboard.") (defun yank-clipboard-selection () "Insert the current Clipboard selection at point." (interactive "*") - (case (device-type (selected-device)) - (x (x-yank-clipboard-selection)) - (mswindows (mswindows-paste-clipboard)) - (otherwise nil))) + (when (console-on-window-system-p) + (setq last-command nil) + (setq this-command 'yank) ; so that yank-pop works. + (let ((clip (get-clipboard))) + (or clip (error "there is no clipboard selection")) + (push-mark) + (insert clip)))) + +(defun get-clipboard () + "Return text pasted to the clipboard." + (get-selection 'CLIPBOARD)) (define-device-method get-cutbuffer "Return the value of one of the cut buffers. @@ -178,13 +185,18 @@ Interactively, the text of the region is used as the selection value." (setq lost-selection-hooks 'dehilight-selection) (defun own-clipboard (string) - "Paste the given string to the X Clipboard." + "Paste the given string to the window system Clipboard." (own-selection string 'CLIPBOARD)) (defun disown-selection (&optional secondary-p) "Assuming we own the selection, disown it. With an argument, discard the secondary selection instead of the primary selection." - (disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) + (disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY)) + (when (and selection-sets-clipboard + (or (not secondary-p) + (eq secondary-p 'PRIMARY) + (eq secondary-p 'CLIPBOARD))) + (disown-selection-internal 'CLIPBOARD))) ;; from x-init.el ;; selections and active regions diff --git a/lisp/setup-paths.el b/lisp/setup-paths.el index b275db2..a01dff3 100644 --- a/lisp/setup-paths.el +++ b/lisp/setup-paths.el @@ -42,10 +42,14 @@ "Depth of load-path searches in core Lisp paths.") (defvar paths-default-info-directories - (list (paths-construct-path '("usr" "local" "info") - (char-to-string directory-sep-char)) - (paths-construct-path '("usr" "info") - (char-to-string directory-sep-char))) + (mapcar (function + (lambda (dirlist) + (paths-construct-path + dirlist (char-to-string directory-sep-char)))) + '(("usr" "local" "info") + ("usr" "info") + ("usr" "local" "share" "info") + ("usr" "share" "info"))) "Directories appended to the end of the info path by default.") (defun paths-find-site-lisp-directory (roots) @@ -69,7 +73,7 @@ (defun paths-find-module-directory (roots) "Find the main modules directory of the XEmacs hierarchy." (paths-find-architecture-directory roots "modules" - configure-module-directory)) + nil configure-module-directory)) (defun paths-construct-load-path (roots early-package-load-path late-package-load-path last-package-load-path @@ -137,7 +141,7 @@ (defun paths-find-doc-directory (roots) "Find the documentation directory." - (paths-find-architecture-directory roots "lib-src")) + (paths-find-architecture-directory roots "lib-src" nil configure-doc-directory)) (defun paths-find-lock-directory (roots) "Find the lock directory." @@ -158,7 +162,8 @@ (defun paths-find-exec-directory (roots) "Find the binary directory." - (paths-find-architecture-directory roots "lib-src" configure-exec-directory)) + (paths-find-architecture-directory roots "lib-src" + nil configure-exec-directory)) (defun paths-construct-exec-path (roots exec-directory early-packages late-packages last-packages) diff --git a/lisp/simple.el b/lisp/simple.el index cbba11c..6fa92b3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -62,7 +62,7 @@ ;; Mule-2.3, and could probably use some feature additions (like additional wrap ;; styles, etc) -;; 97/06/11 Steve Baur (steve@altair.xemacs.org) Convert use of +;; 97/06/11 Steve Baur (steve@xemacs.org) Convert use of ;; (preceding|following)-char to char-(after|before). ;;; Code: @@ -670,7 +670,7 @@ BUFFER defaults to the current buffer." cnt))) ;;; Modified by Bob Weiner, 8/24/95, to print narrowed line number also. -;;; Expanded by Bob Weiner, Altrasoft, on 02/12/1997 +;;; Expanded by Bob Weiner, BeOpen, on 02/12/1997 (defun what-line () "Print the following variants of the line number of point: Region line - displayed line within the active region @@ -2656,20 +2656,23 @@ indicating whether soft newlines should be inserted.") (if (save-excursion (skip-chars-backward " \t") (= (point) fill-point)) + ;; 1999-09-17 hniksic: turn off Kinsoku until + ;; it's debugged. + (indent-new-comment-line) ;; 97/3/14 jhod: Kinsoku processing - ;(indent-new-comment-line) - (let ((spacep (memq (char-before (point)) '(?\ ?\t)))) - (funcall comment-line-break-function) - ;; if user type space explicitly, leave SPC - ;; even if there is no WAN. - (if spacep - (save-excursion - (goto-char fill-point) - ;; put SPC except that there is SPC - ;; already or there is sentence end. - (or (memq (char-after (point)) '(?\ ?\t)) - (fill-end-of-sentence-p) - (insert ?\ ))))) +; ;(indent-new-comment-line) +; (let ((spacep (memq (char-before (point)) '(?\ ?\t)))) +; (funcall comment-line-break-function) +; ;; if user type space explicitly, leave SPC +; ;; even if there is no WAN. +; (if spacep +; (save-excursion +; (goto-char fill-point) +; ;; put SPC except that there is SPC +; ;; already or there is sentence end. +; (or (memq (char-after (point)) '(?\ ?\t)) +; (fill-end-of-sentence-p) +; (insert ?\ ))))) (save-excursion (goto-char fill-point) (funcall comment-line-break-function))) diff --git a/lisp/site-load.el b/lisp/site-load.el index 0fa8cc4..f54ed0d 100644 --- a/lisp/site-load.el +++ b/lisp/site-load.el @@ -1,7 +1,7 @@ ;;; site-load.el --- Template file for site-wide XEmacs customization ;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Author: Steven L. Baur +;; Author: Steven L. Baur ;; Keywords: internal ;; This file is part of XEmacs. diff --git a/lisp/startup.el b/lisp/startup.el index 32deb92..68ce03a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -104,18 +104,21 @@ the user's init file.") (defvar emacs-roots nil "List of plausible roots of the XEmacs hierarchy.") -(defvar init-file-user nil - "Identity of user whose `.emacs' file is or was read. -The value is nil if no init file is being used; otherwise, it may be either -the null string, meaning that the init file was taken from the user that -originally logged in, or it may be a string containing a user's name. +(defvar user-init-directory-base ".xemacs" + "Base of directory where user-installed init files may go.") -In either of the latter cases, `(concat \"~\" init-file-user \"/\")' -evaluates to the name of the directory in which the `.emacs' file was -searched for. +(defvar user-init-file-base (cond + ((eq system-type 'ms-dos) "_emacs") + (t ".emacs")) + "Base of init file.") -Setting `init-file-user' does not prevent Emacs from loading -`site-start.el'. The only way to do that is to use `--no-site-file'.") +(defvar user-init-directory + (file-name-as-directory + (paths-construct-path (list "~" user-init-directory-base))) + "Directory where user-installed init files may go.") + +(defvar load-user-init-file-p t + "Non-nil if XEmacs should load the user's init file.") ;; #### called `site-run-file' in FSFmacs @@ -226,7 +229,11 @@ In addition, the") startup. Also implies `-vanilla'. -vanilla Equivalent to -q -no-site-file -no-early-packages. -q Same as -no-init-file. + -user-init-file Use as init file. + -user-init-directory use as init directory. -user Load user's init file instead of your own. + Equivalent to -user-init-file ~/.emacs + -user-init-directory ~/.xemacs/ -u Same as -user.\n") (let ((l command-switch-alist) (insert (lambda (&rest x) @@ -396,6 +403,7 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (if (null emacs-roots) (startup-find-roots-warning) (startup-setup-paths emacs-roots + user-init-directory inhibit-early-packages inhibit-site-lisp debug-paths)) @@ -496,12 +504,7 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") ;; (standard-display-european t) ;; (require 'iso-syntax))) - ;; Figure out which user's init file to load, - ;; either from the environment or from the options. - (setq init-file-user (if (noninteractive) nil (user-login-name))) - ;; If user has not done su, use current $HOME to find .emacs. - (and init-file-user (string= init-file-user (user-real-login-name)) - (setq init-file-user "")) + (setq load-user-init-file-p (not (noninteractive))) ;; Allow (at least) these arguments anywhere in the command line (let ((new-args nil) @@ -511,7 +514,7 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (cond ((or (string= arg "-q") (string= arg "-no-init-file")) - (setq init-file-user nil)) + (setq load-user-init-file-p nil)) ((string= arg "-no-site-file") (setq site-start-file nil)) ((or (string= arg "-no-early-packages") @@ -522,11 +525,21 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") ;; Some work on this one already done in emacs.c. (string= arg "-no-autoloads") (string= arg "--no-autoloads")) - (setq init-file-user nil + (setq load-user-init-file-p nil site-start-file nil)) + ((string= arg "-user-init-file") + (setq user-init-file (pop args))) + ((string= arg "-user-init-directory") + (setq user-init-directory (file-name-as-directory (pop args)))) ((or (string= arg "-u") - (string= arg "-user")) - (setq init-file-user (pop args))) + (string= arg "-user")) + (let* ((user (pop args)) + (home-user (concat "~" user))) + (setq user-init-file + (paths-construct-path (list home-user user-init-file-base))) + (setq user-init-directory + (file-name-as-directory + (paths-construct-path (list home-user user-init-directory-base)))))) ((string= arg "-debug-init") (setq init-file-debug t)) ((string= arg "-unmapped") @@ -538,7 +551,9 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (while args (push (pop args) new-args))) (t (push arg new-args)))) - + + (setq init-file-user (and load-user-init-file-p "")) + (nreverse new-args))) (defconst initial-scratch-message "\ @@ -623,43 +638,18 @@ If this is nil, no message will be displayed.") (setq term (substring term 0 hyphend)) (setq term nil)))))) -(defconst user-init-directory "/.xemacs/" - "Directory where user-installed packages may go.") -(define-obsolete-variable-alias - 'emacs-user-extension-dir - 'user-init-directory) - -(defun load-user-init-file (init-file-user) +(defun load-user-init-file () "This function actually reads the init file, .emacs." - (when init-file-user -;; purge references to init.el and options.el -;; convert these to use paths-construct-path for eventual migration to init.el -;; needs to be converted when idiom for constructing "~user" paths is created -; (setq user-init-file -; (paths-construct-path (list (concat "~" init-file-user) -; user-init-directory -; "init.el"))) -; (unless (file-exists-p (expand-file-name user-init-file)) - (setq user-init-file - (paths-construct-path (list (concat "~" init-file-user) - (cond - ((eq system-type 'ms-dos) "_emacs") - (t ".emacs"))))) -; ) - (load user-init-file t t t) -;; This should not be loaded since custom stuff currently goes into .emacs -; (let ((default-custom-file -; (paths-construct-path (list (concat "~" init-file-user) -; user-init-directory -; "options.el"))) -; (when (string= custom-file default-custom-file) -; (load default-custom-file t t))) - (unless inhibit-default-init - (let ((inhibit-startup-message nil)) - ;; Users are supposed to be told their rights. - ;; (Plus how to get help and how to undo.) - ;; Don't you dare turn this off for anyone except yourself. - (load "default" t t))))) + (if (not user-init-file) + (setq user-init-file + (paths-construct-path (list "~" user-init-file-base)))) + (load user-init-file t t t) + (unless inhibit-default-init + (let ((inhibit-startup-message nil)) + ;; Users are supposed to be told their rights. + ;; (Plus how to get help and how to undo.) + ;; Don't you dare turn this off for anyone except yourself. + (load "default" t t)))) ;;; Load user's init file and default ones. (defun load-init-file () @@ -680,12 +670,13 @@ If this is nil, no message will be displayed.") (debug-on-error-initial (if (eq init-file-debug t) 'startup init-file-debug))) (let ((debug-on-error debug-on-error-initial)) - (if init-file-debug + (if (and load-user-init-file-p init-file-debug) ;; Do this without a condition-case if the user wants to debug. - (load-user-init-file init-file-user) + (load-user-init-file) (condition-case error (progn - (load-user-init-file init-file-user) + (if load-user-init-file-p + (load-user-init-file)) (setq init-file-had-error nil)) (error (message "Error in init file: %s" (error-message-string error)) @@ -1081,7 +1072,8 @@ Copyright (C) 1995-1996 Ben Wing\n")) ;; don't let /tmp_mnt/... get into the load-path or exec-path. (abbreviate-file-name invocation-directory))) -(defun startup-setup-paths (roots &optional +(defun startup-setup-paths (roots user-init-directory + &optional inhibit-early-packages inhibit-site-lisp debug-paths) "Setup all the various paths. @@ -1096,7 +1088,9 @@ It's idempotent, so call this as often as you like!" early)) (setq late-packages late) (setq last-packages last)) - (packages-find-packages roots)) + (packages-find-packages + roots + (packages-compute-package-locations user-init-directory))) (setq early-package-load-path (packages-find-package-load-path early-packages)) (setq late-package-load-path (packages-find-package-load-path late-packages)) diff --git a/lisp/subr.el b/lisp/subr.el index 4c3977a..0bbb855 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -223,6 +223,12 @@ other hooks, such as major mode hooks, can do the job." The value of this variable may be buffer-local. The buffer about to be killed is current when this hook is run.") +;; called by Frecord_buffer() +(defvar record-buffer-hook nil + "Function or functions to be called when a buffer is recorded. +The value of this variable may be buffer-local. +The buffer being recorded is passed as an argument to the hook.") + ;; in C in FSFmacs (defvar kill-emacs-hook nil "Function or functions to be called when `kill-emacs' is called, @@ -239,6 +245,22 @@ just before emacs is actually killed.") (define-function 'rplaca 'setcar) (define-function 'rplacd 'setcdr) +(defun copy-symbol (symbol &optional copy-properties) + "Return a new uninterned symbol with the same name as SYMBOL. +If COPY-PROPERTIES is non-nil, the new symbol will have a copy of +SYMBOL's value, function, and property lists." + (let ((new (make-symbol (symbol-name symbol)))) + (when copy-properties + ;; This will not copy SYMBOL's chain of forwarding objects, but + ;; I think that's OK. Callers should not expect such magic to + ;; keep working in the copy in the first place. + (and (boundp symbol) + (set new (symbol-value symbol))) + (and (fboundp symbol) + (fset new (symbol-function symbol))) + (setplist new (copy-list (symbol-plist symbol)))) + new)) + ;;;; String functions. ;; XEmacs @@ -569,9 +591,6 @@ This function accepts any number of arguments, but ignores them." (interactive) nil) -(define-function 'mapc-internal 'mapc) -(make-obsolete 'mapc-internal 'mapc) - (define-function 'eval-in-buffer 'with-current-buffer) (make-obsolete 'eval-in-buffer 'with-current-buffer) @@ -632,13 +651,17 @@ If BUFFER is specified, the contents of that buffer are returned. The arguments OLD-END and OLD-BUFFER are supported for backward compatibility with pre-21.2 XEmacsen times when arguments to this function were (buffer-string &optional START END BUFFER)." - (if (or (null buffer) - (bufferp buffer) - (stringp buffer)) - ;; The new way - (buffer-substring nil nil buffer) - ;; The old way - (buffer-substring buffer old-end old-buffer))) + (cond + ((or (stringp buffer) (bufferp buffer)) + ;; Most definitely the new way. + (buffer-substring nil nil buffer)) + ((or (stringp old-buffer) (bufferp old-buffer) + (natnump buffer) (natnump old-end)) + ;; Definitely the old way. + (buffer-substring buffer old-end old-buffer)) + (t + ;; Probably the old way. + (buffer-substring buffer old-end old-buffer)))) ;; This was not present before. I think Jamie had some objections ;; to this, so I'm leaving this undefined for now. --ben diff --git a/lisp/symbols.el b/lisp/symbols.el index c965f6c..d359378 100644 --- a/lisp/symbols.el +++ b/lisp/symbols.el @@ -124,7 +124,7 @@ each of the handlers." (let ((event (apply getfun harg args))) (if (event-live-p event) nil - (setq event (allocate-event)) + (setq event (make-event)) (apply setfun harg event args)) (character-to-event value event))) diff --git a/lisp/text-props.el b/lisp/text-props.el index e08bbbc..0e1baeb 100644 --- a/lisp/text-props.el +++ b/lisp/text-props.el @@ -4,7 +4,7 @@ ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1995 Ben Wing. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, wp, faces, dumped diff --git a/lisp/very-early-lisp.el b/lisp/very-early-lisp.el index a6344c4..24ec4e3 100644 --- a/lisp/very-early-lisp.el +++ b/lisp/very-early-lisp.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1998 by Free Software Foundation, Inc. -;; Author: SL Baur +;; Author: SL Baur ;; Michael Sperber [Mr. Preprocessor] ;; Keywords: internal, dumped @@ -32,8 +32,8 @@ ;;; Code: -;;; Macros from Michael Sperber to replace read-time Lisp reader macros #-, #+ -;;; ####fixme duplicated in make-docfile.el and update-elc.el +;;; Intended replacement for read-time Lisp reader macros #-, #+ + (defmacro assemble-list (&rest components) "Assemble a list from COMPONENTS. This is a poor man's backquote: @@ -55,17 +55,17 @@ Otherwise, the component becomes an element of the list." "Insert STUFF as a list element if FEATURE is a loaded feature. This is intended for use as a component of ASSEMBLE-LIST." (list 'splice - (if (featurep feature) - (list 'list stuff) - '()))) + (list 'if (list 'featurep (list 'quote feature)) + (list 'list stuff) + '()))) (defmacro unless-feature (feature stuff) "Insert STUFF as a list element if FEATURE is NOT a loaded feature. This is intended for use as a component of ASSEMBLE-LIST." (list 'splice - (if (featurep feature) - '() - (list 'list stuff)))) + (list 'if (list 'featurep (list 'quote feature)) + '() + (list 'list stuff)))) (provide 'very-early-lisp) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index a21f19c..b8eb856 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Keywords: extensions ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ @@ -1935,16 +1935,11 @@ If END is omitted, it defaults to the length of LIST." (console-on-window-system-p)) (unless gui-glyphs (let* ((gui-button-shadow-thickness 1) - (gui (make-gui-button tag 'widget-gui-action widget))) - (setq - gui-glyphs - (list - (make-glyph `(,(nth 0 (aref gui 1)) [string :data ,text])) - (make-glyph `(,(nth 1 (aref gui 1)) [string :data ,text])) - (make-glyph `(,(nth 2 (aref gui 1)) [string :data ,text])))) + (gui (make-glyph + (make-gui-button tag 'widget-gui-action widget)))) + (setq gui-glyphs gui) (laxputf widget-push-button-cache tag gui-glyphs))) - (widget-glyph-insert-glyph - widget (nth 0 gui-glyphs) (nth 1 gui-glyphs) (nth 2 gui-glyphs))) + (widget-glyph-insert-glyph widget gui-glyphs)) (t (insert text))))) diff --git a/lisp/widget.el b/lisp/widget.el index 0586999..6f00faa 100644 --- a/lisp/widget.el +++ b/lisp/widget.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Keywords: help, extensions, faces, hypermedia, dumped ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ diff --git a/lisp/winnt.el b/lisp/winnt.el index 9ce0750..0dedb06 100644 --- a/lisp/winnt.el +++ b/lisp/winnt.el @@ -39,11 +39,14 @@ ;; #### Oh if we had an alist of shells and their command switches. (setq shell-command-switch "/c") -;; For appending suffixes to directories and files in shell completions. -(defun nt-shell-mode-hook () - (setq comint-completion-addsuffix '("\\" . " ") - comint-process-echoes t)) -(add-hook 'shell-mode-hook 'nt-shell-mode-hook) +;; For appending suffixes to directories and files in shell +;; completions. This screws up cygwin users so we leave it out for +;; now. Uncomment this if you only ever want to use cmd. + +;(defun nt-shell-mode-hook () +; (setq comint-completion-addsuffix '("\\" . " ") +; comint-process-echoes t)) +;(add-hook 'shell-mode-hook 'nt-shell-mode-hook) ;; Use ";" instead of ":" as a path separator (from files.el). (setq path-separator ";") diff --git a/lisp/x-compose.el b/lisp/x-compose.el index 1500277..40df8e6 100644 --- a/lisp/x-compose.el +++ b/lisp/x-compose.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Maintainer: XEmacs Development Team ;; Rewritten by Martin Buchholz far too many times. ;; @@ -73,7 +73,7 @@ ;; work, depending on what system and keyboard you are using. If it ;; doesn't, you'll have to read the man page for xmodmap. You might want ;; to get the "xkeycaps" program from -;; , +;; , ;; which is a graphical front end to xmodmap ;; that hides xmodmap's arcane syntax from you. diff --git a/lisp/x-faces.el b/lisp/x-faces.el index 46677cf..491d2c8 100644 --- a/lisp/x-faces.el +++ b/lisp/x-faces.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996 Ben Wing. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, internal, dumped diff --git a/lisp/x-font-menu.el b/lisp/x-font-menu.el index 8dffa39..54f4c66 100644 --- a/lisp/x-font-menu.el +++ b/lisp/x-font-menu.el @@ -4,7 +4,7 @@ ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. ;; Copyright (C) 1997 Sun Microsystems -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Restructured by: Jonathan Stigelman ;; Mule-ized by: Martin Buchholz ;; More restructuring for MS-Windows by Andy Piper diff --git a/lisp/x-iso8859-1.el b/lisp/x-iso8859-1.el index 38788ce..94457d4 100644 --- a/lisp/x-iso8859-1.el +++ b/lisp/x-iso8859-1.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Created: 15-jun-92 ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, internal, dumped diff --git a/lisp/x-select.el b/lisp/x-select.el index adfec7f..62ae9a8 100644 --- a/lisp/x-select.el +++ b/lisp/x-select.el @@ -50,6 +50,9 @@ 'select-make-extent-for-selection) (define-obsolete-function-alias 'x-cut-copy-clear-internal 'cut-copy-clear-internal) (define-obsolete-function-alias 'x-get-selection 'get-selection) +(define-obsolete-function-alias 'x-get-clipboard 'get-clipboard) +(define-obsolete-function-alias 'x-yank-clipboard-selection + 'yank-clipboard-selection) (define-obsolete-function-alias 'x-disown-selection-internal 'disown-selection-internal) @@ -57,10 +60,6 @@ "Return text selected from some X window." (get-selection 'SECONDARY)) -(defun x-get-clipboard () - "Return text pasted to the clipboard." - (get-selection 'CLIPBOARD)) - (defun x-own-secondary-selection (selection &optional type) "Make a secondary X Selection of the given argument. The argument may be a string or a cons of two markers (in which case the selection is considered to @@ -154,19 +153,6 @@ into Emacs." (x-store-cutbuffer-internal 'CUT_BUFFER0 string)))) -;;; Random utility functions - -(defun x-yank-clipboard-selection () - "Insert the current Clipboard selection at point." - (interactive "*") - (setq last-command nil) - (setq this-command 'yank) ; so that yank-pop works. - (let ((clip (x-get-clipboard))) - (or clip (error "there is no clipboard selection")) - (push-mark) - (insert clip))) - - ;FSFmacs (provide 'select) ;;; x-select.el ends here. diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 9761ceb..545f2c0 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,267 @@ +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-14 Andy Piper + + * xlwtabs.c (TabsResize): reset need_layout so that we don't go + into infloop death. + +1999-12-14 Andy Piper + + * xlwtabs.c (TabsSetValues): re-allocate GCs if font has changed. + +1999-12-13 Andy Piper + + * xlwtabs.c (TabsResize): We need to expose the tabs after + clearing the window they are in. + +1999-12-08 Andy Piper + + * xlwtabs.c: sync with Tabs 2.1. + +1999-12-07 Andy Piper + + * lwlib-Xlw.c (lw_lucid_widget_p): make sure we pick up the + clip-window as well. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-12-05 Andy Piper + + * xlwtabs.c: back up to previous rev to make syncing easier. Fix + gcc moans. + + * lwlib-Xaw.c (xaw_update_one_widget): use XtIsSubclass. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-26 Martin Buchholz + + * xlwtabs.c: Remove unused variables. Fix warnings. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-09-09 Andy Piper + + * xlwtabs.c: updated tabs widget from Ed Falk. + * xlwtabs.h: ditto. + * xlwtabsP.h: ditto. + +1999-09-22 Martin Buchholz + + * lwlib-internal.h: + * lwlib-utils.h: + Move declaration of destroy_all_children from lwlib-internal.h to + lwlib-utils.h, where it belongs. + +1999-09-21 Andy Piper + + * lwlib-Xm.c (xm_update_label): don't clobber pixmap type labels + with text. + +1999-09-22 Martin Buchholz + + * xlwtabs.c: Fix C++ compilability. + +1999-09-18 Andy Piper + + * xlwtabs.c: Put in tabs sync because clipping should fix useability + problems. + +1999-09-13 Andy Piper + + * xlwtabs.c: Back out tabs sync because of reported useability + problems. + +1999-09-09 Andy Piper + + * xlwtabs.c: updated tabs widget from Ed Falk. + * xlwtabs.h: ditto. + * xlwtabsP.h: ditto. + * xlwgcs.c: ditto. + * xlwgcs.h: ditto. + +1999-09-03 Martin Buchholz + + * xlwgauge.c: Ansify. + Include to get prototype for atoi(). + (GaugeSelect): Call GaugeExpose with the right number of args. + (GaugeLoseSel): Call GaugeExpose with the right number of args. + (GaugeConvert): This is a XtConvertSelectionProc, + so 5th parameter must be of type XtPointer, not XPointer. + (GaugeGetValue): This is a XtTimerCallbackProc, + so 2nd parameter must be of type XtIntervalId *, not XtIntervalId. + + +1999-09-01 Martin Buchholz + + * lwlib.c (free_widget_value_contents): Use proper type for cast. + + * xlwradio.c: Use function prototypes everywhere. + * xlwcheckbox.c: + * xlwradio.c: + * xlwradioP.h: Move declarations of non-static functions defined + in xlwradio.c into xlwradioP.h. + +1999-09-02 Andy Piper + + * xlwgcs.c: include xmu.h + +1999-09-01 Andy Piper + + * xlwgauge.c: rearrange headers yet again. + * xlwcheckbox.c: ditto. + * xlwradio.c: ditto. + * xlwtabs.c: ditto. + +1999-09-01 Andy Piper + + * xlwgauge.c: use xmu.h + * xlwcheckbox.c: ditto. + * xlwradio.c: ditto. + +1999-08-31 Andy Piper + + * xlwtabs.c: + * xlwgcs.c: + * xlwradio.c: + * xlwcheckbox.c: + * xlwgauge.c: Fix for losing systems without Xmu. + +1999-08-31 Andy Piper + + * lwlib-Xm.c (xm_update_one_widget): fix for AIX compiler lossage. + +1999-08-30 Andy Piper + + * lwlib.c (free_widget_value_contents): be more precise about + freeing user defined args. + + * lwlib-Xaw.c (xaw_update_one_widget): make sure we use val not + its contents for hierarchies one deep. + +1999-08-29 Andy Piper + + * xlwtabs.c: temporary fixes pending a new release. + * xlwtabsP.h: ditto. + + * lwlib-Xm.c (xm_update_one_widget): update user defined args. + (xm_create_label): set args after creation as well as before. + + * lwlib-Xlw.c (xlw_create_tab_control): orient tabs horizontally. + (xlw_update_tab_control): actually update the children rather than + the parent. + + * lwlib-Xaw.c (xaw_update_one_widget): update user defined args. + (xaw_create_label): set args after creation as well as before. + +1999-08-23 Andy Piper + + * lwlib-Xm.c (xm_update_label): don't concatenate value to itself. + + * lwlib-Xm.c (xm_create_label_field): new function for creating labels. + (xm_creation_table): use it. + + * lwlib-Xaw.c (xaw_create_label_field): new function for creating labels. + (xaw_creation_table): use it. + +1999-08-16 Andy Piper + + * lwlib.h: declare free_widget_value_tree. + + * lwlib.c (free_widget_value_tree): make non-static. + + * lwlib-Xm.c (xm_update_label): free val_string when updating. + +1999-08-04 Andy Piper + + * lwlib-Xm.c (mark_dead_instance_destroyed): change so that its + defined for widgets. + (xm_nosel_callback): ditto. + + * xlwtabsP.h: sync with 1.5. + + * xlwtabs.c: sync with 1.18. + +1999-07-28 Andy Piper + + * xlwtabs.c: new lucid tabs widget from Ed Falk. + * xlwtabs.h: ditto. + * xlwtabsP.h: ditto. + * xlwgcs.c: GC manipulation for tab widgets. + * xlwgcs.h: ditto. + + * xlwgauge.c: new athena gauge widget from Ed Falk. + * xlwgauge.h: ditto. + * xlwgaugeP.h: ditto. + + * xlwradio.c: new athena radio widget from Ed Falk. + * xlwradio.h: ditto. + * xlwradioP.h: ditto. + + * xlwcheckbox.c: new athena checkbox widget from Ed Falk. + * xlwcheckbox.h: ditto. + * xlwcheckboxP.h: ditto. + + * lwlib-utils.c (destroy_all_children): moved from lwlib-Xm.c. + + * lwlib-internal.h: declare destroy_all_children. + + * lwlib-config.c: add widget checks. + + * lwlib-Xm.h: declare xm_create_label; + + * lwlib-Xm.c (destroy_all_children): move to lwlib-utils.c. + (xm_update_label): enable for widgets. + (xm_update_one_widget): ditto. + (xm_create_button): rename in line with lwlib-Xaw.c + (xm_create_progress): ditto. + (xm_create_text_field): ditto. + (xm_create_combo_box): ditto. + (xm_create_label): new function. + (xm_creation_table): rename widget creation functions. + (xm_destroy_instance): enable for widgets. + (xm_generic_callback): ditto. + (xm_generic_callback): ditto. + + * lwlib-Xlw.c (xlw_tab_control_callback): new function. a special + callback that calls the correct function depending on what tab is + selected. + (xlw_create_tab_control): new function. + (build_tabs_in_widget): new function. puts tabs in a tab widget, + uses Xaw or Xm depending on how XEmacs was compiled. + (xlw_update_tab_control): update the resources for each + tab. optionally rebuild the contents of the tab widget. + (xlw_creation_table): add tab widget creation function. + (lw_lucid_widget_p): add tab widget. + (xlw_update_one_widget): ditto. + + * lwlib-Xaw.h: declare xaw_create_label; + + * lwlib-Xaw.c (lw_xaw_widget_p): add widgets classes. + (xaw_update_one_widget): ditto. + (xaw_update_one_value): add code from the Xm version. + (xaw_generic_callback): add Xm hack for setting command + states. beef up lookup of call data. + (xaw_create_button): new function. + (xaw_create_label): new function for use by tab widget. + (xaw_create_progress): new function. + (xaw_create_text_field): new function. + (xaw_creation_table): add new widget type creation functions. + + * Makefile.in.in: add dependencies for new lw widgets. + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released diff --git a/lwlib/Makefile.in.in b/lwlib/Makefile.in.in index 70be7f3..bd01fc8 100644 --- a/lwlib/Makefile.in.in +++ b/lwlib/Makefile.in.in @@ -95,11 +95,18 @@ CONFIG_H = ../src/config.h config.h ## Following correct as of 19980312 -lwlib-Xaw.o: $(CONFIG_H) lwlib-Xaw.h lwlib-internal.h lwlib.h xlwmenu.h -lwlib-Xlw.o: $(CONFIG_H) lwlib-Xlw.h lwlib-internal.h lwlib.h xlwmenu.h xlwscrollbar.h +lwlib-Xaw.o: $(CONFIG_H) lwlib-Xaw.h lwlib-internal.h lwlib.h xlwmenu.h xlwradio.h \ +xlwgauge.h xlwcheckbox.h +lwlib-Xlw.o: $(CONFIG_H) lwlib-Xlw.h lwlib-internal.h lwlib.h xlwmenu.h xlwscrollbar.h \ +xlwtabs.h xlwgcs.h lwlib-Xm.o: $(CONFIG_H) lwlib-Xm.h lwlib-internal.h lwlib-utils.h lwlib.h xlwmenu.h lwlib-config.o: $(CONFIG_H) lwlib.h xlwmenu.h lwlib-utils.o: $(CONFIG_H) lwlib-utils.h lwlib.o: $(CONFIG_H) lwlib-Xaw.h lwlib-Xlw.h lwlib-Xm.h lwlib-internal.h lwlib-utils.h lwlib.h xlwmenu.h xlwmenu.o: $(CONFIG_H) lwlib.h xlwmenu.h xlwmenuP.h xlwscrollbar.o: $(CONFIG_H) xlwscrollbar.h xlwscrollbarP.h +xlwtabs.o: $(CONFIG_H) xlwtabs.h xlwtabsP.h +xlwradio.o: $(CONFIG_H) xlwradio.h xlwradioP.h +xlwcheckbox.o: $(CONFIG_H) xlwcheckbox.h xlwcheckboxP.h +xlwgauge.o: $(CONFIG_H) xlwgauge.h xlwgaugeP.h +xlwgcs.o: $(CONFIG_H) xlwgcs.h diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index a0198bc..b19dd8c 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -41,7 +41,15 @@ Boston, MA 02111-1307, USA. */ #include #include #endif - +#ifdef LWLIB_WIDGETS_ATHENA +#include +#include "xlwradio.h" +#include "xlwcheckbox.h" +#include "xlwgauge.h" +#ifndef NEED_MOTIF +#include +#endif +#endif #include static void xaw_generic_callback (Widget, XtPointer, XtPointer); @@ -57,6 +65,14 @@ lw_xaw_widget_p (Widget widget) #ifdef LWLIB_DIALOGS_ATHENA || XtIsSubclass (widget, dialogWidgetClass) #endif +#ifdef LWLIB_WIDGETS_ATHENA + || XtIsSubclass (widget, labelWidgetClass) + || XtIsSubclass (widget, toggleWidgetClass) + || XtIsSubclass (widget, gaugeWidgetClass) +#if 0 + || XtIsSubclass (widget, textWidgetClass) +#endif +#endif ); } @@ -110,6 +126,9 @@ void xaw_update_one_widget (widget_instance *instance, Widget widget, widget_value *val, Boolean deep_p) { + if (val->nargs) + XtSetValues (widget, val->args, val->nargs); + if (0) ; #ifdef LWLIB_SCROLLBARS_ATHENA @@ -125,6 +144,16 @@ xaw_update_one_widget (widget_instance *instance, Widget widget, XtSetArg (al [0], XtNlabel, val->contents->value); XtSetValues (widget, al, 1); } +#endif /* LWLIB_DIALOGS_ATHENA */ +#ifdef LWLIB_WIDGETS_ATHENA + else if (XtClass (widget) == labelWidgetClass) + { + Arg al [1]; + XtSetArg (al [0], XtNlabel, val->value); + XtSetValues (widget, al, 1); + } +#endif /* LWLIB_WIDGETS_ATHENA */ +#if defined (LWLIB_DIALOGS_ATHENA) || defined (LWLIB_WIDGETS_ATHENA) else if (XtIsSubclass (widget, commandWidgetClass)) { Dimension bw = 0; @@ -154,6 +183,14 @@ xaw_update_one_widget (widget_instance *instance, Widget widget, XtRemoveAllCallbacks (widget, XtNcallback); XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance); +#ifdef LWLIB_WIDGETS_ATHENA + /* set the selected state */ + if (XtIsSubclass (widget, toggleWidgetClass)) + { + XtSetArg (al [0], XtNstate, val->selected); + XtSetValues (widget, al, 1); + } +#endif /* LWLIB_WIDGETS_ATHENA */ } #endif /* LWLIB_DIALOGS_ATHENA */ } @@ -162,9 +199,36 @@ void xaw_update_one_value (widget_instance *instance, Widget widget, widget_value *val) { - /* This function is not used by the scrollbars and those are the only - Athena widget implemented at the moment so do nothing. */ - return; +#ifdef LWLIB_WIDGETS_ATHENA + widget_value *old_wv; + + /* copy the call_data slot into the "return" widget_value */ + for (old_wv = instance->info->val->contents; old_wv; old_wv = old_wv->next) + if (!strcmp (val->name, old_wv->name)) + { + val->call_data = old_wv->call_data; + break; + } + + if (XtIsSubclass (widget, toggleWidgetClass)) + { + Arg al [1]; + XtSetArg (al [0], XtNstate, &val->selected); + XtGetValues (widget, al, 1); + val->edited = True; + } +#ifndef NEED_MOTIF + else if (XtIsSubclass (widget, asciiTextWidgetClass)) + { + Arg al [1]; + if (val->value) + free (val->value); + XtSetArg (al [0], XtNstring, &val->value); + XtGetValues (widget, al, 1); + val->edited = True; + } +#endif +#endif /* LWLIB_WIDGETS_ATHENA */ } void @@ -440,7 +504,21 @@ xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data) Widget instance_widget; LWLIB_ID id; XtPointer user_data; +#ifdef LWLIB_WIDGETS_ATHENA + /* We want the selected status to change only when we decide it + should change. Yuck but correct. */ + if (XtIsSubclass (widget, toggleWidgetClass)) + { + Boolean check; + Arg al [1]; + + XtSetArg (al [0], XtNstate, &check); + XtGetValues (widget, al, 1); + XtSetArg (al [0], XtNstate, !check); + XtSetValues (widget, al, 1); + } +#endif /* LWLIB_WIDGETS_ATHENA */ lw_internal_update_other_instances (widget, closure, call_data); if (! instance) @@ -464,17 +542,26 @@ xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data) #else /* Damn! Athena doesn't give us a way to hang our own data on the buttons, so we have to go find it... I guess this assumes that - all instances of a button have the same call data. */ + all instances of a button have the same call data. + + ... Which is a totally bogus assumption --andyp */ { - widget_value *val = instance->info->val->contents; - char *name = XtName (widget); - while (val) + widget_value *val = instance->info->val; + /* If the widget is a buffer/gutter widget then we already have + the one we are looking for, so don't try and descend the widget + tree. */ + if (val->contents) { - if (val->name && !strcmp (val->name, name)) - break; - val = val->next; + char *name = XtName (widget); + val = val->contents; + while (val) + { + if (val->name && !strcmp (val->name, name)) + break; + val = val->next; + } + if (! val) abort (); } - if (! val) abort (); user_data = val->call_data; } #endif @@ -614,12 +701,163 @@ xaw_create_horizontal_scrollbar (widget_instance *instance) } #endif /* LWLIB_SCROLLBARS_ATHENA */ +#ifdef LWLIB_WIDGETS_ATHENA +/* glyph widgets */ +static Widget +xaw_create_button (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget button = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + if (!val->call_data) + button = XtCreateManagedWidget (val->name, labelWidgetClass, + instance->parent, al, ac); + + else + { + if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE) + { + XtSetArg (al [ac], XtNstate, val->selected); ac++; + button = XtCreateManagedWidget + (val->name, + val->type == TOGGLE_TYPE ? checkboxWidgetClass : radioWidgetClass, + instance->parent, al, ac); + } + else + { + button = XtCreateManagedWidget (val->name, commandWidgetClass, + instance->parent, al, ac); + } + XtRemoveAllCallbacks (button, XtNcallback); + XtAddCallback (button, XtNcallback, xaw_generic_callback, (XtPointer)instance); + } + + XtManageChild (button); + + return button; +} + +static Widget +xaw_create_label_field (widget_instance *instance) +{ + return xaw_create_label (instance->parent, instance->info->val); +} + +Widget +xaw_create_label (Widget parent, widget_value* val) +{ + Arg al[20]; + int ac = 0; + Widget label = 0; + + XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + label = XtCreateManagedWidget (val->name, labelWidgetClass, + parent, al, ac); + + /* Do it again for arguments that have no effect until the widget is realized. */ + ac = 0; + lw_add_value_args_to_args (val, al, &ac); + XtSetValues (label, al, ac); + + return label; +} + +static Widget +xaw_create_progress (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget scale = 0; + widget_value* val = instance->info->val; + + if (!val->call_data) + { + XtSetArg (al [ac], XtNsensitive, False); ac++; + } + else + { + XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; + } + XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNorientation, XtorientHorizontal); ac++; + XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++; + XtSetArg (al [ac], XtNntics, (Cardinal)10);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + scale = XtCreateManagedWidget (val->name, gaugeWidgetClass, + instance->parent, al, ac); + /* add the callback */ + if (val->call_data) + XtAddCallback (scale, XtNgetValue, xaw_generic_callback, (XtPointer)instance); + + XtManageChild (scale); + + return scale; +} + +#ifndef NEED_MOTIF +static Widget +xaw_create_text_field (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget text = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XtNsensitive, val->enabled && val->call_data); ac++; + XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0); ac++; + XtSetArg (al [ac], XtNtype, XawAsciiString); ac++; + XtSetArg (al [ac], XtNeditType, XawtextEdit); ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + text = XtCreateManagedWidget (val->name, asciiTextWidgetClass, + instance->parent, al, ac); + XtManageChild (text); + + return text; +} +#endif +#endif /* LWLIB_WIDGETS_ATHENA */ + widget_creation_entry xaw_creation_table [] = { #ifdef LWLIB_SCROLLBARS_ATHENA - {"vertical-scrollbar", xaw_create_vertical_scrollbar}, - {"horizontal-scrollbar", xaw_create_horizontal_scrollbar}, + {"vertical-scrollbar", xaw_create_vertical_scrollbar }, + {"horizontal-scrollbar", xaw_create_horizontal_scrollbar }, +#endif +#ifdef LWLIB_WIDGETS_ATHENA + {"button", xaw_create_button }, + { "label", xaw_create_label_field }, +#ifndef NEED_MOTIF + {"text-field", xaw_create_text_field }, +#endif + {"progress", xaw_create_progress }, #endif {NULL, NULL} }; + diff --git a/lwlib/lwlib-Xaw.h b/lwlib/lwlib-Xaw.h index 70e72d4..67c71f9 100644 --- a/lwlib/lwlib-Xaw.h +++ b/lwlib/lwlib-Xaw.h @@ -8,6 +8,9 @@ extern widget_creation_entry xaw_creation_table []; Widget xaw_create_dialog (widget_instance* instance); +Widget +xaw_create_label (Widget parent, widget_value* val); + Boolean lw_xaw_widget_p (Widget widget); diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index 127403a..8063c7c 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -20,20 +20,35 @@ Boston, MA 02111-1307, USA. */ #include #include /* for abort () */ +#include /* for abort () */ #include #include "lwlib-Xlw.h" +#include "lwlib-utils.h" #include #include #include #include #include +#ifdef HAVE_WIDGETS +#include "../src/EmacsManager.h" +#endif #ifdef LWLIB_MENUBARS_LUCID #include "xlwmenu.h" #endif #ifdef LWLIB_SCROLLBARS_LUCID #include "xlwscrollbar.h" #endif +#ifdef LWLIB_TABS_LUCID +#ifdef NEED_MOTIF +#include "lwlib-Xm.h" +#endif +#ifdef NEED_ATHENA +#include "lwlib-Xaw.h" +#endif +#include "../src/xmu.h" +#include "xlwtabs.h" +#endif @@ -301,6 +316,172 @@ xlw_update_scrollbar (widget_instance *instance, Widget widget, #endif /* LWLIB_SCROLLBARS_LUCID */ +#ifdef LWLIB_TABS_LUCID +/* tab control + + 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. */ +static void +xlw_tab_control_callback (Widget w, XtPointer client_data, XtPointer call_data) +{ + /* call data is the topmost widget */ + widget_instance* instance = (widget_instance*)client_data; + Widget top = (Widget)call_data; + char *name = XtName (top); + widget_value* widget_val; + XtPointer widget_arg; + LWLIB_ID id; + lw_callback post_activate_cb; + + if (w->core.being_destroyed) + return; + + /* Grab these values before running any functions, in case running + the selection_cb causes the widget to be destroyed. */ + id = instance->info->id; + post_activate_cb = instance->info->post_activate_cb; + + /* search for the widget_val for the selected tab */ + for (widget_val = instance->info->val->contents; widget_val; + widget_val = widget_val->next) + { + if (!strcmp (widget_val->name, name)) + break; + } + + widget_arg = widget_val ? widget_val->call_data : NULL; + + if (instance->info->selection_cb && + widget_val && + widget_val->enabled && + !widget_val->contents) + instance->info->selection_cb (w, id, widget_arg); + + if (post_activate_cb) + post_activate_cb (w, id, widget_arg); +} + +static Widget +xlw_create_tab_control (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget tab = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XtNsensitive, val->enabled); 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); + + tab = XtCreateManagedWidget (val->name, tabsWidgetClass, + instance->parent, al, ac); + XtRemoveAllCallbacks (tab, XtNcallback); + XtAddCallback (tab, XtNcallback, xlw_tab_control_callback, (XtPointer)instance); + + XtManageChild (tab); + + return tab; +} + +static void build_tabs_in_widget (widget_instance* instance, Widget widget, + widget_value* val) +{ + widget_value* cur = val; + for (cur = val; cur; cur = cur->next) + { + if (cur->value) + { +#ifdef LWLIB_WIDGETS_MOTIF + xm_create_label (widget, cur); +#else + xaw_create_label (widget, cur); +#endif + } + cur->change = NO_CHANGE; + } +} + +static void +xlw_update_tab_control (widget_instance* instance, Widget widget, widget_value* val) +{ + Widget* children; + unsigned int num_children; + int i; + widget_value *cur = 0; + + XtRemoveAllCallbacks (widget, XtNcallback); + XtAddCallback (widget, XtNcallback, xlw_tab_control_callback, (XtPointer)instance); + + if (val->change == STRUCTURAL_CHANGE + || + (val->contents && val->contents->change == STRUCTURAL_CHANGE)) + { + destroy_all_children (widget); + build_tabs_in_widget (instance, widget, val->contents); + } + + children = XtCompositeChildren (widget, &num_children); + if (children) + { + for (i = 0, cur = val->contents; i < num_children; i++) + { + if (!cur) + abort (); + if (children [i]->core.being_destroyed + || strcmp (XtName (children [i]), cur->name)) + continue; +#ifdef NEED_MOTIF + if (lw_motif_widget_p (children [i])) + xm_update_one_widget (instance, children [i], cur, False); +#endif +#ifdef NEED_ATHENA + if (lw_xaw_widget_p (children [i])) + xaw_update_one_widget (instance, children [i], cur, False); +#endif + cur = cur->next; + } + XtFree ((char *) children); + } + if (cur) + abort (); +} +#endif /* LWLIB_TABS_LUCID */ + +#ifdef HAVE_WIDGETS +static Widget +xlw_create_clip_window (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget clip = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNsensitive, TRUE); ac++; + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + /* Create a clip window to contain the subwidget. Incredibly the + XEmacs manager seems to be the most appropriate widget for + this. Nothing else is simple enough and yet does what is + required. */ + clip = XtCreateManagedWidget (val->name, + emacsManagerWidgetClass, + instance->parent, al, ac); + + return clip; +} +#endif + widget_creation_entry xlw_creation_table [] = { @@ -312,6 +493,12 @@ xlw_creation_table [] = {"vertical-scrollbar", xlw_create_vertical_scrollbar}, {"horizontal-scrollbar", xlw_create_horizontal_scrollbar}, #endif +#ifdef LWLIB_TABS_LUCID + {"tab-control", xlw_create_tab_control}, +#endif +#ifdef HAVE_WIDGETS + {"clip-window", xlw_create_clip_window}, +#endif {NULL, NULL} }; @@ -327,12 +514,20 @@ lw_lucid_widget_p (Widget widget) if (the_class == xlwScrollBarWidgetClass) return True; #endif +#ifdef LWLIB_TABS_LUCID + if (the_class == tabsWidgetClass) + return True; +#endif #ifdef LWLIB_MENUBARS_LUCID if (the_class == overrideShellWidgetClass) return XtClass (((CompositeWidget)widget)->composite.children [0]) == xlwMenuWidgetClass; #endif +#ifdef HAVE_WIDGETS + if (the_class == emacsManagerWidgetClass) + return True; +#endif return False; } @@ -340,9 +535,7 @@ void xlw_update_one_widget (widget_instance* instance, Widget widget, widget_value* val, Boolean deep_p) { - WidgetClass class; - - class = XtClass (widget); + WidgetClass class = XtClass (widget); if (0) ; @@ -365,6 +558,12 @@ xlw_update_one_widget (widget_instance* instance, Widget widget, xlw_update_scrollbar (instance, widget, val); } #endif +#ifdef LWLIB_TABS_LUCID + else if (class == tabsWidgetClass) + { + xlw_update_tab_control (instance, widget, val); + } +#endif } void diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 48bb2de..85db133 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -60,9 +60,11 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#ifdef LWLIB_WIDGETS_MOTIF #include #if XmVERSION > 1 -#include +#include +#endif #endif #ifdef LWLIB_MENUBARS_MOTIF @@ -72,7 +74,9 @@ static void xm_internal_update_other_instances (Widget, XtPointer, XtPointer); static void xm_pop_down_callback (Widget, XtPointer, XtPointer); static void xm_generic_callback (Widget, XtPointer, XtPointer); -#ifdef LWLIB_DIALOGS_MOTIF +static void mark_dead_instance_destroyed (Widget widget, XtPointer closure, + XtPointer call_data); +#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) static void xm_nosel_callback (Widget, XtPointer, XtPointer); #endif #ifdef LWLIB_SCROLLBARS_MOTIF @@ -171,35 +175,6 @@ resource_string (Widget widget, char *name) return result; } -#ifdef LWLIB_MENUBARS_MOTIF - -static void -destroy_all_children (Widget widget) -{ - Widget* children; - unsigned int number; - int i; - - children = XtCompositeChildren (widget, &number); - if (children) - { - /* Unmanage all children and destroy them. They will only be - * really destroyed when we get out of DispatchEvent. */ - for (i = 0; i < number; i++) - { - Widget child = children [i]; - if (!child->core.being_destroyed) - { - XtUnmanageChild (child); - XtDestroyWidget (child); - } - } - XtFree ((char *) children); - } -} - -#endif /* LWLIB_MENUBARS_MOTIF */ - #ifdef LWLIB_DIALOGS_MOTIF @@ -221,7 +196,7 @@ is_in_dialog_box (Widget w) #endif /* LWLIB_DIALOGS_MOTIF */ -#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) +#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) /* update the label of anything subclass of a label */ static void @@ -233,6 +208,14 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) XmString name_string = NULL; Arg al [20]; int ac = 0; + int type; + + /* Don't clobber pixmap types. */ + XtSetArg (al [0], XmNlabelType, &type); + XtGetValues (widget, al, 1); + + if (type == XmPIXMAP) + return; if (val->value) { @@ -262,24 +245,30 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) char *res_name = NULL; res_name = resource_string (widget, val->name); + /* Concatenating the value with itself seems just plain daft. */ if (!res_name) - res_name = val->name; - - name_string = - XmStringCreateLtoR (res_name, XmSTRING_DEFAULT_CHARSET); - - value_name = XtMalloc (strlen (val->value) + 2); - *value_name = 0; - strcat (value_name, " "); - strcat (value_name, val->value); - - val_string = - XmStringCreateLtoR (value_name, XmSTRING_DEFAULT_CHARSET); - - built_string = - XmStringConcat (name_string, val_string); - - XtFree (value_name); + { + built_string = + XmStringCreateLtoR (val->value, XmSTRING_DEFAULT_CHARSET); + } + else + { + name_string = + XmStringCreateLtoR (res_name, XmSTRING_DEFAULT_CHARSET); + + value_name = XtMalloc (strlen (val->value) + 2); + *value_name = 0; + strcat (value_name, " "); + strcat (value_name, val->value); + + val_string = + XmStringCreateLtoR (value_name, XmSTRING_DEFAULT_CHARSET); + + built_string = + XmStringConcat (name_string, val_string); + + XtFree (value_name); + } } XtSetArg (al [ac], XmNlabelString, built_string); ac++; @@ -303,6 +292,9 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) if (name_string) XmStringFree (name_string); + + if (val_string) + XmStringFree (val_string); } #endif /* defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) */ @@ -380,7 +372,7 @@ xm_update_toggle (widget_instance* instance, Widget widget, widget_value* val) instance); XtSetArg (al [0], XmNset, val->selected); XtSetArg (al [1], XmNalignment, XmALIGNMENT_BEGINNING); - XtSetValues (widget, al, 2); + XtSetValues (widget, al, 1); } static void @@ -425,6 +417,29 @@ xm_update_radiobox (widget_instance* instance, Widget widget, } } +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 +/* update of combo box */ +static void +xm_update_combo_box (widget_instance* instance, Widget widget, widget_value* val) +{ + widget_value* cur; + int i; + XtRemoveAllCallbacks (widget, XmNselectionCallback); + XtAddCallback (widget, XmNselectionCallback, xm_generic_callback, + instance); + for (cur = val->contents, i = 0; cur; cur = cur->next) + if (cur->value) + { + XmString xmstr = XmStringCreate (cur->value, XmSTRING_DEFAULT_CHARSET); + i += 1; + XmListAddItem (CB_List (widget), xmstr, 0); + if (cur->selected) + XmListSelectPos (CB_List (widget), i, False); + XmStringFree (xmstr); + } +} +#endif + #ifdef LWLIB_MENUBARS_MOTIF /* update a popup menu, pulldown menu or a menubar */ @@ -767,22 +782,24 @@ xm_update_one_widget (widget_instance* instance, Widget widget, widget_value* val, Boolean deep_p) { WidgetClass class; - Arg al [2]; + Arg al [20]; + int ac = 0; /* Mark as not edited */ val->edited = False; /* Common to all widget types */ - XtSetArg (al [0], XmNsensitive, val->enabled); - XtSetArg (al [1], XmNuserData, val->call_data); - XtSetValues (widget, al, 2); + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XmNuserData, val->call_data); ac++; + lw_add_value_args_to_args (val, al, &ac); -#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) + XtSetValues (widget, al, ac); + +#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) /* Common to all label like widgets */ if (XtIsSubclass (widget, xmLabelWidgetClass)) xm_update_label (instance, widget, val); -#endif /* defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) */ - +#endif class = XtClass (widget); /* Class specific things */ if (class == xmPushButtonWidgetClass || @@ -827,6 +844,12 @@ xm_update_one_widget (widget_instance* instance, Widget widget, { xm_update_list (instance, widget, val); } +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 + else if (class == xmComboBoxWidgetClass) + { + xm_update_combo_box (instance, widget, val); + } +#endif #ifdef LWLIB_SCROLLBARS_MOTIF else if (class == xmScrollBarWidgetClass) { @@ -903,11 +926,20 @@ xm_update_one_value (widget_instance* instance, Widget widget, val->edited = True; } } - else if (class == xmListWidgetClass) + else if (class == xmListWidgetClass +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 + || class == xmComboBoxWidgetClass +#endif + ) { int pos_cnt; int* pos_list; - if (XmListGetSelectedPos (widget, &pos_list, &pos_cnt)) + Widget list = widget; +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 + if (class == xmComboBoxWidgetClass) + list = CB_List (widget); +#endif + if (XmListGetSelectedPos (list, &pos_list, &pos_cnt)) { int i; widget_value* cur; @@ -1316,14 +1348,6 @@ find_matching_instance (widget_instance* instance) } static void -mark_dead_instance_destroyed (Widget widget, XtPointer closure, - XtPointer call_data) -{ - destroyed_instance* instance = (destroyed_instance*)closure; - instance->widget = NULL; -} - -static void recenter_widget (Widget widget) { Widget parent = XtParent (widget); @@ -1566,9 +1590,10 @@ make_horizontal_scrollbar (widget_instance *instance) #endif /* LWLIB_SCROLLBARS_MOTIF */ +#ifdef LWLIB_WIDGETS_MOTIF /* glyph widgets */ static Widget -make_button (widget_instance *instance) +xm_create_button (widget_instance *instance) { Arg al[20]; int ac = 0; @@ -1615,14 +1640,21 @@ make_button (widget_instance *instance) } static Widget -make_progress (widget_instance *instance) +xm_create_progress (widget_instance *instance) { Arg al[20]; int ac = 0; Widget scale = 0; widget_value* val = instance->info->val; - XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + if (!val->call_data) + { + XtSetArg (al [ac], XmNsensitive, False); ac++; + } + else + { + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + } XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; XtSetArg (al [ac], XmNuserData, val->call_data); ac++; XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; @@ -1631,9 +1663,6 @@ make_progress (widget_instance *instance) look ugly. I think this may be a LessTif bug but for now we just get rid of it. */ XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; - if (!val->call_data) - XtSetArg (al [ac], XmNsensitive, False); ac++; - /* add any args the user supplied for creation time */ lw_add_value_args_to_args (val, al, &ac); @@ -1648,7 +1677,7 @@ make_progress (widget_instance *instance) } static Widget -make_text_field (widget_instance *instance) +xm_create_text_field (widget_instance *instance) { Arg al[20]; int ac = 0; @@ -1677,9 +1706,45 @@ make_text_field (widget_instance *instance) return text; } +static Widget +xm_create_label_field (widget_instance *instance) +{ + return xm_create_label (instance->parent, instance->info->val); +} + +Widget +xm_create_label (Widget parent, widget_value* val) +{ + Arg al[20]; + int ac = 0; + Widget label = 0; + + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + label = XmCreateLabel (parent, val->name, al, ac); + + XtManageChild (label); + + /* Do it again for arguments that have no effect until the widget is realized. */ + ac = 0; + lw_add_value_args_to_args (val, al, &ac); + XtSetValues (label, al, ac); + + return label; +} + #if XmVERSION > 1 static Widget -make_combo_box (widget_instance *instance) +xm_create_combo_box (widget_instance *instance) { Arg al[20]; int ac = 0; @@ -1698,7 +1763,7 @@ make_combo_box (widget_instance *instance) /* add any args the user supplied for creation time */ lw_add_value_args_to_args (val, al, &ac); - combo = XmCreateComboBox (instance->parent, val->name, al, ac); + combo = XmCreateDropDownComboBox (instance->parent, val->name, al, ac); if (val->call_data) XtAddCallback (combo, XmNselectionCallback, xm_generic_callback, (XtPointer)instance); @@ -1708,6 +1773,7 @@ make_combo_box (widget_instance *instance) return combo; } #endif +#endif /* LWLIB_WIDGETS_MOTIF */ /* Table of functions to create widgets */ @@ -1723,11 +1789,14 @@ xm_creation_table [] = {"vertical-scrollbar", make_vertical_scrollbar}, {"horizontal-scrollbar", make_horizontal_scrollbar}, #endif - {"button", make_button}, - {"progress", make_progress}, - {"text-field", make_text_field}, +#ifdef LWLIB_WIDGETS_MOTIF + {"button", xm_create_button}, + {"progress", xm_create_progress}, + {"text-field", xm_create_text_field}, + {"label", xm_create_label_field}, #if XmVERSION > 1 - {"combo-box", make_combo_box}, + {"combo-box", xm_create_combo_box}, +#endif #endif {NULL, NULL} }; @@ -1736,7 +1805,7 @@ xm_creation_table [] = void xm_destroy_instance (widget_instance* instance) { -#ifdef LWLIB_DIALOGS_MOTIF +#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) /* It appears that this is used only for dialog boxes. */ Widget widget = instance->widget; /* recycle the dialog boxes */ @@ -1767,7 +1836,7 @@ xm_destroy_instance (widget_instance* instance) XtDestroyWidget (instance->widget); } -#endif /* LWLIB_DIALOGS_MOTIF */ +#endif /* LWLIB_DIALOGS_MOTIF || LWLIB_WIDGETS_MOTIF */ } /* popup utility */ @@ -1920,7 +1989,7 @@ xm_internal_update_other_instances (Widget widget, XtPointer closure, static void xm_generic_callback (Widget widget, XtPointer closure, XtPointer call_data) { -#if (defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_DIALOGS_MOTIF)) +#if (defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF)) /* We want the selected status to change only when we decide it should change. Yuck but correct. */ if (XtClass (widget) == xmToggleButtonWidgetClass @@ -1946,25 +2015,6 @@ xm_pop_down_callback (Widget widget, XtPointer closure, XtPointer call_data) do_call (widget, closure, post_activate); } -#ifdef LWLIB_DIALOGS_MOTIF - -static void -xm_nosel_callback (Widget widget, XtPointer closure, XtPointer call_data) -{ - /* This callback is only called when a dialog box is dismissed with the wm's - destroy button (WM_DELETE_WINDOW.) We want the dialog box to be destroyed - in that case, not just unmapped, so that it releases its keyboard grabs. - But there are problems with running our callbacks while the widget is in - the process of being destroyed, so we set XmNdeleteResponse to XmUNMAP - instead of XmDESTROY and then destroy it ourself after having run the - callback. - */ - do_call (widget, closure, no_selection); - XtDestroyWidget (widget); -} - -#endif - #ifdef LWLIB_MENUBARS_MOTIF static void @@ -2073,6 +2123,31 @@ xm_scrollbar_callback (Widget widget, XtPointer closure, XtPointer call_data) } #endif /* LWLIB_SCROLLBARS_MOTIF */ +#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF) +static void +mark_dead_instance_destroyed (Widget widget, XtPointer closure, + XtPointer call_data) +{ + destroyed_instance* instance = (destroyed_instance*)closure; + instance->widget = NULL; +} + +static void +xm_nosel_callback (Widget widget, XtPointer closure, XtPointer call_data) +{ + /* This callback is only called when a dialog box is dismissed with the wm's + destroy button (WM_DELETE_WINDOW.) We want the dialog box to be destroyed + in that case, not just unmapped, so that it releases its keyboard grabs. + But there are problems with running our callbacks while the widget is in + the process of being destroyed, so we set XmNdeleteResponse to XmUNMAP + instead of XmDESTROY and then destroy it ourself after having run the + callback. + */ + do_call (widget, closure, no_selection); + XtDestroyWidget (widget); +} +#endif + /* set the keyboard focus */ void diff --git a/lwlib/lwlib-Xm.h b/lwlib/lwlib-Xm.h index 9088838..b030a51 100644 --- a/lwlib/lwlib-Xm.h +++ b/lwlib/lwlib-Xm.h @@ -8,6 +8,9 @@ extern widget_creation_entry xm_creation_table []; Widget xm_create_dialog (widget_instance* instance); +Widget +xm_create_label (Widget parent, widget_value* val); + Boolean lw_motif_widget_p (Widget widget); diff --git a/lwlib/lwlib-config.c b/lwlib/lwlib-config.c index f2c6edf..7da6b51 100644 --- a/lwlib/lwlib-config.c +++ b/lwlib/lwlib-config.c @@ -88,3 +88,13 @@ int lwlib_dialogs_athena; int lwlib_does_not_support_dialogs; # endif #endif + +#ifdef LWLIB_WIDGETS_MOTIF +int lwlib_widgets_motif; +#else +# ifdef LWLIB_WIDGETS_ATHENA +int lwlib_widgets_athena; +# else +int lwlib_does_not_support_widgets; +# endif +#endif diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c index 0df97a6..9728c6a 100644 --- a/lwlib/lwlib-utils.c +++ b/lwlib/lwlib-utils.c @@ -31,6 +31,31 @@ Boston, MA 02111-1307, USA. */ #include #include "lwlib-utils.h" +void +destroy_all_children (Widget widget) +{ + Widget* children; + unsigned int number; + int i; + + children = XtCompositeChildren (widget, &number); + if (children) + { + /* Unmanage all children and destroy them. They will only be + * really destroyed when we get out of DispatchEvent. */ + for (i = 0; i < number; i++) + { + Widget child = children [i]; + if (!child->core.being_destroyed) + { + XtUnmanageChild (child); + XtDestroyWidget (child); + } + } + XtFree ((char *) children); + } +} + /* Redisplay the contents of the widget, without first clearing it. */ void XtNoClearRefreshWidget (Widget widget) diff --git a/lwlib/lwlib-utils.h b/lwlib/lwlib-utils.h index cfba632..3163a5a 100644 --- a/lwlib/lwlib-utils.h +++ b/lwlib/lwlib-utils.h @@ -1,6 +1,7 @@ #ifndef _LWLIB_UTILS_H_ #define _LWLIB_UTILS_H_ +void destroy_all_children (Widget widget); void XtNoClearRefreshWidget (Widget); typedef void (*XtApplyToWidgetsProc) (Widget, XtPointer); diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index dcbc0b2..69a5c04 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -125,8 +125,6 @@ free_widget_value (widget_value *wv) widget_value_free_list = wv; } -static void free_widget_value_tree (widget_value *wv); - static void free_widget_value_contents (widget_value *wv) { @@ -155,11 +153,13 @@ free_widget_value_contents (widget_value *wv) free_widget_value_tree (wv->contents); wv->contents = (widget_value *) 0xDEADBEEF; } - if (wv->args && wv->free_args) + if (wv->args && wv->nargs) { - free (wv->args); - wv->args = (void *) 0xDEADBEEF; + if (wv->free_args) + free (wv->args); + wv->args = (ArgList) 0xDEADBEEF; wv->nargs = 0; + wv->free_args = 0; } if (wv->next) { @@ -168,7 +168,7 @@ free_widget_value_contents (widget_value *wv) } } -static void +void free_widget_value_tree (widget_value *wv) { if (!wv) @@ -1326,3 +1326,4 @@ void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset) *offset += wv->nargs; } } + diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index 96dfa56..bca2d64 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h @@ -181,6 +181,10 @@ extern int lw_menu_active; /* do this for the other toolkits too */ #endif /* LWLIB_MENUBARS_LUCID */ +#if defined (LWLIB_TABS_LUCID) +#include "xlwtabs.h" +#endif + void lw_register_widget (CONST char* type, CONST char* name, LWLIB_ID id, widget_value* val, lw_callback pre_activate_cb, lw_callback selection_cb, @@ -210,6 +214,7 @@ void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset); widget_value *malloc_widget_value (void); void free_widget_value (widget_value *); +void free_widget_value_tree (widget_value *wv); widget_value *replace_widget_value_tree (widget_value*, widget_value*); void lw_popup_menu (Widget, XEvent *); diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 4b01283..e6d31ae 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -1529,7 +1529,7 @@ label_button_size (XlwMenuWidget mw, 2 * mw->menu.vertical_margin + 2 * mw->menu.shadow_thickness); /* no left column decoration */ - *toggle_width = mw->menu.horizontal_margin + mw->menu.shadow_thickness;; + *toggle_width = mw->menu.horizontal_margin + mw->menu.shadow_thickness; *label_width = string_width_u (mw, resource_widget_value (mw, val)); *bindings_width = mw->menu.horizontal_margin + mw->menu.shadow_thickness; diff --git a/lwlib/xlwtabs.c b/lwlib/xlwtabs.c index e58d6fa..fa10a60 100644 --- a/lwlib/xlwtabs.c +++ b/lwlib/xlwtabs.c @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Synched up with: Tabs.c 1.23 */ + /* Synched up with: Tabs.c 1.25 */ /* * Tabs.c - Index Tabs composite widget @@ -568,7 +568,11 @@ TabsResize(Widget w) cw-bw*2,ch-bw*2, bw) ; } if( XtIsRealized(w) ) - XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ; + { + XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ; + tw->tabs.needs_layout = False ; + XtClass(tw)->core_class.expose((Widget)tw,NULL,None) ; + } } tw->tabs.needs_layout = False ; @@ -629,7 +633,8 @@ TabsSetValues(Widget current, Widget request, Widget new, /* TODO: if any color changes, need to recompute GCs and redraw */ if( tw->core.background_pixel != curtw->core.background_pixel || - tw->core.background_pixmap != curtw->core.background_pixmap ) + tw->core.background_pixmap != curtw->core.background_pixmap || + tw->tabs.font != curtw->tabs.font ) if( XtIsRealized(new) ) { TabsFreeGCs(tw) ; @@ -644,7 +649,8 @@ TabsSetValues(Widget current, Widget request, Widget new, * Window system will handle the redraws. */ - if( tw->tabs.topWidget != curtw->tabs.topWidget ) + if( tw->tabs.topWidget != curtw->tabs.topWidget ) + { if( XtIsRealized(tw->tabs.topWidget) ) { Widget w = tw->tabs.topWidget ; @@ -663,6 +669,7 @@ TabsSetValues(Widget current, Widget request, Widget new, } else tw->tabs.needs_layout = True ; + } return needRedraw ; } @@ -818,15 +825,16 @@ TabsGeometryManager(Widget w, XtWidgetGeometry *req, XtWidgetGeometry *reply) Dimension th ; /* space used by tabs */ Dimension wid,hgt ; /* Tabs widget size */ - rw = tab->tabs.wid ; - rh = tab->tabs.hgt ; + rw = cw = tab->tabs.wid ; + rh = ch = tab->tabs.hgt ; /* find out what the resulting preferred size would be */ #ifdef COMMENT MaxChild(tw, &cw, &ch) ; #endif /* COMMENT */ - PreferredSize2(tw, tw->tabs.max_cw,tw->tabs.max_ch, &wid, &hgt) ; + PreferredSize2(tw, + cw=tw->tabs.max_cw, ch=tw->tabs.max_ch, &wid, &hgt) ; /* Ask to be resized to accommodate. */ @@ -1057,10 +1065,9 @@ static void TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) { TabsWidget tw = (TabsWidget) w ; - Widget newtop ; + Widget newtop = NULL; Widget *childP ; int idx ; - int i ; int nc = tw->composite.num_children ; if( nc <= 0 ) @@ -1082,9 +1089,9 @@ TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) switch( params[0][0] ) { case 'u': /* up */ case 'U': - if( idx == 0 ) - idx = nc ; - newtop = tw->composite.children[idx-1] ; + if( --idx < 0 ) + idx = nc-1 ; + newtop = tw->composite.children[idx] ; break ; case 'd': /* down */ @@ -1096,6 +1103,7 @@ TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) case 'h': case 'H': + default: newtop = tw->composite.children[0] ; break ; @@ -1121,10 +1129,9 @@ static void TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) { TabsWidget tw = (TabsWidget) w ; - Widget newhl ; + Widget newhl = NULL; Widget *childP ; int idx ; - int i ; int nc = tw->composite.num_children ; if( nc <= 0 ) @@ -1142,6 +1149,7 @@ TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) else { + /* find index of currently highlit child */ for(idx=0, childP=tw->composite.children; idx < nc; ++idx, ++childP ) if( tw->tabs.hilight == *childP ) break ; @@ -1149,9 +1157,9 @@ TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) switch( params[0][0] ) { case 'u': /* up */ case 'U': - if( idx == 0 ) - idx = nc ; - newhl = tw->composite.children[idx-1] ; + if( --idx < 0 ) + idx = nc-1 ; + newhl = tw->composite.children[idx] ; break ; case 'd': /* down */ @@ -1170,6 +1178,10 @@ TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) case 'E': newhl = tw->composite.children[nc-1] ; break ; + + default: + newhl = tw->tabs.hilight ; + break ; } } @@ -1271,8 +1283,6 @@ void XawTabsSetHighlight(Widget t, Widget w) { TabsWidget tw = (TabsWidget)t ; - TabsConstraints tab ; - Widget oldtop = tw->tabs.topWidget ; if( !XtIsSubclass(t, tabsWidgetClass) ) return ; diff --git a/man/ChangeLog b/man/ChangeLog index b0157a5..796c1b0 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,148 @@ +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-07 Gunnar Evermann + + * xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH + instead of PACKAGEPATH + From Marcus Harnisch + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-12-06 Sandra Wambold + + * xemacs-faq.texi: Added MS-Windows questions; some other changes + +1999-11-29 Martin Buchholz + + * info.texi (Top): + Remove @ifnottex, which gives old makeinfos indigestion. + * texinfo.texi (Top): + Revert to pre-texinfo-4.0 version, plus small changes to make + texinfo-3.12, texinfo-3.12f, texinfo-4.0, and TeX happy. + +1999-11-30 Sandra Wambold + + * xemacs-faq.texi: fixed and commented out bad URL links + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-26 Martin Buchholz + + * internals.texi (Lstream Functions): + * internals.texi (Lstream Methods): + Types have changed to size_t and ssize_t. Document them. + +1999-08-12 Gunnar Evermann + + * xemacs-faq.texi (Q4.4.2): added FAQ about Sun Workshop on + XEmacs 21 + +1999-11-15 Martin Buchholz + + * xemacs/programs.texi: Upgrade to etags Version 13.32 + + * Makefile: + - Make sure the default target is `info' instead of cl.info. + - Use $(INFODIR) consistently where appropriate. + - Remove makeinfo-1.68 warning. (Usually only maintainer rebuilds info). + - Comment out unused macros: EMACS EMACSFLAGS + - Replace `-rm -f' with `rm -f', XPG4 guarantees exit code == 0. + - Get dependencies up to date. + + * internals/Makefile: + * xemacs/Makefile: + * lispref/Makefile: + * new-users-guide/Makefile: + * lispref/index.perm: + * lispref/index.unperm: + * lispref/permute-index: + * internals/index.perm: + * internals/index.unperm: + Remove these Makefiles. + Include all functionality in man/Makefile. + Support only non-permuted indexes for simplicity. + + * emodules.texi: + - TeX doesn't tolerate `_' in variable names; use `-' instead. + + * lispref/commands.texi: + * lispref/display.texi: + * lispref/faces.texi: + * lispref/functions.texi: + * lispref/keymaps.texi: + * lispref/lists.texi: + * lispref/modes.texi: + * lispref/objects.texi: + * lispref/os.texi: + * lispref/sequences.texi: + * lispref/strings.texi: + * lispref/text.texi: + * new-users-guide/custom1.texi: + * xemacs/custom.texi: + * xemacs/menus.texi: + - Make sources compatible with makeinfo 4.0 *and* 3.12. + - Replace @sc{ASCII} with @sc{ascii}, etc... + - Replace @var{(foo)} with (@var{foo}), etc... + + * info-stnd.texi: Remove. Who cares about the standalone info reader? + + * texinfo.tex: + * texinfo.texi: + * info.texi: + * standards.texi: + * make-stds.texi: + Import FSF-maintained files from texinfo-4.0. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-08-30 Robert Pluim + + * xemacs/packages.texi (Using Packages): Added description of + package-get-package-provider. + +1999-07-27 Charles G Waldman + + * xemacs-faq.texi (Q5.0.6): Describe `shell-multiple-shells' + +1999-08-01 Adrian Aichner + + * xemacs/programs.texi (Balanced Editing): Remove broken + line-break. + + * xemacs-faq.texi (Q1.0.6): Provide correct location in XEmacs + menus. + (Q1.4.1): ditto. + (Q1.4.3): ditto. + (Q2.0.5): Hyphenate words. + + * info.texi (Add): Fix one typo. + +1999-08-23 Stephane Epardaud + + * internals/internals.texi (Garbage Collection - Step by Step): + just added some dots to shut up compile warnings. + +1999-08-19 Matthias Neubauer + + * internals/internals.texi (Garbage Collection - Step by Step): + new section in chapter Allocation of Objects in XEmacs Lisp. + +1999-07-28 Andy Piper + + * internals.texi (Glyphs): add some glyph documentation. + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released diff --git a/man/Makefile b/man/Makefile index 7ede490..a270d5a 100644 --- a/man/Makefile +++ b/man/Makefile @@ -19,15 +19,7 @@ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# Avoid trouble on systems where the "SHELL" variable might be -# inherited from the environment. -SHELL = /bin/sh - -EMACS = ../src/xemacs -EMACSFLAGS = -batch -q -no-site-file - -# NOTE: You *must* have makeinfo-1.68 or later to rebuild the -# info tree. +SHELL = /bin/sh MAKEINFO = makeinfo TEXI2DVI = texi2dvi @@ -36,6 +28,8 @@ TEXI2DVI = texi2dvi RECURSIVE_MAKE = $(MAKE) $(MFLAGS) MAKEINFO='$(MAKEINFO)' TEXI2DVI='$(TEXI2DVI)' +all : info + # Ughhh! The things we do to have portable makefiles... INFODIR = ../info @@ -46,11 +40,15 @@ info_files = \ $(INFODIR)/emodules.info \ $(INFODIR)/external-widget.info \ $(INFODIR)/info.info \ + $(INFODIR)/lispref.info \ + $(INFODIR)/internals.info \ + $(INFODIR)/new-users-guide.info \ $(INFODIR)/standards.info \ $(INFODIR)/term.info \ $(INFODIR)/termcap.info \ $(INFODIR)/texinfo.info \ $(INFODIR)/widget.info \ + $(INFODIR)/xemacs.info \ $(INFODIR)/xemacs-faq.info dvi_files = \ @@ -59,103 +57,244 @@ dvi_files = \ emodules.dvi \ external-widget.dvi \ info.dvi \ + lispref.dvi \ + internals.dvi \ + new-users-guide.dvi \ standards.dvi \ term.dvi \ termcap.dvi \ texinfo.dvi \ widget.dvi \ + xemacs.dvi \ xemacs-faq.dvi -../info/cl.info : cl.texi - -$(MAKEINFO) cl.texi -o ../info/cl.info - -../info/custom.info : custom.texi - -$(MAKEINFO) custom.texi -o ../info/custom.info - -../info/emodules.info : emodules.texi - -$(MAKEINFO) emodules.texi -o ../info/emodules.info - -../info/external-widget.info : external-widget.texi - -$(MAKEINFO) external-widget.texi -o ../info/external-widget.info - -../info/info.info : info.texi - -$(MAKEINFO) info.texi -o ../info/info.info - -../info/standards.info : standards.texi - -$(MAKEINFO) standards.texi -o ../info/standards.info - -../info/term.info : term.texi - -$(MAKEINFO) term.texi -o ../info/term.info - -../info/termcap.info : termcap.texi - -$(MAKEINFO) termcap.texi -o ../info/termcap.info - -../info/texinfo.info : texinfo.texi - -$(MAKEINFO) texinfo.texi -o ../info/texinfo.info - -../info/widget.info : widget.texi - -$(MAKEINFO) widget.texi -o ../info/widget.info - -../info/xemacs-faq.info : xemacs-faq.texi - -$(MAKEINFO) xemacs-faq.texi -o ../info/xemacs-faq.info - - -# ../info/w3.info : w3.texi -# -$(MAKEINFO) w3.texi -o ../info/w3.info - -# ../info/vm.info : vm.texi +xemacs-srcs = \ + xemacs/abbrevs.texi \ + xemacs/basic.texi \ + xemacs/buffers.texi \ + xemacs/building.texi \ + xemacs/calendar.texi \ + xemacs/cmdargs.texi \ + xemacs/custom.texi \ + xemacs/display.texi \ + xemacs/entering.texi \ + xemacs/files.texi \ + xemacs/fixit.texi \ + xemacs/frame.texi \ + xemacs/glossary.texi \ + xemacs/gnu.texi \ + xemacs/help.texi \ + xemacs/indent.texi \ + xemacs/keystrokes.texi \ + xemacs/killing.texi \ + xemacs/m-x.texi \ + xemacs/major.texi \ + xemacs/mark.texi \ + xemacs/menus.texi \ + xemacs/mini.texi \ + xemacs/misc.texi \ + xemacs/mouse.texi \ + xemacs/mule.texi \ + xemacs/new.texi \ + xemacs/packages.texi \ + xemacs/picture.texi \ + xemacs/programs.texi \ + xemacs/reading.texi \ + xemacs/regs.texi \ + xemacs/search.texi \ + xemacs/sending.texi \ + xemacs/startup.texi \ + xemacs/text.texi \ + xemacs/trouble.texi \ + xemacs/undo.texi \ + xemacs/windows.texi \ + xemacs/xemacs.texi + +lispref-srcs = \ + lispref/abbrevs.texi \ + lispref/annotations.texi \ + lispref/back.texi \ + lispref/backups.texi \ + lispref/buffers.texi \ + lispref/building.texi \ + lispref/commands.texi \ + lispref/compile.texi \ + lispref/consoles-devices.texi \ + lispref/control.texi \ + lispref/customize.texi \ + lispref/databases.texi \ + lispref/debugging.texi \ + lispref/dialog.texi \ + lispref/display.texi \ + lispref/dragndrop.texi \ + lispref/edebug-inc.texi \ + lispref/edebug.texi \ + lispref/errors.texi \ + lispref/eval.texi \ + lispref/extents.texi \ + lispref/faces.texi \ + lispref/files.texi \ + lispref/frames.texi \ + lispref/functions.texi \ + lispref/glyphs.texi \ + lispref/hash-tables.texi \ + lispref/help.texi \ + lispref/hooks.texi \ + lispref/index.texi \ + lispref/internationalization.texi \ + lispref/intro.texi \ + lispref/keymaps.texi \ + lispref/ldap.texi \ + lispref/lispref.texi \ + lispref/lists.texi \ + lispref/loading.texi \ + lispref/locals.texi \ + lispref/macros.texi \ + lispref/maps.texi \ + lispref/markers.texi \ + lispref/menus.texi \ + lispref/minibuf.texi \ + lispref/modes.texi \ + lispref/mouse.texi \ + lispref/mule.texi \ + lispref/numbers.texi \ + lispref/objects.texi \ + lispref/os.texi \ + lispref/positions.texi \ + lispref/processes.texi \ + lispref/range-tables.texi \ + lispref/scrollbars.texi \ + lispref/searching.texi \ + lispref/sequences.texi \ + lispref/specifiers.texi \ + lispref/streams.texi \ + lispref/strings.texi \ + lispref/symbols.texi \ + lispref/syntax.texi \ + lispref/text.texi \ + lispref/tips.texi \ + lispref/toolbar.texi \ + lispref/tooltalk.texi \ + lispref/variables.texi \ + lispref/windows.texi \ + lispref/x-windows.texi + +internals-srcs = \ + internals/internals.texi + +new-users-guide-srcs = \ + new-users-guide/custom1.texi \ + new-users-guide/custom2.texi \ + new-users-guide/edit.texi \ + new-users-guide/enter.texi \ + new-users-guide/files.texi \ + new-users-guide/help.texi \ + new-users-guide/modes.texi \ + new-users-guide/new-users-guide.texi \ + new-users-guide/region.texi \ + new-users-guide/search.texi \ + new-users-guide/xmenu.texi + +$(INFODIR)/cl.info : cl.texi + $(MAKEINFO) -o $(INFODIR)/cl.info cl.texi + +$(INFODIR)/custom.info : custom.texi + $(MAKEINFO) -o $(INFODIR)/custom.info custom.texi + +$(INFODIR)/emodules.info : emodules.texi + $(MAKEINFO) -o $(INFODIR)/emodules.info emodules.texi + +$(INFODIR)/external-widget.info : external-widget.texi + $(MAKEINFO) -o $(INFODIR)/external-widget.info external-widget.texi + +$(INFODIR)/info.info : info.texi + $(MAKEINFO) -o $(INFODIR)/info.info info.texi + +$(INFODIR)/standards.info : standards.texi + $(MAKEINFO) -o $(INFODIR)/standards.info standards.texi + +$(INFODIR)/term.info : term.texi + $(MAKEINFO) -o $(INFODIR)/term.info term.texi + +$(INFODIR)/termcap.info : termcap.texi + $(MAKEINFO) -o $(INFODIR)/termcap.info termcap.texi + +$(INFODIR)/texinfo.info : texinfo.texi + $(MAKEINFO) -o $(INFODIR)/texinfo.info texinfo.texi + +$(INFODIR)/widget.info : widget.texi + $(MAKEINFO) -o $(INFODIR)/widget.info widget.texi + +$(INFODIR)/xemacs-faq.info : xemacs-faq.texi + $(MAKEINFO) -o $(INFODIR)/xemacs-faq.info xemacs-faq.texi + +# Manuals with their own subdirectory +$(INFODIR)/xemacs.info : $(xemacs-srcs) + $(MAKEINFO) -P xemacs -o $(INFODIR)/xemacs.info xemacs/xemacs.texi + +$(INFODIR)/lispref.info : $(lispref-srcs) + $(MAKEINFO) -P lispref -o $(INFODIR)/lispref.info lispref/lispref.texi + +$(INFODIR)/internals.info : $(internals-srcs) + $(MAKEINFO) -P internals -o $(INFODIR)/internals.info internals/internals.texi + +$(INFODIR)/new-users-guide.info : $(new-users-guide-srcs) + $(MAKEINFO) -P new-users-guide -o $(INFODIR)/new-users-guide.info new-users-guide/new-users-guide.texi + +# $(INFODIR)/w3.info : w3.texi +# $(MAKEINFO) -o $(INFODIR)/w3.info w3.texi + +# EMACS = ../src/xemacs +# EMACSFLAGS = -batch -q -no-site-file + +# $(INFODIR)/vm.info : vm.texi # -$(EMACS) $(EMACSFLAGS) -insert vm.texi -l texinfmt \ # -f texinfo-format-buffer -f save-buffer -# -mv vm.info* ../info +# -mv vm.info* $(INFODIR)/. -# special = # ../info/w3.info ../info/vm.info ../info/texinfo.info +# special = # $(INFODIR)/vm.info $(INFODIR)/texinfo.info -all: info +xemacs : $(INFODIR)/xemacs.info +lispref : $(INFODIR)/lispref.info +internals : $(INFODIR)/internals.info +new-users-guide.info : $(INFODIR)/new-users-guide.info -# Subdirectories to make recursively. -SUBDIR = xemacs lispref new-users-guide internals -.PHONY: $(SUBDIR) +.PHONY : xemacs lispref internals new-users-guide info dvi info : $(info_files) - -for d in $(SUBDIR) ; do (cd ./$$d && $(RECURSIVE_MAKE) $@) ; done - -.PHONY: info dvi -xemacs: FRC.xemacs - -cd ./$@ && $(RECURSIVE_MAKE) -lispref: FRC.lispref - -cd ./$@ && $(RECURSIVE_MAKE) -new-users-guide: FRC.new-users-guide - -cd ./$@ && $(RECURSIVE_MAKE) -internals: FRC.internals - -cd ./$@ && $(RECURSIVE_MAKE) # tm: FRC.tm -# -cd ./$@ && $(RECURSIVE_MAKE) +# cd ./tm && $(RECURSIVE_MAKE) # gnats: FRC.gnats -# -cd ./$@ && $(RECURSIVE_MAKE) +# cd ./gnats && $(RECURSIVE_MAKE) # FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals FRC.tm FRC.gnats: -FRC.info FRC.dvi FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals: +.PHONY: info dvi .texi.dvi: - $(TEXI2DVI) $< + -$(TEXI2DVI) $< -dvi : $(dvi_files) - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done +xemacs.dvi : $(xemacs-srcs) + $(TEXI2DVI) -I xemacs xemacs/xemacs.texi + +lispref.dvi : $(lispref-srcs) + $(TEXI2DVI) -I lispref lispref/lispref.texi +internals.dvi : $(internals-srcs) + $(TEXI2DVI) -I internals internals/internals.texi + +new-users-guide.dvi : $(new-users-guide-srcs) + $(TEXI2DVI) -I new-users-guide new-users-guide/new-users-guide.texi + +dvi : $(dvi_files) .PHONY: mostlyclean clean distclean realclean extraclean mostlyclean: - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done - rm -f *.toc *.aux *.log *.op \ - *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.pgs *.vr *.vrs *.tp *.tps + rm -f *.toc *.aux *.log *.op *.cp *.cps *.fn *.fns + rm -f *.ky *.kys *.pg *.pgs *.tp *.tps *.vr *.vrs clean: mostlyclean - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done - rm -f *.o core *.dvi + rm -f core *.dvi distclean: clean - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done realclean: distclean - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done extraclean: distclean - -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done - -rm -f *~ \#* + rm -f *~ \#* */*~ */\#* diff --git a/man/emodules.texi b/man/emodules.texi index f6afa99..3ec9d63 100644 --- a/man/emodules.texi +++ b/man/emodules.texi @@ -13,16 +13,16 @@ @ifset XEMACS @set emacs XEmacs @clear EMACS -@set HAVE_EMACS +@set HAVE-EMACS @end ifset @ifset EMACS @set emacs Emacs @clear XEMACS -@set HAVE_EMACS +@set HAVE-EMACS @end ifset -@ifclear HAVE_EMACS +@ifclear HAVE-EMACS @set XEMACS @set emacs XEmacs @end ifclear diff --git a/man/info-stnd.texi b/man/info-stnd.texi deleted file mode 100644 index d20bab7..0000000 --- a/man/info-stnd.texi +++ /dev/null @@ -1,1373 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@comment %**start of header -@setfilename ../info/info-stnd.info -@settitle GNU Info -@set InfoProgVer 2.11 -@paragraphindent none -@footnotestyle end -@synindex vr cp -@synindex fn cp -@synindex ky cp -@comment %**end of header -@comment $Id: info-stnd.texi,v 1.3 1997/07/06 21:49:30 karl Exp $ - -@dircategory Texinfo documentation system -@direntry -* info program: (info-stnd). Standalone Info-reading program. -@end direntry - -@ifinfo -This file documents GNU Info, a program for viewing the on-line formatted -versions of Texinfo files. This documentation is different from the -documentation for the Info reader that is part of GNU Emacs. If you do -not know how to use Info, but have a working Info reader, you should -read that documentation first. - -Copyright @copyright{} 1992, 93, 96, 97 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -@ignore -Permission is granted to process this file through TeX and print the -results, provided the printed document carries a copying permission -notice identical to this one except for the removal of this paragraph -(this paragraph not being relevant to the printed manual). -@end ignore - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -sections entitled ``Copying'' and ``GNU General Public License'' are -included exactly as in the original, and provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation -approved by the Free Software Foundation. -@end ifinfo - -@titlepage -@title GNU Info User's Guide -@subtitle For GNU Info version @value{InfoProgVer} -@author Brian J. Fox (bfox@@ai.mit.edu) -@page -@vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993, 1997 Free Software Foundation - -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -sections entitled ``Copying'' and ``GNU General Public License'' are -included exactly as in the original, and provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation -approved by the Free Software Foundation. -@end titlepage - -@ifinfo -@node Top, What is Info, , (dir) -@top The GNU Info Program - -This file documents GNU Info, a program for viewing the on-line -formatted versions of Texinfo files, version @value{InfoProgVer}. This -documentation is different from the documentation for the Info reader -that is part of GNU Emacs. -@end ifinfo - -@menu -* What is Info:: -* Options:: Options you can pass on the command line. -* Cursor Commands:: Commands which move the cursor within a node. -* Scrolling Commands:: Commands for moving the node around - in a window. -* Node Commands:: Commands for selecting a new node. -* Searching Commands:: Commands for searching an Info file. -* Xref Commands:: Commands for selecting cross references. -* Window Commands:: Commands which manipulate multiple windows. -* Printing Nodes:: How to print out the contents of a node. -* Miscellaneous Commands:: A few commands that defy categories. -* Variables:: How to change the default behavior of Info. -* GNU Info Global Index:: Global index containing keystrokes, - command names, variable names, - and general concepts. -@end menu - -@node What is Info, Options, Top, Top -@chapter What is Info? - -@iftex -This file documents GNU Info, a program for viewing the on-line formatted -versions of Texinfo files, version @value{InfoProgVer}. -@end iftex - -@dfn{Info} is a program which is used to view Info files on an ASCII -terminal. @dfn{Info files} are the result of processing Texinfo files -with the program @code{makeinfo} or with one of the Emacs commands, such -as @code{M-x texinfo-format-buffer}. Texinfo itself is a documentation -system that uses a single source file to produce both on-line -information and printed output. You can typeset and print the -files that you read in Info.@refill - -@node Options, Cursor Commands, What is Info, Top -@chapter Command Line Options -@cindex command line options -@cindex arguments, command line - -GNU Info accepts several options to control the initial node being -viewed, and to specify which directories to search for Info files. Here -is a template showing an invocation of GNU Info from the shell: - -@example -info [--@var{option-name} @var{option-value}] @var{menu-item}@dots{} -@end example - -The following @var{option-names} are available when invoking Info from -the shell: - -@table @code -@cindex directory path -@item --directory @var{directory-path} -@itemx -d @var{directory-path} -Add @var{directory-path} to the list of directory paths searched when -Info needs to find a file. You may issue @code{--directory} multiple -times; once for each directory which contains Info files. -Alternatively, you may specify a value for the environment variable -@code{INFOPATH}; if @code{--directory} is not given, the value of -@code{INFOPATH} is used. The value of @code{INFOPATH} is a colon -separated list of directory names. If you do not supply @code{INFOPATH} -or @code{--directory-path}, Info uses a default path. - -@item --file @var{filename} -@itemx -f @var{filename} -@cindex Info file, selecting -Specify a particular Info file to visit. By default, Info visits -the file @code{dir}; if you use this option, Info will start with -@code{(@var{filename})Top} as the first file and node. - -@item --index-search @var{string} -@cindex index search, selecting -@cindex online help, using Info as -Go to the index entry @var{string} in the Info file specified with -@samp{--file}. If no such entry, print @samp{no entries found} and exit -with nonzero status. This can used from another program as a way to -provide online help. - -@item --node @var{nodename} -@itemx -n @var{nodename} -@cindex node, selecting -Specify a particular node to visit in the initial file that Info -loads. This is especially useful in conjunction with -@code{--file}@footnote{Of course, you can specify both the file and node -in a @code{--node} command; but don't forget to escape the open and -close parentheses from the shell as in: @code{info --node -"(emacs)Buffers"}}. You may specify @code{--node} multiple times; for -an interactive Info, each @var{nodename} is visited in its own window, -for a non-interactive Info (such as when @code{--output} is given) each -@var{nodename} is processed sequentially. - -@item --output @var{filename} -@itemx -o @var{filename} -@cindex file, outputting to -@cindex outputting to a file -Specify @var{filename} as the name of a file to which to direct output. -Each node that Info visits will be output to @var{filename} instead of -interactively viewed. A value of @code{-} for @var{filename} specifies -the standard output. - -@item --subnodes -@cindex @code{--subnodes}, command line option -This option only has meaning when given in conjunction with -@code{--output}. It means to recursively output the nodes appearing in -the menus of each node being output. Menu items which resolve to -external Info files are not output, and neither are menu items which are -members of an index. Each node is only output once. - -@item --help -@itemx -h -Produces a relatively brief description of the available Info options. - -@item --version -@cindex version information -Prints the version information of Info and exits. - -@item @var{menu-item} -@cindex menu, following -Info treats its remaining arguments as the names of menu items. The -first argument is a menu item in the initial node visited, while -the second argument is a menu item in the first argument's node. -You can easily move to the node of your choice by specifying the menu -names which describe the path to that node. For example, - -@example -info emacs buffers -@end example - -@noindent -first selects the menu item @samp{Emacs} in the node @samp{(dir)Top}, -and then selects the menu item @samp{Buffers} in the node -@samp{(emacs)Top}. -@end table - -@node Cursor Commands, Scrolling Commands, Options, Top -@chapter Moving the Cursor -@cindex cursor, moving - -Many people find that reading screens of text page by page is made -easier when one is able to indicate particular pieces of text with some -kind of pointing device. Since this is the case, GNU Info (both the -Emacs and standalone versions) have several commands which allow you to -move the cursor about the screen. The notation used in this manual to -describe keystrokes is identical to the notation used within the Emacs -manual, and the GNU Readline manual. @xref{Characters, , Character -Conventions, emacs, the GNU Emacs Manual}, if you are unfamiliar with the -notation. - -The following table lists the basic cursor movement commands in Info. -Each entry consists of the key sequence you should type to execute the -cursor movement, the @code{M-x}@footnote{@code{M-x} is also a command; it -invokes @code{execute-extended-command}. @xref{M-x, , Executing an -extended command, emacs, the GNU Emacs Manual}, for more detailed -information.} command name (displayed in parentheses), and a short -description of what the command does. All of the cursor motion commands -can take an @dfn{numeric} argument (@pxref{Miscellaneous Commands, -@code{universal-argument}}), to find out how to supply them. With a -numeric argument, the motion commands are simply executed that -many times; for example, a numeric argument of 4 given to -@code{next-line} causes the cursor to move down 4 lines. With a -negative numeric argument, the motion is reversed; an argument of -4 -given to the @code{next-line} command would cause the cursor to move -@emph{up} 4 lines. - -@table @asis -@item @code{C-n} (@code{next-line}) -@kindex C-n -@findex next-line -Move the cursor down to the next line. - -@item @code{C-p} (@code{prev-line}) -@kindex C-p -@findex prev-line -Move the cursor up to the previous line. - -@item @code{C-a} (@code{beginning-of-line}) -@kindex C-a, in Info windows -@findex beginning-of-line -Move the cursor to the start of the current line. - -@item @code{C-e} (@code{end-of-line}) -@kindex C-e, in Info windows -@findex end-of-line -Move the cursor to the end of the current line. - -@item @code{C-f} (@code{forward-char}) -@kindex C-f, in Info windows -@findex forward-char -Move the cursor forward a character. - -@item @code{C-b} (@code{backward-char}) -@kindex C-b, in Info windows -@findex backward-char -Move the cursor backward a character. - -@item @code{M-f} (@code{forward-word}) -@kindex M-f, in Info windows -@findex forward-word -Move the cursor forward a word. - -@item @code{M-b} (@code{backward-word}) -@kindex M-b, in Info windows -@findex backward-word -Move the cursor backward a word. - -@item @code{M-<} (@code{beginning-of-node}) -@itemx @code{b} -@kindex b, in Info windows -@kindex M-< -@findex beginning-of-node -Move the cursor to the start of the current node. - -@item @code{M->} (@code{end-of-node}) -@kindex M-> -@findex end-of-node -Move the cursor to the end of the current node. - -@item @code{M-r} (@code{move-to-window-line}) -@kindex M-r -@findex move-to-window-line -Move the cursor to a specific line of the window. Without a numeric -argument, @code{M-r} moves the cursor to the start of the line in the -center of the window. With a numeric argument of @var{n}, @code{M-r} -moves the cursor to the start of the @var{n}th line in the window. -@end table - -@node Scrolling Commands, Node Commands, Cursor Commands, Top -@chapter Moving Text Within a Window -@cindex scrolling - -Sometimes you are looking at a screenful of text, and only part of the -current paragraph you are reading is visible on the screen. The -commands detailed in this section are used to shift which part of the -current node is visible on the screen. - -@table @asis -@item @code{SPC} (@code{scroll-forward}) -@itemx @code{C-v} -@kindex SPC, in Info windows -@kindex C-v -@findex scroll-forward -Shift the text in this window up. That is, show more of the node which -is currently below the bottom of the window. With a numeric argument, -show that many more lines at the bottom of the window; a numeric -argument of 4 would shift all of the text in the window up 4 lines -(discarding the top 4 lines), and show you four new lines at the bottom -of the window. Without a numeric argument, @key{SPC} takes the bottom -two lines of the window and places them at the top of the window, -redisplaying almost a completely new screenful of lines. - -@item @code{DEL} (@code{scroll-backward}) -@itemx @code{M-v} -@kindex DEL, in Info windows -@kindex M-v -@findex scroll-backward -Shift the text in this window down. The inverse of -@code{scroll-forward}. -@end table - -@cindex scrolling through node structure -The @code{scroll-forward} and @code{scroll-backward} commands can also -move forward and backward through the node structure of the file. If -you press @key{SPC} while viewing the end of a node, or @key{DEL} while -viewing the beginning of a node, what happens is controlled by the -variable @code{scroll-behavior}. @xref{Variables, -@code{scroll-behavior}}, for more information. - -@table @asis -@item @code{C-l} (@code{redraw-display}) -@kindex C-l -@findex redraw-display -Redraw the display from scratch, or shift the line containing the cursor -to a specified location. With no numeric argument, @samp{C-l} clears -the screen, and then redraws its entire contents. Given a numeric -argument of @var{n}, the line containing the cursor is shifted so that -it is on the @var{n}th line of the window. - -@item @code{C-x w} (@code{toggle-wrap}) -@kindex C-w -@findex toggle-wrap -Toggles the state of line wrapping in the current window. Normally, -lines which are longer than the screen width @dfn{wrap}, i.e., they are -continued on the next line. Lines which wrap have a @samp{\} appearing -in the rightmost column of the screen. You can cause such lines to be -terminated at the rightmost column by changing the state of line -wrapping in the window with @code{C-x w}. When a line which needs more -space than one screen width to display is displayed, a @samp{$} appears -in the rightmost column of the screen, and the remainder of the line is -invisible. -@end table - -@node Node Commands, Searching Commands, Scrolling Commands, Top -@chapter Selecting a New Node -@cindex nodes, selection of - -This section details the numerous Info commands which select a new node -to view in the current window. - -The most basic node commands are @samp{n}, @samp{p}, @samp{u}, and -@samp{l}. - -When you are viewing a node, the top line of the node contains some Info -@dfn{pointers} which describe where the next, previous, and up nodes -are. Info uses this line to move about the node structure of the file -when you use the following commands: - -@table @asis -@item @code{n} (@code{next-node}) -@kindex n -@findex next-node -Select the `Next' node. - -@item @code{p} (@code{prev-node}) -@kindex p -@findex prev-node -Select the `Prev' node. - -@item @code{u} (@code{up-node}) -@kindex u -@findex up-node -Select the `Up' node. -@end table - -You can easily select a node that you have already viewed in this window -by using the @samp{l} command -- this name stands for "last", and -actually moves through the list of already visited nodes for this -window. @samp{l} with a negative numeric argument moves forward through -the history of nodes for this window, so you can quickly step between -two adjacent (in viewing history) nodes. - -@table @asis -@item @code{l} (@code{history-node}) -@kindex l -@findex history-node -Select the most recently selected node in this window. -@end table - -Two additional commands make it easy to select the most commonly -selected nodes; they are @samp{t} and @samp{d}. - -@table @asis -@item @code{t} (@code{top-node}) -@kindex t -@findex top-node -Select the node @samp{Top} in the current Info file. - -@item @code{d} (@code{dir-node}) -@kindex d -@findex dir-node -Select the directory node (i.e., the node @samp{(dir)}). -@end table - -Here are some other commands which immediately result in the selection -of a different node in the current window: - -@table @asis -@item @code{<} (@code{first-node}) -@kindex < -@findex first-node -Selects the first node which appears in this file. This node is most -often @samp{Top}, but it does not have to be. - -@item @code{>} (@code{last-node}) -@kindex > -@findex last-node -Select the last node which appears in this file. - -@item @code{]} (@code{global-next-node}) -@kindex ] -@findex global-next-node -Move forward or down through node structure. If the node that you are -currently viewing has a @samp{Next} pointer, that node is selected. -Otherwise, if this node has a menu, the first menu item is selected. If -there is no @samp{Next} and no menu, the same process is tried with the -@samp{Up} node of this node. - -@item @code{[} (@code{global-prev-node}) -@kindex [ -@findex global-prev-node -Move backward or up through node structure. If the node that you are -currently viewing has a @samp{Prev} pointer, that node is selected. -Otherwise, if the node has an @samp{Up} pointer, that node is selected, -and if it has a menu, the last item in the menu is selected. -@end table - -You can get the same behavior as @code{global-next-node} and -@code{global-prev-node} while simply scrolling through the file with -@key{SPC} and @key{DEL}; @xref{Variables, @code{scroll-behavior}}, for -more information. - -@table @asis -@item @code{g} (@code{goto-node}) -@kindex g -@findex goto-node -Read the name of a node and select it. No completion is done while -reading the node name, since the desired node may reside in a separate -file. The node must be typed exactly as it appears in the Info file. A -file name may be included as with any node specification, for example - -@example -@code{g(emacs)Buffers} -@end example - -finds the node @samp{Buffers} in the Info file @file{emacs}. - -@item @code{C-x k} (@code{kill-node}) -@kindex C-x k -@findex kill-node -Kill a node. The node name is prompted for in the echo area, with a -default of the current node. @dfn{Killing} a node means that Info tries -hard to forget about it, removing it from the list of history nodes kept -for the window where that node is found. Another node is selected in -the window which contained the killed node. - -@item @code{C-x C-f} (@code{view-file}) -@kindex C-x C-f -@findex view-file -Read the name of a file and selects the entire file. The command -@example -@code{C-x C-f @var{filename}} -@end example -is equivalent to typing -@example -@code{g(@var{filename})*} -@end example - -@item @code{C-x C-b} (@code{list-visited-nodes}) -@kindex C-x C-b -@findex list-visited-nodes -Make a window containing a menu of all of the currently visited nodes. -This window becomes the selected window, and you may use the standard -Info commands within it. - -@item @code{C-x b} (@code{select-visited-node}) -@kindex C-x b -@findex select-visited-node -Select a node which has been previously visited in a visible window. -This is similar to @samp{C-x C-b} followed by @samp{m}, but no window is -created. -@end table - -@node Searching Commands, Xref Commands, Node Commands, Top -@chapter Searching an Info File -@cindex searching - -GNU Info allows you to search for a sequence of characters throughout an -entire Info file, search through the indices of an Info file, or find -areas within an Info file which discuss a particular topic. - -@table @asis -@item @code{s} (@code{search}) -@kindex s -@findex search -Read a string in the echo area and search for it. - -@item @code{C-s} (@code{isearch-forward}) -@kindex C-s -@findex isearch-forward -Interactively search forward through the Info file for a string as you -type it. - -@item @code{C-r} (@code{isearch-backward}) -@kindex C-r -@findex isearch-backward -Interactively search backward through the Info file for a string as -you type it. - -@item @code{i} (@code{index-search}) -@kindex i -@findex index-search -Look up a string in the indices for this Info file, and select a node -where the found index entry points to. - -@item @code{,} (@code{next-index-match}) -@kindex , -@findex next-index-match -Move to the node containing the next matching index item from the last -@samp{i} command. -@end table - -The most basic searching command is @samp{s} (@code{search}). The -@samp{s} command prompts you for a string in the echo area, and then -searches the remainder of the Info file for an occurrence of that string. -If the string is found, the node containing it is selected, and the -cursor is left positioned at the start of the found string. Subsequent -@samp{s} commands show you the default search string within @samp{[} and -@samp{]}; pressing @key{RET} instead of typing a new string will use the -default search string. - -@dfn{Incremental searching} is similar to basic searching, but the -string is looked up while you are typing it, instead of waiting until -the entire search string has been specified. - -@node Xref Commands, Window Commands, Searching Commands, Top -@chapter Selecting Cross References - -We have already discussed the @samp{Next}, @samp{Prev}, and @samp{Up} -pointers which appear at the top of a node. In addition to these -pointers, a node may contain other pointers which refer you to a -different node, perhaps in another Info file. Such pointers are called -@dfn{cross references}, or @dfn{xrefs} for short. - -@menu -* Parts of an Xref:: What a cross reference is made of. -* Selecting Xrefs:: Commands for selecting menu or note items. -@end menu - -@node Parts of an Xref, Selecting Xrefs, , Xref Commands -@section Parts of an Xref - -Cross references have two major parts: the first part is called the -@dfn{label}; it is the name that you can use to refer to the cross -reference, and the second is the @dfn{target}; it is the full name of -the node that the cross reference points to. - -The target is separated from the label by a colon @samp{:}; first the -label appears, and then the target. For example, in the sample menu -cross reference below, the single colon separates the label from the -target. - -@example -* Foo Label: Foo Target. More information about Foo. -@end example - -Note the @samp{.} which ends the name of the target. The @samp{.} is -not part of the target; it serves only to let Info know where the target -name ends. - -A shorthand way of specifying references allows two adjacent colons to -stand for a target name which is the same as the label name: - -@example -* Foo Commands:: Commands pertaining to Foo. -@end example - -In the above example, the name of the target is the same as the name of -the label, in this case @code{Foo Commands}. - -You will normally see two types of cross reference while viewing nodes: -@dfn{menu} references, and @dfn{note} references. Menu references -appear within a node's menu; they begin with a @samp{*} at the beginning -of a line, and continue with a label, a target, and a comment which -describes what the contents of the node pointed to contains. - -Note references appear within the body of the node text; they begin with -@code{*Note}, and continue with a label and a target. - -Like @samp{Next}, @samp{Prev}, and @samp{Up} pointers, cross references -can point to any valid node. They are used to refer you to a place -where more detailed information can be found on a particular subject. -Here is a cross reference which points to a node within the Texinfo -documentation: @xref{xref, , Writing an Xref, texinfo, the Texinfo -Manual}, for more information on creating your own texinfo cross -references. - -@node Selecting Xrefs, , Parts of an Xref, Xref Commands -@section Selecting Xrefs - -The following table lists the Info commands which operate on menu items. - -@table @asis -@item @code{1} (@code{menu-digit}) -@itemx @code{2} @dots{} @code{9} -@cindex 1 @dots{} 9, in Info windows -@kindex 1 @dots{} 9, in Info windows -@findex menu-digit -Within an Info window, pressing a single digit, (such as @samp{1}), -selects that menu item, and places its node in the current window. -For convenience, there is one exception; pressing @samp{0} selects the -@emph{last} item in the node's menu. - -@item @code{0} (@code{last-menu-item}) -@kindex 0, in Info windows -@findex last-menu-item -Select the last item in the current node's menu. - -@item @code{m} (@code{menu-item}) -@kindex m -@findex menu-item -Reads the name of a menu item in the echo area and selects its node. -Completion is available while reading the menu label. - -@item @code{M-x find-menu} -@findex find-menu -Move the cursor to the start of this node's menu. -@end table - -This table lists the Info commands which operate on note cross references. - -@table @asis -@item @code{f} (@code{xref-item}) -@itemx @code{r} -@kindex f -@kindex r -@findex xref-item -Reads the name of a note cross reference in the echo area and selects -its node. Completion is available while reading the cross reference -label. -@end table - -Finally, the next few commands operate on menu or note references alike: - -@table @asis -@item @code{TAB} (@code{move-to-next-xref}) -@kindex TAB, in Info windows -@findex move-to-next-xref -Move the cursor to the start of the next nearest menu item or note -reference in this node. You can then use @key{RET} -(@code{select-reference-this-line}) to select the menu or note reference. - -@item @code{M-TAB} (@code{move-to-prev-xref}) -@kindex M-TAB, in Info windows -@findex move-to-prev-xref -Move the cursor the start of the nearest previous menu item or note -reference in this node. - -@item @code{RET} (@code{select-reference-this-line}) -@kindex RET, in Info windows -@findex select-reference-this-line -Select the menu item or note reference appearing on this line. -@end table - -@node Window Commands, Printing Nodes, Xref Commands, Top -@chapter Manipulating Multiple Windows -@cindex windows, manipulating - -A @dfn{window} is a place to show the text of a node. Windows have a -view area where the text of the node is displayed, and an associated -@dfn{mode line}, which briefly describes the node being viewed. - -GNU Info supports multiple windows appearing in a single screen; each -window is separated from the next by its modeline. At any time, there -is only one @dfn{active} window, that is, the window in which the cursor -appears. There are commands available for creating windows, changing -the size of windows, selecting which window is active, and for deleting -windows. - -@menu -* The Mode Line:: What appears in the mode line? -* Basic Windows:: Manipulating windows in Info. -* The Echo Area:: Used for displaying errors and reading input. -@end menu - -@node The Mode Line, Basic Windows, , Window Commands -@section The Mode Line - -A @dfn{mode line} is a line of inverse video which appears at the bottom -of an Info window. It describes the contents of the window just above -it; this information includes the name of the file and node appearing in -that window, the number of screen lines it takes to display the node, -and the percentage of text that is above the top of the window. It can -also tell you if the indirect tags table for this Info file needs to be -updated, and whether or not the Info file was compressed when stored on -disk. - -Here is a sample mode line for a window containing an uncompressed file -named @file{dir}, showing the node @samp{Top}. - -@example -@group ------Info: (dir)Top, 40 lines --Top--------------------------------------- - ^^ ^ ^^^ ^^ - (file)Node #lines where -@end group -@end example - -When a node comes from a file which is compressed on disk, this is -indicated in the mode line with two small @samp{z}'s. In addition, if -the Info file containing the node has been split into subfiles, the name -of the subfile containing the node appears in the modeline as well: - -@example ---zz-Info: (emacs)Top, 291 lines --Top-- Subfile: emacs-1.Z--------------- -@end example - -When Info makes a node internally, such that there is no corresponding -info file on disk, the name of the node is surrounded by asterisks -(@samp{*}). The name itself tells you what the contents of the window -are; the sample mode line below shows an internally constructed node -showing possible completions: - -@example ------Info: *Completions*, 7 lines --All----------------------------------- -@end example - -@node Basic Windows, The Echo Area, The Mode Line, Window Commands -@section Window Commands - -It can be convenient to view more than one node at a time. To allow -this, Info can display more than one @dfn{window}. Each window has its -own mode line (@pxref{The Mode Line}) and history of nodes viewed in that -window (@pxref{Node Commands, , @code{history-node}}). - -@table @asis -@item @code{C-x o} (@code{next-window}) -@cindex windows, selecting -@kindex C-x o -@findex next-window -Select the next window on the screen. Note that the echo area can only be -selected if it is already in use, and you have left it temporarily. -Normally, @samp{C-x o} simply moves the cursor into the next window on -the screen, or if you are already within the last window, into the first -window on the screen. Given a numeric argument, @samp{C-x o} moves over -that many windows. A negative argument causes @samp{C-x o} to select -the previous window on the screen. - -@item @code{M-x prev-window} -@findex prev-window -Select the previous window on the screen. This is identical to -@samp{C-x o} with a negative argument. - -@item @code{C-x 2} (@code{split-window}) -@cindex windows, creating -@kindex C-x 2 -@findex split-window -Split the current window into two windows, both showing the same node. -Each window is one half the size of the original window, and the cursor -remains in the original window. The variable @code{automatic-tiling} -can cause all of the windows on the screen to be resized for you -automatically, please @pxref{Variables, , automatic-tiling} for more -information. - -@item @code{C-x 0} (@code{delete-window}) -@cindex windows, deleting -@kindex C-x 0 -@findex delete-window -Delete the current window from the screen. If you have made too many -windows and your screen appears cluttered, this is the way to get rid of -some of them. - -@item @code{C-x 1} (@code{keep-one-window}) -@kindex C-x 1 -@findex keep-one-window -Delete all of the windows excepting the current one. - -@item @code{ESC C-v} (@code{scroll-other-window}) -@kindex ESC C-v, in Info windows -@findex scroll-other-window -Scroll the other window, in the same fashion that @samp{C-v} might -scroll the current window. Given a negative argument, scroll the -"other" window backward. - -@item @code{C-x ^} (@code{grow-window}) -@kindex C-x ^ -@findex grow-window -Grow (or shrink) the current window. Given a numeric argument, grow -the current window that many lines; with a negative numeric argument, -shrink the window instead. - -@item @code{C-x t} (@code{tile-windows}) -@cindex tiling -@kindex C-x t -@findex tile-windows -Divide the available screen space among all of the visible windows. -Each window is given an equal portion of the screen in which to display -its contents. The variable @code{automatic-tiling} can cause -@code{tile-windows} to be called when a window is created or deleted. -@xref{Variables, , @code{automatic-tiling}}. -@end table - -@node The Echo Area, , Basic Windows, Window Commands -@section The Echo Area -@cindex echo area - -The @dfn{echo area} is a one line window which appears at the bottom of -the screen. It is used to display informative or error messages, and to -read lines of input from you when that is necessary. Almost all of the -commands available in the echo area are identical to their Emacs -counterparts, so please refer to that documentation for greater depth of -discussion on the concepts of editing a line of text. The following -table briefly lists the commands that are available while input is being -read in the echo area: - -@table @asis -@item @code{C-f} (@code{echo-area-forward}) -@kindex C-f, in the echo area -@findex echo-area-forward -Move forward a character. - -@item @code{C-b} (@code{echo-area-backward}) -@kindex C-b, in the echo area -@findex echo-area-backward -Move backward a character. - -@item @code{C-a} (@code{echo-area-beg-of-line}) -@kindex C-a, in the echo area -@findex echo-area-beg-of-line -Move to the start of the input line. - -@item @code{C-e} (@code{echo-area-end-of-line}) -@kindex C-e, in the echo area -@findex echo-area-end-of-line -Move to the end of the input line. - -@item @code{M-f} (@code{echo-area-forward-word}) -@kindex M-f, in the echo area -@findex echo-area-forward-word -Move forward a word. - -@item @code{M-b} (@code{echo-area-backward-word}) -@kindex M-b, in the echo area -@findex echo-area-backward-word -Move backward a word. - -@item @code{C-d} (@code{echo-area-delete}) -@kindex C-d, in the echo area -@findex echo-area-delete -Delete the character under the cursor. - -@item @code{DEL} (@code{echo-area-rubout}) -@kindex DEL, in the echo area -@findex echo-area-rubout -Delete the character behind the cursor. - -@item @code{C-g} (@code{echo-area-abort}) -@kindex C-g, in the echo area -@findex echo-area-abort -Cancel or quit the current operation. If completion is being read, -@samp{C-g} discards the text of the input line which does not match any -completion. If the input line is empty, @samp{C-g} aborts the calling -function. - -@item @code{RET} (@code{echo-area-newline}) -@kindex RET, in the echo area -@findex echo-area-newline -Accept (or forces completion of) the current input line. - -@item @code{C-q} (@code{echo-area-quoted-insert}) -@kindex C-q, in the echo area -@findex echo-area-quoted-insert -Insert the next character verbatim. This is how you can insert control -characters into a search string, for example. - -@item @var{printing character} (@code{echo-area-insert}) -@kindex printing characters, in the echo area -@findex echo-area-insert -Insert the character. - -@item @code{M-TAB} (@code{echo-area-tab-insert}) -@kindex M-TAB, in the echo area -@findex echo-area-tab-insert -Insert a TAB character. - -@item @code{C-t} (@code{echo-area-transpose-chars}) -@kindex C-t, in the echo area -@findex echo-area-transpose-chars -Transpose the characters at the cursor. -@end table - -The next group of commands deal with @dfn{killing}, and @dfn{yanking} -text. For an in depth discussion of killing and yanking, -@pxref{Killing, , Killing and Deleting, emacs, the GNU Emacs Manual} - -@table @asis -@item @code{M-d} (@code{echo-area-kill-word}) -@kindex M-d, in the echo area -@findex echo-area-kill-word -Kill the word following the cursor. - -@item @code{M-DEL} (@code{echo-area-backward-kill-word}) -@kindex M-DEL, in the echo area -@findex echo-area-backward-kill-word -Kill the word preceding the cursor. - -@item @code{C-k} (@code{echo-area-kill-line}) -@kindex C-k, in the echo area -@findex echo-area-kill-line -Kill the text from the cursor to the end of the line. - -@item @code{C-x DEL} (@code{echo-area-backward-kill-line}) -@kindex C-x DEL, in the echo area -@findex echo-area-backward-kill-line -Kill the text from the cursor to the beginning of the line. - -@item @code{C-y} (@code{echo-area-yank}) -@kindex C-y, in the echo area -@findex echo-area-yank -Yank back the contents of the last kill. - -@item @code{M-y} (@code{echo-area-yank-pop}) -@kindex M-y, in the echo area -@findex echo-area-yank-pop -Yank back a previous kill, removing the last yanked text first. -@end table - -Sometimes when reading input in the echo area, the command that needed -input will only accept one of a list of several choices. The choices -represent the @dfn{possible completions}, and you must respond with one -of them. Since there are a limited number of responses you can make, -Info allows you to abbreviate what you type, only typing as much of the -response as is necessary to uniquely identify it. In addition, you can -request Info to fill in as much of the response as is possible; this -is called @dfn{completion}. - -The following commands are available when completing in the echo area: - -@table @asis -@item @code{TAB} (@code{echo-area-complete}) -@itemx @code{SPC} -@kindex TAB, in the echo area -@kindex SPC, in the echo area -@findex echo-area-complete -Insert as much of a completion as is possible. - -@item @code{?} (@code{echo-area-possible-completions}) -@kindex ?, in the echo area -@findex echo-area-possible-completions -Display a window containing a list of the possible completions of what -you have typed so far. For example, if the available choices are: - -@example -@group -bar -foliate -food -forget -@end group -@end example - -@noindent -and you have typed an @samp{f}, followed by @samp{?}, the possible -completions would contain: - -@example -@group -foliate -food -forget -@end group -@end example - -@noindent -i.e., all of the choices which begin with @samp{f}. Pressing @key{SPC} -or @key{TAB} would result in @samp{fo} appearing in the echo area, since -all of the choices which begin with @samp{f} continue with @samp{o}. -Now, typing @samp{l} followed by @samp{TAB} results in @samp{foliate} -appearing in the echo area, since that is the only choice which begins -with @samp{fol}. - -@item @code{ESC C-v} (@code{echo-area-scroll-completions-window}) -@kindex ESC C-v, in the echo area -@findex echo-area-scroll-completions-window -Scroll the completions window, if that is visible, or the "other" -window if not. -@end table - -@node Printing Nodes, Miscellaneous Commands, Window Commands, Top -@chapter Printing Out Nodes -@cindex printing - -You may wish to print out the contents of a node as a quick reference -document for later use. Info provides you with a command for doing -this. In general, we recommend that you use @TeX{} to format the -document and print sections of it, by running @code{tex} on the Texinfo -source file. - -@table @asis -@item @code{M-x print-node} -@findex print-node -@cindex INFO_PRINT_COMMAND, environment variable -Pipe the contents of the current node through the command in the -environment variable @code{INFO_PRINT_COMMAND}. If the variable does not -exist, the node is simply piped to @code{lpr}. -@end table - -@node Miscellaneous Commands, Variables, Printing Nodes, Top -@chapter Miscellaneous Commands - -GNU Info contains several commands which self-document GNU Info: - -@table @asis -@item @code{M-x describe-command} -@cindex functions, describing -@cindex commands, describing -@findex describe-command -Read the name of an Info command in the echo area and then display a -brief description of what that command does. - -@item @code{M-x describe-key} -@cindex keys, describing -@findex describe-key -Read a key sequence in the echo area, and then display the name and -documentation of the Info command that the key sequence invokes. - -@item @code{M-x describe-variable} -Read the name of a variable in the echo area and then display a brief -description of what the variable affects. - -@item @code{M-x where-is} -@findex where-is -Read the name of an Info command in the echo area, and then display -a key sequence which can be typed in order to invoke that command. - -@item @code{C-h} (@code{get-help-window}) -@itemx @code{?} -@kindex C-h -@kindex ?, in Info windows -@findex get-help-window -Create (or Move into) the window displaying @code{*Help*}, and place -a node containing a quick reference card into it. This window displays -the most concise information about GNU Info available. - -@item @code{h} (@code{get-info-help-node}) -@kindex h -@findex get-info-help-node -Try hard to visit the node @code{(info)Help}. The Info file -@file{info.texi} distributed with GNU Info contains this node. Of -course, the file must first be processed with @code{makeinfo}, and then -placed into the location of your Info directory. -@end table - -Here are the commands for creating a numeric argument: - -@table @asis -@item @code{C-u} (@code{universal-argument}) -@cindex numeric arguments -@kindex C-u -@findex universal-argument -Start (or multiply by 4) the current numeric argument. @samp{C-u} is -a good way to give a small numeric argument to cursor movement or -scrolling commands; @samp{C-u C-v} scrolls the screen 4 lines, while -@samp{C-u C-u C-n} moves the cursor down 16 lines. - -@item @code{M-1} (@code{add-digit-to-numeric-arg}) -@itemx @code{M-2} @dots{} @code{M-9} -@kindex M-1 @dots{} M-9 -@findex add-digit-to-numeric-arg -Add the digit value of the invoking key to the current numeric -argument. Once Info is reading a numeric argument, you may just type -the digits of the argument, without the Meta prefix. For example, you -might give @samp{C-l} a numeric argument of 32 by typing: - -@example -@kbd{C-u 3 2 C-l} -@end example - -@noindent -or - -@example -@kbd{M-3 2 C-l} -@end example -@end table - -@samp{C-g} is used to abort the reading of a multi-character key -sequence, to cancel lengthy operations (such as multi-file searches) and -to cancel reading input in the echo area. - -@table @asis -@item @code{C-g} (@code{abort-key}) -@cindex cancelling typeahead -@cindex cancelling the current operation -@kindex C-g, in Info windows -@findex abort-key -Cancel current operation. -@end table - -The @samp{q} command of Info simply quits running Info. - -@table @asis -@item @code{q} (@code{quit}) -@cindex quitting -@kindex q -@findex quit -Exit GNU Info. -@end table - -If the operating system tells GNU Info that the screen is 60 lines tall, -and it is actually only 40 lines tall, here is a way to tell Info that -the operating system is correct. - -@table @asis -@item @code{M-x set-screen-height} -@findex set-screen-height -@cindex screen, changing the height of -Read a height value in the echo area and set the height of the -displayed screen to that value. -@end table - -Finally, Info provides a convenient way to display footnotes which might -be associated with the current node that you are viewing: - -@table @asis -@item @code{ESC C-f} (@code{show-footnotes}) -@kindex ESC C-f -@findex show-footnotes -@cindex footnotes, displaying -Show the footnotes (if any) associated with the current node in another -window. You can have Info automatically display the footnotes -associated with a node when the node is selected by setting the variable -@code{automatic-footnotes}. @xref{Variables, , @code{automatic-footnotes}}. -@end table - -@node Variables, GNU Info Global Index, Miscellaneous Commands, Top -@chapter Manipulating Variables - -GNU Info contains several @dfn{variables} whose values are looked at by -various Info commands. You can change the values of these variables, -and thus change the behavior of Info to more closely match your -environment and Info file reading manner. - -@table @asis -@item @code{M-x set-variable} -@cindex variables, setting -@findex set-variable -Read the name of a variable, and the value for it, in the echo area and -then set the variable to that value. Completion is available when -reading the variable name; often, completion is available when reading -the value to give to the variable, but that depends on the variable -itself. If a variable does @emph{not} supply multiple choices to -complete over, it expects a numeric value. - -@item @code{M-x describe-variable} -@cindex variables, describing -@findex describe-variable -Read the name of a variable in the echo area and then display a brief -description of what the variable affects. -@end table - -Here is a list of the variables that you can set in Info. - -@table @code -@item automatic-footnotes -@vindex automatic-footnotes -When set to @code{On}, footnotes appear and disappear automatically. -This variable is @code{On} by default. When a node is selected, a -window containing the footnotes which appear in that node is created, -and the footnotes are displayed within the new window. The window that -Info creates to contain the footnotes is called @samp{*Footnotes*}. If -a node is selected which contains no footnotes, and a @samp{*Footnotes*} -window is on the screen, the @samp{*Footnotes*} window is deleted. -Footnote windows created in this fashion are not automatically tiled so -that they can use as little of the display as is possible. - -@item automatic-tiling -@vindex automatic-tiling -When set to @code{On}, creating or deleting a window resizes other -windows. This variable is @code{Off} by default. Normally, typing -@samp{C-x 2} divides the current window into two equal parts. When -@code{automatic-tiling} is set to @code{On}, all of the windows are -resized automatically, keeping an equal number of lines visible in each -window. There are exceptions to the automatic tiling; specifically, the -windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not} -resized through automatic tiling; they remain their original size. - -@item visible-bell -@vindex visible-bell -When set to @code{On}, GNU Info attempts to flash the screen instead of -ringing the bell. This variable is @code{Off} by default. Of course, -Info can only flash the screen if the terminal allows it; in the case -that the terminal does not allow it, the setting of this variable has no -effect. However, you can make Info perform quietly by setting the -@code{errors-ring-bell} variable to @code{Off}. - -@item errors-ring-bell -@vindex errors-ring-bell -When set to @code{On}, errors cause the bell to ring. The default -setting of this variable is @code{On}. - -@item gc-compressed-files -@vindex gc-compressed-files -When set to @code{On}, Info garbage collects files which had to be -uncompressed. The default value of this variable is @code{Off}. -Whenever a node is visited in Info, the Info file containing that node -is read into core, and Info reads information about the tags and nodes -contained in that file. Once the tags information is read by Info, it -is never forgotten. However, the actual text of the nodes does not need -to remain in core unless a particular Info window needs it. For -non-compressed files, the text of the nodes does not remain in core when -it is no longer in use. But de-compressing a file can be a time -consuming operation, and so Info tries hard not to do it twice. -@code{gc-compressed-files} tells Info it is okay to garbage collect the -text of the nodes of a file which was compressed on disk. - -@item show-index-match -@vindex show-index-match -When set to @code{On}, the portion of the matched search string is -highlighted in the message which explains where the matched search -string was found. The default value of this variable is @code{On}. -When Info displays the location where an index match was found, -(@pxref{Searching Commands, , @code{next-index-match}}), the portion of the -string that you had typed is highlighted by displaying it in the inverse -case from its surrounding characters. - -@item scroll-behavior -@vindex scroll-behavior -Control what happens when forward scrolling is requested at the end of -a node, or when backward scrolling is requested at the beginning of a -node. The default value for this variable is @code{Continuous}. There -are three possible values for this variable: - -@table @code -@item Continuous -Try to get the first item in this node's menu, or failing that, the -@samp{Next} node, or failing that, the @samp{Next} of the @samp{Up}. -This behavior is identical to using the @samp{]} -(@code{global-next-node}) and @samp{[} (@code{global-prev-node}) -commands. - -@item Next Only -Only try to get the @samp{Next} node. - -@item Page Only -Simply give up, changing nothing. If @code{scroll-behavior} is -@code{Page Only}, no scrolling command can change the node that is being -viewed. -@end table - -@item scroll-step -@vindex scroll-step -The number of lines to scroll when the cursor moves out of the window. -Scrolling happens automatically if the cursor has moved out of the -visible portion of the node text when it is time to display. Usually -the scrolling is done so as to put the cursor on the center line of the -current window. However, if the variable @code{scroll-step} has a -nonzero value, Info attempts to scroll the node text by that many lines; -if that is enough to bring the cursor back into the window, that is what -is done. The default value of this variable is 0, thus placing the -cursor (and the text it is attached to) in the center of the window. -Setting this variable to 1 causes a kind of "smooth scrolling" which -some people prefer. - -@item ISO-Latin -@cindex ISO Latin characters -@vindex ISO-Latin -When set to @code{On}, Info accepts and displays ISO Latin characters. -By default, Info assumes an ASCII character set. @code{ISO-Latin} tells -Info that it is running in an environment where the European standard -character set is in use, and allows you to input such characters to -Info, as well as display them. -@end table - - - -@c the following is incomplete -@ignore -@c node Info for Sys Admins -@c chapter Info for System Administrators - -This text describes some common ways of setting up an Info hierarchy -from scratch, and details the various options that are available when -installing Info. This text is designed for the person who is installing -GNU Info on the system; although users may find the information present -in this section interesting, none of it is vital to understanding how to -use GNU Info. - -@menu -* Setting the INFOPATH:: Where are my Info files kept? -* Editing the DIR node:: What goes in `DIR', and why? -* Storing Info files:: Alternate formats allow flexibility in setups. -* Using `localdir':: Building DIR on the fly. -* Example setups:: Some common ways to organize Info files. -@end menu - -@c node Setting the INFOPATH -@c section Setting the INFOPATH - -Where are my Info files kept? - -@c node Editing the DIR node -@c section Editing the DIR node - -What goes in `DIR', and why? - -@c node Storing Info files -@c section Storing Info files - -Alternate formats allow flexibility in setups. - -@c node Using `localdir' -@c section Using `localdir' - -Building DIR on the fly. - -@c node Example setups -@c section Example setups - -Some common ways to organize Info files. -@end ignore - -@node GNU Info Global Index, , Variables, Top -@appendix Global Index - -@printindex cp - -@contents -@bye diff --git a/man/info.texi b/man/info.texi index d2fda6f..e9eab51 100644 --- a/man/info.texi +++ b/man/info.texi @@ -1,9 +1,9 @@ \input texinfo @c -*-texinfo-*- -@comment %**start of header +@comment %**start of header @setfilename ../info/info.info -@settitle Info 1.0 -@comment %**end of header -@comment $Id: info.texi,v 1.4 1997/07/10 21:58:11 karl Exp $ +@settitle Info +@comment %**end of header +@comment $Id: info.texi,v 1.4.2.3 1999/12/05 19:02:24 martinb Exp $ @dircategory Texinfo documentation system @direntry @@ -11,10 +11,10 @@ @end direntry @ifinfo -This file describes how to use Info, -the on-line, menu-driven GNU documentation system. +This file describes how to use Info, the on-line, menu-driven GNU +documentation system. -Copyright (C) 1989, 92, 96, 97 Free Software Foundation, Inc. +Copyright (C) 1989, 92, 96, 97, 98, 99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -44,10 +44,9 @@ by the Free Software Foundation. @author Brian Fox @page @vskip 0pt plus 1filll -Copyright @copyright{} 1989, 1992, 1993, 1996, 1997 Free Software +Copyright @copyright{} 1989, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc. @sp 2 - Published by the Free Software Foundation @* 59 Temple Place - Suite 330 @* Boston, MA 02111-1307, USA. @@ -67,31 +66,19 @@ except that this permission notice may be stated in a translation approved by the Free Software Foundation. @end titlepage -@ifinfo -@node Top, Getting Started, , (dir) +@node Top @top Info: An Introduction -Info is a program for reading documentation, which you are using now. - -To learn how to use Info, type the command @kbd{h}. It brings you -to a programmed instruction sequence. +Info is a program for reading documentation, which you might be using +now to read this. -@c Need to make sure that `Info-help' goes to the right node, -@c which is the first node of the first chapter. (It should.) -@c (Info-find-node "info" -@c (if (< (window-height) 23) -@c "Help-Small-Screen" -@c "Help"))) - -To learn advanced Info commands, type @kbd{n} twice. This brings you to -@cite{Info for Experts}, skipping over the `Getting Started' chapter. -@end ifinfo +To learn how to use Info, type the command @kbd{h} while using the Info +program. It brings you to a programmed instruction sequence. @menu * Getting Started:: Getting started using an Info reader. * Advanced Info:: Advanced commands within Info. -* Create an Info File:: How to make your own Info file. -* The Standalone Info Program: (info-stnd.info). +* Creating an Info File:: How to make your own Info file. @end menu @node Getting Started, Advanced Info, Top, Top @@ -101,7 +88,7 @@ To learn advanced Info commands, type @kbd{n} twice. This brings you to This first part of the Info manual describes how to get around inside of Info. The second part of the manual describes various advanced Info commands, and how to write an Info as distinct from a Texinfo -file. The third part is about how to generate Info files from +file. The third part is about how to generate Info files from Texinfo files. @iftex @@ -110,7 +97,7 @@ try Info commands while reading about them. Reading it on paper is less effective, since you must take it on faith that the commands described really do what the manual says. By all means go through this manual now that you have it; but please try going through the on-line version as -well. +well. There are two ways of looking at the online version of this manual: @@ -340,7 +327,7 @@ Info can interpret it. The beginning of a menu is always identified by a line which starts with @samp{* Menu:}. A node contains a menu if and only if it has a line in it which starts that way. The only menu you can use at any moment is the one in the node you are in. To use a -menu in any other node, you must move to that node first. +menu in any other node, you must move to that node first. After the start of the menu, each line that starts with a @samp{*} identifies one subtopic. The line usually contains a brief name @@ -427,16 +414,14 @@ what you have entered. not need to type the argument: you just type a Return, and it stands for the subtopic of the line you are on. -Here is a menu to give you a chance to practice. - -* Menu: The menu starts here. - -This menu gives you three ways of going to one place, Help-FOO. - -* Foo: Help-FOO. A node you can visit for fun.@* -* Bar: Help-FOO. Strange! two ways to get to the same place.@* -* Help-FOO:: And yet another!@* +Here is a menu to give you a chance to practice. This menu gives you +three ways of going to one place, Help-FOO: +@menu +* Foo: Help-FOO. A node you can visit for fun. +* Bar: Help-FOO. Strange! two ways to get to the same place. +* Help-FOO:: And yet another! +@end menu >> Now type just an @kbd{m} and see what happens: @@ -559,17 +544,16 @@ to cancel the @samp{f}. @c It is an accident of the menu updating command. @node Help-Cross, , , Help-Adv -@comment node-name, next, previous, up -@unnumberedsubsec The node reached by the cross reference in Info +@subsection The node reached by the cross reference in Info This is the node reached by the cross reference named @samp{Cross}. While this node is specifically intended to be reached by a cross -reference, most cross references lead to nodes that ``belong'' -someplace else far away in the structure of Info. So you cannot expect -the footnote to have a @samp{Next}, @samp{Previous} or @samp{Up} pointing back to -where you came from. In general, the @kbd{l} (el) command is the only -way to get back there. +reference, most cross references lead to nodes that ``belong'' someplace +else far away in the structure of Info. So you cannot expect the +footnote to have a @samp{Next}, @samp{Previous} or @samp{Up} pointing +back to where you came from. In general, the @kbd{l} (el) command is +the only way to get back there. >> Type @kbd{l} to return to the node where the cross reference was. @@ -590,15 +574,15 @@ manner. @samp{mInfo} and Return, to get to the node about Info and see what other help is available. -@node Advanced Info, Create an Info File, Getting Started, Top -@comment node-name, next, previous, up + +@node Advanced Info @chapter Info for Experts This chapter describes various advanced Info commands, and how to write an Info as distinct from a Texinfo file. (However, in most cases, writing a Texinfo file is better, since you can use it @emph{both} to generate an Info file and to make a printed manual. @xref{Top,, Overview of -Texinfo, texinfo, Texinfo: The GNU Documentation Format}.) +Texinfo, texinfo, Texinfo}.) @menu * Expert:: Advanced Info commands: g, s, e, and 1 - 5. @@ -639,12 +623,12 @@ type @kbd{s} followed by the string to search for, terminated by @key{RET}. To search for the same string again, just @kbd{s} followed by @key{RET} will do. The file's nodes are scanned in the order they are in in the file, which has no necessary relationship to the -order that they may be in in the tree structure of menus and @samp{next} pointers. -But normally the two orders are not very different. In any case, -you can always do a @kbd{b} to find out what node you have reached, if -the header is not visible (this can happen, because @kbd{s} puts your -cursor at the occurrence of the string, not at the beginning of the -node). +order that they may be in in the tree structure of menus and @samp{next} +pointers. But normally the two orders are not very different. In any +case, you can always do a @kbd{b} to find out what node you have +reached, if the header is not visible (this can happen, because @kbd{s} +puts your cursor at the occurrence of the string, not at the beginning +of the node). If you grudge the system each character of type-in it requires, you might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, ... @@ -652,9 +636,9 @@ might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, ... argument. @kbd{1} goes through the first item in the current node's menu; @kbd{2} goes through the second item, etc. -If you display supports multiple fonts, and you are using Emacs' Info +If your display supports multiple fonts, and you are using Emacs' Info mode to read Info files, the @samp{*} for the fifth menu item is -underlines, and so is the @samp{*} for the ninth item; these underlines +underlined, and so is the @samp{*} for the ninth item; these underlines make it easy to see at a glance which number to use for an item. On ordinary terminals, you won't have underlining. If you need to @@ -678,12 +662,12 @@ Create some nodes, in some file, to document that topic. Put that topic in the menu in the directory. @xref{Menus, Menu}. @end enumerate -Usually, the way to create the nodes is with Texinfo @pxref{Top,, Overview of -Texinfo, texinfo, Texinfo: The GNU Documentation Format}); this has the -advantage that you can also make a printed manual from them. However, -if hyou want to edit an Info file, here is how. +Usually, the way to create the nodes is with Texinfo (@pxref{Top,, +Overview of Texinfo, texinfo, Texinfo}); this has the advantage that you +can also make a printed manual from them. However, if you want to edit +an Info file, here is how. - The new node can live in an existing documentation file, or in a new +The new node can live in an existing documentation file, or in a new one. It must have a @key{^_} character before it (invisible to the user; this node has one but you cannot see it), and it ends with either a @key{^_}, a @key{^L}, or the end of file. Note: If you put in a @@ -693,12 +677,12 @@ Also, a nicer way to make a node boundary be a page boundary as well is to put a @key{^L} @emph{right after} the @key{^_}. The @key{^_} starting a node must be followed by a newline or a -@key{^L} newline, after which comes the node's header line. The -header line must give the node's name (by which Info finds it), -and state the names of the @samp{Next}, @samp{Previous}, and @samp{Up} nodes (if -there are any). As you can see, this node's @samp{Up} node is the node -@samp{Top}, which points at all the documentation for Info. The @samp{Next} -node is @samp{Menus}. +@key{^L} newline, after which comes the node's header line. The header +line must give the node's name (by which Info finds it), and state the +names of the @samp{Next}, @samp{Previous}, and @samp{Up} nodes (if there +are any). As you can see, this node's @samp{Up} node is the node +@samp{Top}, which points at all the documentation for Info. The +@samp{Next} node is @samp{Menus}. The keywords @dfn{Node}, @dfn{Previous}, @dfn{Up}, and @dfn{Next}, may appear in any order, anywhere in the header line, but the @@ -728,10 +712,10 @@ node @kbd{*} is to make it possible to make old-fashioned, unstructured files into nodes of the tree. The @samp{Node:} name, in which a node states its own name, must not -contain a filename, since Info when searching for a node does not -expect one to be there. The @samp{Next}, @samp{Previous} and @samp{Up} names may -contain them. In this node, since the @samp{Up} node is in the same file, -it was not necessary to use one. +contain a filename, since Info when searching for a node does not expect +one to be there. The @samp{Next}, @samp{Previous} and @samp{Up} names +may contain them. In this node, since the @samp{Up} node is in the same +file, it was not necessary to use one. Note that the nodes in this file have a file name in the header line. The file names are ignored by Info, but they serve as comments @@ -741,7 +725,7 @@ to help identify the node for the user. @comment node-name, next, previous, up @section How to Create Menus - Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes. + Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes. The @kbd{m} command searches the current node's menu for the topic which it reads from the terminal. @@ -766,11 +750,11 @@ short abbreviations. In a long menu, it is a good idea to capitalize the beginning of each item name which is the minimum acceptable abbreviation for it (a long menu is more than 5 or so entries). - The nodes listed in a node's menu are called its ``subnodes'', and -it is their ``superior''. They should each have an @samp{Up:} pointing at -the superior. It is often useful to arrange all or most of the -subnodes in a sequence of @samp{Next} and @samp{Previous} pointers so that someone who -wants to see them all need not keep revisiting the Menu. + The nodes listed in a node's menu are called its ``subnodes'', and it +is their ``superior''. They should each have an @samp{Up:} pointing at +the superior. It is often useful to arrange all or most of the subnodes +in a sequence of @samp{Next} and @samp{Previous} pointers so that +someone who wants to see them all need not keep revisiting the Menu. The Info Directory is simply the menu of the node @samp{(dir)Top}---that is, node @samp{Top} in file @file{.../info/dir}. You can put new entries @@ -816,7 +800,7 @@ They are just examples. The places they ``lead to'' do not really exist! You can speed up the access to nodes of a large Info file by giving it a tag table. Unlike the tag table for a program, the tag table for -an Info file lives inside the file itself and is used +an Info file lives inside the file itself and is used automatically whenever Info reads in the file. To make a tag table, go to a node in the file using Emacs Info mode and type @@ -847,24 +831,24 @@ the beginning of the node's header (ending just after the node name), a Delete character, and the character position in the file of the beginning of the node. + @node Checking, Emacs Info Variables, Tags, Advanced Info -@comment node-name, next, previous, up @section Checking an Info File - When creating an Info file, it is easy to forget the name of a node -when you are making a pointer to it from another node. If you put in -the wrong name for a node, this is not detected until someone -tries to go through the pointer using Info. Verification of the Info -file is an automatic process which checks all pointers to nodes and -reports any pointers which are invalid. Every @samp{Next}, @samp{Previous}, and +When creating an Info file, it is easy to forget the name of a node when +you are making a pointer to it from another node. If you put in the +wrong name for a node, this is not detected until someone tries to go +through the pointer using Info. Verification of the Info file is an +automatic process which checks all pointers to nodes and reports any +pointers which are invalid. Every @samp{Next}, @samp{Previous}, and @samp{Up} is checked, as is every menu item and every cross reference. In -addition, any @samp{Next} which does not have a @samp{Previous} pointing back is -reported. Only pointers within the file are checked, because checking -pointers to other files would be terribly slow. But those are usually -few. +addition, any @samp{Next} which does not have a @samp{Previous} pointing +back is reported. Only pointers within the file are checked, because +checking pointers to other files would be terribly slow. But those are +usually few. - To check an Info file, do @kbd{M-x Info-validate} while looking at -any node of the file with Emacs Info mode. +To check an Info file, do @kbd{M-x Info-validate} while looking at any +node of the file with Emacs Info mode. @node Emacs Info Variables, , Checking, Advanced Info @section Emacs Info-mode Variables @@ -894,18 +878,17 @@ The standard directory for Info documentation files. Only used when the function @code{Info-directory} is called. @end vtable -@node Create an Info File, , Advanced Info, Top -@comment node-name, next, previous, up -@chapter Creating an Info File from a Makeinfo file -@code{makeinfo} is a utility that converts a Texinfo file into an Info -file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are -GNU Emacs functions that do the same. +@node Creating an Info File +@chapter Creating an Info File + +@xref{Top,, Overview of Texinfo, texinfo, Texinfo}, to learn how to +write a Texinfo file. -@xref{Create an Info File, , Creating an Info File, texinfo, the Texinfo -Manual}, to learn how to create an Info file from a Texinfo file. +@xref{Creating an Info File,,, texinfo, Texinfo}, to learn how to create +an Info file from a Texinfo file. -@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU Documentation -Format}, to learn how to write a Texinfo file. +@xref{Installing an Info File,,, texinfo, Texinfo}, to learn how to +install an Info file after you have created one. @bye diff --git a/man/internals/Makefile b/man/internals/Makefile deleted file mode 100644 index 9229d29..0000000 --- a/man/internals/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# Makefile for the XEmacs Internals Manual. - -# This file is part of XEmacs. - -# XEmacs is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any -# later version. - -# XEmacs is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -# You should have received a copy of the GNU General Public License -# along with XEmacs; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -VERSION=1.0 -NAME=internals -manual = xemacs-internals-manual-19-$(VERSION) - -TEXI2DVI = texi2dvi -MAKEINFO = makeinfo - -# Uncomment this line for permuted index. -# permuted_index = 1 - -# List of all the texinfo files in the manual: - -srcs = internals.texi index.unperm index.perm - -all : info -info : ../../info/$(NAME).info - -../../info/$(NAME).info: $(srcs) index.texi - @echo "Expect a coredump if you are not using makeinfo 1.68 (or later)" - $(MAKEINFO) $(NAME).texi - @rm -f core - -dvi : $(NAME).dvi - -$(NAME).dvi: $(srcs) index.texi - # Avoid losing old contents of aux file entirely. - -mv $(NAME).aux $(NAME).oaux - # First shot to define xrefs: - $(TEX) $(NAME).texi - if [ a${permuted_index} != a ]; \ - then ./permute-index && mv permuted.fns $(NAME).fns; \ - else texindex $(NAME).??; \ - fi - $(TEX) $(NAME).texi - -index.texi: - if [ a${permuted_index} != a ]; \ - then ln -s index.perm index.texi; \ - else ln -s index.unperm index.texi; \ - fi - -.PHONY: mostlyclean clean distclean realclean extraclean -mostlyclean: - rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ - *.vr *.vrs *.pg *.pgs *.ky *.kys -clean: mostlyclean - rm -f *.dvi *.ps make.out core index.texi -distclean: clean -realclean: clean -extraclean: clean - -rm -f *~ \#* diff --git a/man/internals/index.perm b/man/internals/index.perm deleted file mode 100644 index 0624e15..0000000 --- a/man/internals/index.perm +++ /dev/null @@ -1,37 +0,0 @@ -@c -*-texinfo-*- -@setfilename ../../info/index.info - -@c Indexing guidelines - -@c I assume that all indexes will be combined. -@c Therefore, if a generated findex and permutations -@c cover the ways an index user would look up the entry, -@c then no cindex is added. -@c Concept index (cindex) entries will also be permuted. Therefore, they -@c have no commas and few irrelevant connectives in them. - -@c I tried to include words in a cindex that give the context of the entry, -@c particularly if there is more than one entry for the same concept. -@c For example, "nil in keymap" -@c Similarly for explicit findex and vindex entries, e.g. "print example". - -@c Error codes are given cindex entries, e.g. "end-of-file error". - -@c pindex is used for .el files and Unix programs - -@node Index, , Interface to X Windows, Top -@unnumbered Index - - -All variables, functions, keys, programs, files, and concepts are -in this one index. - -All names and concepts are permuted, so they appear several times, one -for each permutation of the parts of the name. For example, -@code{function-name} would appear as @b{function-name} and @b{name, -function-}. Key entries are not permuted, however. - - -@c Print the indices - -@printindex fn diff --git a/man/internals/index.unperm b/man/internals/index.unperm deleted file mode 100644 index 4a27571..0000000 --- a/man/internals/index.unperm +++ /dev/null @@ -1,37 +0,0 @@ -@c -*-texinfo-*- -@setfilename ../../info/index.info - -@c Indexing guidelines - -@c I assume that all indexes will be combined. -@c Therefore, if a generated findex and permutations -@c cover the ways an index user would look up the entry, -@c then no cindex is added. -@c Concept index (cindex) entries will also be permuted. Therefore, they -@c have no commas and few irrelevant connectives in them. - -@c I tried to include words in a cindex that give the context of the entry, -@c particularly if there is more than one entry for the same concept. -@c For example, "nil in keymap" -@c Similarly for explicit findex and vindex entries, e.g. "print example". - -@c Error codes are given cindex entries, e.g. "end-of-file error". - -@c pindex is used for .el files and Unix programs - -@node Index, , Interface to X Windows, Top -@unnumbered Index - -@ignore -All variables, functions, keys, programs, files, and concepts are -in this one index. - -All names and concepts are permuted, so they appear several times, one -for each permutation of the parts of the name. For example, -@code{function-name} would appear as @b{function-name} and @b{name, -function-}. Key entries are not permuted, however. -@end ignore - -@c Print the indices - -@printindex fn diff --git a/man/internals/internals.texi b/man/internals/internals.texi index 2366573..1a85269 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -63,11 +63,12 @@ instead of in the original English. @titlepage @title XEmacs Internals Manual -@subtitle Version 1.2, October 1998 +@subtitle Version 1.3, August 1999 @author Ben Wing @author Martin Buchholz @author Hrvoje Niksic +@author Matthias Neubauer @page @vskip 0pt plus 1fill @@ -78,8 +79,8 @@ Copyright @copyright{} 1994 - 1998 Free Software Foundation. @* Copyright @copyright{} 1994, 1995 Board of Trustees, University of Illinois. @sp 2 -Version 1.2 @* -October 1998.@* +Version 1.3 @* +August 1999.@* Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -127,7 +128,8 @@ This Info file contains v1.0 of the XEmacs Internals Manual. * Consoles; Devices; Frames; Windows:: * The Redisplay Mechanism:: * Extents:: -* Faces and Glyphs:: +* Faces:: +* Glyphs:: * Specifiers:: * Menus:: * Subprocesses:: @@ -174,6 +176,7 @@ Allocation of Objects in XEmacs Lisp * Introduction to Allocation:: * Garbage Collection:: * GCPROing:: +* Garbage Collection - Step by Step:: * Integers and Characters:: * Allocation from Frob Blocks:: * lrecords:: @@ -260,7 +263,9 @@ Extents * Mathematics of Extent Ordering:: A rigorous foundation. * Extent Fragments:: Cached information useful for redisplay. -Faces and Glyphs +Faces + +Glyphs Specifiers @@ -4370,6 +4375,7 @@ Asian-language support, and is not currently used. * Introduction to Allocation:: * Garbage Collection:: * GCPROing:: +* Garbage Collection - Step by Step:: * Integers and Characters:: * Allocation from Frob Blocks:: * lrecords:: @@ -4714,6 +4720,502 @@ will result in a few objects not getting collected when they should, but it obviates the need for @code{GCPRO}ing, and allows garbage collection to happen at any point at all, such as during object allocation. +@node Garbage Collection - Step by Step +@section Garbage Collection - Step by Step +@cindex garbage collection step by step + +@menu +* Invocation:: +* garbage_collect_1:: +* mark_object:: +* gc_sweep:: +* sweep_lcrecords_1:: +* compact_string_chars:: +* sweep_strings:: +* sweep_bit_vectors_1:: +@end menu + +@node Invocation +@subsection Invocation +@cindex garbage collection, invocation + +The first thing that anyone should know about garbage collection is: +when and how the garbage collector is invoked. One might think that this +could happen every time new memory is allocated, e.g. new objects are +created, but this is @emph{not} the case. Instead, we have the following +situation: + +The entry point of any process of garbage collection is an invocation +of the function @code{garbage_collect_1} in file @code{alloc.c}. The +invocation can occur @emph{explicitly} by calling the function +@code{Fgarbage_collect} (in addition this function provides information +about the freed memory), or can occur @emph{implicitly} in four different +situations: +@enumerate +@item +In function @code{main_1} in file @code{emacs.c}. This function is called +at each startup of xemacs. The garbage collection is invoked after all +initial creations are completed, but only if a special internal error +checking-constant @code{ERROR_CHECK_GC} is defined. +@item +In function @code{disksave_object_finalization} in file +@code{alloc.c}. The only purpose of this function is to clear the +objects from memory which need not be stored with xemacs when we dump out +an executable. This is only done by @code{Fdump_emacs} or by +@code{Fdump_emacs_data} respectively (both in @code{emacs.c}). The +actual clearing is accomplished by making these objects unreachable and +starting a garbage collection. The function is only used while building +xemacs. +@item +In function @code{Feval / eval} in file @code{eval.c}. Each time the +well known and often used function eval is called to evaluate a form, +one of the first things that could happen, is a potential call of +@code{garbage_collect_1}. There exist three global variables, +@code{consing_since_gc} (counts the created cons-cells since the last +garbage collection), @code{gc_cons_threshold} (a specified threshold +after which a garbage collection occurs) and @code{always_gc}. If +@code{always_gc} is set or if the threshold is exceeded, the garbage +collection will start. +@item +In function @code{Ffuncall / funcall} in file @code{eval.c}. This +function evaluates calls of elisp functions and works according to +@code{Feval}. +@end enumerate + +The upshot is that garbage collection can basically occur everywhere +@code{Feval}, respectively @code{Ffuncall}, is used - either directly or +through another function. Since calls to these two functions are +hidden in various other functions, many calls to +@code{garabge_collect_1} are not obviously foreseeable, and therefore +unexpected. Instances where they are used that are worth remembering are +various elisp commands, as for example @code{or}, +@code{and}, @code{if}, @code{cond}, @code{while}, @code{setq}, etc., +miscellaneous @code{gui_item_...} functions, everything related to +@code{eval} (@code{Feval_buffer}, @code{call0}, ...) and inside +@code{Fsignal}. The latter is used to handle signals, as for example the +ones raised by every @code{QUITE}-macro triggered after pressing Ctrl-g. + +@node garbage_collect_1 +@subsection @code{garbage_collect_1} +@cindex @code{garbage_collect_1} + +We can now describe exactly what happens after the invocation takes +place. +@enumerate +@item +There are several cases in which the garbage collector is left immediately: +when we are already garbage collecting (@code{gc_in_progress}), when +the garbage collection is somehow forbidden +(@code{gc_currently_forbidden}), when we are currently displaying something +(@code{in_display}) or when we are preparing for the armageddon of the +whole system (@code{preparing_for_armageddon}). +@item +Next the correct frame in which to put +all the output occurring during garbage collecting is determined. In +order to be able to restore the old display's state after displaying the +message, some data about the current cursor position has to be +saved. The variables @code{pre_gc_curser} and @code{cursor_changed} take +care of that. +@item +The state of @code{gc_currently_forbidden} must be restored after +the garbage collection, no matter what happens during the process. We +accomplish this by @code{record_unwind_protect}ing the suitable function +@code{restore_gc_inhibit} together with the current value of +@code{gc_currently_forbidden}. +@item +If we are concurrently running an interactive xemacs session, the next step +is simply to show the garbage collector's cursor/message. +@item +The following steps are the intrinsic steps of the garbage collector, +therefore @code{gc_in_progress} is set. +@item +For debugging purposes, it is possible to copy the current C stack +frame. However, this seems to be a currently unused feature. +@item +Before actually starting to go over all live objects, references to +objects that are no longer used are pruned. We only have to do this for events +(@code{clear_event_resource}) and for specifiers +(@code{cleanup_specifiers}). +@item +Now the mark phase begins and marks all accessible elements. In order to +start from +all slots that serve as roots of accessibility, the function +@code{mark_object} is called for each root individually to go out from +there to mark all reachable objects. All roots that are traversed are +shown in their processed order: +@itemize @bullet +@item +all constant symbols and static variables that are registered via +@code{staticpro}@ in the array @code{staticvec}. +@xref{Adding Global Lisp Variables}. +@item +all Lisp objects that are created in C functions and that must be +protected from freeing them. They are registered in the global +list @code{gcprolist}. +@xref{GCPROing}. +@item +all local variables (i.e. their name fields @code{symbol} and old +values @code{old_values}) that are bound during the evaluation by the Lisp +engine. They are stored in @code{specbinding} structs pushed on a stack +called @code{specpdl}. +@xref{Dynamic Binding; The specbinding Stack; Unwind-Protects}. +@item +all catch blocks that the Lisp engine encounters during the evaluation +cause the creation of structs @code{catchtag} inserted in the list +@code{catchlist}. Their tag (@code{tag}) and value (@code{val} fields +are freshly created objects and therefore have to be marked. +@xref{Catch and Throw}. +@item +every function application pushes new structs @code{backtrace} +on the call stack of the Lisp engine (@code{backtrace_list}). The unique +parts that have to be marked are the fields for each function +(@code{function}) and all their arguments (@code{args}). +@xref{Evaluation}. +@item +all objects that are used by the redisplay engine that must not be freed +are marked by a special function called @code{mark_redisplay} (in +@code{redisplay.c}). +@item +all objects created for profiling purposes are allocated by C functions +instead of using the lisp allocation mechanisms. In order to receive the +right ones during the sweep phase, they also have to be marked +manually. That is done by the function @code{mark_profiling_info} +@end itemize +@item +Hash tables in Xemacs belong to a kind of special objects that +make use of a concept often called 'weak pointers'. +To make a long story short, these kind of pointers are not followed +during the estimation of the live objects during garbage collection. +Any object referenced only by weak pointers is collected +anyway, and the reference to it is cleared. In hash tables there are +different usage patterns of them, manifesting in different types of hash +tables, namely 'non-weak', 'weak', 'key-weak' and 'value-weak' +(internally also 'key-car-weak' and 'value-car-weak') hash tables, each +clearing entries depending on different conditions. More information can +be found in the documentation to the function @code{make-hash-table}. + +Because there are complicated dependency rules about when and what to +mark while processing weak hash tables, the standard @code{marker} +method is only active if it is marking non-weak hash tables. As soon as +a weak component is in the table, the hash table entries are ignored +while marking. Instead their marking is done each separately by the +function @code{finish_marking_weak_hash_tables}. This function iterates +over each hash table entry @code{hentries} for each weak hash table in +@code{Vall_weak_hash_tables}. Depending on the type of a table, the +appropriate action is performed. +If a table is acting as @code{HASH_TABLE_KEY_WEAK}, and a key already marked, +everything reachable from the @code{value} component is marked. If it is +acting as a @code{HASH_TABLE_VALUE_WEAK} and the value component is +already marked, the marking starts beginning only from the +@code{key} component. +If it is a @code{HASH_TABLE_KEY_CAR_WEAK} and the car +of the key entry is already marked, we mark both the @code{key} and +@code{value} components. +Finally, if the table is of the type @code{HASH_TABLE_VALUE_CAR_WEAK} +and the car of the value components is already marked, again both the +@code{key} and the @code{value} components get marked. + +Again, there are lists with comparable properties called weak +lists. There exist different peculiarities of their types called +@code{simple}, @code{assoc}, @code{key-assoc} and +@code{value-assoc}. You can find further details about them in the +description to the function @code{make-weak-list}. The scheme of their +marking is similar: all weak lists are listed in @code{Qall_weak_lists}, +therefore we iterate over them. The marking is advanced until we hit an +already marked pair. Then we know that during a former run all +the rest has been marked completely. Again, depending on the special +type of the weak list, our jobs differ. If it is a @code{WEAK_LIST_SIMPLE} +and the elem is marked, we mark the @code{cons} part. If it is a +@code{WEAK_LIST_ASSOC} and not a pair or a pair with both marked car and +cdr, we mark the @code{cons} and the @code{elem}. If it is a +@code{WEAK_LIST_KEY_ASSOC} and not a pair or a pair with a marked car of +the elem, we mark the @code{cons} and the @code{elem}. Finally, if it is +a @code{WEAK_LIST_VALUE_ASSOC} and not a pair or a pair with a marked +cdr of the elem, we mark both the @code{cons} and the @code{elem}. + +Since, by marking objects in reach from weak hash tables and weak lists, +other objects could get marked, this perhaps implies further marking of +other weak objects, both finishing functions are redone as long as +yet unmarked objects get freshly marked. + +@item +After completing the special marking for the weak hash tables and for the weak +lists, all entries that point to objects that are going to be swept in +the further process are useless, and therefore have to be removed from +the table or the list. + +The function @code{prune_weak_hash_tables} does the job for weak hash +tables. Totally unmarked hash tables are removed from the list +@code{Vall_weak_hash_tables}. The other ones are treated more carefully +by scanning over all entries and removing one as soon as one of +the components @code{key} and @code{value} is unmarked. + +The same idea applies to the weak lists. It is accomplished by +@code{prune_weak_lists}: An unmarked list is pruned from +@code{Vall_weak_lists} immediately. A marked list is treated more +carefully by going over it and removing just the unmarked pairs. + +@item +The function @code{prune_specifiers} checks all listed specifiers held +in @code{Vall_speficiers} and removes the ones from the lists that are +unmarked. + +@item +All syntax tables are stored in a list called +@code{Vall_syntax_tables}. The function @code{prune_syntax_tables} walks +through it and unlinks the tables that are unmarked. + +@item +Next, we will attack the complete sweeping - the function +@code{gc_sweep} which holds the predominance. +@item +First, all the variables with respect to garbage collection are +reset. @code{consing_since_gc} - the counter of the created cells since +the last garbage collection - is set back to 0, and +@code{gc_in_progress} is not @code{true} anymore. +@item +In case the session is interactive, the displayed cursor and message are +removed again. +@item +The state of @code{gc_inhibit} is restored to the former value by +unwinding the stack. +@item +A small memory reserve is always held back that can be reached by +@code{breathing_space}. If nothing more is left, we create a new reserve +and exit. +@end enumerate + +@node mark_object +@subsection @code{mark_object} +@cindex @code{mark_object} + +The first thing that is checked while marking an object is whether the +object is a real Lisp object @code{Lisp_Type_Record} or just an integer +or a character. Integers and characters are the only two types that are +stored directly - without another level of indirection, and therefore they +don´t have to be marked and collected. +@xref{How Lisp Objects Are Represented in C}. + +The second case is the one we have to handle. It is the one when we are +dealing with a pointer to a Lisp object. But, there exist also three +possibilities, that prevent us from doing anything while marking: The +object is read only which prevents it from being garbage collected, +i.e. marked (@code{C_READONLY_RECORD_HEADER}). The object in question is +already marked, and need not be marked for the second time (checked by +@code{MARKED_RECORD_HEADER_P}). If it is a special, unmarkable object +(@code{UNMARKABLE_RECORD_HEADER_P}, apparently, these are objects that +sit in some CONST space, and can therefore not be marked, see +@code{this_one_is_unmarkable} in @code{alloc.c}). + +Now, the actual marking is feasible. We do so by once using the macro +@code{MARK_RECORD_HEADER} to mark the object itself (actually the +special flag in the lrecord header), and calling its special marker +"method" @code{marker} if available. The marker method marks every +other object that is in reach from our current object. Note, that these +marker methods should not call @code{mark_object} recursively, but +instead should return the next object from where further marking has to +be performed. + +In case another object was returned, as mentioned before, we reiterate +the whole @code{mark_object} process beginning with this next object. + +@node gc_sweep +@subsection @code{gc_sweep} +@cindex @code{gc_sweep} + +The job of this function is to free all unmarked records from memory. As +we know, there are different types of objects implemented and managed, and +consequently different ways to free them from memory. +@xref{Introduction to Allocation}. + +We start with all objects stored through @code{lcrecords}. All +bulkier objects are allocated and handled using that scheme of +@code{lcrecords}. Each object is @code{malloc}ed separately +instead of placing it in one of the contiguous frob blocks. All types +that are currently stored +using @code{lcrecords}´s @code{alloc_lcrecord} and +@code{make_lcrecord_list} are the types: vectors, buffers, +char-table, char-table-entry, console, weak-list, database, device, +ldap, hash-table, command-builder, extent-auxiliary, extent-info, face, +coding-system, frame, image-instance, glyph, popup-data, gui-item, +keymap, charset, color_instance, font_instance, opaque, opaque-list, +process, range-table, specifier, symbol-value-buffer-local, +symbol-value-lisp-magic, symbol-value-varalias, toolbar-button, +tooltalk-message, tooltalk-pattern, window, and window-configuration. We +take care of them in the fist place +in order to be able to handle and to finalize items stored in them more +easily. The function @code{sweep_lcrecords_1} as described below is +doing the whole job for us. +For a description about the internals: @xref{lrecords}. + +Our next candidates are the other objects that behave quite differently +than everything else: the strings. They consists of two parts, a +fixed-size portion (@code{struct Lisp_string}) holding the string's +length, its property list and a pointer to the second part, and the +actual string data, which is stored in string-chars blocks comparable to +frob blocks. In this block, the data is not only freed, but also a +compression of holes is made, i.e. all strings are relocated together. +@xref{String}. This compacting phase is performed by the function +@code{compact_string_chars}, the actual sweeping by the function +@code{sweep_strings} is described below. + +After that, the other types are swept step by step using functions +@code{sweep_conses}, @code{sweep_bit_vectors_1}, +@code{sweep_compiled_functions}, @code{sweep_floats}, +@code{sweep_symbols}, @code{sweep_extents}, @code{sweep_markers} and +@code{sweep_extents}. They are the fixed-size types cons, floats, +compiled-functions, symbol, marker, extent, and event stored in +so-called "frob blocks", and therefore we can basically do the same on +every type objects, using the same macros, especially defined only to +handle everything with respect to fixed-size blocks. The only fixed-size +type that is not handled here are the fixed-size portion of strings, +because we took special care of them earlier. + +The only big exceptions are bit vectors stored differently and +therefore treated differently by the function @code{sweep_bit_vectors_1} +described later. + +At first, we need some brief information about how +these fixed-size types are managed in general, in order to understand +how the sweeping is done. They have all a fixed size, and are therefore +stored in big blocks of memory - allocated at once - that can hold a +certain amount of objects of one type. The macro +@code{DECLARE_FIXED_TYPE_ALLOC} creates the suitable structures for +every type. More precisely, we have the block struct +(holding a pointer to the previous block @code{prev} and the +objects in @code{block[]}), a pointer to current block +(@code{current_..._block)}) and its last index +(@code{current_..._block_index}), and a pointer to the free list that +will be created. Also a macro @code{FIXED_TYPE_FROM_BLOCK} plus some +related macros exists that are used to obtain a new object, either from +the free list @code{ALLOCATE_FIXED_TYPE_1} if there is an unused object +of that type stored or by allocating a completely new block using +@code{ALLOCATE_FIXED_TYPE_FROM_BLOCK}. + +The rest works as follows: all of them define a +macro @code{UNMARK_...} that is used to unmark the object. They define a +macro @code{ADDITIONAL_FREE_...} that defines additional work that has +to be done when converting an object from in use to not in use (so far, +only markers use it in order to unchain them). Then, they all call +the macro @code{SWEEP_FIXED_TYPE_BLOCK} instantiated with their type name +and their struct name. + +This call in particular does the following: we go over all blocks +starting with the current moving towards the oldest. +For each block, we look at every object in it. If the object already +freed (checked with @code{FREE_STRUCT_P} using the first pointer of the +object), or if it is +set to read only (@code{C_READONLY_RECORD_HEADER_P}, nothing must be +done. If it is unmarked (checked with @code{MARKED_RECORD_HEADER_P}), it +is put in the free list and set free (using the macro +@code{FREE_FIXED_TYPE}, otherwise it stays in the block, but is unmarked +(by @code{UNMARK_...}). While going through one block, we note if the +whole block is empty. If so, the whole block is freed (using +@code{xfree}) and the free list state is set to the state it had before +handling this block. + +@node sweep_lcrecords_1 +@subsection @code{sweep_lcrecords_1} +@cindex @code{sweep_lcrecords_1} + +After nullifying the complete lcrecord statistics, we go over all +lcrecords two separate times. They are all chained together in a list with +a head called @code{all_lcrecords}. + +The first loop calls for each object its @code{finalizer} method, but only +in the case that it is not read only +(@code{C_READONLY_RECORD_HEADER_P)}, it is not already marked +(@code{MARKED_RECORD_HEADER_P}), it is not already in a free list (list of +freed objects, field @code{free}) and finally it owns a finalizer +method. + +The second loop actually frees the appropriate objects again by iterating +through the whole list. In case an object is read only or marked, it +has to persist, otherwise it is manually freed by calling +@code{xfree}. During this loop, the lcrecord statistics are kept up to +date by calling @code{tick_lcrecord_stats} with the right arguments, + +@node compact_string_chars +@subsection @code{compact_string_chars} +@cindex @code{compact_string_chars} + +The purpose of this function is to compact all the data parts of the +strings that are held in so-called @code{string_chars_block}, i.e. the +strings that do not exceed a certain maximal length. + +The procedure with which this is done is as follows. We are keeping two +positions in the @code{string_chars_block}s using two pointer/integer +pairs, namely @code{from_sb}/@code{from_pos} and +@code{to_sb}/@code{to_pos}. They stand for the actual positions, from +where to where, to copy the actually handled string. + +While going over all chained @code{string_char_block}s and their held +strings, staring at @code{first_string_chars_block}, both pointers +are advanced and eventually a string is copied from @code{from_sb} to +@code{to_sb}, depending on the status of the pointed at strings. + +More precisely, we can distinguish between the following actions. +@itemize @bullet +@item +The string at @code{from_sb}'s position could be marked as free, which +is indicated by an invalid pointer to the pointer that should point back +to the fixed size string object, and which is checked by +@code{FREE_STRUCT_P}. In this case, the @code{from_sb}/@code{from_pos} +is advanced to the next string, and nothing has to be copied. +@item +Also, if a string object itself is unmarked, nothing has to be +copied. We likewise advance the @code{from_sb}/@code{from_pos} +pair as described above. +@item +In all other cases, we have a marked string at hand. The string data +must be moved from the from-position to the to-position. In case +there is not enough space in the actual @code{to_sb}-block, we advance +this pointer to the beginning of the next block before copying. In case the +from and to positions are different, we perform the +actual copying using the library function @code{memmove}. +@end itemize + +After compacting, the pointer to the current +@code{string_chars_block}, sitting in @code{current_string_chars_block}, +is reset on the last block to which we moved a string, +i.e. @code{to_block}, and all remaining blocks (we know that they just +carry garbage) are explicitly @code{xfree}d. + +@node sweep_strings +@subsection @code{sweep_strings} +@cindex @code{sweep_strings} + +The sweeping for the fixed sized string objects is essentially exactly +the same as it is for all other fixed size types. As before, the freeing +into the suitable free list is done by using the macro +@code{SWEEP_FIXED_SIZE_BLOCK} after defining the right macros +@code{UNMARK_string} and @code{ADDITIONAL_FREE_string}. These two +definitions are a little bit special compared to the ones used +for the other fixed size types. + +@code{UNMARK_string} is defined the same way except some additional code +used for updating the bookkeeping information. + +For strings, @code{ADDITIONAL_FREE_string} has to do something in +addition: in case, the string was not allocated in a +@code{string_chars_block} because it exceeded the maximal length, and +therefore it was @code{malloc}ed separately, we know also @code{xfree} +it explicitly. + +@node sweep_bit_vectors_1 +@subsection @code{sweep_bit_vectors_1} +@cindex @code{sweep_bit_vectors_1} + +Bit vectors are also one of the rare types that are @code{malloc}ed +individually. Consequently, while sweeping, all further needless +bit vectors must be freed by hand. This is done, as one might imagine, +the expected way: since they are all registered in a list called +@code{all_bit_vectors}, all elements of that list are traversed, +all unmarked bit vectors are unlinked by calling @code{xfree} and all of +them become unmarked. +In addition, the bookkeeping information used for garbage +collector's output purposes is updated. + @node Integers and Characters @section Integers and Characters @@ -7004,18 +7506,18 @@ argument is evaluated more than once. Function equivalents of the above macros. @end deftypefun -@deftypefun int Lstream_read (Lstream *@var{stream}, void *@var{data}, int @var{size}) +@deftypefun ssize_t Lstream_read (Lstream *@var{stream}, void *@var{data}, size_t @var{size}) Read @var{size} bytes of @var{data} from the stream. Return the number of bytes read. 0 means EOF. -1 means an error occurred and no bytes were read. @end deftypefun -@deftypefun int Lstream_write (Lstream *@var{stream}, void *@var{data}, int @var{size}) +@deftypefun ssize_t Lstream_write (Lstream *@var{stream}, void *@var{data}, size_t @var{size}) Write @var{size} bytes of @var{data} to the stream. Return the number of bytes written. -1 means an error occurred and no bytes were written. @end deftypefun -@deftypefun void Lstream_unread (Lstream *@var{stream}, void *@var{data}, int @var{size}) +@deftypefun void Lstream_unread (Lstream *@var{stream}, void *@var{data}, size_t @var{size}) Push back @var{size} bytes of @var{data} onto the input queue. The next call to @code{Lstream_read()} with the same size will read the same bytes back. Note that this will be the case even if there is other @@ -7040,7 +7542,7 @@ Rewind the stream to the beginning. @node Lstream Methods @section Lstream Methods -@deftypefn {Lstream Method} int reader (Lstream *@var{stream}, unsigned char *@var{data}, int @var{size}) +@deftypefn {Lstream Method} ssize_t reader (Lstream *@var{stream}, unsigned char *@var{data}, size_t @var{size}) Read some data from the stream's end and store it into @var{data}, which can hold @var{size} bytes. Return the number of bytes read. A return value of 0 means no bytes can be read at this time. This may be because @@ -7057,7 +7559,7 @@ calls @code{Lstream_read()} with a very small size. This function can be @code{NULL} if the stream is output-only. @end deftypefn -@deftypefn {Lstream Method} int writer (Lstream *@var{stream}, CONST unsigned char *@var{data}, int @var{size}) +@deftypefn {Lstream Method} ssize_t writer (Lstream *@var{stream}, CONST unsigned char *@var{data}, size_t @var{size}) Send some data to the stream's end. Data to be sent is in @var{data} and is @var{size} bytes. Return the number of bytes sent. This function can send and return fewer bytes than is passed in; in that @@ -7402,6 +7904,7 @@ It Is Better To Be Fast Than Not To Be. @menu * Critical Redisplay Sections:: * Line Start Cache:: +* Redisplay Piece by Piece:: @end menu @node Critical Redisplay Sections @@ -7497,7 +8000,58 @@ the part of the cache starting at where the modification occurs. In case you're wondering, the Second Golden Rule of Redisplay is not applicable. -@node Extents, Faces and Glyphs, The Redisplay Mechanism, Top +@node Redisplay Piece by Piece +@section Redisplay Piece by Piece +@cindex Redisplay Piece by Piece + +As you can begin to see redisplay is complex and also not well +documented. Chuck no longer works on XEmacs so this section is my take +on the workings of redisplay. + +Redisplay happens in three phases: + +@enumerate +@item +Determine desired display in area that needs redisplay. +Implemented by @code{redisplay.c} +@item +Compare desired display with current display +Implemented by @code{redisplay-output.c} +@item +Output changes Implemented by @code{redisplay-output.c}, +@code{redisplay-x.c}, @code{redisplay-msw.c} and @code{redisplay-tty.c} +@end enumerate + +Steps 1 and 2 are device-independant and relatively complex. Step 3 is +mostly device-dependent. + +Determining the desired display + +Display attributes are stored in @code{display_line} structures. Each +@code{display_line} consists of a set of @code{display_block}'s and each +@code{display_block} contains a number of @code{rune}'s. Generally +dynarr's of @code{display_line}'s are held by each window representing +the current display and the desired display. + +The @code{display_line} structures are tighly tied to buffers which +presents a problem for redisplay as this connection is bogus for the +modeline. Hence the @code{display_line} generation routines are +duplicated for generating the modeline. This means that the modeline +display code has many bugs that the standard redisplay code does not. + +The guts of @code{display_line} generation are in +@code{create_text_block}, which creates a single display line for the +desired locale. This incrementally parses the characters on the current +line and generates redisplay structures for each. + +Gutter redisplay is different. Because the data to display is stored in +a string we cannot use @code{create_text_block}. Instead we use +@code{create_text_string_block} which performs the same function as +@code{create_text_block} but for strings. Many of the complexities of +@code{create_text_block} to do with cursor handling and selective +display have been removed. + +@node Extents, Faces, The Redisplay Mechanism, Top @chapter Extents @menu @@ -7785,12 +8339,74 @@ position when moving linearly through the buffer. They rely on the stack-of-extents code, which does the heavy-duty algorithmic work of determining which extents overly a particular position. -@node Faces and Glyphs, Specifiers, Extents, Top -@chapter Faces and Glyphs +@node Faces, Glyphs, Extents, Top +@chapter Faces Not yet documented. -@node Specifiers, Menus, Faces and Glyphs, Top +@node Glyphs, Specifiers, Faces, Top +@chapter Glyphs + +Glyphs are graphical elements that can be displayed in XEmacs buffers or +gutters. We use the term graphical element here in the broadest possible +sense since glyphs can be as mundane as text to as arcane as a native +tab widget. + +In XEmacs, glyphs represent the uninstantiated state of graphical +elements, i.e. they hold all the information necessary to produce an +image on-screen but the image does not exist at this stage. + +Glyphs are lazily instantiated by calling one of the glyph +functions. This usually occurs within redisplay when +@code{Fglyph_height} is called. Instantiation causes an image-instance +to be created and cached. This cache is on a device basis for all glyphs +except glyph-widgets, and on a window basis for glyph widgets. The +caching is done by @code{image_instantiate} and is necessary because it +is generally possible to display an image-instance in multiple +domains. For instance if we create a Pixmap, we can actually display +this on multiple windows - even though we only need a single Pixmap +instance to do this. If caching wasn't done then it would be necessary +to create image-instances for every displayable occurrance of a glyph - +and every usage - and this would be extremely memory and cpu intensive. + +Widget-glyphs (a.k.a native widgets) are not cached in this way. This is +because widget-glyph image-instances on screen are toolkit windows, and +thus cannot be reused in multiple XEmacs domains. Thus widget-glyphs are +cached on a window basis. + +Any action on a glyph first consults the cache before actually +instantiating a widget. + +@section Widget-Glyphs in the MS-WIndows Environment + +To Do + +@section Widget-Glyphs in the X Environment + +Widget-glyphs under X make heavy use of lwlib for manipulating the +native toolkit objects. This is primarily so that different toolkits can +be supported for widget-glyphs, just as they are supported for features +such as menubars etc. + +Lwlib is extremely poorly documented and quite hairy so here is my +understanding of what goes on. + +Lwlib maintains a set of widget_instances which mirror the hierarchical +state of Xt widgets. I think this is so that widgets can be updated and +manipulated generically by the lwlib library. For instance +update_one_widget_instance can cope with multiple types of widget and +multiple types of toolkit. Each element in the widget hierarchy is updated +from its corresponding widget_instance by walking the widget_instance +tree recursively. + +This has desirable properties such as lw_modify_all_widgets which is +called from glyphs-x.c and updates all the properties of a widget +without having to know what the widget is or what toolkit it is from. +Unfortunately this also has hairy properrties such as making the lwlib +code quite complex. And of course lwlib has to know at some level what +the widget is and how to set its properties. + +@node Specifiers, Menus, Glyphs, Top @chapter Specifiers Not yet documented. diff --git a/man/lispref/Makefile b/man/lispref/Makefile deleted file mode 100644 index 5ab9c87..0000000 --- a/man/lispref/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# Makefile for the XEmacs Lisp Programmer's Manual. - -# This file is part of XEmacs. - -# XEmacs is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any -# later version. - -# XEmacs is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -# You should have received a copy of the GNU General Public License -# along with XEmacs; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -VERSION=2.4 -NAME=lispref -manual = elisp-manual-19-$(VERSION) - -TEXI2DVI = texi2dvi -MAKEINFO = makeinfo - -# Uncomment this line for permuted index. -# permuted_index = 1 - -# List of all the texinfo files in the manual: - -srcs = abbrevs.texi annotations.texi back.texi backups.texi buffers.texi \ - building.texi commands.texi compile.texi consoles-devices.texi control.texi \ - databases.texi debugging.texi dialog.texi display.texi edebug-inc.texi \ - edebug.texi errors.texi eval.texi extents.texi faces.texi files.texi \ - frames.texi functions.texi glyphs.texi hash-tables.texi help.texi \ - hooks.texi index.texi internationalization.texi intro.texi \ - keymaps.texi ldap.texi lispref.texi lists.texi loading.texi locals.texi \ - macros.texi maps.texi markers.texi menus.texi minibuf.texi modes.texi \ - mouse.texi mule.texi numbers.texi objects.texi os.texi positions.texi \ - processes.texi range-tables.texi scrollbars.texi searching.texi \ - sequences.texi specifiers.texi streams.texi strings.texi symbols.texi \ - syntax.texi text.texi tips.texi toolbar.texi tooltalk.texi variables.texi \ - windows.texi x-windows.texi index.unperm index.perm - -all : info -info : ../../info/$(NAME).info - -../../info/$(NAME).info: $(srcs) index.texi - $(MAKEINFO) -o $@ $(NAME).texi - -dvi: $(NAME).dvi - -$(NAME).dvi: $(srcs) index.texi - # Avoid losing old contents of aux file entirely. - -mv $(NAME).aux $(NAME).oaux - # First shot to define xrefs: - $(TEX) $(NAME).texi - if [ a${permuted_index} != a ]; \ - then ./permute-index && mv permuted.fns $(NAME).fns; \ - else texindex $(NAME).??; \ - fi - $(TEX) $(NAME).texi - -index.texi: - if [ a${permuted_index} != a ]; \ - then ln -s index.perm index.texi; \ - else ln -s index.unperm index.texi; \ - fi - -.PHONY: mostlyclean clean distclean realclean extraclean -mostlyclean: - rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ - *.vr *.vrs *.pg *.pgs *.ky *.kys -clean: mostlyclean - rm -f *.dvi *.ps make.out core index.texi -distclean: clean -realclean: distclean -extraclean: distclean - -rm -f *~ \#* diff --git a/man/lispref/commands.texi b/man/lispref/commands.texi index 49b599c..9fc3616 100644 --- a/man/lispref/commands.texi +++ b/man/lispref/commands.texi @@ -874,7 +874,7 @@ The contents of each event are as follows: @item channel @item timestamp @item key - Which key was pressed. This is an integer (in the printing @sc{ASCII} + Which key was pressed. This is an integer (in the printing @sc{ascii} range: >32 and <127) or a symbol such as @code{left} or @code{right}. Note that many physical keys are actually treated as two separate keys, depending on whether the shift key is pressed; for example, the ``a'' @@ -1252,7 +1252,7 @@ This function returns the device that the given event occurred on. @defun event-key event This function returns the Keysym of the given key-press event. -This will be the @sc{ASCII} code of a printing character, or a symbol. +This will be the @sc{ascii} code of a printing character, or a symbol. @end defun @defun event-button event @@ -1450,10 +1450,10 @@ that is safe. XEmacs provides some auxiliary functions for converting between events and other ways of representing keys. These are useful when working with -@sc{ASCII} strings and with keymaps. +@sc{ascii} strings and with keymaps. @defun character-to-event ch &optional event device -This function converts a numeric @sc{ASCII} value to an event structure, +This function converts a numeric @sc{ascii} value to an event structure, replete with modifier bits. @var{ch} is the character to convert, and @var{event} is the event object to fill in. This function contains knowledge about what the codes ``mean'' -- for example, the number 9 is @@ -1474,19 +1474,19 @@ high bit as meta. Beware that @code{character-to-event} and @code{event-to-character} are not strictly inverse functions, since events contain much more -information than the @sc{ASCII} character set can encode. +information than the @sc{ascii} character set can encode. @end defun @defun event-to-character event &optional allow-extra-modifiers allow-meta allow-non-ascii -This function returns the closest @sc{ASCII} approximation to +This function returns the closest @sc{ascii} approximation to @var{event}. If the event isn't a keypress, this returns @code{nil}. If @var{allow-extra-modifiers} is non-@code{nil}, then this is lenient in its translation; it will ignore modifier keys other than @key{control} and @key{meta}, and will ignore the @key{shift} modifier -on those characters which have no shifted @sc{ASCII} equivalent +on those characters which have no shifted @sc{ascii} equivalent (@key{Control-Shift-A} for example, will be mapped to the same -@sc{ASCII} code as @key{Control-A}). +@sc{ascii} code as @key{Control-A}). If @var{allow-meta} is non-@code{nil}, then the @key{Meta} modifier will be represented by turning on the high bit of the byte returned; @@ -1497,7 +1497,7 @@ If @var{allow-non-ascii} is non-@code{nil}, then characters which are present in the prevailing character set (@pxref{Keymaps, variable @code{character-set-property}}) will be returned as their code in that character set, instead of the return value being restricted to -@sc{ASCII}. +@sc{ascii}. Note that specifying both @var{allow-meta} and @var{allow-non-ascii} is ambiguous, as both use the high bit; @key{M-x} and @key{oslash} will be @@ -1506,7 +1506,7 @@ indistinguishable. @defun events-to-keys events &optional no-mice Given a vector of event objects, this function returns a vector of key -descriptors, or a string (if they all fit in the @sc{ASCII} range). +descriptors, or a string (if they all fit in the @sc{ascii} range). Optional arg @var{no-mice} means that button events are not allowed. @end defun @@ -1656,7 +1656,7 @@ press the right-arrow function key: @defun read-char This function reads and returns a character of command input. If a mouse click is detected, an error is signalled. The character typed is -returned as an @sc{ASCII} value. This function is retained for +returned as an @sc{ascii} value. This function is retained for compatibility with Emacs 18, and is most likely the wrong thing for you to be using: consider using @code{next-command-event} instead. @end defun @@ -1803,8 +1803,8 @@ value of @code{last-command-event}. @defvar last-input-char If the value of @code{last-input-event} is a keyboard event, then this -is the nearest @sc{ASCII} equivalent to it. Remember that there is -@emph{not} a 1:1 mapping between keyboard events and @sc{ASCII} +is the nearest @sc{ascii} equivalent to it. Remember that there is +@emph{not} a 1:1 mapping between keyboard events and @sc{ascii} characters: the set of keyboard events is much larger, so writing code that examines this variable to determine what key has been typed is bad practice, unless you are certain that it will be one of a small set of diff --git a/man/lispref/display.texi b/man/lispref/display.texi index 3d1e992..1517f0f 100644 --- a/man/lispref/display.texi +++ b/man/lispref/display.texi @@ -874,13 +874,13 @@ Character code 10 is a newline. All other codes in the range 0 through 31, and code 127, display in one of two ways according to the value of @code{ctl-arrow}. If it is non-@code{nil}, these codes map to sequences of two glyphs, where the -first glyph is the @sc{ASCII} code for @samp{^}. (A display table can +first glyph is the @sc{ascii} code for @samp{^}. (A display table can specify a glyph to use instead of @samp{^}.) Otherwise, these codes map just like the codes in the range 128 to 255. @item Character codes 128 through 255 map to sequences of four glyphs, where -the first glyph is the @sc{ASCII} code for @samp{\}, and the others are +the first glyph is the @sc{ascii} code for @samp{\}, and the others are digit characters representing the code in octal. (A display table can specify a glyph to use instead of @samp{\}.) @end itemize @@ -921,7 +921,7 @@ stops used by the command @code{tab-to-tab-stop}. @xref{Indent Tabs}. @cindex display table You can use the @dfn{display table} feature to control how all 256 possible character codes display on the screen. This is useful for -displaying European languages that have letters not in the @sc{ASCII} +displaying European languages that have letters not in the @sc{ascii} character set. The display table maps each character code into a sequence of @@ -1040,9 +1040,9 @@ set, you can arrange to use that character set as follows: @end example If you are editing buffers written in the ISO Latin 1 character set and -your terminal doesn't handle anything but @sc{ASCII}, you can load the +your terminal doesn't handle anything but @sc{ascii}, you can load the file @file{iso-ascii} to set up a display table that displays the other -ISO characters as explanatory sequences of @sc{ASCII} characters. For +ISO characters as explanatory sequences of @sc{ascii} characters. For example, the character ``o with umlaut'' displays as @samp{@{"o@}}. Some European countries have terminals that don't support ISO Latin 1 diff --git a/man/lispref/faces.texi b/man/lispref/faces.texi index 09a0bc4..8a6b0ae 100644 --- a/man/lispref/faces.texi +++ b/man/lispref/faces.texi @@ -672,7 +672,7 @@ result. @end defun @defun color-rgb-components color &optional domain -This function returns the @sc{RGB} components of the @var{color} in the +This function returns the @sc{rgb} components of the @var{color} in the specified @var{domain}, if any. @var{color} should be a color specifier object and @var{domain} is normally a window and defaults to the selected window if omitted. This is equivalent to using diff --git a/man/lispref/functions.texi b/man/lispref/functions.texi index e1aa70b..63b964a 100644 --- a/man/lispref/functions.texi +++ b/man/lispref/functions.texi @@ -716,7 +716,7 @@ length of @var{sequence}. Return the list of results." ;; @r{If no list is exhausted,} (if (not (memq 'nil args)) - ;; @r{apply function to @sc{CAR}s.} + ;; @r{apply function to @sc{car}s.} (cons (apply f (mapcar 'car args)) (apply 'mapcar* f ;; @r{Recurse for rest of elements.} diff --git a/man/lispref/hash-tables.texi b/man/lispref/hash-tables.texi index ddf239b..6d0b646 100644 --- a/man/lispref/hash-tables.texi +++ b/man/lispref/hash-tables.texi @@ -72,19 +72,25 @@ The structure syntax accepts the same keywords as @code{make-hash-table} (without the @code{:} character), as well as the additional keyword @code{data}, which specifies the initial hash table contents. -@defun make-hash-table &key @code{:size} @code{:test} @code{:type} @code{:rehash-size} @code{:rehash-threshold} +@defun make-hash-table &key @code{test} @code{size} @code{rehash-size} @code{rehash-threshold} @code{weakness} This function returns a new empty hash table object. -Keyword @code{:size} specifies the number of keys likely to be inserted. -This number of entries can be inserted without enlarging the hash table. - Keyword @code{:test} can be @code{eq}, @code{eql} (default) or @code{equal}. Comparison between keys is done using this function. If speed is important, consider using @code{eq}. When storing strings in the hash table, you will likely need to use @code{equal}. -Keyword @code{:type} can be @code{non-weak} (default), @code{weak}, -@code{key-weak} or @code{value-weak}. +Keyword @code{:size} specifies the number of keys likely to be inserted. +This number of entries can be inserted without enlarging the hash table. + +Keyword @code{:rehash-size} must be a float greater than 1.0, and specifies +the factor by which to increase the size of the hash table when enlarging. + +Keyword @code{:rehash-threshold} must be a float between 0.0 and 1.0, +and specifies the load factor of the hash table which triggers enlarging. + +Keyword @code{:weakness} can be @code{nil} (default), @code{t}, +@code{key} or @code{value}. A weak hash table is one whose pointers do not count as GC referents: for any key-value pair in the hash table, if the only remaining pointer @@ -104,12 +110,6 @@ that a key-value pair will be removed only if the value remains unmarked outside of weak hash tables. The pair will remain in the hash table if the value is pointed to by something other than a weak hash table, even if the key is not. - -Keyword @code{:rehash-size} must be a float greater than 1.0, and specifies -the factor by which to increase the size of the hash table when enlarging. - -Keyword @code{:rehash-threshold} must be a float between 0.0 and 1.0, -and specifies the load factor of the hash table which triggers enlarging. @end defun @defun copy-hash-table hash-table @@ -122,22 +122,16 @@ copied. This function returns the number of entries in @var{hash-table}. @end defun -@defun hash-table-size hash-table -This function returns the current number of slots in @var{hash-table}, -whether occupied or not. -@end defun - -@defun hash-table-type hash-table -This function returns the type of @var{hash-table}. -This can be one of @code{non-weak}, @code{weak}, @code{key-weak} or -@code{value-weak}. -@end defun - @defun hash-table-test hash-table This function returns the test function of @var{hash-table}. This can be one of @code{eq}, @code{eql} or @code{equal}. @end defun +@defun hash-table-size hash-table +This function returns the current number of slots in @var{hash-table}, +whether occupied or not. +@end defun + @defun hash-table-rehash-size hash-table This function returns the current rehash size of @var{hash-table}. This is a float greater than 1.0; the factor by which @var{hash-table} @@ -150,6 +144,11 @@ This is a float between 0.0 and 1.0; the maximum @dfn{load factor} of @var{hash-table}, beyond which the @var{hash-table} is enlarged by rehashing. @end defun +@defun hash-table-weakness hash-table +This function returns the weakness of @var{hash-table}. +This can be one of @code{nil}, @code{t}, @code{key} or @code{value}. +@end defun + @node Working With Hash Tables @section Working With Hash Tables @@ -181,6 +180,7 @@ that @var{function} may remhash or puthash the entry currently being processed by @var{function}. @end defun + @node Weak Hash Tables @section Weak Hash Tables @cindex hash table, weak @@ -220,5 +220,5 @@ of the table, regardless of how the key is referenced. Also see @ref{Weak Lists}. -Weak hash tables are created by specifying the @code{:type} keyword to +Weak hash tables are created by specifying the @code{:weakness} keyword to @code{make-hash-table}. diff --git a/man/lispref/index.perm b/man/lispref/index.perm deleted file mode 100644 index 163d218..0000000 --- a/man/lispref/index.perm +++ /dev/null @@ -1,37 +0,0 @@ -@c -*-texinfo-*- -@setfilename ../../info/index.info - -@c Indexing guidelines - -@c I assume that all indexes will be combined. -@c Therefore, if a generated findex and permutations -@c cover the ways an index user would look up the entry, -@c then no cindex is added. -@c Concept index (cindex) entries will also be permuted. Therefore, they -@c have no commas and few irrelevant connectives in them. - -@c I tried to include words in a cindex that give the context of the entry, -@c particularly if there is more than one entry for the same concept. -@c For example, "nil in keymap" -@c Similarly for explicit findex and vindex entries, e.g. "print example". - -@c Error codes are given cindex entries, e.g. "end-of-file error". - -@c pindex is used for .el files and Unix programs - -@node Index, , Standard Hooks, Top -@unnumbered Index - - -All variables, functions, keys, programs, files, and concepts are -in this one index. - -All names and concepts are permuted, so they appear several times, one -for each permutation of the parts of the name. For example, -@code{function-name} would appear as @b{function-name} and @b{name, -function-}. Key entries are not permuted, however. - - -@c Print the indices - -@printindex fn diff --git a/man/lispref/index.unperm b/man/lispref/index.unperm deleted file mode 100644 index 31ed313..0000000 --- a/man/lispref/index.unperm +++ /dev/null @@ -1,37 +0,0 @@ -@c -*-texinfo-*- -@setfilename ../../info/index.info - -@c Indexing guidelines - -@c I assume that all indexes will be combined. -@c Therefore, if a generated findex and permutations -@c cover the ways an index user would look up the entry, -@c then no cindex is added. -@c Concept index (cindex) entries will also be permuted. Therefore, they -@c have no commas and few irrelevant connectives in them. - -@c I tried to include words in a cindex that give the context of the entry, -@c particularly if there is more than one entry for the same concept. -@c For example, "nil in keymap" -@c Similarly for explicit findex and vindex entries, e.g. "print example". - -@c Error codes are given cindex entries, e.g. "end-of-file error". - -@c pindex is used for .el files and Unix programs - -@node Index, , Standard Hooks, Top -@unnumbered Index - -@ignore -All variables, functions, keys, programs, files, and concepts are -in this one index. - -All names and concepts are permuted, so they appear several times, one -for each permutation of the parts of the name. For example, -@code{function-name} would appear as @b{function-name} and @b{name, -function-}. Key entries are not permuted, however. -@end ignore - -@c Print the indices - -@printindex fn diff --git a/man/lispref/intro.texi b/man/lispref/intro.texi index 0896fce..93f6309 100644 --- a/man/lispref/intro.texi +++ b/man/lispref/intro.texi @@ -471,7 +471,7 @@ which you are criticizing. @end ifinfo This manual was originally written for FSF Emacs 19 and was updated by -Ben Wing (wing@@666.com) for Lucid Emacs 19.10 and later for XEmacs +Ben Wing (ben@@xemacs.org) for Lucid Emacs 19.10 and later for XEmacs 19.12, 19.13, 19.14, and 20.0. It was further updated by the XEmacs Development Team for 19.15 and 20.1. Please send comments and corrections relating to XEmacs-specific portions of this manual to diff --git a/man/lispref/keymaps.texi b/man/lispref/keymaps.texi index 3fd15ff..e7ea2a7 100644 --- a/man/lispref/keymaps.texi +++ b/man/lispref/keymaps.texi @@ -235,7 +235,7 @@ if it has none. @section Key Sequences @cindex key sequences - Contrary to popular belief, the world is not @sc{ASCII}. When running + Contrary to popular belief, the world is not @sc{ascii}. When running under a window manager, XEmacs can tell the difference between, for example, the keystrokes @kbd{control-h}, @kbd{control-shift-h}, and @kbd{backspace}. You can, in fact, bind different commands to each of @@ -246,8 +246,8 @@ keysym and some set of modifiers (such as @key{CONTROL} and @key{META}). A @dfn{keysym} is what is printed on the keys on your keyboard. A keysym may be represented by a symbol, or (if and only if it is -equivalent to an @sc{ASCII} character in the range 32 - 255) by a -character or its equivalent @sc{ASCII} code. The @kbd{A} key may be +equivalent to an @sc{ascii} character in the range 32 - 255) by a +character or its equivalent @sc{ascii} code. The @kbd{A} key may be represented by the symbol @code{A}, the character @code{?A}, or by the number 65. The @kbd{break} key may be represented only by the symbol @code{break}. @@ -262,12 +262,12 @@ keystroke may also be represented by an event object, as returned by the @code{next-command-event} and @code{read-key-sequence} functions. Note that in this context, the keystroke @kbd{control-b} is @emph{not} -represented by the number 2 (the @sc{ASCII} code for @samp{^B}) or the +represented by the number 2 (the @sc{ascii} code for @samp{^B}) or the character @code{?\^B}. See below. The @key{SHIFT} modifier is somewhat of a special case. You should not (and cannot) use @code{(meta shift a)} to mean @code{(meta A)}, -since for characters that have @sc{ASCII} equivalents, the state of the +since for characters that have @sc{ascii} equivalents, the state of the shift key is implicit in the keysym (@samp{a} vs. @samp{A}). You also cannot say @code{(shift =)} to mean @code{+}, as that sort of thing varies from keyboard to keyboard. The @key{SHIFT} modifier is for use @@ -311,8 +311,8 @@ so be careful. For backward compatibility, a key sequence may also be represented by a string. In this case, it represents the key sequence(s) that would -produce that sequence of @sc{ASCII} characters in a purely @sc{ASCII} -world. For example, a string containing the @sc{ASCII} backspace +produce that sequence of @sc{ascii} characters in a purely @sc{ascii} +world. For example, a string containing the @sc{ascii} backspace character, @code{"\^H"}, would represent two key sequences: @code{(control h)} and @code{backspace}. Binding a command to this will actually bind both of those key sequences. Likewise for the following @@ -342,7 +342,7 @@ it is possible to redefine only one of those sequences like so: @end example Of course, all of this applies only when running under a window -system. If you're talking to XEmacs through a @sc{TTY} connection, you +system. If you're talking to XEmacs through a @sc{tty} connection, you don't get any of these features. @defun event-matches-key-specifier-p event key-specifier @@ -973,14 +973,14 @@ This variable is the meta-prefix character code. It is used when translating a two-character sequence to a meta character so it can be looked up in a keymap. For useful results, the value should be a prefix event (@pxref{Prefix Keys}). The default value is @code{?\^[} (integer -27), which is the @sc{ASCII} character usually produced by the @key{ESC} +27), which is the @sc{ascii} character usually produced by the @key{ESC} key. As long as the value of @code{meta-prefix-char} remains @code{?\^[}, key lookup translates @kbd{@key{ESC} b} into @kbd{M-b}, which is normally defined as the @code{backward-word} command. However, if you set @code{meta-prefix-char} to @code{?\^X} (i.e. the keystroke -@kbd{C-x}) or its equivalent @sc{ASCII} code @code{24}, then XEmacs will +@kbd{C-x}) or its equivalent @sc{ascii} code @code{24}, then XEmacs will translate @kbd{C-x b} (whose standard binding is the @code{switch-to-buffer} command) into @kbd{M-b}. @@ -1503,7 +1503,7 @@ If @var{firstonly} is @code{non-ascii}, then the value is a single string representing the first key sequence found, rather than a list of all possible key sequences. If @var{firstonly} is @code{t}, then the value is the first key sequence, except that key sequences consisting -entirely of @sc{ASCII} characters (or meta variants of @sc{ASCII} +entirely of @sc{ascii} characters (or meta variants of @sc{ascii} characters) are preferred to all other key sequences. @end ignore @@ -1546,13 +1546,13 @@ displays it in a window. If @var{prefix} is non-@code{nil}, it should be a prefix key; then the listing includes only keys that start with @var{prefix}. -When several characters with consecutive @sc{ASCII} codes have the +When several characters with consecutive @sc{ascii} codes have the same definition, they are shown together, as @samp{@var{firstchar}..@var{lastchar}}. In this instance, you need to -know the @sc{ASCII} codes to understand which characters this means. +know the @sc{ascii} codes to understand which characters this means. For example, in the default global map, the characters @samp{@key{SPC} -..@: ~} are described by a single line. @key{SPC} is @sc{ASCII} 32, -@kbd{~} is @sc{ASCII} 126, and the characters between them include all +..@: ~} are described by a single line. @key{SPC} is @sc{ascii} 32, +@kbd{~} is @sc{ascii} 126, and the characters between them include all the normal printing characters, (e.g., letters, digits, punctuation, etc.@:); all these characters are bound to @code{self-insert-command}. diff --git a/man/lispref/lispref.texi b/man/lispref/lispref.texi index a24a43c..2024291 100644 --- a/man/lispref/lispref.texi +++ b/man/lispref/lispref.texi @@ -1,4 +1,4 @@ -\input ../texinfo @c -*-texinfo-*- +\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename ../../info/lispref.info @c @smallbook diff --git a/man/lispref/lists.texi b/man/lispref/lists.texi index be8bc92..1abd504 100644 --- a/man/lispref/lists.texi +++ b/man/lispref/lists.texi @@ -1628,7 +1628,7 @@ This function returns @code{t} if @var{prop} has a value specified in In the following functions, if optional arg @var{nil-means-not-present} is non-@code{nil}, then a property with a @code{nil} value is ignored or removed. This feature is a virus that has infected old Lisp -implementations (and thus E-Lisp, due to @sc{RMS}'s enamorment with old +implementations (and thus E-Lisp, due to @sc{rms}'s enamorment with old Lisps), but should not be used except for backward compatibility. @defun plists-eq a b &optional nil-means-not-present @@ -1682,7 +1682,7 @@ This function returns @code{t} if @var{prop} has a value specified in In the following functions, if optional arg @var{nil-means-not-present} is non-@code{nil}, then a property with a @code{nil} value is ignored or removed. This feature is a virus that has infected old Lisp -implementations (and thus E-Lisp, due to @sc{RMS}'s enamorment with old +implementations (and thus E-Lisp, due to @sc{rms}'s enamorment with old Lisps), but should not be used except for backward compatibility. @defun lax-plists-eq a b &optional nil-means-not-present diff --git a/man/lispref/modes.texi b/man/lispref/modes.texi index 0a05e5f..332a960 100644 --- a/man/lispref/modes.texi +++ b/man/lispref/modes.texi @@ -330,7 +330,7 @@ correspondingly more complicated. Here are excerpts from @group ;; @r{Set syntax of chars up to 0 to class of chars that are} ;; @r{part of symbol names but not words.} - ;; @r{(The number 0 is @code{48} in the @sc{ASCII} character set.)} + ;; @r{(The number 0 is @code{48} in the @sc{ascii} character set.)} (while (< i ?0) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) diff --git a/man/lispref/objects.texi b/man/lispref/objects.texi index 8b68361..a809171 100644 --- a/man/lispref/objects.texi +++ b/man/lispref/objects.texi @@ -343,7 +343,7 @@ number whose value is 1500. They are all equivalent. @node Character Type @subsection Character Type -@cindex @sc{ASCII} character codes +@cindex @sc{ascii} character codes @cindex char-int confoundance disease In XEmacs version 19, and in all versions of FSF GNU Emacs, a @@ -352,7 +352,7 @@ This is yet another holdover from XEmacs Lisp's derivation from vintage-1980 Lisps; modern versions of Lisp consider this equivalence a bad idea, and have separate character types. In XEmacs version 20, the modern convention is followed, and characters are their own -primitive types. (This change was necessary in order for @sc{MULE}, +primitive types. (This change was necessary in order for @sc{mule}, i.e. Asian-language, support to be correctly implemented.) Even in XEmacs version 20, remnants of the equivalence between @@ -370,21 +370,21 @@ with the distinction between characters and integers in mind. Every character has an equivalent integer, called the @dfn{character code}. For example, the character @kbd{A} is represented as the -@w{integer 65}, following the standard @sc{ASCII} representation of -characters. If XEmacs was not compiled with @sc{MULE} support, the +@w{integer 65}, following the standard @sc{ascii} representation of +characters. If XEmacs was not compiled with @sc{mule} support, the range of this integer will always be 0 to 255 -- eight bits, or one byte. (Integers outside this range are accepted but silently truncated; however, you should most decidedly @emph{not} rely on this, because it -will not work under XEmacs with @sc{MULE} support.) When @sc{MULE} +will not work under XEmacs with @sc{mule} support.) When @sc{mule} support is present, the range of character codes is much larger. (Currently, 19 bits are used.) FSF GNU Emacs uses kludgy character codes above 255 to represent -keyboard input of @sc{ASCII} characters in combination with certain +keyboard input of @sc{ascii} characters in combination with certain modifiers. XEmacs does not use this (a more general mechanism is -used that does not distinguish between @sc{ASCII} keys and other +used that does not distinguish between @sc{ascii} keys and other keys), so you will never find character codes above 255 in a -non-@sc{MULE} XEmacs. +non-@sc{mule} XEmacs. Individual characters are not often used in programs. It is far more common to work with @emph{strings}, which are sequences composed of @@ -506,15 +506,15 @@ with character code 193, or 128 plus 65. You should @emph{not} use this syntax in your programs. It is a holdover of yet another confoundance disease from earlier Emacsen. (This was used to represent keyboard input with the @key{META} key set, thus the @samp{M}; however, it conflicts -with the legitimate @sc{ISO}-8859-1 interpretation of the character code. +with the legitimate @sc{iso}-8859-1 interpretation of the character code. For example, character code 193 is a lowercase @samp{a} with an acute -accent, in @sc{ISO}-8859-1.) +accent, in @sc{iso}-8859-1.) @ignore @c None of this crap applies to XEmacs. For use in strings and buffers, you are limited to the control -characters that exist in @sc{ASCII}, but for keyboard input purposes, +characters that exist in @sc{ascii}, but for keyboard input purposes, you can turn any character into a control character with @samp{C-}. The -character codes for these non-@sc{ASCII} control characters include the +character codes for these non-@sc{ascii} control characters include the @iftex $2^{26}$ @end iftex @@ -617,9 +617,9 @@ bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper. followed by a backslash and the character code in octal (up to three octal digits); thus, @samp{?\101} for the character @kbd{A}, @samp{?\001} for the character @kbd{C-a}, and @code{?\002} for the -character @kbd{C-b}. Although this syntax can represent any @sc{ASCII} +character @kbd{C-b}. Although this syntax can represent any @sc{ascii} character, it is preferred only when the precise octal value is more -important than the @sc{ASCII} representation. +important than the @sc{ascii} representation. @example @group @@ -1521,7 +1521,7 @@ Normally, there is only one device object, but there may be more than one if XEmacs is being run on a multi-headed display (e.g. an X server with attached color and mono screens) or if XEmacs is simultaneously driving frames attached to different consoles, e.g. -an X display and a @sc{TTY} connection. +an X display and a @sc{tty} connection. Devices do not have a read syntax. They print in hash notation, giving the device's type, connection name, and a unique number assigned @@ -1544,13 +1544,13 @@ related to devices. (i.e. displays on which frames exist) are connected. Normally, there is only one console object, but there may be more than one if XEmacs is simultaneously driving frames attached to different X servers and/or -@sc{TTY} connections. (XEmacs is capable of driving multiple X and -@sc{TTY} connections at the same time, and provides a robust mechanism +@sc{tty} connections. (XEmacs is capable of driving multiple X and +@sc{tty} connections at the same time, and provides a robust mechanism for handling the differing display capabilities of such heterogeneous environments. A buffer with embedded glyphs and multiple fonts and colors, for example, will display reasonably if it simultaneously appears on a frame on a color X display, a frame on a mono X display, -and a frame on a @sc{TTY} connection.) +and a frame on a @sc{tty} connection.) Consoles do not have a read syntax. They print in hash notation, giving the console's type, connection name, and a unique number assigned diff --git a/man/lispref/os.texi b/man/lispref/os.texi index b79830b..afe40ac 100644 --- a/man/lispref/os.texi +++ b/man/lispref/os.texi @@ -1602,7 +1602,7 @@ entries and DEC terminal concentrators, see @file{emacs/etc/TERMS}. @code{C-s} and @kbd{C-q} for flow control. Therefore, the choice of @kbd{C-s} and @kbd{C-q} as command characters was uncontroversial. XEmacs, for economy of keystrokes and portability, used nearly all the -@sc{ASCII} control characters, with mnemonic meanings when possible; +@sc{ascii} control characters, with mnemonic meanings when possible; thus, @kbd{C-s} for search and @kbd{C-q} for quote. Later, some terminals were introduced which required these characters diff --git a/man/lispref/permute-index b/man/lispref/permute-index deleted file mode 100755 index 600b066..0000000 --- a/man/lispref/permute-index +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/csh -f -# Generate a permuted index of all names. -# The result is a file called index.fns. - -# You will need to modify this for your needs. - - -set TEXINDEX=texindex # path to texindex command -#set EMACS=xemacs # your emacs command -#set TEX=tex # your tex command - -set MANUAL=lispref # the base name of the manual - -# goto 3 - -1: -echo "Extract raw index from texinfo fn index." -# Let texindex combine duplicate entries, later. -# But it wants to protect non-alphanumerics thus confusing ptx. -# Also change `\ ' to just a ` ', since texindex will fail. This is produced -# by `@findex two words' in an example environment (no doubt among others). -# delete wrapper parens -# change dots {} to dots{} -# change {-} to char form, so ptx wont ignore it. -# delete leading \entry { -# change '\ ' to ' ' -# change lines with = < > since they mess up field extraction. -# separate into fields delimited by " -cat ${MANUAL}.fn | \ - sed \ - -e 's/(\([^)]*\))/\1/' \ - -e 's/\\dots {}/(\\dots{})/' \ - -e "s/{-}/{{\\tt\\char'055}}/" \ - -e 's,^[^ ]* {,,' \ - -e 's, },},' \ - -e 's,\\ , ,g' \ - -e 's/{\\tt\\char61}/=/' \ - -e 's/{\\tt\\gtr}/>/' \ - -e 's/{\\tt\\less}/! permuted.raw - -2: -# Build break file for ptx. -cat < permuted.break -- -: -EOF -# Build the ignore file for ptx. -# We would like to ignore "and", "or", and "for", -# but ptx ignores ignore words even if they stand alone. -cat < permuted.ignore -the -in -to -as -a -an -of -on -them -how -from -by -EOF - -echo "Make troff permuted index." -ptx -i permuted.ignore -b permuted.break -f -r -w 144 \ - < permuted.raw >! permuted.t - -3: -echo "Extract the desired fields." -awk -F\" '{printf "%s\"%s\"%s\n", $4,$6,$9}' permuted.t >! permuted.fields - -4: -echo "Format for texindex." -# delete lines that start with "and ", "for " -sed < permuted.fields \ - -e 's/=/{\\tt\\char61}/' \ - -e 's/>/{\\tt\\gtr}/' \ - -e 's/0 {if ($1=="") {\ - print "\entry {" $2 "}{" 0+$3 "}{" $2 "}" }\ - else {\ - print "\entry {" $2 ", " $1 "}{" 0+$3 "}{" $2 ", " $1 "}"} }'\ - > permuted.fn - -5: -echo "Sort with texindex." -${TEXINDEX} permuted.fn -#mv permuted.fns ${MANUAL}.fns - -# The resulting permuted.fns will be read when we run TeX -# on the manual the second time. Or you can use permuted.texinfo here. -#${TEX} permuted.texinfo - -6: -echo "Clean up." -rm -f permuted.fields permuted.t permuted.raw -rm -f permuted.break permuted.ignore permuted.fn diff --git a/man/lispref/sequences.texi b/man/lispref/sequences.texi index 54b2d95..fd7f170 100644 --- a/man/lispref/sequences.texi +++ b/man/lispref/sequences.texi @@ -264,7 +264,7 @@ strings for such applications, for four reasons: @item They usually occupy one-fourth the space of a vector of the same elements. (This is one-eighth the space for 64-bit machines such as the -DEC Alpha, and may also be different when @sc{MULE} support is compiled +DEC Alpha, and may also be different when @sc{mule} support is compiled into XEmacs.) @item diff --git a/man/lispref/strings.texi b/man/lispref/strings.texi index 95da8ee..260509c 100644 --- a/man/lispref/strings.texi +++ b/man/lispref/strings.texi @@ -45,8 +45,8 @@ determined only by how it is used. @xref{Character Type}. The length of a string (like any array) is fixed and independent of the string contents, and cannot be altered. Strings in Lisp are @emph{not} terminated by a distinguished character code. (By contrast, -strings in C are terminated by a character with @sc{ASCII} code 0.) -This means that any character, including the null character (@sc{ASCII} +strings in C are terminated by a character with @sc{ascii} code 0.) +This means that any character, including the null character (@sc{ascii} code 0), is a valid element of a string.@refill Since strings are considered arrays, you can operate on them with the @@ -321,15 +321,15 @@ the range 0 - 255 map to characters as follows: @item 0 - 31 Control set 0 @item 32 - 127 -@sc{ASCII} +@sc{ascii} @item 128 - 159 Control set 1 @item 160 - 255 Right half of ISO-8859-1 @end table -If support for @sc{MULE} does not exist, these are the only valid -character values. When @sc{MULE} support exists, the values assigned to +If support for @sc{mule} does not exist, these are the only valid +character values. When @sc{mule} support exists, the values assigned to other characters may vary depending on the particular version of XEmacs, the order in which character sets were loaded, etc., and you should not depend on them. @@ -427,9 +427,9 @@ function returns @code{t}. If the lesser character is the one from @var{string2}, then @var{string1} is greater, and this function returns @code{nil}. If the two strings match entirely, the value is @code{nil}. -Pairs of characters are compared by their @sc{ASCII} codes. Keep in +Pairs of characters are compared by their @sc{ascii} codes. Keep in mind that lower case letters have higher numeric values in the -@sc{ASCII} character set than their upper case counterparts; numbers and +@sc{ascii} character set than their upper case counterparts; numbers and many punctuation characters have a lower numeric value than upper case letters. @@ -515,7 +515,7 @@ of 1. (@xref{Creating Strings}.) This conversion can also be done with This function returns the first character in @var{string}. If the string is empty, the function returns 0. (Under XEmacs 19, the value is also 0 when the first character of @var{string} is the null character, -@sc{ASCII} code 0.) +@sc{ascii} code 0.) @example (string-to-char "ABC") @@ -910,7 +910,7 @@ characters (the letters @samp{A} through @samp{Z} and @samp{a} through modify the strings that are passed to them as arguments. The examples below use the characters @samp{X} and @samp{x} which have -@sc{ASCII} codes 88 and 120 respectively. +@sc{ascii} codes 88 and 120 respectively. @defun downcase string-or-char This function converts a character or a string to lower case. @@ -995,7 +995,7 @@ table}. A case table specifies the mapping between upper case and lower case letters. It affects both the string and character case conversion functions (see the previous section) and those that apply to text in the buffer (@pxref{Case Changes}). You need a case table if you are using a -language which has letters other than the standard @sc{ASCII} letters. +language which has letters other than the standard @sc{ascii} letters. A case table is a list of this form: @@ -1022,7 +1022,7 @@ the same canonical equivalent character. The element @var{equivalences} is a map that cyclicly permutes each equivalence class (of characters with the same canonical equivalent). -(For ordinary @sc{ASCII}, this would map @samp{a} into @samp{A} and +(For ordinary @sc{ascii}, this would map @samp{a} into @samp{A} and @samp{A} into @samp{a}, and likewise for each set of equivalent characters.) @@ -1063,7 +1063,7 @@ This sets the current buffer's case table to @var{table}. @end defun The following three functions are convenient subroutines for packages -that define non-@sc{ASCII} character sets. They modify a string +that define non-@sc{ascii} character sets. They modify a string @var{downcase-table} provided as an argument; this should be a string to be used as the @var{downcase} part of a case table. They also modify the standard syntax table. @xref{Syntax Tables}. @@ -1109,7 +1109,7 @@ Note that char tables as a primitive type, and all of the functions in this section, exist only in XEmacs 20. In XEmacs 19, char tables are generally implemented using a vector of 256 elements. -When @sc{MULE} support exists, the types of ranges that can be assigned +When @sc{mule} support exists, the types of ranges that can be assigned values are @itemize @bullet @@ -1123,7 +1123,7 @@ a single row in a two-octet charset a single character @end itemize -When @sc{MULE} support is not present, the types of ranges that can be +When @sc{mule} support is not present, the types of ranges that can be assigned values are @itemize @bullet @@ -1154,7 +1154,7 @@ Used for category tables, which specify the regexp categories that a character is in. The valid values are @code{nil} or a bit vector of 95 elements. Higher-level Lisp functions are provided for working with category tables. Currently categories -and category tables only exist when @sc{MULE} support is present. +and category tables only exist when @sc{mule} support is present. @item char A generalized char table, for mapping from one character to another. Used for case tables, syntax matching tables, @@ -1203,10 +1203,10 @@ one of the following: @item @code{t} (all characters are affected) @item -A charset (only allowed when @sc{MULE} support is present) +A charset (only allowed when @sc{mule} support is present) @item A vector of two elements: a two-octet charset and a row number -(only allowed when @sc{MULE} support is present) +(only allowed when @sc{mule} support is present) @item A single character @end itemize diff --git a/man/lispref/text.texi b/man/lispref/text.texi index 1f743a5..1fdb63f 100644 --- a/man/lispref/text.texi +++ b/man/lispref/text.texi @@ -1478,7 +1478,7 @@ comparing the first characters of each, the second characters of each, and so on. If a mismatch is found, it means that the sort keys are unequal; the sort key whose character is less at the point of first mismatch is the lesser sort key. The individual characters are compared -according to their numerical values. Since Emacs uses the @sc{ASCII} +according to their numerical values. Since Emacs uses the @sc{ascii} character set, the ordering in that set determines alphabetical order. @c version 19 change diff --git a/man/make-stds.texi b/man/make-stds.texi index b3b88da..c7c71ad 100644 --- a/man/make-stds.texi +++ b/man/make-stds.texi @@ -21,6 +21,8 @@ chapter @end ifclear @end iftex describes conventions for writing the Makefiles for GNU programs. +Using Automake will help you write a Makefile that follows these +conventions. @menu * Makefile Basics:: General Conventions for Makefiles @@ -28,6 +30,8 @@ describes conventions for writing the Makefiles for GNU programs. * Command Variables:: Variables for Specifying Commands * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users +* Install Command Categories:: Three categories of commands in the `install' + rule: normal, pre-install and post-install. @end menu @node Makefile Basics @@ -65,9 +69,10 @@ part of the make or @file{$(srcdir)/} if the file is an unchanging part of the source code. Without one of these prefixes, the current search path is used. -The distinction between @file{./} and @file{$(srcdir)/} is important -when using the @samp{--srcdir} option to @file{configure}. A rule of -the form: +The distinction between @file{./} (the @dfn{build directory}) and +@file{$(srcdir)/} (the @dfn{source directory}) is important because +users can build in a separate directory using the @samp{--srcdir} option +to @file{configure}. A rule of the form: @smallexample foo.1 : foo.man sedscript @@ -75,9 +80,8 @@ foo.1 : foo.man sedscript @end smallexample @noindent -will fail when the current directory is not the source directory, -because @file{foo.man} and @file{sedscript} are not in the current -directory. +will fail when the build directory is not the source directory, because +@file{foo.man} and @file{sedscript} are in the the source directory. When using GNU @code{make}, relying on @samp{VPATH} to find the source file will work in the case where there is a single dependency file, @@ -109,6 +113,18 @@ foo.1 : foo.man sedscript sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@ @end smallexample +GNU distributions usually contain some files which are not source +files---for example, Info files, and the output from Autoconf, Automake, +Bison or Flex. Since these files normally appear in the source +directory, they should always appear in the source directory, not in the +build directory. So Makefile rules to update them should put the +updated files in the source directory. + +However, if a file does not appear in the distribution, then the +Makefile should not put it in the source directory, because building a +program in ordinary circumstances should not modify the source directory +in any way. + Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel @code{make}. @@ -122,11 +138,17 @@ special features of @code{ksh} or @code{bash}. The @code{configure} script and the Makefile rules for building and installation should not use any utilities directly except these: +@c dd find +@c gunzip gzip md5sum +@c mkfifo mknod tee uname + @example -cat cmp cp echo egrep expr false grep -ln mkdir mv pwd rm rmdir sed test touch true +cat cmp cp diff echo egrep expr false grep install-info +ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true @end example +The compression program @code{gzip} can be used in the @code{dist} rule. + Stick to the generally supported options for these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because most systems don't support it. @@ -140,26 +162,33 @@ user can substitute alternatives. Here are some of the programs we mean: @example -ar bison cc flex install ld lex +ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc @end example -Use the following @code{make} variables: +Use the following @code{make} variables to run those programs: @example -$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) +$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) @end example -When you use @code{ranlib}, you should make sure nothing bad happens if -the system does not have @code{ranlib}. Arrange to ignore an error -from that command, and print a message before the command to tell the -user that failure of the @code{ranlib} command does not mean a problem. -(The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.) +When you use @code{ranlib} or @code{ldconfig}, you should make sure +nothing bad happens if the system does not have the program in question. +Arrange to ignore an error from that command, and print a message before +the command to tell the user that failure of this command does not mean +a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with +this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. +Additional utilities that can be used via Make variables are: + +@example +chgrp chmod chown mknod +@end example + It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. @@ -182,11 +211,12 @@ don't need to replace them with other programs. Each program-name variable should come with an options variable that is used to supply options to the program. Append @samp{FLAGS} to the program-name variable name to get the options variable name---for -example, @code{BISONFLAGS}. (The name @code{CFLAGS} is an exception to -this rule, but we keep it because it is standard.) Use @code{CPPFLAGS} -in any compilation command that runs the preprocessor, and use -@code{LDFLAGS} in any compilation command that does linking as well as -in any direct use of @code{ld}. +example, @code{BISONFLAGS}. (The names @code{CFLAGS} for the C +compiler, @code{YFLAGS} for yacc, and @code{LFLAGS} for lex, are +exceptions to this rule, but we keep them because they are standard.) +Use @code{CPPFLAGS} in any compilation command that runs the +preprocessor, and use @code{LDFLAGS} in any compilation command that +does linking as well as in any direct use of @code{ld}. If there are C compiler options that @emph{must} be used for proper compilation of certain files, do not include them in @code{CFLAGS}. @@ -212,6 +242,9 @@ Put @code{CFLAGS} last in the compilation command, after other variables containing compiler options, so the user can use @code{CFLAGS} to override the others. +@code{CFLAGS} should be used in every invocation of the C compiler, +both those which do compilation and those which do linking. + Every Makefile should define the variable @code{INSTALL}, which is the basic command for installing a file into the system. @@ -226,6 +259,18 @@ $(INSTALL_PROGRAM) foo $(bindir)/foo $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a @end example +Optionally, you may prepend the value of @code{DESTDIR} to the target +filename. Doing this allows the installer to create a snapshot of the +installation to be copied onto the real target filesystem later. Do not +set the value of @code{DESTDIR} in your Makefile, and do not include it +in any installed files. With support for @code{DESTDIR}, the above +examples become: + +@example +$(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo +$(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a +@end example + @noindent Always use a file name, not a directory name, as the second argument of the installation commands. Use a separate command for each file to be @@ -252,6 +297,10 @@ When building the complete GNU system, the prefix will be empty and @file{/usr} will be a symbolic link to @file{/}. (If you are using Autoconf, write it as @samp{@@prefix@@}.) +Running @samp{make install} with a different value of @code{prefix} +from the one used to build the program should @var{not} recompile +the program. + @item exec_prefix A prefix used in constructing the default values of some of the variables listed below. The default value of @code{exec_prefix} should @@ -261,6 +310,10 @@ be @code{$(prefix)}. Generally, @code{$(exec_prefix)} is used for directories that contain machine-specific files (such as executables and subroutine libraries), while @code{$(prefix)} is used directly for other directories. + +Running @samp{make install} with a different value of @code{exec_prefix} +from the one used to build the program should @var{not} recompile the +program. @end table Executable programs are installed in one of the following directories. @@ -328,14 +381,11 @@ files. This directory should normally be @file{/usr/local/etc}, but write it as @file{$(prefix)/etc}. (If you are using Autoconf, write it as @samp{@@sysconfdir@@}.) -@c rewritten to avoid overfull hbox --tower -Do not install executables -@c here -in this directory (they probably -belong in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not -install files that are modified in the normal course of their use -(programs whose purpose is to change the configuration of the system -excluded). Those probably belong in @file{$(localstatedir)}. +Do not install executables here in this directory (they probably belong +in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install +files that are modified in the normal course of their use (programs +whose purpose is to change the configuration of the system excluded). +Those probably belong in @file{$(localstatedir)}. @item sharedstatedir The directory for installing architecture-independent data files which @@ -366,6 +416,20 @@ default, it should be @file{/usr/local/info}, but it should be written as @file{$(prefix)/info}. (If you are using Autoconf, write it as @samp{@@infodir@@}.) +@item lispdir +The directory for installing any Emacs Lisp files in this package. By +default, it should be @file{/usr/local/share/emacs/site-lisp}, but it +should be written as @file{$(prefix)/share/emacs/site-lisp}. + +If you are using Autoconf, write the default as @samp{@@lispdir@@}. +In order to make @samp{@@lispdir@@} work, you need the following lines +in your @file{configure.in} file: + +@example +lispdir='$@{datadir@}/emacs/site-lisp' +AC_SUBST(lispdir) +@end example + @item includedir @c rewritten to avoid overfull hbox --roland The directory for installing header files to be included by user @@ -374,7 +438,7 @@ should normally be @file{/usr/local/include}, but write it as @file{$(prefix)/include}. (If you are using Autoconf, write it as @samp{@@includedir@@}.) -Most compilers other than GCC do not look for header files in +Most compilers other than GCC do not look for header files in directory @file{/usr/local/include}. So installing the header files this way is only useful with GCC. Sometimes this is not a problem because some libraries are only really intended to work with GCC. But some libraries @@ -526,11 +590,12 @@ Here is a sample rule to install an Info file: @comment This example has been carefully formatted for the Make manual. @comment Please do not reformat it without talking to roland@gnu.ai.mit.edu. @smallexample -$(infodir)/foo.info: foo.info +$(DESTDIR)$(infodir)/foo.info: foo.info + $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ - $(INSTALL_DATA) $$d/foo.info $@@; \ + $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@@; \ # Run install-info only if it exists. # Use `if' instead of just prepending `-' to the # line so we notice real errors from install-info. @@ -538,22 +603,29 @@ $(infodir)/foo.info: foo.info # fail gracefully when there is an unknown command. if $(SHELL) -c 'install-info --version' \ >/dev/null 2>&1; then \ - install-info --dir-file=$(infodir)/dir \ - $(infodir)/foo.info; \ + install-info --dir-file=$(DESTDIR)$(infodir)/dir \ + $(DESTDIR)$(infodir)/foo.info; \ else true; fi @end smallexample +When writing the @code{install} target, you must classify all the +commands into three categories: normal ones, @dfn{pre-installation} +commands and @dfn{post-installation} commands. @xref{Install Command +Categories}. + @item uninstall -Delete all the installed files that the @samp{install} target would -create (but not the noninstalled files such as @samp{make all} would -create). +Delete all the installed files---the copies that the @samp{install} +target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. +The uninstallation commands are divided into three categories, just like +the installation commands. @xref{Install Command Categories}. + @item install-strip Like @code{install}, but strip the executable files while installing -them. The definition of this target can be very simple: +them. In many cases, the definition of this target can be very simple: @smallexample install-strip: @@ -638,6 +710,12 @@ You must define the variable @code{MAKEINFO} in the Makefile. It should run the @code{makeinfo} program, which is part of the Texinfo distribution. +Normally a GNU distribution comes with Info files, and that means the +Info files are present in the source directory. Therefore, the Make +rule for an info file should update it in the source directory. When +users build the package, ordinarily Make will not update the Info files +because they will already be up to date. + @item dvi Generate DVI files for all Texinfo documentation. For example: @@ -669,7 +747,7 @@ The easiest way to do this is to create a subdirectory appropriately named, use @code{ln} or @code{cp} to install the proper files in it, and then @code{tar} that subdirectory. -Compress the tar file with @code{gzip}. For example, the actual +Compress the tar file file with @code{gzip}. For example, the actual distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}. The @code{dist} target should explicitly depend on all non-source files @@ -720,3 +798,119 @@ installdirs: mkinstalldirs This rule should not modify the directories where compilation is done. It should do nothing but create installation directories. @end table + +@node Install Command Categories +@section Install Command Categories + +@cindex pre-installation commands +@cindex post-installation commands +When writing the @code{install} target, you must classify all the +commands into three categories: normal ones, @dfn{pre-installation} +commands and @dfn{post-installation} commands. + +Normal commands move files into their proper places, and set their +modes. They may not alter any files except the ones that come entirely +from the package they belong to. + +Pre-installation and post-installation commands may alter other files; +in particular, they can edit global configuration files or data bases. + +Pre-installation commands are typically executed before the normal +commands, and post-installation commands are typically run after the +normal commands. + +The most common use for a post-installation command is to run +@code{install-info}. This cannot be done with a normal command, since +it alters a file (the Info directory) which does not come entirely and +solely from the package being installed. It is a post-installation +command because it needs to be done after the normal command which +installs the package's Info files. + +Most programs don't need any pre-installation commands, but we have the +feature just in case it is needed. + +To classify the commands in the @code{install} rule into these three +categories, insert @dfn{category lines} among them. A category line +specifies the category for the commands that follow. + +A category line consists of a tab and a reference to a special Make +variable, plus an optional comment at the end. There are three +variables you can use, one for each category; the variable name +specifies the category. Category lines are no-ops in ordinary execution +because these three Make variables are normally undefined (and you +@emph{should not} define them in the makefile). + +Here are the three possible category lines, each with a comment that +explains what it means: + +@smallexample + $(PRE_INSTALL) # @r{Pre-install commands follow.} + $(POST_INSTALL) # @r{Post-install commands follow.} + $(NORMAL_INSTALL) # @r{Normal commands follow.} +@end smallexample + +If you don't use a category line at the beginning of the @code{install} +rule, all the commands are classified as normal until the first category +line. If you don't use any category lines, all the commands are +classified as normal. + +These are the category lines for @code{uninstall}: + +@smallexample + $(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.} + $(POST_UNINSTALL) # @r{Post-uninstall commands follow.} + $(NORMAL_UNINSTALL) # @r{Normal commands follow.} +@end smallexample + +Typically, a pre-uninstall command would be used for deleting entries +from the Info directory. + +If the @code{install} or @code{uninstall} target has any dependencies +which act as subroutines of installation, then you should start +@emph{each} dependency's commands with a category line, and start the +main target's commands with a category line also. This way, you can +ensure that each command is placed in the right category regardless of +which of the dependencies actually run. + +Pre-installation and post-installation commands should not run any +programs except for these: + +@example +[ basename bash cat chgrp chmod chown cmp cp dd diff echo +egrep expand expr false fgrep find getopt grep gunzip gzip +hostname install install-info kill ldconfig ln ls md5sum +mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee +test touch true uname xargs yes +@end example + +@cindex binary packages +The reason for distinguishing the commands in this way is for the sake +of making binary packages. Typically a binary package contains all the +executables and other files that need to be installed, and has its own +method of installing them---so it does not need to run the normal +installation commands. But installing the binary package does need to +execute the pre-installation and post-installation commands. + +Programs to build binary packages work by extracting the +pre-installation and post-installation commands. Here is one way of +extracting the pre-installation commands: + +@smallexample +make -n install -o all \ + PRE_INSTALL=pre-install \ + POST_INSTALL=post-install \ + NORMAL_INSTALL=normal-install \ + | gawk -f pre-install.awk +@end smallexample + +@noindent +where the file @file{pre-install.awk} could contain this: + +@smallexample +$0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@} +on @{print $0@} +$0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@} +@end smallexample + +The resulting file of pre-installation commands is executed as a shell +script as part of installing the binary package. diff --git a/man/new-users-guide/Makefile b/man/new-users-guide/Makefile deleted file mode 100644 index 3e24296..0000000 --- a/man/new-users-guide/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# Makefile for the XEmacs New Users Guide - -# This file is part of XEmacs. - -# XEmacs is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any -# later version. - -# XEmacs is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -# You should have received a copy of the GNU General Public License -# along with XEmacs; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -NAME=new-users-guide - -SHELL = /bin/sh -TEXI2DVI = texi2dvi -MAKEINFO = makeinfo - -# List of all the texinfo files in the manual: - -srcs = new-users-guide.texi custom1.texi files.texi region.texi \ - custom2.texi help.texi search.texi edit.texi modes.texi \ - xmenu.texi enter.texi - -all : info -info : ../../info/$(NAME).info - -../../info/$(NAME).info: $(srcs) - $(MAKEINFO) -o $@ $(NAME).texi - -dvi : $(NAME).dvi -.texi.dvi : - $(TEXI2DVI) $< - -.PHONY: mostlyclean clean distclean realclean extraclean -mostlyclean: - rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ - *.vr *.vrs *.pg *.pgs *.ky *.kys -clean: mostlyclean - rm -f *.dvi *.ps make.out core -distclean: clean -realclean: clean -extraclean: clean - -rm -f *~ \#* diff --git a/man/new-users-guide/custom1.texi b/man/new-users-guide/custom1.texi index a5da258..f60c940 100644 --- a/man/new-users-guide/custom1.texi +++ b/man/new-users-guide/custom1.texi @@ -168,8 +168,8 @@ Menus}. @enumerate @item -add-menu-item: @var{(menu-name item-name function enabled-p -&optional before)} +add-menu-item: (@var{menu-name} @var{item-name} @var{function} @var{enabled-p} +&optional @var{before}) This function will add a menu item to a menu, creating the menu first if necessary. If the named item already exists, the menu will remain @@ -260,7 +260,7 @@ submenus: @b{Copy File}, @b{Delete File} and @b{Rename File}. @findex delete-menu-item @cindex deleting menu items @item -delete-menu-item: @var{(menu-path)} +delete-menu-item: (@var{menu-path}) This function will remove the menu item defined by @var{menu-name} from the menu hierarchy. Look at the following examples and the comments just above them which specify what the examples do. @@ -286,7 +286,7 @@ above them which specify what the examples do. @findex disable-menu-item @cindex disabling menu items @item -disable-menu-item: @var{(menu-name)} +disable-menu-item: (@var{menu-name}) Disables the specified menu item. The following example @example @@ -301,7 +301,7 @@ be selected. @findex enable-menu-item @cindex enabling menu items @item -enable-menu-item: @var{(menu-name)} +enable-menu-item: (@var{menu-name}) Enables the specified previously disabled menu item. @example @@ -315,7 +315,7 @@ earlier command. @findex relabel-menu-items @cindex relabelling menu items @item -relabel-menu-item: @var{(menu-name new-name)} +relabel-menu-item: (@var{menu-name} @var{new-name}) Change the string of the menu item specified by @var{menu-name} to @var{new-name}. diff --git a/man/new-users-guide/new-users-guide.texi b/man/new-users-guide/new-users-guide.texi index 4d984b7..3bed4da 100644 --- a/man/new-users-guide/new-users-guide.texi +++ b/man/new-users-guide/new-users-guide.texi @@ -1,4 +1,4 @@ -\input ../texinfo @c -*-texinfo-*- +\input texinfo @c -*-texinfo-*- @setfilename ../../info/new-users-guide.info @comment node-name, next, previous, up diff --git a/man/standards.texi b/man/standards.texi index 222c11f..7889e30 100644 --- a/man/standards.texi +++ b/man/standards.texi @@ -2,8 +2,8 @@ @c %**start of header @setfilename ../info/standards.info @settitle GNU Coding Standards -@c UPDATE THIS DATE WHENEVER YOU MAKE CHANGES! -@set lastupdate 17 May 1996 +@c This date is automagically updated when you save this file: +@set lastupdate June 24, 1999 @c %**end of header @ifinfo @@ -28,7 +28,7 @@ END-INFO-DIR-ENTRY @ifinfo GNU Coding Standards -Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -59,7 +59,7 @@ by the Free Software Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -84,13 +84,14 @@ Last updated @value{lastupdate}. @end ifinfo @menu -* Preface:: About the GNU Coding Standards -* Intellectual Property:: Keeping Free Software Free -* Design Advice:: General Program Design -* Program Behavior:: Program Behavior for All Programs -* Writing C:: Making The Best Use of C -* Documentation:: Documenting Programs -* Managing Releases:: The Release Process +* Preface:: About the GNU Coding Standards +* Legal Issues:: Keeping Free Software Free +* Design Advice:: General Program Design +* Program Behavior:: Program Behavior for All Programs +* Writing C:: Making The Best Use of C +* Documentation:: Documenting Programs +* Managing Releases:: The Release Process +* References:: References to Non-Free Software or Documentation @end menu @node Preface @@ -104,8 +105,8 @@ programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way. -Corrections or suggestions regarding this document should be sent to -@code{gnu@@prep.ai.mit.edu}. If you make a suggestion, please include a +Corrections or suggestions for this document should be sent to +@email{gnu@@gnu.org}. If you make a suggestion, please include a suggested new wording for it; our time is limited. We prefer a context diff to the @file{standards.texi} or @file{make-stds.texi} files, but if you don't have those files, please mail your suggestion anyway. @@ -113,15 +114,15 @@ you don't have those files, please mail your suggestion anyway. This release of the GNU Coding Standards was last updated @value{lastupdate}. -@node Intellectual Property +@node Legal Issues @chapter Keeping Free Software Free This @value{CHAPTER} discusses how you can make sure that GNU software remains unencumbered. @menu -* Reading Non-Free Code:: Referring to Proprietary Programs -* Contributions:: Accepting Contributions +* Reading Non-Free Code:: Referring to Proprietary Programs +* Contributions:: Accepting Contributions @end menu @node Reading Non-Free Code @@ -161,37 +162,47 @@ to free memory, or use a new GNU facility such as obstacks. @node Contributions @section Accepting Contributions -If someone else sends you a piece of code to add to the program you are -working on, we need legal papers to use it---the same sort of legal -papers we will need to get from you. @emph{Each} significant -contributor to a program must sign some sort of legal papers in order -for us to have clear title to the program. The main author alone is not +If the program you are working on is copyrighted by the Free Software +Foundation, then when someone else sends you a piece of code to add to +the program, we need legal papers to use it---just as we asked you to +sign papers initially. @emph{Each} person who makes a nontrivial +contribution to a program must sign some sort of legal papers in order +for us to have clear title to the program; the main author alone is not enough. -So, before adding in any contributions from other people, tell us -so we can arrange to get the papers. Then wait until we tell you +So, before adding in any contributions from other people, please tell +us, so we can arrange to get the papers. Then wait until we tell you that we have received the signed papers, before you actually use the contribution. This applies both before you release the program and afterward. If you receive diffs to fix a bug, and they make significant changes, we -need legal papers for it. +need legal papers for that change. + +This also applies to comments and documentation files. For copyright +law, comments and code are just text. Copyright applies to all kinds of +text, so we need legal papers for all kinds. + +We know it is frustrating to ask for legal papers; it's frustrating for +us as well. But if you don't wait, you are going out on a limb---for +example, what if the contributor's employer won't sign a disclaimer? +You might have to take that code out again! You don't need papers for changes of a few lines here or there, since they are not significant for copyright purposes. Also, you don't need papers if all you get from the suggestion is some ideas, not actual code -which you use. For example, if you write a different solution to the -problem, you don't need to get papers. - -We know this is frustrating; it's frustrating for us as well. But if -you don't wait, you are going out on a limb---for example, what if the -contributor's employer won't sign a disclaimer? You might have to take -that code out again! +which you use. For example, if someone send you one implementation, but +you write a different implementation of the same idea, you don't need to +get papers. The very worst thing is if you forget to tell us about the other contributor. We could be very embarrassed in court some day as a result. +We have more detailed advice for maintainers of programs; if you have +reached the stage of actually maintaining a program for GNU (whether +released or not), please ask us for a copy. + @node Design Advice @chapter General Program Design @@ -199,10 +210,10 @@ This @value{CHAPTER} discusses some of the issues you should take into account when designing your program. @menu -* Compatibility:: Compatibility with other implementations -* Using Extensions:: Using non-standard features +* Compatibility:: Compatibility with other implementations +* Using Extensions:: Using non-standard features * ANSI C:: Using ANSI C features -* Source Language:: Using languages other than C +* Source Language:: Using languages other than C @end menu @node Compatibility @@ -211,20 +222,20 @@ account when designing your program. With occasional exceptions, utility programs and libraries for GNU should be upward compatible with those in Berkeley Unix, and upward compatible with @sc{ansi} C if @sc{ansi} C specifies their behavior, and -upward compatible with @sc{POSIX} if @sc{POSIX} specifies their +upward compatible with @sc{posix} if @sc{posix} specifies their behavior. When these standards conflict, it is useful to offer compatibility modes for each of them. -@sc{ansi} C and @sc{POSIX} prohibit many kinds of extensions. Feel free +@sc{ansi} C and @sc{posix} prohibit many kinds of extensions. Feel free to make the extensions anyway, and include a @samp{--ansi}, @samp{--posix}, or @samp{--compatible} option to turn them off. However, if the extension has a significant chance of breaking any real programs or scripts, then it is not really upward compatible. Try to redesign its interface. -Many GNU programs suppress extensions that conflict with POSIX if the +Many GNU programs suppress extensions that conflict with @sc{posix} if the environment variable @code{POSIXLY_CORRECT} is defined (even if it is defined with a null value). Please make your program recognize this variable if appropriate. @@ -236,9 +247,6 @@ completely with something totally different and better. (For example, feature as well. (There is a free @code{vi} clone, so we offer it.) Additional useful features not in Berkeley Unix are welcome. -Additional programs with no counterpart in Unix may be useful, -but our first priority is usually to duplicate what Unix already -has. @node Using Extensions @section Using Non-standard Features @@ -282,9 +290,16 @@ non-@sc{ansi} compilers). And if a program is already written in @sc{ansi} C, there's no need to convert it to support non-@sc{ansi} compilers. +If you don't know non-@sc{ansi} C, there's no need to learn it; just +write in @sc{ansi} C. + However, it is easy to support non-@sc{ansi} compilers in most programs, -so you might still consider doing so when you write a program. Instead -of writing function definitions in @sc{ansi} prototype form, +so you might still consider doing so when you write a program. And if a +program you are maintaining has such support, you should try to keep it +working. + +To support pre-@sc{ansi} C, instead of writing function definitions in +@sc{ansi} prototype form, @example int @@ -311,11 +326,22 @@ int foo (int, int); You need such a declaration anyway, in a header file, to get the benefit of @sc{ansi} C prototypes in all the files where the function is called. -And once you have it, you lose nothing by writing the function -definition in the pre-@sc{ansi} style. - -If you don't know non-@sc{ansi} C, there's no need to learn it; just -write in @sc{ansi} C. +And once you have the declaration, you normally lose nothing by writing +the function definition in the pre-@sc{ansi} style. + +This technique does not work for integer types narrower than @code{int}. +If you think of an argument as being of a type narrower than @code{int}, +declare it as @code{int} instead. + +There are a few special cases where this technique is hard to use. For +example, if a function argument needs to hold the system type +@code{dev_t}, you run into trouble, because @code{dev_t} is shorter than +@code{int} on some machines; but you cannot use @code{int} instead, +because @code{dev_t} is wider than @code{int} on some machines. There +is no type you can safely use on all machines in a non-@sc{ansi} +definition. The only way to support non-@sc{ansi} C and pass such an +argument is to check the width of @code{dev_t} using Autoconf and choose +the argument type accordingly. This may not be worth the trouble. @node Source Language @section Using Languages Other Than C @@ -323,13 +349,16 @@ write in @sc{ansi} C. Using a language other than C is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the compiler for that -other language in order to build your program. So please write in C. +other language in order to build your program. For example, if you +write your program in C++, people will have to install the C++ compiler +in order to compile your program. Thus, it is better if you write in C. -There are three exceptions for this rule: +But there are three situations when there is no disadvantage in using +some other language: @itemize @bullet @item -It is okay to use a special language if the same program contains an +It is okay to use another language if your program contains an interpreter for that language. For example, if your program links with GUILE, it is ok to write part of @@ -343,10 +372,14 @@ This is okay because the only people who want to build the tool will be those who have installed the other language anyway. @item -If an application is not of extremely widespread interest, then perhaps +If an application is of interest to a narrow community, then perhaps it's not important if the application is inconvenient to install. @end itemize +C has one other advantage over C++ and other compiled languages: more +people know C, so more people will find it easy to read and modify the +program if it is written in C. + @node Program Behavior @chapter Program Behavior for All Programs @@ -355,10 +388,11 @@ describes general standards for error messages, the command line interface, and how libraries should behave. @menu -* Semantics:: Writing robust programs -* Libraries:: Library behavior -* Errors:: Formatting error messages -* User Interfaces:: Standards for command line interfaces +* Semantics:: Writing robust programs +* Libraries:: Library behavior +* Errors:: Formatting error messages +* User Interfaces:: Standards for command line interfaces +* Option Table:: Table of long options. * Memory Usage:: When and how to care about memory needs @end menu @@ -371,9 +405,13 @@ all data structures dynamically. In most Unix utilities, ``long lines are silently truncated''. This is not acceptable in a GNU utility. Utilities reading files should not drop NUL characters, or any other -nonprinting characters @emph{including those with codes above 0177}. The -only sensible exceptions would be utilities specifically intended for -interface to certain types of printers that can't handle those characters. +nonprinting characters @emph{including those with codes above 0177}. +The only sensible exceptions would be utilities specifically intended +for interface to certain types of terminals or printers +that can't handle those characters. +Whenever possible, try to make programs work properly with +sequences of bytes that represent multibyte characters, using encodings +such as UTF-8 and others. Check every system call for an error return, unless you know you wish to ignore errors. Include the system error text (from @code{perror} or @@ -415,11 +453,18 @@ Try to avoid low-level interfaces to obscure Unix data structures (such as file directories, utmp, or the layout of kernel memory), since these are less likely to work compatibly. If you need to find all the files in a directory, use @code{readdir} or some other high-level interface. -These will be supported compatibly by GNU. +These are supported compatibly by GNU. -By default, the GNU system will provide the signal handling functions of -@sc{BSD} and of @sc{POSIX}. So GNU software should be written to use -these. +The preferred signal handling facilities are the BSD variant of +@code{signal}, and the @sc{posix} @code{sigaction} function; the +alternative USG @code{signal} interface is an inferior design. + +Nowadays, using the @sc{posix} signal functions may be the easiest way +to make a program portable. If you use @code{signal}, then on GNU/Linux +systems running GNU libc version 1, you should include +@file{bsd/signal.h} instead of @file{signal.h}, so as to get BSD +behavior. It is up to you whether to support systems where +@code{signal} has only the USG behavior, or give up on them. In error checks that detect ``impossible'' conditions, just abort. There is usually no point in printing any message. These checks @@ -477,6 +522,20 @@ Error messages from compilers should look like this: @var{source-file-name}:@var{lineno}: @var{message} @end example +@noindent +If you want to mention the column number, use this format: + +@example +@var{source-file-name}:@var{lineno}:@var{column}: @var{message} +@end example + +@noindent +Line numbers should start from 1 at the beginning of the file, and +column numbers should start from 1 at the beginning of the line. (Both +of these conventions are chosen for compatibility.) Calculate column +numbers assuming that space and all ASCII printing characters have +equal width, and assuming tab stops every 8 columns. + Error messages from other noninteractive programs should look like this: @example @@ -493,6 +552,12 @@ when there is an appropriate source file, or like this: @noindent when there is no relevant source file. +If you want to mention the column number, use this format: + +@example +@var{program}:@var{source-file-name}:@var{lineno}:@var{column}: @var{message} +@end example + In an interactive program (one that is reading commands from a terminal), it is better not to include the program name in an error message. The place to indicate which program is running is in the @@ -520,8 +585,10 @@ to select among the alternate behaviors. Likewise, please don't make the behavior of the program depend on the type of output device it is used with. Device independence is an -important principle of the system's design; do not compromise it -merely to save someone from typing an option now and then. +important principle of the system's design; do not compromise it merely +to save someone from typing an option now and then. (Variation in error +message syntax when using a terminal is ok, because that is a side issue +that people do not depend on.) If you think one behavior is most useful when the output is to a terminal, and another is most useful when the output is a file or a @@ -537,11 +604,11 @@ output device type. For example, we provide a @code{dir} program much like @code{ls} except that its default output format is always multi-column format. -It is a good idea to follow the @sc{POSIX} guidelines for the +It is a good idea to follow the @sc{posix} guidelines for the command-line options of a program. The easiest way to do this is to use @code{getopt} to parse them. Note that the GNU version of @code{getopt} will normally permit options anywhere among the arguments unless the -special argument @samp{--} is used. This is not what @sc{POSIX} +special argument @samp{--} is used. This is not what @sc{posix} specifies; it is a GNU extension. Please define long-named options that are equivalent to the @@ -554,26 +621,119 @@ consistent from program to program. For example, users should be able to expect the ``verbose'' option of any GNU program which has one, to be spelled precisely @samp{--verbose}. To achieve this uniformity, look at the table of common long-option names when you choose the option names -for your program. The table appears below. - -If you use names not already in the table, please send -@samp{gnu@@prep.ai.mit.edu} a list of them, with their meanings, so we -can update the table. - -It is usually a good idea for file names given as ordinary arguments -to be input files only; any output files would be specified using -options (preferably @samp{-o}). Even if you allow an output file name -as an ordinary argument for compatibility, try to provide a suitable -option as well. This will lead to more consistency among GNU -utilities, so that there are fewer idiosyncracies for users to -remember. - -Programs should support an option @samp{--version} which prints the -program's version number on standard output and exits successfully, and -an option @samp{--help} which prints option usage information on -standard output and exits successfully. These options should inhibit -the normal function of the command; they should do nothing except print -the requested information. +for your program (@pxref{Option Table}). + +It is usually a good idea for file names given as ordinary arguments to +be input files only; any output files would be specified using options +(preferably @samp{-o} or @samp{--output}). Even if you allow an output +file name as an ordinary argument for compatibility, try to provide an +option as another way to specify it. This will lead to more consistency +among GNU utilities, and fewer idiosyncracies for users to remember. + +All programs should support two standard options: @samp{--version} +and @samp{--help}. + +@table @code +@item --version +This option should direct the program to print information about its name, +version, origin and legal status, all on standard output, and then exit +successfully. Other options and arguments should be ignored once this +is seen, and the program should not perform its normal function. + +The first line is meant to be easy for a program to parse; the version +number proper starts after the last space. In addition, it contains +the canonical name for this program, in this format: + +@example +GNU Emacs 19.30 +@end example + +@noindent +The program's name should be a constant string; @emph{don't} compute it +from @code{argv[0]}. The idea is to state the standard or canonical +name for the program, not its file name. There are other ways to find +out the precise file name where a command is found in @code{PATH}. + +If the program is a subsidiary part of a larger package, mention the +package name in parentheses, like this: + +@example +emacsserver (GNU Emacs) 19.30 +@end example + +@noindent +If the package has a version number which is different from this +program's version number, you can mention the package version number +just before the close-parenthesis. + +If you @strong{need} to mention the version numbers of libraries which +are distributed separately from the package which contains this program, +you can do so by printing an additional line of version info for each +library you want to mention. Use the same format for these lines as for +the first line. + +Please do not mention all of the libraries that the program uses ``just +for completeness''---that would produce a lot of unhelpful clutter. +Please mention library version numbers only if you find in practice that +they are very important to you in debugging. + +The following line, after the version number line or lines, should be a +copyright notice. If more than one copyright notice is called for, put +each on a separate line. + +Next should follow a brief statement that the program is free software, +and that users are free to copy and change it on certain conditions. If +the program is covered by the GNU GPL, say so here. Also mention that +there is no warranty, to the extent permitted by law. + +It is ok to finish the output with a list of the major authors of the +program, as a way of giving credit. + +Here's an example of output that follows these rules: + +@smallexample +GNU Emacs 19.34.5 +Copyright (C) 1996 Free Software Foundation, Inc. +GNU Emacs comes with NO WARRANTY, +to the extent permitted by law. +You may redistribute copies of GNU Emacs +under the terms of the GNU General Public License. +For more information about these matters, +see the files named COPYING. +@end smallexample + +You should adapt this to your program, of course, filling in the proper +year, copyright holder, name of program, and the references to +distribution terms, and changing the rest of the wording as necessary. + +This copyright notice only needs to mention the most recent year in +which changes were made---there's no need to list the years for previous +versions' changes. You don't have to mention the name of the program in +these notices, if that is inconvenient, since it appeared in the first +line. + +@item --help +This option should output brief documentation for how to invoke the +program, on standard output, then exit successfully. Other options and +arguments should be ignored once this is seen, and the program should +not perform its normal function. + +Near the end of the @samp{--help} option's output there should be a line +that says where to mail bug reports. It should have this format: + +@example +Report bugs to @var{mailing-address}. +@end example +@end table + +@node Option Table +@section Table of Long Options + +Here is a table of long options used by GNU programs. It is surely +incomplete, but we aim to list all the options that a new program might +want to be compatible with. If you use names not already in the table, +please send @email{gnu@@gnu.org} a list of them, with their +meanings, so we can update the table. @c Please leave newlines between items in this table; it's much easier @c to update when it isn't completely squashed together and unreadable. @@ -581,10 +741,7 @@ the requested information. @c a semicolon between the lists of the programs that use them, not a @c period. --friedman -Here is the table of long options used by GNU programs. - @table @samp - @item after-date @samp{-N} in @code{tar}. @@ -635,6 +792,9 @@ and @code{unexpand}. @item avoid-wraps @samp{-n} in @code{wdiff}. +@item background +For server programs, run in the background. + @item backward-search @samp{-B} in @code{ctags}. @@ -759,6 +919,9 @@ Used in @code{tar} and @code{cpio}. @item dereference-args @samp{-D} in @code{du}. +@item device +Specify an I/O device (special file name). + @item diacritics @samp{-d} in @code{recode}. @@ -891,6 +1054,11 @@ Used in @code{makeinfo}. @item force-prefix @samp{-F} in @code{shar}. +@item foreground +For server programs, run in the foreground; +in other words, don't do anything special to run the server +in the background. + @item format Used in @code{ls}, @code{time}, and @code{ptx}. @@ -1070,7 +1238,7 @@ Used in @code{su}. @item machine No listing of which programs already use this; someone should check to -see if any actually do and tell @code{gnu@@prep.ai.mit.edu}. +see if any actually do, and tell @email{gnu@@gnu.org}. @item macro-name @samp{-M} in @code{ptx}. @@ -1195,6 +1363,9 @@ Used in @code{makeinfo}. @item no-validate Used in @code{makeinfo}. +@item no-wait +Used in @code{emacsclient}. + @item no-warn Used in various programs to inhibit warnings. @@ -1246,6 +1417,10 @@ Used in GDB. @item only-time @samp{-F} in @code{gprof}. +@item options +@samp{-o} in @code{getopt}, @code{fdlist}, @code{fdmount}, +@code{fdmountd}, and @code{fdumount}. + @item output In various programs, specify the output file name. @@ -1330,6 +1505,9 @@ Used in @code{tar} and @code{cp}. @item prompt @samp{-p} in @code{ed}. +@item proxy +Specify an HTTP proxy. + @item query-user @samp{-X} in @code{shar}. @@ -1337,9 +1515,9 @@ Used in @code{tar} and @code{cp}. @samp{-q} in Make. @item quiet -Used in many programs to inhibit the usual output. @strong{Please -note:} every program accepting @samp{--quiet} should accept -@samp{--silent} as a synonym. +Used in many programs to inhibit the usual output. @strong{Note:} every +program accepting @samp{--quiet} should accept @samp{--silent} as a +synonym. @item quiet-unshar @samp{-Q} in @code{shar} @@ -1452,12 +1630,18 @@ Used by @code{recode} to chose files or pipes for sequencing passes. @item silent Used in many programs to inhibit the usual output. -@strong{Please note:} every program accepting +@strong{Note:} every program accepting @samp{--silent} should accept @samp{--quiet} as a synonym. @item size @samp{-s} in @code{ls}. +@item socket +Specify a file descriptor for a network server to use for its socket, +instead of opening and binding a new socket. This provides a way to +run, in a nonpriveledged process, a server that normally needs a +reserved port number. + @item sort Used in @code{ls}. @@ -1556,6 +1740,9 @@ Used in GDB and @code{objdump}. @item time Used in @code{ls} and @code{touch}. +@item timeout +Specify how long to wait before giving up on some operation. + @item to-stdout @samp{-O} in @code{tar}. @@ -1672,14 +1859,15 @@ This @value{CHAPTER} provides advice on how best to use the C language when writing GNU software. @menu -* Formatting:: Formatting Your Source Code -* Comments:: Commenting Your Work -* Syntactic Conventions:: Clean Use of C Constructs -* Names:: Naming Variables and Functions -* System Portability:: Portability between different operating systems +* Formatting:: Formatting Your Source Code +* Comments:: Commenting Your Work +* Syntactic Conventions:: Clean Use of C Constructs +* Names:: Naming Variables and Functions +* System Portability:: Portability between different operating systems * CPU Portability:: Supporting the range of CPU types * System Functions:: Portability and ``standard'' library functions * Internationalization:: Techniques for internationalization +* Mmap:: How you can safely use @code{mmap}. @end menu @node Formatting @@ -1808,6 +1996,13 @@ page. The formfeeds should appear alone on lines by themselves. Every program should start with a comment saying briefly what it is for. Example: @samp{fmt - filter for simple filling of text}. +Please write the comments in a GNU program in English, because English +is the one language that nearly all programmers in all countries can +read. If you do not write English well, please write comments in +English as well as you can, then ask other people to help rewrite them. +If you can't write comments in English, please find someone to work with +you and translate your comments into English. + Please put a comment on each function saying what the function does, what sorts of arguments it gets, and what the possible values of arguments mean and are used for. It is not necessary to duplicate in @@ -1862,6 +2057,11 @@ its sense}. @samp{#else} should have a comment describing the condition @dots{} #endif /* not foo */ @end group +@group +#ifdef foo + @dots{} +#endif /* foo */ +@end group @end example @noindent @@ -1875,9 +2075,13 @@ but, by contrast, write the comments this way for a @samp{#ifndef}: @dots{} #endif /* foo */ @end group +@group +#ifndef foo + @dots{} +#endif /* not foo */ +@end group @end example - @node Syntactic Conventions @section Clean Use of C Constructs @@ -2005,9 +2209,22 @@ Don't make the program ugly to placate @code{lint}. Please don't insert any casts to @code{void}. Zero without a cast is perfectly fine as a null pointer constant, except when calling a varargs function. -@node Names +@node Names @section Naming Variables and Functions +The names of global variables and functions in a program serve as +comments of a sort. So don't choose terse names---instead, look for +names that give useful information about the meaning of the variable or +function. In a GNU program, names should be English, like other +comments. + +Local variable names can be shorter, because they are used only within +one context, where (presumably) comments explain their purpose. + +Try to limit your use of abbreviations in symbol names. It is ok to +make a few abbreviations, explain what they mean, and then use them +frequently, but don't use lots of obscure abbreviations. + Please use underscores to separate words in a name, so that the Emacs word commands can be useful within them. Stick to lower case; reserve upper case for macros and @code{enum} constants, and for name-prefixes @@ -2033,10 +2250,10 @@ When you want to define names with constant integer values, use constants. Use file names of 14 characters or less, to avoid creating gratuitous -problems on older System V systems. You can use the program @code{doschk} to test for -this. @code{doschk} also tests for potential name conflicts if the -files were loaded onto an MS-DOS file system---something you may or may -not care about. +problems on older System V systems. You can use the program +@code{doschk} to test for this. @code{doschk} also tests for potential +name conflicts if the files were loaded onto an MS-DOS file +system---something you may or may not care about. @node System Portability @section Portability between System Types @@ -2066,14 +2283,10 @@ Avoid using the format of semi-internal data bases (e.g., directories) when there is a higher-level alternative (@code{readdir}). As for systems that are not like Unix, such as MSDOS, Windows, the -Macintosh, VMS, and MVS, supporting them is usually so much work that it -is better if you don't. - -The planned GNU kernel is not finished yet, but you can tell which -facilities it will provide by looking at the GNU C Library Manual. The -GNU kernel is based on Mach, so the features of Mach will also be -available. However, if you use Mach features, you'll probably have -trouble debugging your program today. +Macintosh, VMS, and MVS, supporting them is often a lot of work. When +that is the case, it is better to spend your time adding features that +will be useful on GNU and GNU/Linux, rather than on supporting other +incompatible systems. @node CPU Portability @section Portability between @sc{cpu}s @@ -2111,7 +2324,7 @@ that pass their arguments along to @code{printf} and friends: @example error (s, a1, a2, a3) char *s; - int a1, a2, a3; + char *a1, *a2, *a3; @{ fprintf (stderr, "error: "); fprintf (stderr, s, a1, a2, a3); @@ -2119,16 +2332,18 @@ error (s, a1, a2, a3) @end example @noindent -In practice, this works on all machines, and it is much simpler than any -``correct'' alternative. Be sure @emph{not} to use a prototype -for such functions. +In practice, this works on all machines, since a pointer is generally +the widest possible kind of argument, and it is much simpler than any +``correct'' alternative. Be sure @emph{not} to use a prototype for such +functions. However, avoid casting pointers to integers unless you really need to. -These assumptions really reduce portability, and in most programs they -are easy to avoid. In the cases where casting pointers to integers is -essential---such as, a Lisp interpreter which stores type information as -well as an address in one word---it is ok to do so, but you'll have to -make explicit provisions to handle different word sizes. +Outside of special situations, such casts greatly reduce portability, +and in most programs they are easy to avoid. In the cases where casting +pointers to integers is essential---such as, a Lisp interpreter which +stores type information as well as an address in one word---it is ok to +do it, but you'll have to make explicit provisions to handle different +word sizes. @node System Functions @section Calling System Functions @@ -2145,6 +2360,11 @@ Don't use the value of @code{sprintf}. It returns the number of characters written on some systems, but not on all systems. @item +@code{main} should be declared to return type @code{int}. It should +terminate either by calling @code{exit} or by returning the integer +status code; make sure it cannot ever return an undefined value. + +@item Don't declare system functions explicitly. Almost any declaration for a system function is wrong on some system. @@ -2275,13 +2495,18 @@ translations for this package from the translations for other packages. Normally, the text domain name should be the same as the name of the package---for example, @samp{fileutils} for the GNU file utilities. -To enable gettext to work, avoid writing code that makes assumptions -about the structure of words. Don't construct words from parts. Here -is an example of what not to do: +To enable gettext to work well, avoid writing code that makes +assumptions about the structure of words or sentences. When you want +the precise text of a sentence to vary depending on the data, use two or +more alternative string constants each containing a complete sentences, +rather than inserting conditionalized words or phrases into a single +sentence framework. + +Here is an example of what not to do: @example -prinf ("%d file%s processed", nfiles, - nfiles > 1 ? "s" : ""); +printf ("%d file%s processed", nfiles, + nfiles != 1 ? "s" : ""); @end example @noindent @@ -2289,8 +2514,8 @@ The problem with that example is that it assumes that plurals are made by adding `s'. If you apply gettext to the format string, like this, @example -prinf (gettext ("%d file%s processed"), nfiles, - nfiles > 1 ? "s" : ""); +printf (gettext ("%d file%s processed"), nfiles, + nfiles != 1 ? "s" : ""); @end example @noindent @@ -2298,9 +2523,9 @@ the message can use different words, but it will still be forced to use `s' for the plural. Here is a better way: @example -prinf ((nfiles > 1 ? "%d files processed" - : "%d file processed"), - nfiles); +printf ((nfiles != 1 ? "%d files processed" + : "%d file processed"), + nfiles); @end example @noindent @@ -2308,14 +2533,52 @@ This way, you can apply gettext to each of the two strings independently: @example -prinf ((nfiles > 1 ? gettext ("%d files processed") - : gettext ("%d file processed")), - nfiles); +printf ((nfiles != 1 ? gettext ("%d files processed") + : gettext ("%d file processed")), + nfiles); +@end example + +@noindent +This can be any method of forming the plural of the word for ``file'', and +also handles languages that require agreement in the word for +``processed''. + +A similar problem appears at the level of sentence structure with this +code: + +@example +printf ("# Implicit rule search has%s been done.\n", + f->tried_implicit ? "" : " not"); @end example @noindent -This can handle any language, no matter how it forms the plural of the -word for ``file.'' +Adding @code{gettext} calls to this code cannot give correct results for +all languages, because negation in some languages requires adding words +at more than one place in the sentence. By contrast, adding +@code{gettext} calls does the job straightfowardly if the code starts +out like this: + +@example +printf (f->tried_implicit + ? "# Implicit rule search has been done.\n", + : "# Implicit rule search has not been done.\n"); +@end example + +@node Mmap +@section Mmap + +Don't assume that @code{mmap} either works on all files or fails +for all files. It may work on some files and fail on others. + +The proper way to use @code{mmap} is to try it on the specific file for +which you want to use it---and if @code{mmap} doesn't work, fall back on +doing the job in another way using @code{read} and @code{write}. + +The reason this precaution is needed is that the GNU kernel (the HURD) +provides a user-extensible file system, in which there can be many +different kinds of ``ordinary files.'' Many of them support +@code{mmap}, but some do not. It is important to make programs handle +all these kinds of files. @node Documentation @chapter Documenting Programs @@ -2323,8 +2586,9 @@ word for ``file.'' @menu * GNU Manuals:: Writing proper manuals. * Manual Structure Details:: Specific structure conventions. +* License for Manuals:: Writing the distribution terms for a manual. * NEWS File:: NEWS files supplement manuals. -* Change Logs:: Recording Changes +* Change Logs:: Recording Changes * Man Pages:: Man pages are secondary. * Reading other Manuals:: How far you can go in learning from other manuals. @@ -2334,21 +2598,54 @@ word for ``file.'' @section GNU Manuals The preferred way to document part of the GNU system is to write a -manual in the Texinfo formatting language. See the Texinfo manual, -either the hardcopy, or the on-line version available through -@code{info} or the Emacs Info subsystem (@kbd{C-h i}). - -The manual should document all of the program's command-line options and -all of its commands. It should give examples of their use. But don't -organize the manual as a list of features. Instead, organize it -logically, by subtopics. Address the goals that a user will have in -mind, and explain how to accomplish them. +manual in the Texinfo formatting language. This makes it possible to +produce a good quality formatted book, using @TeX{}, and to generate an +Info file. It is also possible to generate HTML output from Texinfo +source. See the Texinfo manual, either the hardcopy, or the on-line +version available through @code{info} or the Emacs Info subsystem +(@kbd{C-h i}). + +Programmers often find it most natural to structure the documentation +following the structure of the implementation, which they know. But +this structure is not necessarily good for explaining how to use the +program; it may be irrelevant and confusing for a user. + +At every level, from the sentences in a paragraph to the grouping of +topics into separate manuals, the right way to structure documentation +is according to the concepts and questions that a user will have in mind +when reading it. Sometimes this structure of ideas matches the +structure of the implementation of the software being documented---but +often they are different. Often the most important part of learning to +write good documentation is learning to notice when you are structuring +the documentation like the implementation, and think about better +alternatives. + +For example, each program in the GNU system probably ought to be +documented in one manual; but this does not mean each program should +have its own manual. That would be following the structure of the +implementation, rather than the structure that helps the user +understand. + +Instead, each manual should cover a coherent @emph{topic}. For example, +instead of a manual for @code{diff} and a manual for @code{diff3}, we +have one manual for ``comparison of files'' which covers both of those +programs, as well as @code{cmp}. By documenting these programs +together, we can make the whole subject clearer. + +The manual which discusses a program should document all of the +program's command-line options and all of its commands. It should give +examples of their use. But don't organize the manual as a list of +features. Instead, organize it logically, by subtopics. Address the +questions that a user will ask when thinking about the job that the +program does. In general, a GNU manual should serve both as tutorial and reference. It should be set up for convenient access to each topic through Info, and for reading straight through (appendixes aside). A GNU manual should give a good introduction to a beginner reading through from the start, and should also provide all the details that hackers want. +The Bison manual is a good example of this---please take a look at it +to see what we mean. That is not as hard as it first sounds. Arrange each chapter as a logical breakdown of its topic, but order the sections, and write their @@ -2363,29 +2660,38 @@ the framework for a beginner to understand the rest of the manual. The Bison manual provides a good example of how to do this. Don't use Unix man pages as a model for how to write GNU documentation; -they are a bad example to follow. +most of them are terse, badly structured, and give inadequate +explanation of the underlying concepts. (There are, of course +exceptions.) Also Unix man pages use a particular format which is +different from what we use in GNU manuals. + +Please include an email address in the manual for where to report +bugs @emph{in the manual}. Please do not use the term ``pathname'' that is used in Unix documentation; use ``file name'' (two words) instead. We use the term -``path'' only for search paths, which are lists of file names. +``path'' only for search paths, which are lists of directory names. + +Please do not use the term ``illegal'' to refer to erroneous input to a +computer program. Please use ``invalid'' for this, and reserve the term +``illegal'' for violations of law. @node Manual Structure Details @section Manual Structure Details -The title page of the manual should state the version of the program -to which the manual applies. The Top node of the manual should also -contain this information. If the manual is changing more frequently -than or independent of the program, also state a version number for -the manual in both of these places. - -The manual should have a node named @samp{@var{program} Invocation} or -@samp{Invoking @var{program}}, where @var{program} stands for the name -of the program being described, as you would type it in the shell to run -the program. This node (together with its subnodes, if any) should -describe the program's command line arguments and how to run it (the -sort of information people would look in a man page for). Start with an -@samp{@@example} containing a template for all the options and arguments -that the program uses. +The title page of the manual should state the version of the programs or +packages documented in the manual. The Top node of the manual should +also contain this information. If the manual is changing more +frequently than or independent of the program, also state a version +number for the manual in both of these places. + +Each program documented in the manual should have a node named +@samp{@var{program} Invocation} or @samp{Invoking @var{program}}. This +node (together with its subnodes, if any) should describe the program's +command line arguments and how to run it (the sort of information people +would look in a man page for). Start with an @samp{@@example} +containing a template for all the options and arguments that the program +uses. Alternatively, put a menu item in some menu whose item name fits one of the above patterns. This identifies the node which that item points to @@ -2397,6 +2703,18 @@ quickly reading just this part of its manual. If one manual describes several programs, it should have such a node for each program described. +@node License for Manuals +@section License for Manuals + +If the manual contains a copy of the GNU GPL or GNU LGPL, or if it +contains chapters that make political or personal statements, please +copy the distribution terms of the GNU Emacs Manual, and adapt it by +modifying appropriately the list of special chapters that may not be +modified or deleted. + +If the manual does not contain any such chapters, then imitate the +simpler distribution terms of the Texinfo manual. + @node NEWS File @section The NEWS File @@ -2418,18 +2736,46 @@ Keep a change log to describe all the changes made to program source files. The purpose of this is so that people investigating bugs in the future will know about the changes that might have introduced the bug. Often a new bug can be found by looking at what was recently changed. -More importantly, change logs can help eliminate conceptual -inconsistencies between different parts of a program; they can give you -a history of how the conflicting concepts arose. +More importantly, change logs can help you eliminate conceptual +inconsistencies between different parts of a program, by giving you a +history of how the conflicting concepts arose and who they came from. + +@menu +* Change Log Concepts:: +* Style of Change Logs:: +* Simple Changes:: +* Conditional Changes:: +@end menu + +@node Change Log Concepts +@subsection Change Log Concepts -A change log file is normally called @file{ChangeLog} and covers an +You can think of the change log as a conceptual ``undo list'' which +explains how earlier versions were different from the current version. +People can see the current version; they don't need the change log +to tell them what is in it. What they want from a change log is a +clear explanation of how the earlier version differed. + +The change log file is normally called @file{ChangeLog} and covers an entire directory. Each directory can have its own change log, or a directory can use the change log of its parent directory--it's up to you. Another alternative is to record change log information with a version control system such as RCS or CVS. This can be converted automatically -to a @file{ChangeLog} file. +to a @file{ChangeLog} file using @code{rcs2log}; in Emacs, the command +@kbd{C-x v a} (@code{vc-update-change-log}) does the job. + +There's no need to describe the full purpose of the changes or how they +work together. If you think that a change calls for explanation, you're +probably right. Please do explain it---but please put the explanation +in comments in the code, where people will see it whenever they see the +code. For example, ``New function'' is enough for the change log when +you add a function, because there should be a comment before the +function definition to explain what it does. + +However, sometimes it is useful to write one line to describe the +overall purpose of a batch of changes. The easiest way to add an entry to @file{ChangeLog} is with the Emacs command @kbd{M-x add-change-log-entry}. An entry should have an @@ -2437,12 +2783,10 @@ asterisk, the name of the changed file, and then in parentheses the name of the changed functions, variables or whatever, followed by a colon. Then describe the changes you made to that function or variable. -Separate unrelated entries with blank lines. When two entries -represent parts of the same change, so that they work together, then -don't put blank lines between them. Then you can omit the file name -and the asterisk when successive entries are in the same file. +@node Style of Change Logs +@subsection Style of Change Logs -Here are some examples: +Here are some examples of change log entries: @example * register.el (insert-register): Return nil. @@ -2461,44 +2805,87 @@ Restart the tex shell if process is gone or stopped. It's important to name the changed function or variable in full. Don't abbreviate function or variable names, and don't combine them. -Subsequent maintainers will often -search for a function name to find all the change log entries that -pertain to it; if you abbreviate the name, they won't find it when they -search. For example, some people are tempted to abbreviate groups of -function names by writing @samp{* register.el -(@{insert,jump-to@}-register)}; this is not a good idea, since searching -for @code{jump-to-register} or @code{insert-register} would not find the -entry. +Subsequent maintainers will often search for a function name to find all +the change log entries that pertain to it; if you abbreviate the name, +they won't find it when they search. -There's no need to describe the full purpose of the changes or how they -work together. It is better to put such explanations in comments in the -code. That's why just ``New function'' is enough; there is a comment -with the function in the source to explain what it does. +For example, some people are tempted to abbreviate groups of function +names by writing @samp{* register.el (@{insert,jump-to@}-register)}; +this is not a good idea, since searching for @code{jump-to-register} or +@code{insert-register} would not find that entry. -However, sometimes it is useful to write one line to describe the -overall purpose of a large batch of changes. +Separate unrelated change log entries with blank lines. When two +entries represent parts of the same change, so that they work together, +then don't put blank lines between them. Then you can omit the file +name and the asterisk when successive entries are in the same file. -You can think of the change log as a conceptual ``undo list'' which -explains how earlier versions were different from the current version. -People can see the current version; they don't need the change log -to tell them what is in it. What they want from a change log is a -clear explanation of how the earlier version differed. +@node Simple Changes +@subsection Simple Changes + +Certain simple kinds of changes don't need much detail in the change +log. -When you change the calling sequence of a function in a simple -fashion, and you change all the callers of the function, there is no -need to make individual entries for all the callers. Just write in +When you change the calling sequence of a function in a simple fashion, +and you change all the callers of the function, there is no need to make +individual entries for all the callers that you changed. Just write in the entry for the function being called, ``All callers changed.'' +@example +* keyboard.c (Fcommand_execute): New arg SPECIAL. +All callers changed. +@end example + When you change just comments or doc strings, it is enough to write an -entry for the file, without mentioning the functions. Write just, -``Doc fix.'' +entry for the file, without mentioning the functions. Just ``Doc +fixes'' is enough for the change log. There's no need to make change log entries for documentation files. This is because documentation is not susceptible to bugs that are hard to fix. Documentation does not consist of parts that must interact in a precisely engineered fashion. To correct an error, you need not know -the history of the erroneous passage; it is enough to compare the -passage with the way the program actually works. +the history of the erroneous passage; it is enough to compare what the +documentation says with the way the program actually works. + +@node Conditional Changes +@subsection Conditional Changes + +C programs often contain compile-time @code{#if} conditionals. Many +changes are conditional; sometimes you add a new definition which is +entirely contained in a conditional. It is very useful to indicate in +the change log the conditions for which the change applies. + +Our convention for indicating conditional changes is to use square +brackets around the name of the condition. + +Here is a simple example, describing a change which is conditional but +does not have a function or entity name associated with it: + +@example +* xterm.c [SOLARIS2]: Include string.h. +@end example + +Here is an entry describing a new definition which is entirely +conditional. This new definition for the macro @code{FRAME_WINDOW_P} is +used only when @code{HAVE_X_WINDOWS} is defined: + +@example +* frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. +@end example + +Here is an entry for a change within the function @code{init_display}, +whose definition as a whole is unconditional, but the changes themselves +are contained in a @samp{#ifdef HAVE_LIBNCURSES} conditional: + +@example +* dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. +@end example + +Here is an entry for a change that takes affect only when +a certain macro is @emph{not} defined: + +@example +(gethostname) [!HAVE_SOCKETS]: Replace with winsock version. +@end example @node Man Pages @section Man Pages @@ -2558,9 +2945,9 @@ makes it easy to include your package into the larger framework of all GNU software. @menu -* Configuration:: How Configuration Should Work +* Configuration:: How Configuration Should Work * Makefile Conventions:: Makefile Conventions -* Releases:: Making Releases +* Releases:: Making Releases @end menu @node Configuration @@ -2633,7 +3020,7 @@ The @code{configure} script needs to be able to decode all plausible alternatives for how to describe a machine. Thus, @samp{sun3-sunos4.1} would be a valid alias. For many programs, @samp{vax-dec-ultrix} would be an alias for @samp{vax-dec-bsd}, simply because the differences -between Ultrix and @sc{BSD} are rarely noticeable, but a few programs +between Ultrix and BSD are rarely noticeable, but a few programs might need to distinguish them. @c Real 4.4BSD now runs on some Suns. @@ -2665,9 +3052,12 @@ to work with @var{package}. @c Giving an optional @var{parameter} of @c @samp{no} should omit @var{package}, if it is used by default. -Possible values of @var{package} include @samp{x}, @samp{x-toolkit}, -@samp{gnu-as} (or @samp{gas}), @samp{gnu-ld}, @samp{gnu-libc}, and -@samp{gdb}. +Possible values of @var{package} include +@samp{gnu-as} (or @samp{gas}), @samp{gnu-ld}, @samp{gnu-libc}, +@samp{gdb}, +@samp{x}, +and +@samp{x-toolkit}. Do not use a @samp{--with} option to specify the file name to use to find certain files. That is outside the scope of what @samp{--with} @@ -2734,9 +3124,9 @@ ignore most of its arguments. @node Releases @section Making Releases -Package the distribution of Foo version 69.96 in a gzipped tar file -named @file{foo-69.96.tar.gz}. It should unpack into a subdirectory -named @file{foo-69.96}. +Package the distribution of @code{Foo version 69.96} up in a gzipped tar +file with the name @file{foo-69.96.tar.gz}. It should unpack into a +subdirectory named @file{foo-69.96}. Building and installing the program should never modify any of the files contained in the distribution. This means that all the files that form @@ -2745,6 +3135,21 @@ files} and @dfn{non-source files}. Source files are written by humans and never changed automatically; non-source files are produced from source files by programs under the control of the Makefile. +The distribution should contain a file named @file{README} which gives +the name of the package, and a general description of what it does. It +is also good to explain the purpose of each of the first-level +subdirectories in the package, if there are any. The @file{README} file +should either state the version number of the package, or refer to where +in the package it can be found. + +The @file{README} file should refer to the file @file{INSTALL}, which +should contain an explanation of the installation procedure. + +The @file{README} file should also refer to the file which contains the +copying conditions. The GNU GPL, if used, should be in a file called +@file{COPYING}. If the GNU LGPL is used, it should be in a file called +@file{COPYING.LIB}. + Naturally, all the source files must be in the distribution. It is okay to include non-source files in the distribution, provided they are up-to-date and machine-independent, so that building the distribution @@ -2769,7 +3174,7 @@ Make sure that all the files in the distribution are world-readable. Make sure that no file name in the distribution is more than 14 characters long. Likewise, no file created by building the program should have a name longer than 14 characters. The reason for this is -that some systems adhere to a foolish interpretation of the POSIX +that some systems adhere to a foolish interpretation of the @sc{posix} standard, and refuse to open a longer name, rather than truncating as they did in the past. @@ -2797,6 +3202,31 @@ Leaving them out would make the distribution file a little smaller at the expense of possible inconvenience to a user who doesn't know what other files to get. +@node References +@chapter References to Non-Free Software and Documentation + +A GNU program should not recommend use of any non-free program. We +can't stop some people from writing proprietary programs, or stop other +people from using them. But we can and should avoid helping to +advertise them to new customers. + +Sometimes it is important to mention how to build your package on top of +some non-free operating system or other non-free base package. In such +cases, please mention the name of the non-free package or system in the +briefest possible way. Don't include any references for where to find +more information about the proprietary program. The goal should be that +people already using the proprietary program will get the advice they +need about how to use your free program, while people who don't already +use the proprietary program will not see anything to encourage them to +take an interest in it. + +Likewise, a GNU package should not refer the user to any non-free +documentation for free software. The need for free documentation to go +with free software is now a major focus of the GNU project; to show that +we are serious about the need for free documentation, we must not +undermine our position by recommending use of documentation that isn't +free. + @contents @bye diff --git a/man/texinfo.tex b/man/texinfo.tex index 3ce4715..c49af9f 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -1,7 +1,11 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% $Id: texinfo.tex,v 2.227 1998/02/25 22:54:34 karl Exp $ % -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{1999-09-25.10} +% +% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 % Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or @@ -25,36 +29,44 @@ % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex -% /home/gd/gnu/doc/texinfo.tex on the GNU machines. -% -% Send bug reports to bug-texinfo@gnu.org. -% Please include a precise test case in each bug report, -% including a complete document with which we can reproduce the problem. -% -% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You -% have to run makeinfo -E to expand macros first; the texi2dvi script -% does this. - - -% Make it possible to create a .fmt file just by loading this file: -% if the underlying format is not loaded, start by loading it now. -% Added by gildea November 1993. -\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% ftp://ftp.gnu.org/gnu/texinfo.tex +% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) +% ftp://texinfo.org/tex/texinfo.tex +% ftp://us.ctan.org/macros/texinfo/texinfo.tex +% (and all CTAN mirrors, finger ctan@us.ctan.org for a list). +% /home/gd/gnu/doc/texinfo.tex on the GNU machines. +% The texinfo.tex in any given Texinfo distribution could well be out +% of date, so if that's what you're using, please check. +% Texinfo has a small home page at http://texinfo.org/. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. +% The extra runs of TeX get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages. You can get +% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. -% This automatically updates the version number based on RCS. -\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 2.227 $ -\message{Loading texinfo package [Version \texinfoversion]:} +\message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. -\everyjob{\message{[Texinfo version \texinfoversion]}\message{} +\everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. - \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c @@ -70,18 +82,9 @@ \let\ptexstar=\* \let\ptext=\t -% Be sure we're in horizontal mode when doing a tie, since we make space -% equivalent to this in @example-like environments. Otherwise, a space -% at the beginning of a line will start with \penalty -- and -% since \penalty is valid in vertical mode, we'd end up putting the -% penalty on the vertical list instead of in the new paragraph. -{\catcode`@ = 11 - % Avoid using \@M directly, because that causes trouble - % if the definition is written into an index file. - \global\let\tiepenalty = \@M - \gdef\tie{\leavevmode\penalty\tiepenalty\ } -} - +% We never want plain's outer \+ definition in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax \message{Basics,} \chardef\other=12 @@ -90,18 +93,47 @@ % starts a new line in the output. \newlinechar = `^^J -% Set up fixed words for English. -\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi% -\def\putwordInfo{Info}% -\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi% -\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi% -\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi% -\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi% -\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi% -\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi% -\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi% -\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi% -\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi% +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi +\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi % Ignore a token. % @@ -122,30 +154,35 @@ % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\ifx\eTeXversion\undefined \def\loggingall{\tracingcommands2 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% +\else +\def\loggingall{\tracingcommands3 \tracingstats2 + \tracingpages1 \tracingoutput1 \tracinglostchars1 + \tracingmacros2 \tracingparagraphs1 \tracingrestores1 + \tracingscantokens1 \tracingassigns1 \tracingifs1 + \tracinggroups1 \tracingnesting2 + \showboxbreadth\maxdimen\showboxdepth\maxdimen +}% +\fi % For @cropmarks command. % Do @cropmarks to get crop marks. -% +% \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % -\newdimen\cornerlong \newdimen\cornerthick -\newdimen\topandbottommargin -\newdimen\outerhsize \newdimen\outervsize -\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks -\outerhsize=7in -%\outervsize=9.5in -% Alternative @smallbook page size is 9.25in -\outervsize=9.25in -\topandbottommargin=.75in +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 @@ -179,13 +216,16 @@ \shipout\vbox{% \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize - \line{\ewtop\hfil\ewtop}% - \nointerlineskip - \line{% - \vbox{\moveleft\cornerthick\nstop}% - \hfill - \vbox{\moveright\cornerthick\nstop}% - }% + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. @@ -203,18 +243,22 @@ \unvbox\footlinebox \fi % + \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi + % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick - \line{% - \vbox{\moveleft\cornerthick\nsbot}% - \hfill - \vbox{\moveright\cornerthick\nsbot}% + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% }% - \nointerlineskip - \line{\ewbot\hfil\ewbot}% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox @@ -330,11 +374,11 @@ %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% -\ifENV\errmessage{Still within an environment. Type Return to continue.} +\ifENV\errmessage{Still within an environment; press RETURN to continue} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. -\newhelp\EMsimple{Type to continue.} +\newhelp\EMsimple{Press RETURN to continue.} \outer\def\begin{\parsearg\beginxxx} @@ -393,7 +437,7 @@ % @@ prints an @ % Kludge this until the fonts are right (grr). -\def\@{{\tt \char '100}} +\def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. @@ -403,8 +447,8 @@ %\def\'{{'}} % Used to generate quoted braces. -\def\mylbrace {{\tt \char '173}} -\def\myrbrace {{\tt \char '175}} +\def\mylbrace {{\tt\char123}} +\def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup @@ -441,6 +485,18 @@ \fi\fi } +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } @@ -538,41 +594,47 @@ where each line of input produces a line of output.} %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000 +%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \def\needx#1{% - % Go into vertical mode, so we don't make a big box in the middle of a + % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % - % Don't add any leading before our big empty box, but allow a page - % break, since the best break might be right here. - \allowbreak - \nointerlineskip - \vtop to #1\mil{\vfil}% - % - % TeX does not even consider page breaks if a penalty added to the - % main vertical list is 10000 or more. But in order to see if the - % empty box we just added fits on the page, we must make it consider - % page breaks. On the other hand, we don't want to actually break the - % page after the empty box. So we use a penalty of 9999. - % - % There is an extremely small chance that TeX will actually break the - % page at this \penalty, if there are no other feasible breakpoints in - % sight. (If the user is using lots of big @group commands, which - % almost-but-not-quite fill up a page, TeX will have a hard time doing - % good page breaking, for example.) However, I could not construct an - % example where a page broke at this \penalty; if it happens in a real - % document, then we can reconsider our strategy. - \penalty9999 - % - % Back up by the size of the box, whether we did a page break or not. - \kern -#1\mil - % - % Do not allow a page break right after this kern. - \nobreak + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi } % @br forces paragraph break @@ -583,15 +645,19 @@ where each line of input produces a line of output.} % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % -\def\dots{\hbox to 1.5em{% - \hskip 0pt plus 0.25fil minus 0.25fil - .\hss.\hss.% - \hskip 0pt plus 0.5fil minus 0.5fil -}} +\def\dots{% + \leavevmode + \hbox to 1.5em{% + \hskip 0pt plus 0.25fil minus 0.25fil + .\hss.\hss.% + \hskip 0pt plus 0.5fil minus 0.5fil + }% +} % @enddots{} is an end-of-sentence ellipsis. -% +% \def\enddots{% + \leavevmode \hbox to 2em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.\hss.% @@ -602,7 +668,7 @@ where each line of input produces a line of output.} % @page forces the start of a new page - +% \def\page{\par\vfill\supereject} % @exdent text.... @@ -669,420 +735,295 @@ where each line of input produces a line of output.} % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment -\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other% -\parsearg \commentxxx} - -\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 } +\def\comment{\begingroup \catcode`\^^M=\other% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\commentxxx} +{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment -% @paragraphindent is defined for the Info formatting commands only. -\let\paragraphindent=\comment - -% Prevent errors for section commands. -% Used in @ignore and in failing conditionals. -\def\ignoresections{% -\let\chapter=\relax -\let\unnumbered=\relax -\let\top=\relax -\let\unnumberedsec=\relax -\let\unnumberedsection=\relax -\let\unnumberedsubsec=\relax -\let\unnumberedsubsection=\relax -\let\unnumberedsubsubsec=\relax -\let\unnumberedsubsubsection=\relax -\let\section=\relax -\let\subsec=\relax -\let\subsubsec=\relax -\let\subsection=\relax -\let\subsubsection=\relax -\let\appendix=\relax -\let\appendixsec=\relax -\let\appendixsection=\relax -\let\appendixsubsec=\relax -\let\appendixsubsection=\relax -\let\appendixsubsubsec=\relax -\let\appendixsubsubsection=\relax -\let\contents=\relax -\let\smallbook=\relax -\let\titlepage=\relax +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% We cannot implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\def\paragraphindent{\parsearg\doparagraphindent} +\def\doparagraphindent#1{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent } -% Used in nested conditionals, where we have to parse the Texinfo source -% and so want to turn off most commands, in case they are used -% incorrectly. -% -\def\ignoremorecommands{% - \let\defcodeindex = \relax - \let\defcv = \relax - \let\deffn = \relax - \let\deffnx = \relax - \let\defindex = \relax - \let\defivar = \relax - \let\defmac = \relax - \let\defmethod = \relax - \let\defop = \relax - \let\defopt = \relax - \let\defspec = \relax - \let\deftp = \relax - \let\deftypefn = \relax - \let\deftypefun = \relax - \let\deftypevar = \relax - \let\deftypevr = \relax - \let\defun = \relax - \let\defvar = \relax - \let\defvr = \relax - \let\ref = \relax - \let\xref = \relax - \let\printindex = \relax - \let\pxref = \relax - \let\settitle = \relax - \let\setchapternewpage = \relax - \let\setchapterstyle = \relax - \let\everyheading = \relax - \let\evenheading = \relax - \let\oddheading = \relax - \let\everyfooting = \relax - \let\evenfooting = \relax - \let\oddfooting = \relax - \let\headings = \relax - \let\include = \relax - \let\lowersections = \relax - \let\down = \relax - \let\raisesections = \relax - \let\up = \relax - \let\set = \relax - \let\clear = \relax - \let\item = \relax +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\def\exampleindent{\parsearg\doexampleindent} +\def\doexampleindent#1{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi } -% Ignore @ignore ... @end ignore. +% @asis just yields its argument. Used with @table, for example. % -\def\ignore{\doignore{ignore}} +\def\asis#1{#1} -% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. +% @math means output in math mode. +% We don't use $'s directly in the definition of \math because control +% sequences like \math are expanded when the toc file is written. Then, +% we read the toc file back, the $'s will be normal characters (as they +% should be, according to the definition of Texinfo). So we must use a +% control sequence to switch into and out of math mode. % -\def\ifinfo{\doignore{ifinfo}} -\def\ifhtml{\doignore{ifhtml}} -\def\ifnottex{\doignore{ifnottex}} -\def\html{\doignore{html}} -\def\menu{\doignore{menu}} -\def\direntry{\doignore{direntry}} - -% Also ignore @macro ... @end macro. The user must run texi2dvi, -% which runs makeinfo to do macro expansion. Ignore @unmacro, too. -\def\macro{\doignore{macro}} -\let\unmacro = \comment +% This isn't quite enough for @math to work properly in indices, but it +% seems unlikely it will ever be needed there. +% +\let\implicitmath = $ +\def\math#1{\implicitmath #1\implicitmath} +% @bullet and @minus need the same treatment as @math, just above. +\def\bullet{\implicitmath\ptexbullet\implicitmath} +\def\minus{\implicitmath-\implicitmath} -% @dircategory CATEGORY -- specify a category of the dir file -% which this file should belong to. Ignore this in TeX. -\let\dircategory = \comment +% @refill is a no-op. +\let\refill=\relax -% Ignore text until a line `@end #1'. +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate (before @setfilename). % -\def\doignore#1{\begingroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define a command to swallow text until we reach `@end #1'. - \long\def\doignoretext##1\end #1{\enddoignore}% - % - % Make sure that spaces turn into tokens that match what \doignoretext wants. - \catcode32 = 10 - % - % Ignore braces, too, so mismatched braces don't cause trouble. - \catcode`\{ = 9 - \catcode`\} = 9 - % - % And now expand that command. - \doignoretext +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% @setfilename is done at the beginning of every texinfo file. +% So open here the files we need to have open while reading the input. +% This makes it possible to make a .fmt file for texinfo. +\def\setfilename{% + \iflinks + \readauxfile + \fi % \openindices needs to do some work in any case. + \openindices + \fixbackslash % Turn off hack to swallow `\input texinfo'. + \global\let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + % Just to be on the safe side, close the input stream before the \input. + \openin 1 texinfo.cnf + \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi + \closein1 + \temp + % + \comment % Ignore the actual filename. } -% What we do to finish off ignored text. +% Called from \setfilename. % -\def\enddoignore{\endgroup\ignorespaces}% +\def\openindices{% + \newindex{cp}% + \newcodeindex{fn}% + \newcodeindex{vr}% + \newcodeindex{tp}% + \newcodeindex{ky}% + \newcodeindex{pg}% +} -\newif\ifwarnedobs\warnedobsfalse -\def\obstexwarn{% - \ifwarnedobs\relax\else - % We need to warn folks that they may have trouble with TeX 3.0. - % This uses \immediate\write16 rather than \message to get newlines. - \immediate\write16{} - \immediate\write16{***WARNING*** for users of Unix TeX 3.0!} - \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} - \immediate\write16{If you are running another version of TeX, relax.} - \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} - \immediate\write16{ Then upgrade your TeX installation if you can.} - \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)} - \immediate\write16{If you are stuck with version 3.0, run the} - \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} - \immediate\write16{ to use a workaround.} - \immediate\write16{} - \global\warnedobstrue +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +\ifx\pdfoutput\undefined + \pdffalse + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\linkcolor = \relax + \let\pdfmakeoutlines = \relax +\else + \pdftrue + \pdfoutput = 1 + \input pdfcolor + \def\dopdfimage#1#2#3{% + \def\imagewidth{#2}% + \def\imageheight{#3}% + \ifnum\pdftexversion < 14 + \pdfimage + \else + \pdfximage \fi -} - -% **In TeX 3.0, setting text in \nullfont hangs tex. For a -% workaround (which requires the file ``dummy.tfm'' to be installed), -% uncomment the following line: -%%%%%\font\nullfont=dummy\let\obstexwarn=\relax - -% Ignore text, except that we keep track of conditional commands for -% purposes of nesting, up to an `@end #1' command. -% -\def\nestedignore#1{% - \obstexwarn - % We must actually expand the ignored text to look for the @end - % command, so that nested ignore constructs work. Thus, we put the - % text into a \vbox and then do nothing with the result. To minimize - % the change of memory overflow, we follow the approach outlined on - % page 401 of the TeXbook: make the current font be a dummy font. - % - \setbox0 = \vbox\bgroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define `@end #1' to end the box, which will in turn undefine the - % @end command again. - \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% - % - % We are going to be parsing Texinfo commands. Most cause no - % trouble when they are used incorrectly, but some commands do - % complicated argument parsing or otherwise get confused, so we - % undefine them. - % - % We can't do anything about stray @-signs, unfortunately; - % they'll produce `undefined control sequence' errors. - \ignoremorecommands - % - % Set the current font to be \nullfont, a TeX primitive, and define - % all the font commands to also use \nullfont. We don't use - % dummy.tfm, as suggested in the TeXbook, because not all sites - % might have that installed. Therefore, math mode will still - % produce output, but that should be an extremely small amount of - % stuff compared to the main input. - % - \nullfont - \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont - \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont - \let\tensf = \nullfont - % Similarly for index fonts (mostly for their use in - % smallexample) - \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont - \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont - \let\indsf = \nullfont - % - % Don't complain when characters are missing from the fonts. - \tracinglostchars = 0 - % - % Don't bother to do space factor calculations. - \frenchspacing - % - % Don't report underfull hboxes. - \hbadness = 10000 - % - % Do minimal line-breaking. - \pretolerance = 10000 - % - % Do not execute instructions in @tex - \def\tex{\doignore{tex}}% -} - -% @set VAR sets the variable VAR to an empty value. -% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. -% -% Since we want to separate VAR from REST-OF-LINE (which might be -% empty), we can't just use \parsearg; we have to insert a space of our -% own to delimit the rest of the line, and then take it out again if we -% didn't need it. Make sure the catcode of space is correct to avoid -% losing inside @example, for instance. -% -\def\set{\begingroup\catcode` =10 - \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. - \parsearg\setxxx} -\def\setxxx#1{\setyyy#1 \endsetyyy} -\def\setyyy#1 #2\endsetyyy{% - \def\temp{#2}% - \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty - \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. - \fi - \endgroup -} -% Can't use \xdef to pre-expand #2 and save some time, since \temp or -% \next or other control sequences that we've defined might get us into -% an infinite loop. Consider `@set foo @cite{bar}'. -\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} - -% @clear VAR clears (i.e., unsets) the variable VAR. -% -\def\clear{\parsearg\clearxxx} -\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} - -% @value{foo} gets the text saved in variable foo. -% -\def\value{\begingroup - \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. - \valuexxx} -\def\valuexxx#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - {\{No value for ``#1''\}}% - \else - \csname SET#1\endcsname - \fi -\endgroup} - -% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined -% with @set. -% -\def\ifset{\parsearg\ifsetxxx} -\def\ifsetxxx #1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifsetfail - \else - \expandafter\ifsetsucceed - \fi -} -\def\ifsetsucceed{\conditionalsucceed{ifset}} -\def\ifsetfail{\nestedignore{ifset}} -\defineunmatchedend{ifset} - -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been -% defined with @set, or has been undefined with @clear. -% -\def\ifclear{\parsearg\ifclearxxx} -\def\ifclearxxx #1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifclearsucceed - \else - \expandafter\ifclearfail - \fi -} -\def\ifclearsucceed{\conditionalsucceed{ifclear}} -\def\ifclearfail{\nestedignore{ifclear}} -\defineunmatchedend{ifclear} - -% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text -% following, through the first @end iftex (etc.). Make `@end iftex' -% (etc.) valid only after an @iftex. -% -\def\iftex{\conditionalsucceed{iftex}} -\def\ifnothtml{\conditionalsucceed{ifnothtml}} -\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} -\defineunmatchedend{iftex} -\defineunmatchedend{ifnothtml} -\defineunmatchedend{ifnotinfo} - -% We can't just want to start a group at @iftex (for example) and end it -% at @end iftex, since then @set commands inside the conditional have no -% effect (they'd get reverted at the end of the group). So we must -% define \Eiftex to redefine itself to be its previous value. (We can't -% just define it to fail again with an ``unmatched end'' error, since -% the @ifset might be nested.) -% -\def\conditionalsucceed#1{% - \edef\temp{% - % Remember the current value of \E#1. - \let\nece{prevE#1} = \nece{E#1}% - % - % At the `@end #1', redefine \E#1 to be its previous value. - \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% - }% - \temp -} - -% We need to expand lots of \csname's, but we don't want to expand the -% control sequences after we've constructed them. -% -\def\nece#1{\expandafter\noexpand\csname#1\endcsname} - -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math means output in math mode. -% We don't use $'s directly in the definition of \math because control -% sequences like \math are expanded when the toc file is written. Then, -% we read the toc file back, the $'s will be normal characters (as they -% should be, according to the definition of Texinfo). So we must use a -% control sequence to switch into and out of math mode. -% -% This isn't quite enough for @math to work properly in indices, but it -% seems unlikely it will ever be needed there. -% -\let\implicitmath = $ -\def\math#1{\implicitmath #1\implicitmath} - -% @bullet and @minus need the same treatment as @math, just above. -\def\bullet{\implicitmath\ptexbullet\implicitmath} -\def\minus{\implicitmath-\implicitmath} - -\def\node{\ENVcheck\parsearg\nodezzz} -\def\nodezzz#1{\nodexxx [#1,]} -\def\nodexxx[#1,#2]{\gdef\lastnode{#1}} -\let\nwnode=\node -\let\lastnode=\relax - -\def\donoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\setref{\lastnode}\fi -\global\let\lastnode=\relax} - -\def\unnumbnoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi -\global\let\lastnode=\relax} - -\def\appendixnoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi -\global\let\lastnode=\relax} - -% @refill is a no-op. -\let\refill=\relax - -% @setfilename is done at the beginning of every texinfo file. -% So open here the files we need to have open while reading the input. -% This makes it possible to make a .fmt file for texinfo. -\def\setfilename{% - \readauxfile - \opencontents - \openindices - \fixbackslash % Turn off hack to swallow `\input texinfo'. - \global\let\setfilename=\comment % Ignore extra @setfilename cmds. - % - % If texinfo.cnf is present on the system, read it. - % Useful for site-wide @afourpaper, etc. - % Just to be on the safe side, close the input stream before the \input. - \openin 1 texinfo.cnf - \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi - \closein1 - \temp - % - \comment % Ignore the actual filename. -} - -% @bye. -\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} - -% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} -% \def\macroxxx#1#2 \end macro{% -% \expandafter\gdef\macrotemp#1{#2}% -% \endgroup} - -%\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} -%\def\linemacroxxx#1#2 \end linemacro{% -%\let\parsearg=\relax -%\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}% -%\expandafter\xdef\macrotemp{\parsearg\macrotempx}% -%\expandafter\gdef\macrotempx#1{#2}% -%\endgroup} - -%\def\butfirst#1{} + \ifx\empty\imagewidth\else width \imagewidth \fi + \ifx\empty\imageheight\else height \imageheight \fi + {#1.pdf}% + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + \def\pdfmkdest#1{\pdfdest name{#1@} xyz} + \def\pdfmkpgn#1{#1@} + \let\linkcolor = \Cyan + \def\endlink{\Black\pdfendlink} + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + \def\pdfmakeoutlines{{% + \openin 1 \jobname.toc + \ifeof 1\else\bgroup + \closein 1 + \indexnofonts + \def\tt{} + % thanh's hack / proper braces in bookmarks + \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace + \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace + % + \def\chapentry ##1##2##3{} + \def\unnumbchapentry ##1##2{} + \def\secentry ##1##2##3##4{\advancenumber{chap##2}} + \def\unnumbsecentry ##1##2{} + \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} + \def\unnumbsubsecentry ##1##2{} + \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} + \def\unnumbsubsubsecentry ##1##2{} + \input \jobname.toc + \def\chapentry ##1##2##3{% + \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} + \def\unnumbchapentry ##1##2{% + \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} + \def\secentry ##1##2##3##4{% + \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} + \def\unnumbsecentry ##1##2{% + \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} + \def\subsecentry ##1##2##3##4##5{% + \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} + \def\unnumbsubsecentry ##1##2{% + \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} + \def\subsubsecentry ##1##2##3##4##5##6{% + \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} + \def\unnumbsubsubsecentry ##1##2{% + \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} + \input \jobname.toc + \egroup\fi + }} + \def\makelinks #1,{% + \def\params{#1}\def\E{END}% + \ifx\params\E + \let\nextmakelinks=\relax + \else + \let\nextmakelinks=\makelinks + \ifnum\lnkcount>0,\fi + \picknum{#1}% + \startlink attr{/Border [0 0 0]} + goto name{\pdfmkpgn{\the\pgn}}% + \linkcolor #1% + \advance\lnkcount by 1% + \endlink + \fi + \nextmakelinks + } + \def\picknum#1{\expandafter\pn#1} + \def\pn#1{% + \def\p{#1}% + \ifx\p\lbrace + \let\nextpn=\ppn + \else + \let\nextpn=\ppnn + \def\first{#1} + \fi + \nextpn + } + \def\ppn#1{\pgn=#1\gobble} + \def\ppnn{\pgn=\first} + \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \ifx\p\space\else\addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \fi + \nextsp} + \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + \def\pdfurl#1{% + \begingroup + \normalturnoffactive\def\@{@}% + \leavevmode\Red + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + % #1 + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS| + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} + \linkcolor #1\endlink} + \def\mkpgn#1{#1@} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\fi % \ifx\pdfoutput \message{fonts,} - % Font-change commands. -% Texinfo supports the sans serif font style, which plain TeX does not. +% Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} @@ -1148,22 +1089,17 @@ where each line of input produces a line of output.} \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} -% Fonts for indices and small examples (9pt). -% We actually use the slanted font rather than the italic, -% because texinfo normally uses the slanted fonts for that. -% Do not make many font distinctions in general in the index, since they -% aren't very useful. -\setfont\ninett\ttshape{9}{1000} -\setfont\indrm\rmshape{9}{1000} -\setfont\indit\slshape{9}{1000} -\let\indsl=\indit -\let\indtt=\ninett -\let\indttsl=\ninett -\let\indsf=\indrm -\let\indbf=\indrm -\setfont\indsc\scshape{10}{900} -\font\indi=cmmi9 -\font\indsy=cmsy9 +% Fonts for indices, footnotes, small examples (9pt). +\setfont\smallrm\rmshape{9}{1000} +\setfont\smalltt\ttshape{9}{1000} +\setfont\smallbf\bfshape{10}{900} +\setfont\smallit\itshape{9}{1000} +\setfont\smallsl\slshape{9}{1000} +\setfont\smallsf\sfshape{9}{1000} +\setfont\smallsc\scshape{10}{900} +\setfont\smallttsl\ttslshape{10}{900} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} @@ -1277,11 +1213,12 @@ where each line of input produces a line of output.} \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? -\def\indexfonts{% - \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl - \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc - \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl - \resetmathfonts \setleading{12pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \resetmathfonts \setleading{11pt}} % Set up the default fonts, so we can use them for creating boxes. % @@ -1305,13 +1242,14 @@ where each line of input produces a line of output.} % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} -\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx} +\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} +\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic -\let\var=\smartitalic -\let\dfn=\smartitalic +\let\var=\smartslanted +\let\dfn=\smartslanted \let\emph=\smartitalic -\let\cite=\smartitalic +\let\cite=\smartslanted \def\b#1{{\bf #1}} \let\strong=\b @@ -1329,9 +1267,9 @@ where each line of input produces a line of output.} } \let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} -\setfont\smallrm\rmshape{8}{1000} -\font\smallsy=cmsy9 -\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% +\setfont\keyrm\rmshape{8}{1000} +\font\keysy=cmsy9 +\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% @@ -1341,7 +1279,9 @@ where each line of input produces a line of output.} %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} +% @file, @option are the same as @samp. \let\file=\samp +\let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. @@ -1376,20 +1316,18 @@ where each line of input produces a line of output.} % and arrange explicitly to hyphenate at a dash. % -- rms. { -\catcode`\-=\active -\catcode`\_=\active -\catcode`\|=\active -\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} -% The following is used by \doprintindex to insure that long function names -% wrap around. It is necessary for - and _ to be active before the index is -% read from the file, as \entry parses the arguments long before \code is -% ever called. -- mycroft -% _ is always active; and it shouldn't be \let = to an _ that is a -% subscript character anyway. Then, @cindex @samp{_} (for example) -% fails. --karl -\global\def\indexbreaks{% - \catcode`\-=\active \let-\realdash -} + \catcode`\-=\active + \catcode`\_=\active + % + \global\def\code{\begingroup + \catcode`\-=\active \let-\codedash + \catcode`\_=\active \let_\codeunder + \codex + } + % + % If we end up with any active - characters when handling the index, + % just treat them as a normal -. + \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} @@ -1430,27 +1368,55 @@ where each line of input produces a line of output.} \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} -% @url. Quotes do not seem necessary, so use \code. +% For @url, @env, @command quotes seem unnecessary, so use \code. \let\url=\code - -% @uref (abbreviation for `urlref') takes an optional second argument -% specifying the text to display. First (mandatory) arg is the url. -% Perhaps eventually put in a hypertex \special here. -% -\def\uref#1{\urefxxx #1,,\finish} -\def\urefxxx#1,#2,#3\finish{% - \setbox0 = \hbox{\ignorespaces #2}% +\let\env=\code +\let\command=\code + +% @uref (abbreviation for `urlref') takes an optional (comma-separated) +% second argument specifying the text to display and an optional third +% arg as text to display instead of (rather than in addition to) the url +% itself. First (mandatory) arg is the url. Perhaps eventually put in +% a hypertex \special here. +% +\def\uref#1{\douref #1,,,\finish} +\def\douref#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt - \unhbox0\ (\code{#1})% + \unhbox0 % third arg given, show only that \else - \code{#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \code{#1}% only url given, so show it + \fi \fi -} + \endlink +\endgroup} -% rms does not like the angle brackets --karl, 17may97. -% So now @email is just like @uref. +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% %\def\email#1{\angleleft{\tt #1}\angleright} -\let\email=\uref +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and @@ -1460,8 +1426,7 @@ where each line of input produces a line of output.} \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the -% argument is to make the input look right: @dmn{pt} instead of -% @dmn{}pt. +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} @@ -1472,11 +1437,14 @@ where each line of input produces a line of output.} % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} +% Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font -% Use of \lowercase was suggested. \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font +% @acronym downcases the argument and prints in smallcaps. +\def\acronym#1{{\smallcaps \lowercase{#1}}} + % @pounds{} is a sterling sign. \def\pounds{{\it\$}} @@ -1490,15 +1458,20 @@ where each line of input produces a line of output.} \newif\ifseenauthor \newif\iffinishedtitlepage +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm -% I deinstalled the following change because \cmr12 is undefined. -% This change was not in the ChangeLog anyway. --rms. -% \let\subtitlerm=\cmr12 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% @@ -1547,6 +1520,23 @@ where each line of input produces a line of output.} % after the title page, which we certainly don't want. \oldpage \endgroup + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi + % + \ifpdf \pdfmakepagedesttrue \fi + % \HEADINGSon } @@ -1560,10 +1550,10 @@ where each line of input produces a line of output.} \let\thispage=\folio -\newtoks \evenheadline % Token sequence for heading line of even pages -\newtoks \oddheadline % Token sequence for heading line of odd pages -\newtoks \evenfootline % Token sequence for footing line of even pages -\newtoks \oddfootline % Token sequence for footing line of odd pages +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline @@ -1681,39 +1671,23 @@ where each line of input produces a line of output.} % Subroutines used in generating headings % Produces Day Month Year style of output. -\def\today{\number\day\space -\ifcase\month\or -January\or February\or March\or April\or May\or June\or -July\or August\or September\or October\or November\or December\fi -\space\number\year} - -% Use this if you want the Month Day, Year style of output. -%\def\today{\ifcase\month\or -%January\or February\or March\or April\or May\or June\or -%July\or August\or September\or October\or November\or December\fi -%\space\number\day, \number\year} - -% @settitle line... specifies the title of the document, for headings -% It generates no output of its own - -\def\thistitle{No Title} +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} - -% @tabs -- simple alignment - -% These don't work. For one thing, \+ is defined as outer. -% So these macros cannot even be defined. - -%\def\tabs{\parsearg\tabszzz} -%\def\tabszzz #1{\settabs\+#1\cr} -%\def\tabline{\parsearg\tablinezzz} -%\def\tablinezzz #1{\+#1\cr} -%\def\&{&} - % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text @@ -1757,11 +1731,6 @@ July\or August\or September\or October\or November\or December\fi \itemindex{#1}% \nobreak % This prevents a break before @itemx. % - % Be sure we are not still in the middle of a paragraph. - %{\parskip = 0in - %\par - %}% - % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next @@ -1790,13 +1759,17 @@ July\or August\or September\or October\or November\or December\fi \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the - % following text (if any) will end up on the same line. Since that - % text will be indented by \tableindent, we make the item text be in - % a zero-width box. + % following text (if any) will end up on the same line. \noindent - \rlap{\hskip -\tableindent\box0}\ignorespaces% - \endgroup% - \itemxneedsnegativevskiptrue% + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue \fi } @@ -1807,9 +1780,10 @@ July\or August\or September\or October\or November\or December\fi \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} -%% Contains a kludge to get @end[description] to work +% Contains a kludge to get @end[description] to work. \def\description{\tablez{\dontindex}{1}{}{}{}{}} +% @table, @ftable, @vtable. \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% @@ -1869,7 +1843,7 @@ July\or August\or September\or October\or November\or December\fi \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% - \begingroup % ended by the @end itemsize + \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } @@ -2082,46 +2056,60 @@ July\or August\or September\or October\or November\or December\fi \multitablelinespace=0pt % Macros used to set up halign preamble: -% +% \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent -% 2/1/96, to allow fractions to be given with more than one digit. -\def\pickupwholefraction#1 {\global\advance\colcount by1 % -\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% -\setuptable} +% #1 is the part of the @columnfraction before the decimal point, which +% is presumably either 0 or the empty string (but we don't check, we +% just throw it away). #2 is the decimal part, which we use as the +% percent of \hsize for this column. +\def\pickupwholefraction#1.#2 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% + \setuptable +} \newcount\colcount -\def\setuptable#1{\def\firstarg{#1}% -\ifx\firstarg\xendsetuptable\let\go\relax% -\else - \ifx\firstarg\xcolumnfractions\global\setpercenttrue% +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax \else - \ifsetpercent - \let\go\pickupwholefraction % In this case arg of setuptable - % is the decimal point before the - % number given in percent of hsize. - % We don't need this so we don't use it. + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; + % typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% \else - \global\advance\colcount by1 - \setbox0=\hbox{#1 }% Add a normal word space as a separator; - % typically that is always in the input, anyway. - \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \let\go = \setuptable \fi% - \fi% -\ifx\go\pickupwholefraction\else\let\go\setuptable\fi% -\fi\go} + \fi + \go +} -% multitable syntax -\def\tab{&\hskip1sp\relax} % 2/2/96 - % tiny skip here makes sure this column space is - % maintained, even if it is never used. +% This used to have \hskip1sp. But then the space in a template line is +% not enough. That is bad. So let's go back to just & until we +% encounter the problem it was intended to solve again. +% --karl, nathan@acm.org, 20apr99. +\def\tab{&} % @multitable ... @end multitable definitions: - +% \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip @@ -2160,15 +2148,15 @@ July\or August\or September\or October\or November\or December\fi % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. - % + % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. - % + % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. - % + % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 @@ -2199,15 +2187,18 @@ July\or August\or September\or October\or November\or December\fi % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. \else +%% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi +%% Test to see if parskip is larger than space between lines of +%% table. If not, do nothing. +%% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller @@ -2220,6 +2211,356 @@ width0pt\relax} \fi \fi} +\message{conditionals,} +% Prevent errors for section commands. +% Used in @ignore and in failing conditionals. +\def\ignoresections{% + \let\chapter=\relax + \let\unnumbered=\relax + \let\top=\relax + \let\unnumberedsec=\relax + \let\unnumberedsection=\relax + \let\unnumberedsubsec=\relax + \let\unnumberedsubsection=\relax + \let\unnumberedsubsubsec=\relax + \let\unnumberedsubsubsection=\relax + \let\section=\relax + \let\subsec=\relax + \let\subsubsec=\relax + \let\subsection=\relax + \let\subsubsection=\relax + \let\appendix=\relax + \let\appendixsec=\relax + \let\appendixsection=\relax + \let\appendixsubsec=\relax + \let\appendixsubsection=\relax + \let\appendixsubsubsec=\relax + \let\appendixsubsubsection=\relax + \let\contents=\relax + \let\smallbook=\relax + \let\titlepage=\relax +} + +% Used in nested conditionals, where we have to parse the Texinfo source +% and so want to turn off most commands, in case they are used +% incorrectly. +% +\def\ignoremorecommands{% + \let\defcodeindex = \relax + \let\defcv = \relax + \let\deffn = \relax + \let\deffnx = \relax + \let\defindex = \relax + \let\defivar = \relax + \let\defmac = \relax + \let\defmethod = \relax + \let\defop = \relax + \let\defopt = \relax + \let\defspec = \relax + \let\deftp = \relax + \let\deftypefn = \relax + \let\deftypefun = \relax + \let\deftypeivar = \relax + \let\deftypeop = \relax + \let\deftypevar = \relax + \let\deftypevr = \relax + \let\defun = \relax + \let\defvar = \relax + \let\defvr = \relax + \let\ref = \relax + \let\xref = \relax + \let\printindex = \relax + \let\pxref = \relax + \let\settitle = \relax + \let\setchapternewpage = \relax + \let\setchapterstyle = \relax + \let\everyheading = \relax + \let\evenheading = \relax + \let\oddheading = \relax + \let\everyfooting = \relax + \let\evenfooting = \relax + \let\oddfooting = \relax + \let\headings = \relax + \let\include = \relax + \let\lowersections = \relax + \let\down = \relax + \let\raisesections = \relax + \let\up = \relax + \let\set = \relax + \let\clear = \relax + \let\item = \relax +} + +% Ignore @ignore ... @end ignore. +% +\def\ignore{\doignore{ignore}} + +% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. +% +\def\ifinfo{\doignore{ifinfo}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifnottex{\doignore{ifnottex}} +\def\html{\doignore{html}} +\def\menu{\doignore{menu}} +\def\direntry{\doignore{direntry}} + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory = \comment + +% Ignore text until a line `@end #1'. +% +\def\doignore#1{\begingroup + % Don't complain about control sequences we have declared \outer. + \ignoresections + % + % Define a command to swallow text until we reach `@end #1'. + % This @ is a catcode 12 token (that is the normal catcode of @ in + % this texinfo.tex file). We change the catcode of @ below to match. + \long\def\doignoretext##1@end #1{\enddoignore}% + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \catcode32 = 10 + % + % Ignore braces, too, so mismatched braces don't cause trouble. + \catcode`\{ = 9 + \catcode`\} = 9 + % + % We must not have @c interpreted as a control sequence. + \catcode`\@ = 12 + % + % Make the letter c a comment character so that the rest of the line + % will be ignored. This way, the document can have (for example) + % @c @end ifinfo + % and the @end ifinfo will be properly ignored. + % (We've just changed @ to catcode 12.) + \catcode`\c = 14 + % + % And now expand that command. + \doignoretext +} + +% What we do to finish off ignored text. +% +\def\enddoignore{\endgroup\ignorespaces}% + +\newif\ifwarnedobs\warnedobsfalse +\def\obstexwarn{% + \ifwarnedobs\relax\else + % We need to warn folks that they may have trouble with TeX 3.0. + % This uses \immediate\write16 rather than \message to get newlines. + \immediate\write16{} + \immediate\write16{WARNING: for users of Unix TeX 3.0!} + \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} + \immediate\write16{If you are running another version of TeX, relax.} + \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} + \immediate\write16{ Then upgrade your TeX installation if you can.} + \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} + \immediate\write16{If you are stuck with version 3.0, run the} + \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} + \immediate\write16{ to use a workaround.} + \immediate\write16{} + \global\warnedobstrue + \fi +} + +% **In TeX 3.0, setting text in \nullfont hangs tex. For a +% workaround (which requires the file ``dummy.tfm'' to be installed), +% uncomment the following line: +%%%%%\font\nullfont=dummy\let\obstexwarn=\relax + +% Ignore text, except that we keep track of conditional commands for +% purposes of nesting, up to an `@end #1' command. +% +\def\nestedignore#1{% + \obstexwarn + % We must actually expand the ignored text to look for the @end + % command, so that nested ignore constructs work. Thus, we put the + % text into a \vbox and then do nothing with the result. To minimize + % the change of memory overflow, we follow the approach outlined on + % page 401 of the TeXbook: make the current font be a dummy font. + % + \setbox0 = \vbox\bgroup + % Don't complain about control sequences we have declared \outer. + \ignoresections + % + % Define `@end #1' to end the box, which will in turn undefine the + % @end command again. + \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% + % + % We are going to be parsing Texinfo commands. Most cause no + % trouble when they are used incorrectly, but some commands do + % complicated argument parsing or otherwise get confused, so we + % undefine them. + % + % We can't do anything about stray @-signs, unfortunately; + % they'll produce `undefined control sequence' errors. + \ignoremorecommands + % + % Set the current font to be \nullfont, a TeX primitive, and define + % all the font commands to also use \nullfont. We don't use + % dummy.tfm, as suggested in the TeXbook, because not all sites + % might have that installed. Therefore, math mode will still + % produce output, but that should be an extremely small amount of + % stuff compared to the main input. + % + \nullfont + \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont + \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont + \let\tensf=\nullfont + % Similarly for index fonts (mostly for their use in smallexample). + \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont + \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont + \let\smallsf=\nullfont + % + % Don't complain when characters are missing from the fonts. + \tracinglostchars = 0 + % + % Don't bother to do space factor calculations. + \frenchspacing + % + % Don't report underfull hboxes. + \hbadness = 10000 + % + % Do minimal line-breaking. + \pretolerance = 10000 + % + % Do not execute instructions in @tex + \def\tex{\doignore{tex}}% + % Do not execute macro definitions. + % `c' is a comment character, so the word `macro' will get cut off. + \def\macro{\doignore{ma}}% +} + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. Make sure the catcode of space is correct to avoid +% losing inside @example, for instance. +% +\def\set{\begingroup\catcode` =10 + \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. + \parsearg\setxxx} +\def\setxxx#1{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + \def\temp{#2}% + \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty + \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. + \fi + \endgroup +} +% Can't use \xdef to pre-expand #2 and save some time, since \temp or +% \next or other control sequences that we've defined might get us into +% an infinite loop. Consider `@set foo @cite{bar}'. +\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\def\clear{\parsearg\clearxxx} +\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} + +% @value{foo} gets the text saved in variable foo. +{ + \catcode`\_ = \active + % + % We might end up with active _ or - characters in the argument if + % we're called from @code, as @code{@value{foo-bar_}}. So \let any + % such active characters to their normal equivalents. + \gdef\value{\begingroup + \catcode`\-=12 \catcode`\_=12 + \indexbreaks \let_\normalunderscore + \valuexxx} +} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we \let\value to this in \indexdummies). Ones +% whose names contain - or _ still won't work, but we can't do anything +% about that. The command has to be fully expandable, since the result +% winds up in the index file. This means that if the variable's value +% contains other Texinfo commands, it's almost certain it will fail +% (although perhaps we could fix that with sufficient work to do a +% one-level expansion on the result, instead of complete). +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +\def\ifset{\parsearg\ifsetxxx} +\def\ifsetxxx #1{% + \expandafter\ifx\csname SET#1\endcsname\relax + \expandafter\ifsetfail + \else + \expandafter\ifsetsucceed + \fi +} +\def\ifsetsucceed{\conditionalsucceed{ifset}} +\def\ifsetfail{\nestedignore{ifset}} +\defineunmatchedend{ifset} + +% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +\def\ifclear{\parsearg\ifclearxxx} +\def\ifclearxxx #1{% + \expandafter\ifx\csname SET#1\endcsname\relax + \expandafter\ifclearsucceed + \else + \expandafter\ifclearfail + \fi +} +\def\ifclearsucceed{\conditionalsucceed{ifclear}} +\def\ifclearfail{\nestedignore{ifclear}} +\defineunmatchedend{ifclear} + +% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text +% following, through the first @end iftex (etc.). Make `@end iftex' +% (etc.) valid only after an @iftex. +% +\def\iftex{\conditionalsucceed{iftex}} +\def\ifnothtml{\conditionalsucceed{ifnothtml}} +\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} +\defineunmatchedend{iftex} +\defineunmatchedend{ifnothtml} +\defineunmatchedend{ifnotinfo} + +% We can't just want to start a group at @iftex (for example) and end it +% at @end iftex, since then @set commands inside the conditional have no +% effect (they'd get reverted at the end of the group). So we must +% define \Eiftex to redefine itself to be its previous value. (We can't +% just define it to fail again with an ``unmatched end'' error, since +% the @ifset might be nested.) +% +\def\conditionalsucceed#1{% + \edef\temp{% + % Remember the current value of \E#1. + \let\nece{prevE#1} = \nece{E#1}% + % + % At the `@end #1', redefine \E#1 to be its previous value. + \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% + }% + \temp +} + +% We need to expand lots of \csname's, but we don't want to expand the +% control sequences after we've constructed them. +% +\def\nece#1{\expandafter\noexpand\csname#1\endcsname} + +% @defininfoenclose. +\let\definfoenclose=\comment + + \message{indexing,} % Index generation facilities @@ -2235,12 +2576,14 @@ width0pt\relax} \fi % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. - -\def\newindex #1{ -\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\doindex {#1}} +% +\def\newindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 % Open the file + \fi + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} @@ -2249,31 +2592,37 @@ width0pt\relax} \fi % Define @defcodeindex, like @defindex except put all entries in @code. -\def\newcodeindex #1{ -\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\docodeindex {#1}} +\def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}} } \def\defcodeindex{\parsearg\newcodeindex} % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. -\def\synindex #1 #2 {% -\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -\expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\doindex {#2}}% +% The \closeout helps reduce unnecessary open files; the limit on the +% Acorn RISC OS is a mere 16 files. +\def\synindex#1 #2 {% + \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname + \expandafter\closeout\csname#1indfile\endcsname + \expandafter\let\csname#1indfile\endcsname=\synindexfoo + \expandafter\xdef\csname#1index\endcsname{% define \xxxindex + \noexpand\doindex{#2}}% } % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. -\def\syncodeindex #1 #2 {% -\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -\expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\docodeindex {#2}}% +\def\syncodeindex#1 #2 {% + \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname + \expandafter\closeout\csname#1indfile\endcsname + \expandafter\let\csname#1indfile\endcsname=\synindexfoo + \expandafter\xdef\csname#1index\endcsname{% define \xxxindex + \noexpand\docodeindex{#2}}% } % Define \doindex, the driver for all \fooindex macros. @@ -2294,6 +2643,7 @@ width0pt\relax} \fi \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% +\def\ { }% % Take care of the plain tex accent commands. \def\"{\realbackslash "}% \def\`{\realbackslash `}% @@ -2323,8 +2673,11 @@ width0pt\relax} \fi % (Must be a way to avoid doing expansion at all, and thus not have to % laboriously list every single command here.) \def\@{@}% will be @@ when we switch to @ as escape char. -%\let\{ = \lbracecmd -%\let\} = \rbracecmd +% Need these in case \tex is in effect and \{ is a \delimiter again. +% But can't use \lbracecmd and \rbracecmd because texindex assumes +% braces and backslashes are used only as delimiters. +\let\{ = \mylbrace +\let\} = \myrbrace \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% @@ -2335,7 +2688,6 @@ width0pt\relax} \fi \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% -%\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% \def\result{\realbackslash result}% @@ -2347,6 +2699,11 @@ width0pt\relax} \fi \def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% +\def\uref##1{\realbackslash uref {##1}}% +\def\url##1{\realbackslash url {##1}}% +\def\env##1{\realbackslash env {##1}}% +\def\command##1{\realbackslash command {##1}}% +\def\option##1{\realbackslash option {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% \def\,##1{\realbackslash ,{##1}}% @@ -2362,8 +2719,16 @@ width0pt\relax} \fi \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% -\def\value##1{\realbackslash value {##1}}% +\def\acronym##1{\realbackslash acronym {##1}}% +% +% Handle some cases of @value -- where the variable name does not +% contain - or _, and the value does not contain any +% (non-fully-expandable) commands. +\let\value = \expandablevalue +% \unsepspaces +% Turn off macro expansion +\turnoffmacros } % If an index command is used in an @example environment, any spaces @@ -2420,6 +2785,12 @@ width0pt\relax} \fi %\let\tt=\indexdummyfont \let\tclose=\indexdummyfont \let\code=\indexdummyfont +\let\url=\indexdummyfont +\let\uref=\indexdummyfont +\let\env=\indexdummyfont +\let\acronym=\indexdummyfont +\let\command=\indexdummyfont +\let\option=\indexdummyfont \let\file=\indexdummyfont \let\samp=\indexdummyfont \let\kbd=\indexdummyfont @@ -2435,14 +2806,24 @@ width0pt\relax} \fi % so we do not become unable to do a definition. {\catcode`\@=0 \catcode`\\=\other -@gdef@realbackslash{\}} + @gdef@realbackslash{\}} \let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? -\let\SETmarginindex=\relax %initialize! -% workhorse for all \fooindexes -% #1 is name of index, #2 is stuff to put there -\def\doind #1#2{% +% For \ifx comparisons. +\def\emptymacro{\empty} + +% Most index entries go through here, but \dosubind is the general case. +% +\def\doind#1#2{\dosubind{#1}{#2}\empty} + +% Workhorse for all \fooindexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% \empty if called from \doind, as we usually are. The main exception +% is with defuns, which call us directly. +% +\def\dosubind#1#2#3{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% @@ -2453,48 +2834,75 @@ width0pt\relax} \fi \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ {% - \let\folio=0% We will expand all macros now EXCEPT \folio. + \let\folio = 0% We will expand all macros now EXCEPT \folio. \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % - % First process the index-string with all font commands turned off - % to get the string to sort by. - {\indexnofonts \xdef\indexsorttmp{#2}}% + \def\thirdarg{#3}% + % + % If third arg is present, precede it with space in sort key. + \ifx\thirdarg\emptymacro + \let\subentry = \empty + \else + \def\subentry{ #3}% + \fi + % + % First process the index entry with all font commands turned + % off to get the string to sort by. + {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% % - % Now produce the complete index entry, with both the sort key and the - % original text, including any font commands. + % Now the real index entry with the fonts. \toks0 = {#2}% + % + % If third (subentry) arg is present, add it to the index + % string. And include a space. + \ifx\thirdarg\emptymacro \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + % Set up the complete index entry, with both the sort key + % and the original text, including any font commands. We write + % three arguments to \entry to the .?? file, texindex reduces to + % two when writing the .??s sorted result. \edef\temp{% \write\csname#1indfile\endcsname{% \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% }% - \temp + % + % If a skip is the last thing on the list now, preserve it + % by backing up by \lastskip, doing the \write, then inserting + % the skip again. Otherwise, the whatsit generated by the + % \write will make \lastskip zero. The result is that sequences + % like this: + % @end defun + % @tindex whatever + % @defun ... + % will have extra space inserted, because the \medbreak in the + % start of the @defun won't see the skip inserted by the @end of + % the previous defun. + % + % But don't do any of this if we're not in vertical mode. We + % don't want to do a \vskip and prematurely end a paragraph. + % + % Avoid page breaks due to these extra skips, too. + % + \iflinks + \ifvmode + \skip0 = \lastskip + \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi + \fi + % + \temp % do the write + % + % + \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi + \fi }% }% \penalty\count255 }% } -\def\dosubind #1#2#3{% -{\count10=\lastpenalty % -{\indexdummies % Must do this here, since \bf, etc expand at this stage -\escapechar=`\\% -{\let\folio=0% -\def\rawbackslashxx{\indexbackslash}% -% -% Now process the index-string once, with all font commands turned off, -% to get the string to sort the index by. -{\indexnofonts -\xdef\temp1{#2 #3}% -}% -% Now produce the complete index entry. We process the index-string again, -% this time with font commands expanded, to get what to print in the index. -\edef\temp{% -\write \csname#1indfile\endcsname{% -\realbackslash entry {\temp1}{\folio}{#2}{#3}}}% -\temp }% -}\penalty\count10}} - % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or @@ -2534,7 +2942,7 @@ width0pt\relax} \fi \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % - \indexfonts \rm + \smallfonts \rm \tolerance = 9500 \indexbreaks % @@ -2550,7 +2958,7 @@ width0pt\relax} \fi % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. - (Index is nonexistent) + \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof @@ -2558,7 +2966,7 @@ width0pt\relax} \fi % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 - (Index is empty) + \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change @@ -2577,21 +2985,35 @@ width0pt\relax} \fi % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. -% Same as \bigskipamount except no shrink. -% \balancecolumns gets confused if there is any shrink. -\newskip\initialskipamount \initialskipamount 12pt plus4pt - -\def\initial #1{% -{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt -\ifdim\lastskip<\initialskipamount -\removelastskip \penalty-200 \vskip \initialskipamount\fi -\line{\secbf#1\hfill}\kern 2pt\penalty10000}} +\def\initial#1{{% + % Some minor font changes for the special characters. + \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt + % + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + \penalty -300 + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% + \vskip .33\baselineskip plus .1\baselineskip + % + % Do our best not to break after the initial. + \nobreak +}} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % -\def\entry #1#2{\begingroup +\def\entry#1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. @@ -2614,12 +3036,15 @@ width0pt\relax} \fi % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. - \hangindent=2em + \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % + % A bit of stretch before each entry for the benefit of balancing columns. + \vskip 0pt plus1pt + % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent @@ -2644,7 +3069,11 @@ width0pt\relax} \fi % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. - \ #2% The page number ends the paragraph. + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + \ #2% The page number ends the paragraph. + \fi \fi% \par \endgroup} @@ -2673,24 +3102,26 @@ width0pt\relax} \fi \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. - \output = {\global\setbox\partialpage = \vbox{% - % + \output = {% + % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In - % that case, we must prevent the second \partialpage from - % simply overwriting the first, causing us to lose the page. - % This will preserve it until a real output routine can ship it - % out. Generally, \partialpage will be empty when this runs and - % this will be a no-op. - \unvbox\partialpage + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi % - % Unvbox the main output page. - \unvbox255 - \kern-\topskip \kern\baselineskip - }}% - \eject + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + }% + \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% @@ -2718,14 +3149,21 @@ width0pt\relax} \fi % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) + \advance\vsize by -\ht\partialpage \vsize = 2\vsize } + +% The double-column output routine for all double-column pages except +% the last. +% \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. - \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage + \dimen@ = \vsize + \divide\dimen@ by 2 + % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar @@ -2734,42 +3172,67 @@ width0pt\relax} \fi } \def\pagesofar{% % Re-output the contents of the output page -- any previous material, - % followed by the two boxes we just split. + % followed by the two boxes we just split, in box0 and box2. \unvbox\partialpage + % \hsize = \doublecolumnhsize - \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% } \def\enddoublecolumns{% - \output = {\balancecolumns}\eject % split what we have + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject \endgroup % started in \begindoublecolumns % - % Back to normal single-column typesetting, but take account of the - % fact that we just accumulated some stuff on the output page. + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). \pagegoal = \vsize } \def\balancecolumns{% % Called at the end of the double column material. - \setbox0 = \vbox{\unvbox255}% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip - \divide\dimen@ by 2 + \divide\dimen@ by 2 % target to split to + %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. - {\vbadness=10000 \loop - \global\setbox3=\copy0 - \global\setbox1=\vsplit3 to\dimen@ - \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt - \repeat}% + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht3>\dimen@ + \global\advance\dimen@ by 1pt + \repeat + }% + %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% + % \pagesofar } \catcode`\@ = \other \message{sectioning,} -% Define chapters, sections, etc. +% Chapters, sections, etc. \newcount\chapno \newcount\secno \secno=0 @@ -2778,58 +3241,48 @@ width0pt\relax} \fi % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ -\def\appendixletter{\char\the\appendixno} - -\newwrite\contentsfile -% This is called from \setfilename. -\def\opencontents{\openout\contentsfile = \jobname.toc } +% \def\appendixletter{\char\the\appendixno} +% We do the following for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise - -\def\thischapter{} \def\thissection{} -\def\seccheck#1{\ifnum \pageno<0 - \errmessage{@#1 not allowed after generating table of contents}% -\fi} - -\def\chapternofonts{% - \let\rawbackslash=\relax - \let\frenchspacing=\relax - \def\result{\realbackslash result}% - \def\equiv{\realbackslash equiv}% - \def\expansion{\realbackslash expansion}% - \def\print{\realbackslash print}% - \def\TeX{\realbackslash TeX}% - \def\dots{\realbackslash dots}% - \def\result{\realbackslash result}% - \def\equiv{\realbackslash equiv}% - \def\expansion{\realbackslash expansion}% - \def\print{\realbackslash print}% - \def\error{\realbackslash error}% - \def\point{\realbackslash point}% - \def\copyright{\realbackslash copyright}% - \def\tt{\realbackslash tt}% - \def\bf{\realbackslash bf}% - \def\w{\realbackslash w}% - \def\less{\realbackslash less}% - \def\gtr{\realbackslash gtr}% - \def\hat{\realbackslash hat}% - \def\char{\realbackslash char}% - \def\tclose##1{\realbackslash tclose{##1}}% - \def\code##1{\realbackslash code{##1}}% - \def\samp##1{\realbackslash samp{##1}}% - \def\r##1{\realbackslash r{##1}}% - \def\b##1{\realbackslash b{##1}}% - \def\key##1{\realbackslash key{##1}}% - \def\file##1{\realbackslash file{##1}}% - \def\kbd##1{\realbackslash kbd{##1}}% - % These are redefined because @smartitalic wouldn't work inside xdef. - \def\i##1{\realbackslash i{##1}}% - \def\cite##1{\realbackslash cite{##1}}% - \def\var##1{\realbackslash var{##1}}% - \def\emph##1{\realbackslash emph{##1}}% - \def\dfn##1{\realbackslash dfn{##1}}% -} +% page headings and footings can use it. @section does likewise. +\def\thischapter{} +\def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raise/lowersections modify this count @@ -2901,59 +3354,59 @@ width0pt\relax} \fi \fi } - +% @chapter, @appendix, @unnumbered. \def\thischaptername{No Chapter Title} \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz -\def\chapterzzz #1{\seccheck{chapter}% +\def\chapterzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}% +\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % +\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% + {\the\chapno}}}% +\temp +\donoderef \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec -}} +} \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz -\def\appendixzzz #1{\seccheck{appendix}% +\def\appendixzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \appendixno by 1 \message{Appendix \appendixletter}% +\global\advance \appendixno by 1 +\message{\putwordAppendix\space \appendixletter}% \chapmacro {#1}{\putwordAppendix{} \appendixletter}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash chapentry{\the\toks0}% - {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % +\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% + {\putwordAppendix{} \appendixletter}}}% +\temp +\appendixnoderef \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec -}} +} % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} +% @top is like @unnumbered. \outer\def\top{\parsearg\unnumberedyyy} + \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -\def\unnumberedzzz #1{\seccheck{unnumbered}% +\def\unnumberedzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 % % This used to be simply \message{#1}, but TeX fully expands the @@ -2965,155 +3418,139 @@ width0pt\relax} \fi % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, -% simply yielding the contents of the . +% simply yielding the contents of . (We also do this for +% the toc entries.) \toks0 = {#1}\message{(\the\toks0)}% % \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % +\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% +\temp +\unnumbnoderef \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec -}} +} +% Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz -\def\seczzz #1{\seccheck{section}% +\def\seczzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash secentry % -{\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% + {\the\chapno}{\the\secno}}}% +\temp +\donoderef +\nobreak +} \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz -\def\appendixsectionzzz #1{\seccheck{appendixsection}% +\def\appendixsectionzzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash secentry % -{\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% + {\appendixletter}{\the\secno}}}% +\temp +\appendixnoderef +\nobreak +} \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz -\def\unnumberedseczzz #1{\seccheck{unnumberedsec}% +\def\unnumberedseczzz #1{% \plainsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% +\temp +\unnumbnoderef +\nobreak +} +% Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz -\def\numberedsubseczzz #1{\seccheck{subsection}% +\def\numberedsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash subsecentry % -{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% + {\the\chapno}{\the\secno}{\the\subsecno}}}% +\temp +\donoderef +\nobreak +} \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz -\def\appendixsubseczzz #1{\seccheck{appendixsubsec}% +\def\appendixsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash subsecentry % -{\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% + {\appendixletter}{\the\secno}{\the\subsecno}}}% +\temp +\appendixnoderef +\nobreak +} \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% +\def\unnumberedsubseczzz #1{% \plainsubsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% + {\the\toks0}}}% +\temp +\unnumbnoderef +\nobreak +} +% Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz -\def\numberedsubsubseczzz #1{\seccheck{subsubsection}% +\def\numberedsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash subsubsecentry{\the\toks0} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} - {\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% + {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% +\temp +\donoderef +\nobreak +} \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz -\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}% +\def\appendixsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash subsubsecentry{\the\toks0}% - {\appendixletter} - {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% + {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% +\temp +\appendixnoderef +\nobreak +} \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% +\def\unnumberedsubsubseczzz #1{% \plainsubsubsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% \toks0 = {#1}% -\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} +\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% + {\the\toks0}}}% +\temp +\unnumbnoderef +\nobreak +} % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they should now be obsolete; ordinary section commands should work. @@ -3142,8 +3579,7 @@ width0pt\relax} \fi % Define @majorheading, @heading and @subheading -% NOTE on use of \vbox for chapter headings, section headings, and -% such: +% NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a @@ -3190,12 +3626,12 @@ width0pt\relax} \fi \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} -\def\CHAPPAGoff{ +\def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} -\def\CHAPPAGon{ +\def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager @@ -3249,7 +3685,7 @@ width0pt\relax} \fi \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 10000 % + \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts @@ -3260,7 +3696,7 @@ width0pt\relax} \fi \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 % + \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{ @@ -3313,24 +3749,45 @@ width0pt\relax} \fi } -\message{toc printing,} -% Finish up the main text and prepare to read what we've written -% to \contentsfile. +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. We supply {\folio} at the end of the +% argument, which will end up as the last argument to the \...entry macro. +% +% We open the .toc file here instead of at @setfilename or any other +% given time so that @contents can be put in the document anywhere. +% +\newif\iftocfileopened +\def\writetocentry#1{% + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + \iflinks \write\tocfile{#1{\folio}}\fi +} \newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Finish up the main text and prepare to read what we've written +% to \tocfile. +% \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro - \immediate\closeout \contentsfile - \ifnum \pageno>0 - \pageno = -1 % Request roman numbered pages. - \fi + \immediate\closeout\tocfile + % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% + \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section @@ -3338,20 +3795,31 @@ width0pt\relax} \fi %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \pageno = \lastnegativepageno \fi } % Normal (long) toc. -\outer\def\contents{% - \startcontents{\putwordTableofContents}% - \input \jobname.toc +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \jobname.toc + \ifeof 1 \else + \closein 1 + \input \jobname.toc + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \pdfmakeoutlines \endgroup - \vfill \eject + \lastnegativepageno = \pageno + \pageno = \savepageno } % And just the chapters. -\outer\def\summarycontents{% - \startcontents{\putwordShortContents}% +\def\summarycontents{% + \startcontents{\putwordShortTOC}% % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry @@ -3367,12 +3835,23 @@ width0pt\relax} \fi \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{} \def\unnumbsubsubsecentry ##1##2{} - \input \jobname.toc + \openin 1 \jobname.toc + \ifeof 1 \else + \closein 1 + \input \jobname.toc + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup - \vfill \eject + \lastnegativepageno = \pageno + \pageno = \savepageno } \let\shortcontents = \summarycontents +\ifpdf + \pdfcatalog{/PageMode /UseOutlines}% +\fi + % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. @@ -3383,7 +3862,7 @@ width0pt\relax} \fi % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } % Typeset the label for a chapter or appendix for the short contents. @@ -3391,10 +3870,14 @@ width0pt\relax} \fi % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. -\setbox0 = \hbox{\shortcontrm \putwordAppendix } -\newdimen\shortappendixwidth \shortappendixwidth = \wd0 - +% +\newdimen\shortappendixwidth +% \def\shortchaplabel#1{% + % Compute width of word "Appendix", may change with language. + \setbox0 = \hbox{\shortcontrm \putwordAppendix}% + \shortappendixwidth = \wd0 + % % We typeset #1 in a box of constant width, regardless of the text of % #1, so the chapter titles will come out aligned. \setbox0 = \hbox{#1}% @@ -3409,7 +3892,7 @@ width0pt\relax} \fi } \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} -\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}} +\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} @@ -3436,24 +3919,24 @@ width0pt\relax} \fi \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts - \tocentry{#1}{\dopageno{#2}}% + \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent - \tocentry{#1}{\dopageno{#2}}% + \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent - \tocentry{#1}{\dopageno{#2}}% + \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent - \tocentry{#1}{\dopageno{#2}}% + \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for @@ -3481,6 +3964,7 @@ width0pt\relax} \fi \message{environments,} +% @foo ... @end foo. % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. @@ -3553,6 +4037,7 @@ width0pt\relax} \fi \let\!=\ptexexclam \let\i=\ptexi \let\{=\ptexlbrace + \let\+=\tabalign \let\}=\ptexrbrace \let\*=\ptexstar \let\t=\ptext @@ -3604,8 +4089,8 @@ width0pt\relax} \fi % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% \cartouche: draw rectangle w/rounded corners around argument +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner @@ -3632,9 +4117,9 @@ width0pt\relax} \fi \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize - \advance\cartouter by 18pt % allow for 3pt kerns on either + \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from -% each corner char +% each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment @@ -3688,49 +4173,52 @@ width0pt\relax} \fi \fi } -% To ending an @example-like environment, we first end the paragraph -% (via \afterenvbreak's vertical glue), and then the group. That way we -% keep the zero \parskip that the environments set -- \parskip glue -% will be inserted at the beginning of the next paragraph in the -% document, after the environment. +% Define the \E... control sequence only if we are inside the particular +% environment, so the error checking in \end will work. % -\def\nonfillfinish{\afterenvbreak\endgroup}% +% To end an @example-like environment, we first end the paragraph (via +% \afterenvbreak's vertical glue), and then the group. That way we keep +% the zero \parskip that the environments set -- \parskip glue will be +% inserted at the beginning of the next paragraph in the document, after +% the environment. +% +\def\nonfillfinish{\afterenvbreak\endgroup} +% @lisp: indented, narrowed, typewriter font. \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt - % Make @kbd do something special, if requested. - \let\kbdfont\kbdexamplefont - \rawbackslash % have \ input char produce \ char from current font - \gobble + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return } -% Define the \E... control sequence only if we are inside the -% environment, so the error checking in \end will work. -% -% We must call \lisp last in the definition, since it reads the -% return following the @example (or whatever) command. -% +% @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp} -\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp} -% @smallexample and @smalllisp. This is not used unless the @smallbook -% command is given. Originally contributed by Pavel@xerox. +% @small... is usually equivalent to the non-small (@smallbook +% redefines). We must call \example (or whatever) last in the +% definition, since it reads the return following the @example (or +% whatever) command. +% +% This actually allows (for example) @end display inside an +% @smalldisplay. Too bad, but makeinfo will catch the error anyway. % +\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} +\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} +\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} +\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} + +% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. +% Originally contributed by Pavel@xerox. \def\smalllispx{\begingroup - \nonfillstart - \let\Esmalllisp = \nonfillfinish - \let\Esmallexample = \nonfillfinish - % - % Smaller fonts for small examples. - \indexfonts \tt - \rawbackslash % make \ output the \ character from the current font (tt) - \gobble + \def\Esmalllisp{\nonfillfinish\endgroup}% + \def\Esmallexample{\nonfillfinish\endgroup}% + \smallfonts + \lisp } -% This is @display; same as @lisp except use roman font. +% @display: same as @lisp except keep current font. % \def\display{\begingroup \nonfillstart @@ -3738,7 +4226,15 @@ width0pt\relax} \fi \gobble } -% This is @format; same as @display except don't narrow margins. +% @smalldisplay (when @smallbook): @display plus smaller fonts. +% +\def\smalldisplayx{\begingroup + \def\Esmalldisplay{\nonfillfinish\endgroup}% + \smallfonts \rm + \display +} + +% @format: same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t @@ -3747,20 +4243,27 @@ width0pt\relax} \fi \gobble } -% @flushleft (same as @format) and @flushright. +% @smallformat (when @smallbook): @format plus smaller fonts. % -\def\flushleft{\begingroup - \let\nonarrowing = t - \nonfillstart - \let\Eflushleft = \nonfillfinish - \gobble +\def\smallformatx{\begingroup + \def\Esmallformat{\nonfillfinish\endgroup}% + \smallfonts \rm + \format } + +% @flushleft (same as @format). +% +\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} + +% @flushright. +% \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill - \gobble} + \gobble +} % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. @@ -3783,9 +4286,11 @@ width0pt\relax} \fi \fi } + \message{defuns,} -% Define formatter for defuns -% First, allow user to change definition object font (\df) internally +% @defun etc. + +% Allow user to change definition object font (\df) internally \def\setdeffont #1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in @@ -3839,10 +4344,16 @@ width0pt\relax} \fi %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } -\def\ampnr{\&} +\let\ampnr = \& \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} +% Active &'s sneak into the index arguments, so make sure it's defined. +{ + \catcode`& = 13 + \global\let& = \ampnr +} + % First, defname, which formats the header line itself. % #1 should be the function name. % #2 should be the type of definition, such as "Function". @@ -3852,20 +4363,18 @@ width0pt\relax} \fi % outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent -\dimen3=\rightskip -\advance\dimen3 by -\defbodyindent -\noindent % +\noindent \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations -\parshape 2 0in \dimen0 \defargsindent \dimen1 % +\parshape 2 0in \dimen0 \defargsindent \dimen1 % Now output arg 2 ("Function" or some such) % ending at \deftypemargin from the right margin, % but stuck inside a box of width 0 so it does not interfere with linebreaking {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. -\advance \hsize by -\dimen2 \advance \hsize by -\dimen3 -\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}% +\advance \hsize by -\dimen2 +\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% % Make all lines underfull and no complaints: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent @@ -3886,23 +4395,62 @@ width0pt\relax} \fi \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% \parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent +\advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % 61 is `=' \obeylines\activeparens\spacesplit#3} -\def\defmethparsebody #1#2#3#4 {\begingroup\inENV % +% #1 is the \E... control sequence to end the definition (which we define). +% #2 is the \...x control sequence for consecutive fns (which we define). +% #3 is the control sequence to call to resume processing. +% #4, delimited by the space, is the class name. +% +\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% \parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent +\advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} +% Used for @deftypemethod and @deftypeivar. +% #1 is the \E... control sequence to end the definition (which we define). +% #2 is the \...x control sequence for consecutive fns (which we define). +% #3 is the control sequence to call to resume processing. +% #4, delimited by a space, is the class name. +% #5 is the method's return type. +% +\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV + \medbreak + \def#1{\endgraf\endgroup\medbreak}% + \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent + \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} + +% Used for @deftypeop. The change from \deftypemethparsebody is an +% extra argument at the beginning which is the `category', instead of it +% being the hardwired string `Method' or `Instance Variable'. We have +% to account for this both in the \...x definition and in parsing the +% input at hand. Thus also need a control sequence (passed as #5) for +% the \E... definition to assign the category name to. +% +\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV + \medbreak + \def#1{\endgraf\endgroup\medbreak}% + \def#2##1 ##2 ##3 {% + \def#4{##1}% + \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent + \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} + \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies @@ -3911,7 +4459,7 @@ width0pt\relax} \fi \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% \parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent +\advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} @@ -3926,7 +4474,7 @@ width0pt\relax} \fi \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\spacesplit#3}% \parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent +\advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % @@ -3943,7 +4491,7 @@ width0pt\relax} \fi \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% \parindent=0in - \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent + \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines } @@ -3988,7 +4536,7 @@ width0pt\relax} \fi \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\spacesplit{#3{##2}}}% \parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent +\advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\spacesplit{#3{#5}}} @@ -4012,16 +4560,17 @@ width0pt\relax} \fi % First, define the processing that is wanted for arguments of \defun % Use this to expand the args and terminate the paragraph they make up -\def\defunargs #1{\functionparens \sl +\def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. -\hyphenchar\tensl=0 +% Set the font temporarily and use \font in case \setfont made \tensl a macro. +{\tensl\hyphenchar\font=0}% #1% -\hyphenchar\tensl=45 +{\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil -\endgraf\penalty 10000\vskip -\parskip\penalty 10000% +\endgraf\nobreak\vskip -\parskip\nobreak } \def\deftypefunargs #1{% @@ -4032,7 +4581,7 @@ width0pt\relax} \fi \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil -\endgraf\penalty 10000\vskip -\parskip\penalty 10000% +\endgraf\nobreak\vskip -\parskip\nobreak } % Do complete processing of one @defun or @defunx line already parsed. @@ -4051,7 +4600,7 @@ width0pt\relax} \fi \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Function}% +\begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } @@ -4065,7 +4614,7 @@ width0pt\relax} \fi % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index -\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}% +\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } @@ -4096,7 +4645,7 @@ width0pt\relax} \fi \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Macro}% +\begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } @@ -4106,53 +4655,77 @@ width0pt\relax} \fi \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Special Form}% +\begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } -% This definition is run if you use @defunx -% anywhere other than immediately after a @defun or @defunx. - -\def\deffnx #1 {\errmessage{@deffnx in invalid context}} -\def\defunx #1 {\errmessage{@defunx in invalid context}} -\def\defmacx #1 {\errmessage{@defmacx in invalid context}} -\def\defspecx #1 {\errmessage{@defspecx in invalid context}} -\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} -\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} -\def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} - -% @defmethod, and so on - -% @defop {Funny Method} foo-class frobnicate argument - +% @defop CATEGORY CLASS OPERATION ARG... +% \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} - -\def\defopheader #1#2#3{% -\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index -\begingroup\defname {#2}{\defoptype{} on #1}% +% +\def\defopheader#1#2#3{% +\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index +\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% \defunargs {#3}\endgroup % } -% @deftypemethod foo-class return-type foo-method args +% @deftypeop CATEGORY CLASS TYPE OPERATION ARG... +% +\def\deftypeop #1 {\def\deftypeopcategory{#1}% + \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader + \deftypeopcategory} +% +% #1 is the class name, #2 the data type, #3 the operation name, #4 the args. +\def\deftypeopheader#1#2#3#4{% + \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index + \begingroup + \defname{\defheaderxcond#2\relax$$$#3} + {\deftypeopcategory\ \putwordon\ \code{#1}}% + \deftypefunargs{#4}% + \endgroup +} + +% @deftypemethod CLASS TYPE METHOD ARG... % \def\deftypemethod{% - \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} + \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% - \deftypefnheaderx{Method on #1}{#2}#3 #4\relax + \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index + \begingroup + \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% + \deftypefunargs{#4}% + \endgroup } -% @defmethod == @defop Method +% @deftypeivar CLASS TYPE VARNAME +% +\def\deftypeivar{% + \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} +% +% #1 is the class name, #2 the data type, #3 the variable name. +\def\deftypeivarheader#1#2#3{% + \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index + \begingroup + \defname{#3}{\putwordInstanceVariableof\ \code{#1}}% + \defvarargs{#3}% + \endgroup +} +% @defmethod == @defop Method +% \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} - -\def\defmethodheader #1#2#3{% -\dosubind {fn}{\code{#2}}{on #1}% entry in function index -\begingroup\defname {#2}{Method on #1}% -\defunargs {#3}\endgroup % +% +% #1 is the class name, #2 the method name, #3 the args. +\def\defmethodheader#1#2#3{% + \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index + \begingroup + \defname{#2}{\putwordMethodon\ \code{#1}}% + \defunargs{#3}% + \endgroup } % @defcv {Class Option} foo-class foo-flag @@ -4161,37 +4734,30 @@ width0pt\relax} \fi \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% -\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index -\begingroup\defname {#2}{\defcvtype{} of #1}% +\dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index +\begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% \defvarargs {#3}\endgroup % } -% @defivar == @defcv {Instance Variable} - +% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME +% \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} - -\def\defivarheader #1#2#3{% -\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index -\begingroup\defname {#2}{Instance Variable of #1}% -\defvarargs {#3}\endgroup % +% +\def\defivarheader#1#2#3{% + \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index + \begingroup + \defname{#2}{\putwordInstanceVariableof\ #1}% + \defvarargs{#3}% + \endgroup } -% These definitions are run if you use @defmethodx, etc., -% anywhere other than immediately after a @defmethod, etc. - -\def\defopx #1 {\errmessage{@defopx in invalid context}} -\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}} -\def\defcvx #1 {\errmessage{@defcvx in invalid context}} -\def\defivarx #1 {\errmessage{@defivarx in invalid context}} - -% Now @defvar - +% @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000} +\endgraf\nobreak\vskip -\parskip\nobreak} % @defvr Counter foo-count @@ -4205,7 +4771,7 @@ width0pt\relax} \fi \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{Variable}% +\begingroup\defname {#1}{\putwordDefvar}% \defvarargs {#2}\endgroup % } @@ -4214,7 +4780,7 @@ width0pt\relax} \fi \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{User Option}% +\begingroup\defname {#1}{\putwordDefopt}% \defvarargs {#2}\endgroup % } @@ -4226,9 +4792,9 @@ width0pt\relax} \fi % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index -\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% +\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% \interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000 +\endgraf\nobreak\vskip -\parskip\nobreak \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} @@ -4239,18 +4805,9 @@ width0pt\relax} \fi \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000 +\endgraf\nobreak\vskip -\parskip\nobreak \endgroup} -% This definition is run if you use @defvarx -% anywhere other than immediately after a @defvar or @defvarx. - -\def\defvrx #1 {\errmessage{@defvrx in invalid context}} -\def\defvarx #1 {\errmessage{@defvarx in invalid context}} -\def\defoptx #1 {\errmessage{@defoptx in invalid context}} -\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}} -\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}} - % Now define @deftp % Args are printed in bold, a slight difference from @defvar. @@ -4263,51 +4820,394 @@ width0pt\relax} \fi \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} -% This definition is run if you use @deftpx, etc -% anywhere other than immediately after a @deftp, etc. +% These definitions are used if you use @defunx (etc.) +% anywhere other than immediately after a @defun or @defunx. +% +\def\defcvx#1 {\errmessage{@defcvx in invalid context}} +\def\deffnx#1 {\errmessage{@deffnx in invalid context}} +\def\defivarx#1 {\errmessage{@defivarx in invalid context}} +\def\defmacx#1 {\errmessage{@defmacx in invalid context}} +\def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} +\def\defoptx #1 {\errmessage{@defoptx in invalid context}} +\def\defopx#1 {\errmessage{@defopx in invalid context}} +\def\defspecx#1 {\errmessage{@defspecx in invalid context}} +\def\deftpx#1 {\errmessage{@deftpx in invalid context}} +\def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} +\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} +\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} +\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} +\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} +\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} +\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} +\def\defunx#1 {\errmessage{@defunx in invalid context}} +\def\defvarx#1 {\errmessage{@defvarx in invalid context}} +\def\defvrx#1 {\errmessage{@defvrx in invalid context}} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\undefined + \newwrite\macscribble + \def\scanmacro#1{% + \begingroup \newlinechar`\^^M + % Undo catcode changes of \startcontents and \doprintindex + \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ + % Append \endinput to make sure that TeX does not see the ending newline. + \toks0={#1\endinput}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \let\xeatspaces\eatspaces + \input \jobname.tmp + \endgroup +} +\else +\def\scanmacro#1{% +\begingroup \newlinechar`\^^M +% Undo catcode changes of \startcontents and \doprintindex +\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ +\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} +\fi + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? +\def\macrolist{} % List of all defined macros in the form + % \do\macro1\do\macro2... + +% Utility routines. +% Thisdoes \let #1 = #2, except with \csnames. +\def\cslet#1#2{% +\expandafter\expandafter +\expandafter\let +\expandafter\expandafter +\csname#1\endcsname +\csname#2\endcsname} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=12\catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \. + +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. + +\def\macrobodyctxt{% + \catcode`\~=12 + \catcode`\^=12 + \catcode`\_=12 + \catcode`\|=12 + \catcode`\<=12 + \catcode`\>=12 + \catcode`\+=12 + \catcode`\{=12 + \catcode`\}=12 + \catcode`\@=12 + \catcode`\^^M=12 + \usembodybackslash} + +\def\macroargctxt{% + \catcode`\~=12 + \catcode`\^=12 + \catcode`\_=12 + \catcode`\|=12 + \catcode`\<=12 + \catcode`\>=12 + \catcode`\+=12 + \catcode`\@=12 + \catcode`\\=12} + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. + +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0% + \else + \expandafter\parsemargdef \argl;% + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{The name \the\macname\space is reserved}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + % Add the macroname to \macrolist + \toks0 = \expandafter{\macrolist\do}% + \xdef\macrolist{\the\toks0 + \expandafter\noexpand\csname\the\macname\endcsname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\def\unmacro{\parsearg\unmacroxxx} +\def\unmacroxxx#1{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist + \begingroup + \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% + \def\do##1{% + \def\tempb{##1}% + \ifx\tempa\tempb + % remove this + \else + \toks0 = \expandafter{\newmacrolist\do}% + \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% + \fi}% + \def\newmacrolist{}% + % Execute macro list to define \newmacrolist + \macrolist + \global\let\macrolist\newmacrolist + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% This makes use of the obscure feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} + +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.blah for each blah +% in the params list, to be ##N where N is the position in that list. +% That gets used by \mbodybackslash (above). + +% We need to get `macro parameter char #' into several definitions. +% The technique used is stolen from LaTeX: let \hash be something +% unexpandable, insert that wherever you need a #, and then redefine +% it to # just before using the token list produced. +% +% The same technique is used to protect \eatspaces till just before +% the macro is used. + +\def\parsemargdef#1;{\paramno=0\def\paramlist{}% + \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1% + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +% These two commands read recursive and nonrecursive macro bodies. +% (They're different since rec and nonrec macros end differently.) + +\long\def\parsemacbody#1@end macro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\long\def\parsermacbody#1@end rmacro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% + +% This defines the macro itself. There are six cases: recursive and +% nonrecursive macros of zero, one, and many arguments. +% Much magic with \expandafter here. +% \xdef is used so that macro definitions will survive the file +% they're defined in; @include reads the file inside a group. +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\temp}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \fi + \else + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \fi + \fi} + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + +% \braceorline decides whether the next nonwhitespace character is a +% {. If so it reads up to the closing }, if not, it reads the whole +% line. Whatever was read is then fed to the next control sequence +% as an argument (by \parsebrace or \parsearg) +\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \next} + +% We mant to disable all macros during \shipout so that they are not +% expanded by \write. +\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% + \edef\next{\macrolist}\expandafter\endgroup\next} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Just make them active and then expand them all to nothing. +\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{\ignoreactivespaces +\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% + \expandafter\noexpand\csname#2\endcsname}% +\expandafter\endgroup\next} -\def\deftpx #1 {\errmessage{@deftpx in invalid context}} +\message{cross references,} +% @xref etc. -\message{cross reference,} -% Define cross-reference macros -\newwrite \auxfile +\newwrite\auxfile -\newif\ifhavexrefs % True if xref values are known. +\newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. -% @inforef is simple. +% @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} -% \setref{foo} defines a cross-reference point named foo. +% @node's job is to define \lastnode. +\def\node{\ENVcheck\parsearg\nodezzz} +\def\nodezzz#1{\nodexxx [#1,]} +\def\nodexxx[#1,#2]{\gdef\lastnode{#1}} +\let\nwnode=\node +\let\lastnode=\relax -\def\setref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Ysectionnumberandtype}} +% The sectioning commands (@chapter, etc.) call these. +\def\donoderef{% + \ifx\lastnode\relax\else + \expandafter\expandafter\expandafter\setref{\lastnode}% + {Ysectionnumberandtype}% + \global\let\lastnode=\relax + \fi +} +\def\unnumbnoderef{% + \ifx\lastnode\relax\else + \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% + \global\let\lastnode=\relax + \fi +} +\def\appendixnoderef{% + \ifx\lastnode\relax\else + \expandafter\expandafter\expandafter\setref{\lastnode}% + {Yappendixletterandtype}% + \global\let\lastnode=\relax + \fi +} -\def\unnumbsetref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Ynothing}} -\def\appendixsetref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Yappendixletterandtype}} +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME, namely +% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have +% to set \indexdummies so commands such as @code in a section title +% aren't expanded. It would be nicer not to expand the titles in the +% first place, but there's so many layers that that is hard to do. +% +\def\setref#1#2{{% + \indexdummies + \pdfmkdest{#1}% + \dosetq{#1-title}{Ytitle}% + \dosetq{#1-pg}{Ypagenumber}% + \dosetq{#1-snt}{#2}% +}} -% \xref, \pxref, and \ref generate cross-references to specified points. -% For \xrefX, #1 is the node name, #2 the name of the Info -% cross-reference, #3 the printed node name, #4 the name of the Info -% file, #5 the name of the printed manual. All but the node name can be -% omitted. +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% @@ -4320,7 +5220,7 @@ width0pt\relax} \fi \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. - \ifdim \wd1>0pt% + \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else @@ -4341,27 +5241,54 @@ width0pt\relax} \fi % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. + \ifpdf + \leavevmode + \getfilename{#4}% + \ifnum\filenamelength>0 + \startlink attr{/Border [0 0 0]}% + goto file{\the\filename.pdf} name{#1@}% + \else + \startlink attr{/Border [0 0 0]}% + goto name{#1@}% + \fi + \linkcolor + \fi + % \ifdim \wd1 > 0pt - \putwordsection{} ``\printednodename'' in \cite{\printedmanual}% + \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. - {\turnoffactive \refx{#1-snt}{}}% - \space [\printednodename],\space + {\normalturnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % [mynode], + [\printednodename],\space + % page 3 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi + \endlink \endgroup} % \dosetq is the interface for calls from other macros -% Use \turnoffactive so that punctuation chars such as underscore -% work in node names. -\def\dosetq #1#2{{\let\folio=0 \turnoffactive -\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% -\next}} +% Use \normalturnoffactive so that punctuation chars such as underscore +% and backslash work in node names. (\turnoffactive doesn't do \.) +\def\dosetq#1#2{% + {\let\folio=0% + \normalturnoffactive + \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% + \iflinks + \next + \fi + }% +} % \internalsetq {foo}{page} expands into % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} @@ -4413,12 +5340,14 @@ width0pt\relax} \fi \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright - \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% - \else - \ifwarnedxrefs\else - \global\warnedxrefstrue - \message{Cross reference values unknown; you must run TeX again.}% + \iflinks + \ifhavexrefs + \message{\linenumber Undefined cross reference `#1'.}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi \fi \fi \else @@ -4429,7 +5358,7 @@ width0pt\relax} \fi } % This is the macro invoked by entries in the aux file. -% +% \def\xrdef#1{\begingroup % Reenable \ as an escape while reading the second argument. \catcode`\\ = 0 @@ -4492,8 +5421,7 @@ width0pt\relax} \fi \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other - % `\+ does not work, so use 43. - \catcode43=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % Make the characters 128-255 be printing characters {% \count 1=128 @@ -4582,6 +5510,8 @@ width0pt\relax} \fi \xspaceskip\z@skip \parindent\defaultparindent % + \smallfonts \rm + % % Hang the footnote text off the number. \hang \textindent{\thisfootno}% @@ -4596,7 +5526,7 @@ width0pt\relax} \fi \else\let\next\f@t\fi \next} \def\f@@t{\bgroup\aftergroup\@foot\let\next} \def\f@t#1{#1\@foot} -\def\@foot{\strut\egroup} +\def\@foot{\strut\par\egroup} }%end \catcode `\@=11 @@ -4655,23 +5585,25 @@ width0pt\relax} \fi % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. -% +% % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else \closein 1 - \def\epsfannounce{\toks0 = }% do not bother showing banner + % Do not bother showing banner with post-v2.7 epsf.tex (available in + % doc/epsf.tex until it shows up on ctan). + \def\epsfannounce{\toks0 = }% \input epsf.tex \fi % +% We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get - it from ftp://ftp.tug.org/tex/epsf.tex.} + it from ftp://tug.org/tex/epsf.tex.} % -% Only complain once about lack of epsf.tex. \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else @@ -4689,42 +5621,79 @@ width0pt\relax} \fi % #2 is (optional) width, #3 is (optional) height. % #4 is just the usual extra ignored arg for parsing this stuff. \def\imagexxx#1,#2,#3,#4\finish{% - % \epsfbox itself resets \epsf?size at each figure. - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi - \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi - \epsfbox{#1.eps}% + \ifpdf + \centerline{\dopdfimage{#1}{#2}{#3}}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \begingroup + \catcode`\^^M = 5 % in case we're inside an example + % If the image is by itself, center it. + \ifvmode + \nobreak\bigskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \centerline{\epsfbox{#1.eps}}% + \bigbreak + \else + % In the middle of a paragraph, no extra space. + \epsfbox{#1.eps}% + \fi + \endgroup + \fi } -% End of control word definitions. - -\message{and turning on texinfo input format.} +\message{localization,} +% and i18n. -\def\openindices{% - \newindex{cp}% - \newcodeindex{fn}% - \newcodeindex{vr}% - \newcodeindex{tp}% - \newcodeindex{ky}% - \newcodeindex{pg}% +% @documentlanguage is usually given very early, just after +% @setfilename. If done too late, it may not override everything +% properly. Single argument is the language abbreviation. +% It would be nice if we could set up a hyphenation file here. +% +\def\documentlanguage{\parsearg\dodocumentlanguage} +\def\dodocumentlanguage#1{% + \tex % read txi-??.tex file in plain TeX. + % Read the file if it exists. + \openin 1 txi-#1.tex + \ifeof1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \let\temp = \relax + \else + \def\temp{\input txi-#1.tex }% + \fi + \temp + \endgroup } +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? In the current directory +should work if nowhere else does.} + -% Set some numeric style parameters, for 8.5 x 11 format. +% @documentencoding should change something in TeX eventually, most +% likely, but for now just recognize it. +\let\documentencoding = \comment -\hsize = 6in -\hoffset = .25in + +% Page size parameters. +% \newdimen\defaultparindent \defaultparindent = 15pt -\parindent = \defaultparindent -\parskip 3pt plus 2pt minus 1pt -\setleading{13.2pt} -\advance\topskip by 1.2cm \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. -\vbadness=10000 +\vbadness = 10000 + +% Don't be so finicky about underfull hboxes, either. +\hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 @@ -4733,101 +5702,125 @@ width0pt\relax} \fi % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on -% \hsize. This makes it come to about 9pt for the 8.5x11 format. +% \hsize. We call this whenever the paper size is set. % -\ifx\emergencystretch\thisisundefined - % Allow us to assign to \emergencystretch anyway. - \def\emergencystretch{\dimen0}% -\else - \emergencystretch = \hsize - \divide\emergencystretch by 45 -\fi +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} -% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) -\def\smallbook{ - \global\chapheadingskip = 15pt plus 4pt minus 2pt - \global\secheadingskip = 12pt plus 3pt minus 2pt - \global\subsecheadingskip = 9pt plus 2pt minus 2pt +% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; +% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can +% set \parskip and call \setleading for \baselineskip. +% +\def\internalpagesizes#1#2#3#4#5#6{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip % - \global\lispnarrowing = 0.3in - \setleading{12pt} - \advance\topskip by -1cm - \global\parskip 2pt plus 1pt - \global\hsize = 5in - \global\vsize=7.5in - \global\tolerance=700 - \global\hfuzz=1pt - \global\contentsrightmargin=0pt - \global\deftypemargin=0pt - \global\defbodyindent=.5cm + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize % - \global\pagewidth=\hsize - \global\pageheight=\vsize + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize % - \global\let\smalllisp=\smalllispx - \global\let\smallexample=\smalllispx - \global\def\Esmallexample{\Esmalllisp} + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \parindent = \defaultparindent + \setemergencystretch } +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \setleading{13.2pt}% + % + % If page is nothing but text, make it come out even. + \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% +}} + +% Use @smallbook to reset parameters for 7x9.5 (or so) format. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \setleading{12pt}% + % + \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \deftypemargin = 0pt + \defbodyindent = .5cm + % + \let\smalldisplay = \smalldisplayx + \let\smallexample = \smalllispx + \let\smallformat = \smallformatx + \let\smalllisp = \smalllispx +}} + % Use @afourpaper to print on European A4 paper. -\def\afourpaper{ -\global\tolerance=700 -\global\hfuzz=1pt -\setleading{12pt} -\global\parskip 15pt plus 1pt - -\global\vsize= 53\baselineskip -\advance\vsize by \topskip -%\global\hsize= 5.85in % A4 wide 10pt -\global\hsize= 6.5in -\global\outerhsize=\hsize -\global\advance\outerhsize by 0.5in -\global\outervsize=\vsize -\global\advance\outervsize by 0.6in - -\global\pagewidth=\hsize -\global\pageheight=\vsize -} - -\bindingoffset=0pt -\normaloffset=\hoffset -\pagewidth=\hsize -\pageheight=\vsize - -% Allow control of the text dimensions. Parameters in order: textheight; -% textwidth; voffset; hoffset; binding offset; topskip. -% All require a dimension; -% header is additional; added length extends the bottom of the page. - -\def\changepagesizes#1#2#3#4#5#6{ - \global\vsize= #1 - \global\topskip= #6 - \advance\vsize by \topskip - \global\voffset= #3 - \global\hsize= #2 - \global\outerhsize=\hsize - \global\advance\outerhsize by 0.5in - \global\outervsize=\vsize - \global\advance\outervsize by 0.6in - \global\pagewidth=\hsize - \global\pageheight=\vsize - \global\normaloffset= #4 - \global\bindingoffset= #5} +\def\afourpaper{{\globaldefs = 1 + \setleading{12pt}% + \parskip = 3pt plus 2pt minus 1pt + % + \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% + % + \tolerance = 700 + \hfuzz = 1pt +}} % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin % 29mm, hence bottom margin 28mm, nominal side margin 3cm. -\def\afourlatex - {\global\tolerance=700 - \global\hfuzz=1pt - \setleading{12pt} - \global\parskip 15pt plus 1pt - \advance\baselineskip by 1.6pt - \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm} - } +\def\afourlatex{{\globaldefs = 1 + \setleading{13.6pt}% + % + \afourpaper + \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% + % + \globaldefs = 0 +}} % Use @afourwide to print on European A4 paper in wide format. -\def\afourwide{\afourpaper -\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}} +\def\afourwide{% + \afourpaper + \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% + % + \globaldefs = 0 +} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\def\pagesizes{\parsearg\pagesizesxxx} +\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{13.2pt}% + % + \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other @@ -4838,6 +5831,7 @@ width0pt\relax} \fi \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other +\catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} @@ -4846,6 +5840,7 @@ width0pt\relax} \fi \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} +\def\normaldollar{$} % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, @@ -4856,7 +5851,13 @@ width0pt\relax} \fi % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % -\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi} +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). @@ -4864,10 +5865,10 @@ width0pt\relax} \fi % use math or other variants that look better in normal text. \catcode`\"=\active -\def\activedoublequote{{\tt \char '042}} +\def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active -\def~{{\tt \char '176}} +\def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} @@ -4878,7 +5879,7 @@ width0pt\relax} \fi \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \catcode`\|=\active -\def|{{\tt \char '174}} +\def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} @@ -4887,6 +5888,8 @@ width0pt\relax} \fi \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active +\def${\ifusingit{{\sl\$}}\normaldollar} %\catcode 27=\active %\def^^[{$\diamondsuit$} @@ -4917,9 +5920,6 @@ width0pt\relax} \fi % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} -% Say @foo, not \foo, in error messages. -\escapechar=`\@ - % \catcode 17=0 % Define control-q \catcode`\\=\active @@ -4933,7 +5933,8 @@ width0pt\relax} \fi @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater -@let+=@normalplus} +@let+=@normalplus +@let$=@normaldollar} @def@normalturnoffactive{@let"=@normaldoublequote @let\=@normalbackslash @@ -4943,7 +5944,8 @@ width0pt\relax} \fi @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater -@let+=@normalplus} +@let+=@normalplus +@let$=@normaldollar} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @@ -4962,16 +5964,29 @@ width0pt\relax} \fi % Also back turn on active characters that might appear in the input % file name, in case not using a pre-dumped format. % -@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi - @catcode`+=@active @catcode`@_=@active} +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active + @catcode`@_=@active +} + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ -%% These look ok in all fonts, so just make them not special. The @rm below -%% makes sure that the current font starts out as the newly loaded cmr10 -@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other +% These look ok in all fonts, so just make them not special. +@catcode`@& = @other +@catcode`@# = @other +@catcode`@% = @other +@c Set initial fonts. @textfonts @rm + @c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" @c End: diff --git a/man/texinfo.texi b/man/texinfo.texi index 4690a34..73037d2 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.txi,v 1.50 1998/02/27 21:21:34 karl Exp $ +@c $Id: texinfo.texi,v 1.8.2.4 1999/12/05 19:02:24 martinb Exp $ @c %**start of header @c All text is ignored before the setfilename. @@ -7448,13 +7448,6 @@ Here is an example written in the small font used by the @tex % Remove extra vskip; this is a kludge to counter the effect of display \vskip-3\baselineskip -{\ninett -\dots{} to make sure that you have the freedom to -distribute copies of free software (and charge for -this service if you wish), that you receive source -code or can get it if you want it, that you can -change the software or use pieces of it in new free -programs; and that you know you can do these things.} @end tex @end display @end ifclear @@ -14206,7 +14199,7 @@ Start a new page in a printed manual if fewer than @var{n} mils (thousandths of an inch) remain on the current page. @xref{need, , @code{@@need}}.@refill -@item @@node @var{name, next, previous, up} +@item @@node @var{name}, @var{next}, @var{previous}, @var{up} Define the beginning of a new node in Info, and serve as a locator for references for @TeX{}. @xref{node, , @code{@@node}}.@refill diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index 76641d8..ef0b785 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,14 +7,15 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/03/04 15:48:25 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/12/07 03:11:46 $ @sp 1 @author Tony Rossini -@author Ben Wing +@author Ben Wing @author Chuck Thompson @author Steve Baur @author Andreas Kaempf @author Christian Nyb@o{} +@author Sandra Wambold @page @end titlepage @@ -88,6 +89,7 @@ library directory>/info/}. For example in * Customization:: Customization and Options. * Subsystems:: Major Subsystems. * Miscellaneous:: The Miscellaneous Stuff. +* MS Windows:: XEmacs on Microsoft Windows. * Current Events:: What the Future Holds. @detailmenu @@ -305,6 +307,7 @@ Other Mail & News: 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? @@ -376,12 +379,38 @@ Miscellaneous: * Q5.3.11:: How do I add new Info directories? * Q5.3.12:: What do I need to change to make printing work? -What the Future Holds +XEmacs on MS Windows -* Q6.0.1:: What is new in 20.2? -* Q6.0.2:: What is new in 20.3? -* Q6.0.3:: What is new in 20.4? -* Q6.0.4:: Procedural changes in XEmacs development. +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? +* Q6.0.3:: Are binary kits available? +* Q6.0.4:: Does XEmacs on MS Windows require an X server to run? + +Building XEmacs on MS Windows: +* Q6.1.1:: I decided to run with X. Where do I get an X server? +* Q6.1.2:: What compiler do I need to compile XEmacs? +* Q6.1.3:: How do I compile for the native port? +* Q6.1.4:: How do I compile for the X port? +* Q6.1.5:: How do I compile for Cygnus' Cygwin? +* Q6.1.6:: What do I need for Cygwin? + +Customization and User Interface: +* Q6.2.1:: How will 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{.emacs} file? + +Miscellaneous: +* Q6.3.1:: Will XEmacs rename all the win32-* symbols to w32-*? +* Q6.3.2:: What are the differences between the various MS Windows emacsen? +* Q6.3.3:: What is the porting team doing at the moment? + +Current Events: + +* Q7.0.1:: What is new in 20.2? +* Q7.0.2:: What is new in 20.3? +* Q7.0.3:: What is new in 20.4? +* Q7.0.4:: Procedural changes in XEmacs development. @end detailmenu @end menu @@ -398,15 +427,15 @@ available resources. The previous maintainer of the FAQ was @email{rossini@@stat.sc.edu, Anthony Rossini}, who started it, after getting tired of hearing JWZ complain about repeatedly having to answer questions. -@email{ben@@666.com, Ben Wing} and @email{cthomp@@xemacs.org, Chuck +@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 version was converted to hypertext format, and edited by -@email{steve@@altair.xemacs.org, Steven L. Baur}. It was converted back to -texinfo by @email{hniksic@@srce.hr, Hrvoje Niksic}. +@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 @email{faq@@xemacs.org, Christian @@ -476,6 +505,8 @@ track changes to GNU Emacs while also working to add new features. @node Q1.0.2, Q1.0.3, Q1.0.1, Introduction @unnumberedsubsec Q1.0.2: What is the current version of XEmacs? +XEmacs 21.1.8 is the current stable version of XEmacs. + XEmacs 20.4 is a minor upgrade from 20.3, containing many bugfixes. It was released in February 1998. @@ -485,7 +516,7 @@ which was also the last version without international language support. @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction @unnumberedsubsec Q1.0.3: Where can I find it? -The canonical source and binaries is found via anonymous FTP at: +The canonical source and binaries can be found via anonymous FTP at: @example @uref{ftp://ftp.xemacs.org/pub/xemacs/} @@ -497,7 +528,7 @@ The canonical source and binaries is found via anonymous FTP at: 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/NEWS.html, NEWS file} +@uref{http://www.xemacs.org/About/XEmacsVsGNUemacs.html, NEWS file} @end example However, here is a list of some of the reasons why we think you might @@ -579,44 +610,37 @@ that often result. Mail your questions to @email{xemacs-beta@@xemacs.org} and @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 selecting @code{Emacs Info} from the Help Menu. +Probably the easiest way, if everything is installed, is to use Info, by +pressing @kbd{C-h i}, or selecting @code{Manuals->Info} from the +Help Menu. @kbd{M-x apropos} can be used to look for particular commands. -Also, @kbd{M-x apropos} will look for commands for you. +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. -Try reading this FAQ, examining the regular GNU Emacs FAQ (which can be -found with the Emacs 19 distribution) as well as at -@uref{http://www.eecs.nwu.edu/emacs/faq/} and reading the Usenet group -comp.emacs.xemacs. - -If that does not help, try posting your question to comp.emacs.xemacs. -Please @strong{do not} post XEmacs related questions to gnu.emacs.help. +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 which is available. It can be subscribed to by sending a message -with a subject of @samp{subscribe} to @email{xemacs-request@@xemacs.org} -for subscription information and @email{xemacs@@xemacs.org} to send messages -to the list. - -To cancel a subscription, you @strong{must} use the xemacs-request -address. Send a message with a subject of @samp{unsubscribe} to be -removed. +to @email{xemacs-request@@xemacs.org} with @samp{subscribe} in the +body of the message. Send to the list at @email{xemacs@@xemacs.org}. +list. To cancel a subscription, you @strong{must} use the +xemacs-request address. 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 is the mailing list archived? -The mailing list was archived in the directory -@example -@uref{ftp://ftp.xemacs.org/pub/mlists/}. -@end example - -However, this archive is out of date. The current mailing list server -supports an @code{archive} feature, which may be utilized. +The archives can be found at @uref{http://www.xemacs.org/Lists/Archive} @node Q1.0.8, Q1.0.9, Q1.0.7, Introduction @unnumberedsubsec Q1.0.8: How do you pronounce XEmacs? -I pronounce it @samp{Eks eemax}. +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? @@ -629,40 +653,42 @@ Screen snapshots are available in the WWW version of the FAQ. @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)? -Thanks to efforts of many people, coordinated by -@email{davidh@@wr.com.au, David Hobley} and @email{marcpa@@cam.org, Marc -Paquette}, beta versions of XEmacs now run on 32-bit Windows platforms -(NT and 95). The current betas require having an X server to run -XEmacs; however, a native NT/95 port is in alpha, thanks to -@email{jhar@@tardis.ed.ac.uk, Jonathan Harris}. - -Although some features are still unimplemented, XEmacs 21.0 will support -MS-Windows. - -The NT development is now coordinated by a mailing list at -@email{xemacs-nt@@xemacs.org}. - -If you are willing to contribute or want to follow the progress, mail to -@iftex -@* -@end iftex -@email{xemacs-nt-request@@xemacs.org} to subscribe. - -Furthermore, Altrasoft is seeking corporate and government sponsors to -help fund a fully native port of XEmacs to Windows 95 and NT using -full-time, senior-level staff working under a professionally managed -project structure. See @uref{http://www.altrasoft.com/, the Altrasoft -web site} for more details -or contact Altrasoft directly at 1-888-ALTSOFT. - - -The closest existing port is @dfn{Win-Emacs}, which is based on Lucid -Emacs 19.6. Available from @uref{http://www.pearlsoft.com/}. - -There's a port of GNU Emacs (not XEmacs) at -@example -@uref{http://www.cs.washington.edu/homes/voelker/ntemacs.html}. -@end example +Yes, @xref{MS Windows}. + +@comment Thanks to efforts of many people, coordinated by +@comment @email{davidh@@wr.com.au, David Hobley} and @email{marcpa@@cam.org, Marc +@comment Paquette}, beta versions of XEmacs now run on 32-bit Windows platforms +@comment (NT and 95). The current betas require having an X server to run +@comment XEmacs; however, a native NT/95 port is in alpha, thanks to +@comment @email{jhar@@tardis.ed.ac.uk, Jonathan Harris}. +@comment +@comment Although some features are still unimplemented, XEmacs 21.0 will support +@comment MS-Windows. +@comment +@comment The NT development is now coordinated by a mailing list at +@comment @email{xemacs-nt@@xemacs.org}. +@comment +@comment If you are willing to contribute or want to follow the progress, mail to +@comment @iftex +@comment @* +@comment @end iftex +@comment @email{xemacs-nt-request@@xemacs.org} to subscribe. +@comment +@comment Furthermore, Altrasoft is seeking corporate and government sponsors to +@comment help fund a fully native port of XEmacs to Windows 95 and NT using +@comment full-time, senior-level staff working under a professionally managed +@comment project structure. See @uref{http://www.altrasoft.com/, the Altrasoft +@comment web site} for more details +@comment or contact Altrasoft directly at 1-888-ALTSOFT. +@comment +@comment +@comment The closest existing port is @dfn{Win-Emacs}, which is based on Lucid +@comment Emacs 19.6. Available from @uref{http://www.pearlsoft.com/}. +@comment +@comment There's a port of GNU Emacs (not XEmacs) at +@comment @example +@comment @uref{http://www.cs.washington.edu/homes/voelker/ntemacs.html}. +@comment @end example @node Q1.0.11, Q1.0.12, Q1.0.10, Introduction @unnumberedsubsec Q1.0.11: Is there a port of XEmacs to the Macintosh? @@ -690,39 +716,24 @@ No, and there is no news of anyone 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 users manual? -Altrasoft Associates, a firm specializing in Emacs-related support and -development, will be maintaining the XEmacs user manual. The firm plans -to begin publishing printed copies of the manual soon. -@c This used to say `March 1997'! +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 may be available from the +XEmacs web site in the future. -@example - Web: @uref{http://www.xemacs.com} - E-mail: @email{info@@xemacs.com} - Tel: +1 408 243 3300 -@end example @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? The FAQ is actively maintained and modified regularly. All links should -be up to date. - -Changes are displayed on a monthly basis. @dfn{Months}, for this -purpose are defined as the 5th of the month through the 5th of the -month. Preexisting questions that have been changed are marked as such. -Brand new questions are tagged. - -All submissions are welcome. E-mail submissions -to -@iftex -@* -@end iftex -@email{faq@@xemacs.org, Christian Nyb@o{}}. +be up to date. All submissions are welcome. E-mail submissions to +@email{faq@@xemacs.org, XEmacs FAQ maintainers}. 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, I'd like to hear about it. Questions and +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 one @@ -733,8 +744,8 @@ author. @node Q1.1.2, Q1.1.3, Q1.1.1, Introduction @unnumberedsubsec Q1.1.2: How do I become a Beta Tester? -Send an email message to @email{xemacs-beta-request@@xemacs.org} with a -subject line of @samp{subscribe}. +Send an email message to @email{xemacs-beta-request@@xemacs.org} with +the line @samp{subscribe} in the body of the message. Be prepared to get your hands dirty, as beta testers are expected to identify problems as best they can. @@ -742,7 +753,7 @@ identify problems as best they can. @node Q1.1.3, Q1.2.1, Q1.1.2, Introduction @unnumberedsubsec Q1.1.3: How do I contribute to XEmacs itself? -Ben Wing @email{ben@@666.com} writes: +Ben Wing @email{ben@@xemacs.org} writes: @quotation BTW if you have a wish list of things that you want added, you have to @@ -785,14 +796,14 @@ developers responsible for the 19.16/20.x releases are: @end ifhtml -@item @email{steve@@altair.xemacs.org, Steve Baur} +@item @email{steve@@xemacs.org, Steve Baur} @ifhtml
Portrait of Steve Baur
@end ifhtml -@item @email{hniksic@@srce.hr, Hrvoje Niksic} +@item @email{hniksic@@xemacs.org, Hrvoje Niksic} @ifhtml
Portrait of Hrvoje Niksic
@@ -811,7 +822,7 @@ The developers responsible for the 19.14 release are: Chuck was Mr. XEmacs from 19.11 through 19.14, and is responsible for XEmacs becoming a widely distributed program over the Internet. -@item @email{ben@@666.com, Ben Wing} +@item @email{ben@@xemacs.org, Ben Wing} @ifhtml
Portrait of Ben Wing
@end ifhtml @@ -820,7 +831,7 @@ for XEmacs becoming a widely distributed program over the Internet. @itemize @bullet -@item @email{jwz@@netscape.com, Jamie Zawinski} +@item @email{jwz@@jwz.org, Jamie Zawinski} @ifhtml
Portrait of Jamie Zawinski
@end ifhtml @@ -844,7 +855,7 @@ version of the FAQ (listed in alphabetical order): @itemize @bullet @item @email{steve@@xemacs.org, SL Baur} -@item @email{hniksic@@srce.hr, Hrvoje Niksic} +@item @email{hniksic@@xemacs.org, Hrvoje Niksic} @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari} @@ -923,7 +934,7 @@ This is yet another holdover from XEmacs Lisp's derivation from vintage-1980 Lisps; modern versions of Lisp consider this equivalence a bad idea, and have separate character types. In XEmacs version 20, the modern convention is followed, and characters are their own -primitive types. (This change was necessary in order for @sc{MULE}, +primitive types. (This change was necessary in order for @sc{mule}, i.e. Asian-language, support to be correctly implemented.) Even in XEmacs version 20, remnants of the equivalence between @@ -941,21 +952,21 @@ with the distinction between characters and integers in mind. Every character has an equivalent integer, called the @dfn{character code}. For example, the character @kbd{A} is represented as the -@w{integer 65}, following the standard @sc{ASCII} representation of -characters. If XEmacs was not compiled with @sc{MULE} support, the +@w{integer 65}, following the standard @sc{ascii} representation of +characters. If XEmacs was not compiled with @sc{mule} support, the range of this integer will always be 0 to 255 -- eight bits, or one byte. (Integers outside this range are accepted but silently truncated; however, you should most decidedly @emph{not} rely on this, because it -will not work under XEmacs with @sc{MULE} support.) When @sc{MULE} +will not work under XEmacs with @sc{mule} support.) When @sc{mule} support is present, the range of character codes is much larger. (Currently, 19 bits are used.) FSF GNU Emacs uses kludgy character codes above 255 to represent -keyboard input of @sc{ASCII} characters in combination with certain +keyboard input of @sc{ascii} characters in combination with certain modifiers. XEmacs does not use this (a more general mechanism is -used that does not distinguish between @sc{ASCII} keys and other +used that does not distinguish between @sc{ascii} keys and other keys), so you will never find character codes above 255 in a -non-@sc{MULE} XEmacs. +non-@sc{mule} XEmacs. Individual characters are not often used in programs. It is far more common to work with @emph{strings}, which are sequences composed of @@ -965,14 +976,12 @@ characters. @node Q1.3.2, Q1.3.3, Q1.3.1, Introduction @unnumberedsubsec Q1.3.2: What is the status of Asian-language support, aka MULE? -The MULE support works OK but still needs a fair amount of work before -it's really solid. We could definitely use some help here, esp. people -who speak Japanese and will use XEmacs/MULE to work with Japanese and -have some experience with E-Lisp. +MULE support is now available for UNIX versions of XEmacs. -As the fundings on Mule have stopped, the Mule part of XEmacs is currently -looking for a full-time maintainer. If you can provide help here, or -are willing to fund the work, please mail to @email{xemacs-beta@@xemacs.org}. +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. @xref{Q1.1.2}. @@ -1161,23 +1170,23 @@ 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? -There's the XEmacs tutorial available from the Help Menu, 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}. - -There's an Emacs Lisp tutorial at - -@example -@uref{ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz}. -@end example - -@email{erik@@petaxp.rug.ac.be, Erik Sundermann} has made a tutorial web -page at -@iftex -@* -@end iftex -@uref{http://petaxp.rug.ac.be/~erik/xemacs/}. +There's the XEmacs tutorial available from the Help Menu under +@samp{Basics->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}. + +@comment There's an Emacs Lisp tutorial at +@comment +@comment @example +@comment @uref{ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz}. +@comment @end example +@comment +@comment @email{erik@@petaxp.rug.ac.be, Erik Sundermann} has made a tutorial web +@comment page at +@comment @iftex +@comment @* +@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? @@ -1352,7 +1361,7 @@ This will let you run XEmacs without massive copying. Although this entry has been written for XEmacs 19.13, most of it still stands true. -@email{steve@@altair.xemacs.org, Steve Baur} writes: +@email{steve@@xemacs.org, Steve Baur} writes: @quotation The 45MB of space required by the installation directories can be @@ -1568,7 +1577,7 @@ Initialization error: Terminal type `xterm' undefined (or can't access database?) @end example -@email{ben@@666.com, Ben Wing} writes: +@email{ben@@xemacs.org, Ben Wing} writes: @quotation Your ncurses configuration is messed up. Your /usr/lib/terminfo is a @@ -1580,7 +1589,7 @@ bad pointer, perhaps to a CD-ROM that is not inserted. No. The name @dfn{XEmacs} is unfortunate in the sense that it is @strong{not} an X Window System-only version of Emacs. Starting with -19.14 XEmacs has full color support on a color capable character +19.14 XEmacs has full color support on a color-capable character terminal. @node Q2.0.6, Q2.0.7, Q2.0.5, Installation @@ -1626,7 +1635,7 @@ Rebuild XEmacs yourself -- any working ELF version of libc should be O.K. @end enumerate -@email{hniksic@@srce.hr, Hrvoje Niksic} writes: +@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: @quotation Why not use a Perl one-liner for No. 2? @@ -2210,7 +2219,7 @@ forcing a static link of libc (manually). @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? -@email{ben@@666.com, Ben Wing} writes: +@email{ben@@xemacs.org, Ben Wing} writes: @quotation @kbd{C-g} does work for most people in most circumstances. If it @@ -2380,8 +2389,8 @@ corresponding to the configure options used when building XEmacs. @node Q2.1.16, Q2.1.17, Q2.1.15, Installation @unnumberedsubsec Q2.1.16: XEmacs crashes in @code{strcat} on HP/UX 10 ->From the problems database (through -@uref{http://support.mayfield.hp.com/}): +From the problems database (through +the former address http://support.mayfield.hp.com/): @example Problem Report: 5003302299 @@ -2976,7 +2985,7 @@ 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{ben@@666.com, Ben Wing} writes: +@email{ben@@xemacs.org, Ben Wing} writes: @quotation Ugh, this stuff is such an incredible mess that I've about given up @@ -3540,7 +3549,7 @@ 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@@666.com, Ben Wing} writes: +@email{ben@@xemacs.org, Ben Wing} writes: @quotation One thing about the sticky modifiers is that if you move the mouse out @@ -4086,6 +4095,7 @@ Other Mail & News: 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? @@ -4165,7 +4175,7 @@ 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@@666.com")) + "wing@@netcom.com" "wing@@xemacs.org")) @end lisp Note that each string is a regular expression. @@ -4469,12 +4479,11 @@ tm has following functions: tm is available from following anonymous ftp sites: @itemize @bullet -@item @uref{ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/} (Japan). -@item @uref{ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/} (Japan). -@c The host above is unknown. - -@item @uref{ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/} (US). -@item @uref{ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/} (US). +@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). @@ -4487,7 +4496,7 @@ trivial to use. @node Q4.3.3, Q4.3.4, Q4.3.2, Subsystems @unnumberedsubsec Q4.3.3: Why isn't this @code{movemail} program working? -Ben Wing @email{ben@@666.com} writes: +Ben Wing @email{ben@@xemacs.org} writes: @quotation It wasn't chown'ed/chmod'd correctly. @@ -4496,14 +4505,14 @@ It wasn't chown'ed/chmod'd correctly. @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? -@email{steve@@altair.xemacs.org, Steve Baur} writes: +@email{steve@@xemacs.org, Steve Baur} writes: @quotation Yes. Always use the movemail installed with your XEmacs. Failure to do so can result in lost mail. @end quotation -Please refer to @email{jwz@@netscape.com, Jamie Zawinski's} notes at +Please refer to @email{jwz@@jwz.org, Jamie Zawinski's} notes at @iftex @* @end iftex @@ -4539,7 +4548,7 @@ There is a good mirror at ftp.cdrom.com; @end iftex @uref{ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/}. -@node Q4.4.1, Q4.5.1, Q4.3.5, Subsystems +@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? @@ -4580,10 +4589,48 @@ details, check out @iftex @* @end iftex -@uref{http://www.sun.com/software/Products/Developer-products/programs.html}. +@uref{http://www.sun.com/software/Products/Developer-products}. @end quotation -@node Q4.5.1, Q4.6.1, Q4.4.1, Subsystems +@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? + +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 + +If you are not using the latest Workshop (5.0) you have to apply the +following patch: + +@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") + +-(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 + + + +@node Q4.5.1, Q4.6.1, Q4.4.2, Subsystems @unnumberedsec 4.5: Energize @unnumberedsubsec Q4.5.1: What is/was Energize? @@ -4888,13 +4935,15 @@ One way to do this (and much more) is by using the @iftex @* @end iftex -@uref{ftp://ftp.mathworks.com/pub/contrib/v5/tools/matlab.el, matlab mode}. +@comment @uref{ftp://ftp.mathworks.com/pub/contrib/v5/tools/matlab.el, matlab mode}. +matlab mode. (If someone knows where this can be found, please contact +the @email{faq@@xemacs.org,XEmacs FAQ maintainer}. Instructions on how to install this mode are included in this file. @end quotation -@node Miscellaneous, Current Events, Subsystems, Top +@node Miscellaneous, MS Windows, Subsystems, Top @unnumbered 5 The Miscellaneous Stuff This is part 5 of the XEmacs Frequently Asked Questions list. This @@ -5112,6 +5161,10 @@ This will then start a second shell. The key is that no buffer named 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 Q5.0.7, Q5.0.8, Q5.0.6, Miscellaneous @unnumberedsubsec Q5.0.7: Telnet from shell filters too much @@ -5255,7 +5308,7 @@ if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec @email{bwarsaw@@cnri.reston.va.us, Barry A. Warsaw} writes: @quotation -This can be had from @uref{http://www.python.org/ftp/emacs/}. +This can be had from @uref{http://www.python.org/emacs/}. @end quotation @node Q5.0.16, Q5.0.17, Q5.0.15, Miscellaneous @@ -5704,7 +5757,7 @@ is: an easy way to find out where it spends time? @c New -z@email{hniksic@@srce.hr, Hrvoje Niksic} writes: +z@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 @@ -6036,8 +6089,9 @@ 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. For convenience xbm2xface is available for anonymous FTP at -@uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}. +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: @@ -6138,25 +6192,394 @@ 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 Current Events, , Miscellaneous, Top -@unnumbered 6 What the Future Holds +@node MS Windows, Current Events, Miscellaneous, Top +@unnumbered 6 XEmacs on MS Windows + +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. + +@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? +* Q6.0.3:: Where are the XEmacs on MS Windows binaries? +* Q6.0.4:: Does XEmacs on MS Windows require an X server to run? + +Building XEmacs on MS Windows +* Q6.1.1:: I decided to run with X. Where do I get an X server? +* Q6.1.2:: What compiler do I need to compile XEmacs? +* Q6.1.3:: How do I compile for the native port? +* Q6.1.4:: How do I compile for the X port? +* Q6.1.5:: How do I compile for Cygnus' Cygwin? +* Q6.1.6:: What do I need for Cygwin? + +Customization and User Interface +* Q6.2.1:: How will 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{.emacs} file? + +Miscellaneous +* Q6.3.1:: Will XEmacs rename all the win32-* symbols to w32-*? +* Q6.3.2:: What are the differences between the various MS Windows emacsen? +* Q6.3.3:: What is the porting team doing at the moment? + +@end menu + +@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? + +Is XEmacs really getting ported to MS Windows? What is the status of the port? + +Yes, a group of volunteers actively works on making XEmacs code base +cleanly compile and run on MS Windows operating systems. The mailing +list at @email{xemacs-nt@@xemacs.org} is dedicated to that effort (please use +the -request address to subscribe). + +At this time, XEmacs on MS Windows is usable, but lacks some of the +features of XEmacs on UNIX and UNIX-like systems. Notably, +internationalization does not work. + +@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. + +The list name is misleading, as XEmacs will support both Windows 95, +Windows 98 and Windows NT. The MS Windows-specific code is based on +Microsoft Win32 API, and will not work on MS Windows 3.x or on MS-DOS. + + +@node Q6.0.3, Q6.0.4, Q6.0.2, MS Windows +@unnumberedsubsec Q6.0.3: Are binary kits available? + +Binary kits are available at +@uref{ftp://ftp.xemacs.org/pub/xemacs/binary-kits/win32/} for the +"plain" MS Windows version. + +@node Q6.0.4, Q6.1.1, Q6.0.3, MS Windows +@unnumberedsubsec Q6.0.4: Does XEmacs on MS Windows require an X server to run? + +Short answer: No. + +Long answer: XEmacs can be built in several ways in the MS Windows +environment, some of them requiring an X server and some not. + +One is what we call the "X" port -- it requires X libraries to build +and an X server to run. Internally it uses the Xt event loop and +makes use of X toolkits. Its look is quite un-Windowsy, but it works +reliably and supports all of the graphical features of Unix XEmacs. + +The other is what we call the "native" port. It uses the Win32 API +and does not require X libraries to build, nor does it require an X to +run. In fact, it has no connection with X whatsoever. At this time, +the native port obsoletes the X port, providing almost all of its +features, including support for menus, scrollbars, toolbars, embedded +images and background pixmaps, frame pointers, etc. Most of the +future work will be based on the native port. + +There is also a third special case, the Cygwin port. It takes +advantage of Cygnus emulation library under Win32, which enables it to +reuse much of the Unix XEmacs code base, such as processes and network +support, or internal select() mechanisms. + +Cygwin port supports all display types -- TTY, X & MS gui, and can be +built with support for all three. If you build with ms gui support +then the Cygwin version uses the majority of the msw code, which is +mostly related to display. If you want to build with X support you +need X libraries. If you want to build with tty support you need +ncurses. MS gui requires no additional libraries. + +Some of the advantages of the Cygwin version are that it: + +@itemize @bullet + +@item integrates well with Cygwin environment for existing Cygwin users; +@item uses configure so building with different features is very easy; +@item has process support in X & tty. + +@end itemize + +The disadvantage is that it requires several Unix utilities and 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 Q6.1.1, Q6.1.2, Q6.0.4, MS Windows +@unnumberedsec 6.1: Building XEmacs on MS Windows +@unnumberedsubsec Q6.1.1: I decided to run with X. Where do I get an X server? + +Pointers to X servers can be found at +@iftex +@* +@end iftex +@uref{http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/}; + +look for "Where to get an X server". Also note that, although the above +page talks about Cygnus gnu-win32 (Cygwin), the information on X servers +is Cygwin-independent. You don't have to be running/using Cygwin to use +these X servers, and you don't have to compile XEmacs under Cygwin to +use XEmacs with these X servers. An "X port" XEmacs compiled under +Visual C++ will work with these X servers (as will XEmacs running on a +Unix box, redirected to the server running on your PC). + + +@node Q6.1.2, Q6.1.3, Q6.1.1, MS Windows +@unnumberedsubsec Q6.1.2: What compiler do I need to compile XEmacs? + +You need Visual C++ 4.2 or 5.0, with the exception of the Cygwin port, +which uses Gcc. + + +@node Q6.1.3, Q6.1.4, Q6.1.2, MS Windows +@unnumberedsubsec Q6.1.3: How do I compile for the native port? + +Please read the file @file{nt/README} in the XEmacs distribution, which +contains the full description. + + +@node Q6.1.4, Q6.1.5, Q6.1.3, MS Windows +@unnumberedsubsec Q6.1.4: How do I compile for the X port? + +Again, it is 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, I don't know of it. + + +@node Q6.1.5, Q6.1.6, Q6.1.4, MS Windows +@unnumberedsubsec Q6.1.5: How do I compile for Cygnus' Cygwin? + +Similar as on Unix; use the usual `configure' and `make' process. +Some problems to watch out for: + +@itemize @bullet +@item +make sure HOME is set. This controls where you @file{.emacs} file comes +from; + +@item +CYGWIN32 needs to be set to tty for process support +work. e.g. CYGWIN32=tty; + +@item +picking up some other grep or other unix like tools can kill configure; + +@item +static heap too small, adjust src/sheap-adjust.h to a more positive +number; + +@item +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. + +@end itemize + +@node Q6.1.6, Q6.2.1, Q6.1.5, MS Windows +@unnumberedsubsec Q6.1.6: What do I need for Cygwin? + +You can find the Cygwin tools and compiler at: + +@uref{http://sourceware.cygnus.com/cygwin/} + +You will need version b19 or later. + +You will also need the X libraries. There are libraries at +@iftex +@* +@end iftex +@uref{http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/}, but +these are not b19 compatible. You can get b19 X11R6.3 binaries, as +well as pre-built ncurses and graphic libraries, from: + +@uref{ftp://ftp.parallax.co.uk/pub/andyp/}. + + +@node Q6.2.1, Q6.2.2, Q6.1.6, MS Windows +@unnumberedsec 6.2: Customization and User Interface +@unnumberedsubsec Q6.2.1: How will the port cope with differences in the Windows user interface? + +XEmacs (and Emacs in general) UI is pretty +different from what is expected of a typical MS Windows program. How will +the MS Windows port cope with it? + +Fortunately, Emacs is also one of the most configurable editor beasts +in the world. The MS Windows "look and feel" (mark via shift-arrow, +self-inserting deletes region, etc.) can be easily configured via +various packages distributed with XEmacs. The `pending-delete' +package is an example of such a utility. + +In future versions, some of these packages might be turned on by +default in the MS Windows environment. + + +@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? + +You can change font manually, but not from the menubar, yet. For +example: + +@display + (set-face-font 'default "Lucida Console:Regular:10") + (set-face-font 'modeline "MS Sans Serif:Regular:10") +@end display + + +@node Q6.2.3, Q6.3.1, Q6.2.2, MS Windows +@unnumberedsubsec Q6.2.3: Where do I put my @file{.emacs} file? + +If the HOME environment variable is set, @file{.emacs} will be looked for +there. Else the directory defaults to `c:\'. + +@node Q6.3.1, Q6.3.2, Q6.2.3, MS Windows +@unnumberedsec 6.3: Miscellaneous +@unnumberedsubsec Q6.3.1: Will XEmacs rename all the win32-* symbols to w32-*? + +In his flavor of Emacs 20, Richard Stallman has renamed all the win32-* +symbols to w32-*. Will XEmacs do the same? + +We consider such a move counter-productive, thus we will not use the +`w32' prefix. However, we do recognize that Win32 name is little more +than a marketing buzzword (will it be Win64 in the next release?), so +we decided not to use it. Using `windows-' would be wrong because the +term is too generic, which is why we settled on a compromise +`mswindows' term. + +Thus all the XEmacs variables and functions directly related to Win32 +are prefixed `mswindows-'. The user-variables shared with NT Emacs +will be provided as compatibility aliases. + +Architectural note: We believe that there should be a very small +number of window-systems-specific variables, and will try to provide +generic interfaces whenever possible. + + +@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? + +XEmacs, Win-Emacs, DOS Emacs, NT Emacs, this is all very confusing. +Could you briefly explain the differences between them? + +Here is a recount of various Emacs versions running on MS Windows: + +@itemize @bullet + +@item +Win-Emacs + +@itemize @minus + +@item +Win-Emacs is a port of Lucid Emacs 19.6 to MS Windows using X +compatibility libraries. Win-Emacs has been written by Ben Wing. The +MS Windows code has not made it back to Lucid Emacs, which left Win-Emacs +pretty much dead for our purposes. Win-Emacs used to be available at +Pearlsoft, but not anymore, since Pearlsoft went out of business. +@end itemize + +@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 supports long file names, lacks proper subprocesses support, and +is far too big compared to typical DOS editors. +@end itemize + +@item +GNU Emacs compiled with Win32 + +@itemize @minus + +@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 is very similar to GNU Emacs compiled under MS DOS, only it +supports longer file names, etc. This "port" is similar to the "X" +flavor of XEmacs on MS Windows. +@end itemize + +@item +NT Emacs + +@itemize @minus + +@item +NT Emacs is a version of GNU Emacs modified to compile and run under +MS MS Windows 95 and NT using the native Win32 API. As such, it is close +in spirit to the XEmacs "native" port. + +@item +NT Emacs has been written by Geoff Voelker, and more information can be +found at +@iftex +@* +@end iftex +@uref{http://www.cs.washington.edu/homes/voelker/ntemacs.html}. + +@end itemize + +@item +XEmacs + +@itemize @minus + +@item +Beginning with XEmacs 19.12, XEmacs' architecture has been 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" XEmacs supported. The 19.12 design is the basis for +the current native MS Windows code. + +@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. + +@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), Jeff Sparkes (contributed scrollbars support) and many +others. + +@end itemize + +@end itemize + + +@node Q6.3.3, , Q6.3.2, MS Windows +@unnumberedsubsec Q6.3.3: What is the porting team doing at the moment? + +The porting team is continuing work on the MS Windows-specific code. + + +@node Current Events, , MS Windows, Top +@unnumbered 7 What the Future Holds -This is part 6 of the XEmacs Frequently Asked Questions list. This +This is part 7 of the XEmacs Frequently Asked Questions list. This section will change monthly, and contains any interesting items that have transpired over the previous month. If you are reading this from the XEmacs distribution, please see the version on the Web or archived at the various FAQ FTP sites, as this file is surely out of date. @menu -* Q6.0.1:: What is new in 20.2? -* Q6.0.2:: What is new in 20.3? -* Q6.0.3:: What is new in 20.4? -* Q6.0.4:: Procedural changes in XEmacs development. +* Q7.0.1:: What is new in 20.2? +* Q7.0.2:: What is new in 20.3? +* Q7.0.3:: What is new in 20.4? +* Q7.0.4:: Procedural changes in XEmacs development. @end menu -@node Q6.0.1, Q6.0.2, Current Events, Current Events -@unnumberedsec 6.0: Changes -@unnumberedsubsec Q6.0.1: What is new in 20.2? +@node Q7.0.1, Q7.0.2, Current Events, Current Events +@unnumberedsec 7.0: Changes +@unnumberedsubsec Q7.0.1: What is new in 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 @@ -6168,8 +6591,8 @@ customize}. XEmacs 20.2 is the development release (20.0 was beta), and is no longer considered unstable. -@node Q6.0.2, Q6.0.3, Q6.0.1, Current Events -@unnumberedsubsec Q6.0.2: What is new in 20.3? +@node Q7.0.2, Q7.0.3, Q7.0.1, Current Events +@unnumberedsubsec Q7.0.2: What is new in 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, @@ -6188,15 +6611,15 @@ 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 Q6.0.3, Q6.0.4, Q6.0.2, Current Events -@unnumberedsubsec Q6.0.3: What's new in XEmacs 20.4? +@node Q7.0.3, Q7.0.4, Q7.0.2, Current Events +@unnumberedsubsec Q7.0.3: 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 Q6.0.4, , Q6.0.3, Current Events -@unnumberedsubsec Q6.0.4: Procedural changes in XEmacs development. +@node Q7.0.4, , Q7.0.3, Current Events +@unnumberedsubsec Q7.0.4: Procedural changes in XEmacs development. @enumerate @item @@ -6225,7 +6648,7 @@ XEmacs 19.16 was the last 19 release, basically consisting of 19.15 plus the collected bugfixes. @item -As of December 1996, @email{steve@@altair.xemacs.org, Steve Baur} has become +As of December 1996, @email{steve@@xemacs.org, Steve Baur} has become the lead maintainer of XEmacs. @end enumerate diff --git a/man/xemacs/Makefile b/man/xemacs/Makefile deleted file mode 100644 index 24e9bd2..0000000 --- a/man/xemacs/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# Makefile for the XEmacs Reference Manual. - -# This file is part of XEmacs. - -# XEmacs is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any -# later version. - -# XEmacs is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -# You should have received a copy of the GNU General Public License -# along with XEmacs; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# Modified by Ben Wing, February 1994 - -NAME=xemacs - -MAKEINFO = makeinfo -TEXI2DVI = texi2dvi - -# List of all the texinfo files in the manual: - -srcs = xemacs.texi abbrevs.texi basic.texi buffers.texi building.texi \ - calendar.texi cmdargs.texi custom.texi display.texi entering.texi \ - files.texi fixit.texi glossary.texi gnu.texi help.texi indent.texi \ - keystrokes.texi killing.texi xemacs.texi m-x.texi major.texi mark.texi \ - menus.texi mini.texi misc.texi mouse.texi new.texi picture.texi \ - programs.texi reading.texi regs.texi frame.texi search.texi sending.texi \ - text.texi trouble.texi undo.texi windows.texi - -all : info -info : ../../info/$(NAME).info - -dvi: $(NAME).dvi -.texi.dvi : - $(TEXI2DVI) $< - -../../info/$(NAME).info: $(srcs) - $(MAKEINFO) -o $@ $(NAME).texi - -.PHONY: mostlyclean clean distclean realclean extraclean -mostlyclean: - rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ - *.vr *.vrs *.pg *.pgs *.ky *.kys -clean: mostlyclean - rm -f *.dvi *.ps make.out core -distclean: clean -realclean: distclean -extraclean: distclean - -rm -f *~ \#* diff --git a/man/xemacs/cmdargs.texi b/man/xemacs/cmdargs.texi index c81812c..fe78398 100644 --- a/man/xemacs/cmdargs.texi +++ b/man/xemacs/cmdargs.texi @@ -155,10 +155,17 @@ concerning the package system, @xref{Startup Paths}.) @item -vanilla This is equivalent to @samp{-q -no-site-file -no-early-packages}. +@item -user-init-file @var{file} +Load @var{file} as your Emacs init file instead of @file{~/.emacs}. + +@item -user-init-directory @var{directory} +Use @var{directory} as the location of your early package hierarchies +and the various user-specific initialization files. + @item -user @var{user} @itemx -u @var{user} -Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of -your own. +Equivalent to +@samp{-user-init-file ~@var{user}/.emacs -user-init-directory ~@var{user}/.xemacs}. @end table diff --git a/man/xemacs/custom.texi b/man/xemacs/custom.texi index 28abc84..d37a926 100644 --- a/man/xemacs/custom.texi +++ b/man/xemacs/custom.texi @@ -1539,18 +1539,13 @@ and some English to explain that string if necessary. When you start Emacs, it normally loads the file @file{.emacs} in your home directory. This file, if it exists, should contain Lisp code. It is called your initialization file or @dfn{init file}. Use the command -line switches @samp{-q} and @samp{-u} to tell Emacs whether to load an -init file (@pxref{Entering Emacs}). +line switch @samp{-q} to tell Emacs whether to load an +init file (@pxref{Entering Emacs}). Use the command line switch +@samp{-user-init-file} (@pxref{Command Switches}) to tell Emacs to load +a different file instead of @file{~/.emacs}. -@vindex init-file-user -When the @file{.emacs} file is read, the variable @code{init-file-user} -says which user's init file it is. The value may be the null string or a -string containing a user's name. If the value is a null string, it means -that the init file was taken from the user that originally logged in. - -In all cases, @code{(concat "~" init-file-user "/")} evaluates to the -directory name of the directory where the @file{.emacs} file was looked -for. +When the @file{.emacs} file is read, the variable @code{user-init-file} +says which init file was loaded. At some sites there is a @dfn{default init file}, which is the library named @file{default.el}, found via the standard search path for @@ -2364,8 +2359,8 @@ The font of this face. The foreground and background colors of this face. @item @code{attributeBackgroundPixmap} (class @code{AttributeBackgroundPixmap}): file-name -The name of an @sc{XBM} file (or @sc{XPM} file, if your version of Emacs -supports @sc{XPM}), to use as a background stipple. +The name of an @sc{xbm} file (or @sc{xpm} file, if your version of Emacs +supports @sc{xpm}), to use as a background stipple. @item @code{attributeUnderline} (class @code{AttributeUnderline}): boolean Whether text in this face should be underlined. diff --git a/man/xemacs/menus.texi b/man/xemacs/menus.texi index 7b735c7..92accd8 100644 --- a/man/xemacs/menus.texi +++ b/man/xemacs/menus.texi @@ -430,18 +430,18 @@ items and disabling or enabling existing menu items. The following functions are available: @table @kbd -@item add-menu: @var{(menu-path menu-name menu-items &optional before)} +@item add-menu: (@var{menu-path} @var{menu-name} @var{menu-items} &optional @var{before}) Add a menu to the menu bar or one of its submenus. -@item add-menu-item: @var{(menu-path item-name function enabled-p -&optional before)} +@item add-menu-item: (@var{menu-path} @var{item-name} @var{function} +@var{enabled-p} &optional @var{before}) Add a menu item to a menu, creating the menu first if necessary. -@item delete-menu-item: @var{(path)} +@item delete-menu-item: (@var{path}) Remove the menu item defined by @var{path} from the menu hierarchy. -@item disable-menu-item: @var{(path)} +@item disable-menu-item: (@var{path}) Disable the specified menu item. -@item enable-menu-item: @var{(path)} +@item enable-menu-item: (@var{path}) Enable the specified previously disabled menu item. -@item relabel-menu-item: @var{(path new-name)} +@item relabel-menu-item: (@var{path} @var{new-name}) Change the string of the menu item specified by @var{path} to @var{new-name}. diff --git a/man/xemacs/packages.texi b/man/xemacs/packages.texi index fd4ac70..b147f9a 100644 --- a/man/xemacs/packages.texi +++ b/man/xemacs/packages.texi @@ -116,6 +116,17 @@ Hint to system administrators of multi-user systems: it might be a good idea to install all packages and not interfere with the wishes of your users. +If you can't find which package provides the feature you require, try +using the @code{package-get-package-provider} function. Eg., if you know +that you need @code{thingatpt}, type: + +@example +M-x package-get-package-provider RET thingatpt +@end example + +which will return something like (fsf-compat "1.06"). You can the use +one of the methods above for installing the package you want. + @subsection XEmacs and Installing Packages Normally, packages are installed over the network, using EFS diff --git a/man/xemacs/programs.texi b/man/xemacs/programs.texi index ff2b41e..ded2af4 100644 --- a/man/xemacs/programs.texi +++ b/man/xemacs/programs.texi @@ -508,7 +508,7 @@ indentation is computed by @kbd{C-M-q}; if the value is a number, until the end of the list. @end table -@node C Indent,, Lisp Indent, Grinding +@node C Indent, , Lisp Indent, Grinding @subsection Customizing C Indentation Two variables control which commands perform C indentation and when. @@ -884,7 +884,7 @@ Move past next close parenthesis and re-indent @findex insert-parentheses @findex move-over-close-and-reindent The commands @kbd{M-(} (@code{insert-parentheses}) and @kbd{M-)} -(@code{move-over-close-@*and-reindent}) are designed to facilitate a style of +(@code{move-over-close-and-reindent}) are designed to facilitate a style of editing which keeps parentheses balanced at all times. @kbd{M-(} inserts a pair of parentheses, either together as in @samp{()}, or, if given an argument, around the next several sexps, and leaves point after the open @@ -1012,7 +1012,7 @@ broken up into files. It lists the names of the component files and the names and positions of the functions (or other named subunits) in each file. Grouping the related files makes it possible to search or replace through all the files with one command. Recording the function names -and positions makes possible the @kbd{M-.} command which finds the +and positions makes possible the @kbd{M-.} command which finds the definition of a function by looking up which of the files it is in. Tags tables are stored in files called @dfn{tags table files}. The @@ -1029,15 +1029,16 @@ global variables, data types, and anything else convenient. Each name recorded is called a @dfn{tag}. @menu -* Tag Syntax:: Tag syntax for various types of code and text files. +* Tag Syntax:: Tag syntax for various types of code and text files. * Create Tags Table:: Creating a tags table with @code{etags}. +* Etags Regexps:: Create arbitrary tags using regular expressions. * Select Tags Table:: How to visit a tags table. -* Find Tag:: Commands to find the definition of a specific tag. +* Find Tag:: Commands to find the definition of a specific tag. * Tags Search:: Using a tags table for searching and replacing. * List Tags:: Listing and finding tags defined in a file. @end menu -@node Tag Syntax +@node Tag Syntax, Create Tags Table, Tags, Tags @subsection Source File Tag Syntax Here is how tag syntax is defined for the most popular languages: @@ -1045,25 +1046,28 @@ recorded is called a @dfn{tag}. @itemize @bullet @item In C code, any C function or typedef is a tag, and so are definitions of -@code{struct}, @code{union} and @code{enum}. @code{#define} macro -definitions and @code{enum} constants are also tags, unless you specify -@samp{--no-defines} when making the tags table. Similarly, global -variables are tags, unless you specify @samp{--no-globals}. Use of -@samp{--no-globals} and @samp{--no-defines} can make the tags table file -much smaller. +@code{struct}, @code{union} and @code{enum}. You can tag function +declarations and external variables in addition to function definitions +by giving the @samp{--declarations} option to @code{etags}. +@code{#define} macro definitions and @code{enum} constants are also +tags, unless you specify @samp{--no-defines} when making the tags table. +Similarly, global variables are tags, unless you specify +@samp{--no-globals}. Use of @samp{--no-globals} and @samp{--no-defines} +can make the tags table file much smaller. @item In C++ code, in addition to all the tag constructs of C code, member functions are also recognized, and optionally member variables if you use the @samp{--members} option. Tags for variables and functions in classes are named @samp{@var{class}::@var{variable}} and -@samp{@var{class}::@var{function}}. +@samp{@var{class}::@var{function}}. @code{operator} functions tags are +named, for example @samp{operator+}. @item In Java code, tags include all the constructs recognized in C++, plus -the @code{extends} and @code{implements} constructs. Tags for variables -and functions in classes are named @samp{@var{class}.@var{variable}} and -@samp{@var{class}.@var{function}}. +the @code{interface}, @code{extends} and @code{implements} constructs. +Tags for variables and functions in classes are named +@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. @item In La@TeX{} text, the argument of any of the commands @code{\chapter}, @@ -1075,7 +1079,7 @@ tag.@refill Other commands can make tags as well, if you specify them in the environment variable @code{TEXTAGS} before invoking @code{etags}. The value of this environment variable should be a colon-separated list of -commands names. For example, +command names. For example, @example TEXTAGS="def:newcommand:newenvironment" @@ -1101,6 +1105,12 @@ set with @code{set!} at top level in the file. Several other languages are also supported: @itemize @bullet + +@item +In Ada code, functions, procedures, packages, tasks, and types are +tags. Use the @samp{--packages-only} option to create tags for packages +only. + @item In assembler code, labels appearing at the beginning of a line, followed by a colon, are tags. @@ -1111,39 +1121,44 @@ it constructs. The portions of the file that contain C code are parsed as C code. @item -In Cobol code, paragraphs names are the tags, i.e. any word starting in -column 8 and followed by a full stop. +In Cobol code, tags are paragraph names; that is, any word starting in +column 8 and followed by a period. @item In Erlang code, the tags are the functions, records, and macros defined in the file. @item -In Fortran code, functions and subroutines are tags. +In Fortran code, functions, subroutines and blockdata are tags. @item In Objective C code, tags include Objective C definitions for classes, -class categories, methods and protocols. +class categories, methods, and protocols. @item In Pascal code, the tags are the functions and procedures defined in the file. @item -In Perl code, the tags are the procedures defined by the @code{sub} -keyword. +In Perl code, the tags are the procedures defined by the @code{sub}, +@code{my} and @code{local} keywords. Use @samp{--globals} if you want +to tag global variables. @item In Postscript code, the tags are the functions. @item In Prolog code, a tag name appears at the left margin. + +@item +In Python code, @code{def} or @code{class} at the beginning of a line +generate a tag. @end itemize - You can also generate tags based on regexp matching (@pxref{Create -Tags Table}) to handle other formats and languages. + You can also generate tags based on regexp matching +(@pxref{Etags Regexps}) to handle other formats and languages. -@node Create Tags Table +@node Create Tags Table, Etags Regexps, Tag Syntax, Tags @subsection Creating Tags Tables @cindex @code{etags} program @@ -1162,10 +1177,18 @@ etags @var{inputfiles}@dots{} @end example @noindent -The @code{etags} program reads the specified files, and writes a tags table -named @file{TAGS} in the current working directory. @code{etags} -recognizes the language used in an input file based on its file name and -contents. You can specify the language with the +The @code{etags} program reads the specified files, and writes a tags +table named @file{TAGS} in the current working directory. You can +intermix compressed and plain text source file names. @code{etags} +knows about the most common compression formats, and does the right +thing. So you can compress all your source files and have @code{etags} +look for compressed versions of its file name arguments, if it does not +find uncompressed versions. Under MS-DOS, @code{etags} also looks for +file names like @samp{mycode.cgz} if it is given @samp{mycode.c} on the +command line and @samp{mycode.c} does not exist. + + @code{etags} recognizes the language used in an input file based on +its file name and contents. You can specify the language with the @samp{--language=@var{name}} option, described below. If the tags table data become outdated due to changes in the files @@ -1202,7 +1225,7 @@ files. the tags file will contain absolute file names. This way, the tags file will still refer to the same files even if you move it, as long as the source files remain in the same place. Absolute file names start with -@samp{/}, or with @samp{@var{device}:/} on MS-DOS and Windows. +@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows. When you want to make a tags table from a great number of files, you may have problems listing them on the command line, because some systems @@ -1210,9 +1233,9 @@ have a limit on its length. The simplest way to circumvent this limit is to tell @code{etags} to read the file names from its standard input, by typing a dash in place of the file names, like this: -@example +@smallexample find . -name "*.[chCH]" -print | etags - -@end example +@end smallexample Use the option @samp{--language=@var{name}} to specify the language explicitly. You can intermix these options with file names; each one @@ -1220,18 +1243,25 @@ applies to the file names that follow it. Specify @samp{--language=auto} to tell @code{etags} to resume guessing the language from the file names and file contents. Specify @samp{--language=none} to turn off language-specific processing -entirely; then @code{etags} recognizes tags by regexp matching alone. -@samp{etags --help} prints the list of the languages @code{etags} knows, -and the file name rules for guessing the language. +entirely; then @code{etags} recognizes tags by regexp matching alone +(@pxref{Etags Regexps}). + + @samp{etags --help} prints the list of the languages @code{etags} +knows, and the file name rules for guessing the language. It also prints +a list of all the available @code{etags} options, together with a short +explanation. + +@node Etags Regexps, Select Tags Table, Create Tags Table, Tags +@subsection Etags Regexps The @samp{--regex} option provides a general way of recognizing tags based on regexp matching. You can freely intermix it with file names. Each @samp{--regex} option adds to the preceding ones, and applies only to the following files. The syntax is: -@example +@smallexample --regex=/@var{tagregexp}[/@var{nameregexp}]/ -@end example +@end smallexample @noindent where @var{tagregexp} is used to match the lines to tag. It is always @@ -1251,18 +1281,25 @@ expression at least @var{m} times and up to @var{n} times. You should not match more characters with @var{tagregexp} than that needed to recognize what you want to tag. If the match is such that -more characters than needed are unavoidably matched by @var{tagregexp}, -you may find useful to add a @var{nameregexp}, in order to narrow the tag -scope. You can find some examples below. +more characters than needed are unavoidably matched by @var{tagregexp} +(as will usually be the case), you should add a @var{nameregexp}, to +pick out just the tag. This will enable Emacs to find tags more +accurately and to do completion on tag names more reliably. You can +find some examples below. + + The option @samp{--ignore-case-regex} (or @samp{-c}) is like +@samp{--regex}, except that the regular expression provided will be +matched without regard to case, which is appropriate for various +programming languages. The @samp{-R} option deletes all the regexps defined with @samp{--regex} options. It applies to the file names following it, as you can see from the following example: -@example +@smallexample etags --regex=/@var{reg1}/ voo.doo --regex=/@var{reg2}/ \ bar.ber -R --lang=lisp los.er -@end example +@end smallexample @noindent Here @code{etags} chooses the parsing language for @file{voo.doo} and @@ -1272,38 +1309,90 @@ Here @code{etags} chooses the parsing language for @file{voo.doo} and @file{bar.ber}. @code{etags} uses the Lisp tags rules, and no regexp matching, to recognize tags in @file{los.er}. - Here are some more examples. The regexps are quoted to protect them -from shell interpretation. + A regular expression can be bound to a given language, by prepending +it with @samp{@{lang@}}. When you do this, @code{etags} will use the +regular expression only for files of that language. @samp{etags --help} +prints the list of languages recognised by @code{etags}. The following +example tags the @code{DEFVAR} macros in the Emacs source files. +@code{etags} applies this regular expression to C files only: + +@smallexample +--regex='@{c@}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/' +@end smallexample @noindent -Tag the @code{DEFVAR} macros in the emacs source files: +This feature is particularly useful when storing a list of regular +expressions in a file. The following option syntax instructs +@code{etags} to read two files of regular expressions. The regular +expressions contained in the second file are matched without regard to +case. -@example ---regex='/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/' -@end example +@smallexample +--regex=@@first-file --ignore-case-regex=@@second-file +@end smallexample @noindent -Tag VHDL files (this example is a single long line, broken here for -formatting reasons): +A regex file contains one regular expressions per line. Empty lines, +and lines beginning with space or tab are ignored. When the first +character in a line is @samp{@@}, @code{etags} assumes that the rest of +the line is the name of a file of regular expressions. This means that +such files can be nested. All the other lines are taken to be regular +expressions. For example, one can create a file called +@samp{emacs.tags} with the following contents (the first line in the +file is a comment): -@example ---language=none ---regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' ---regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\ -\( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/' -@end example +@smallexample + -- This is for GNU Emacs source files +@{c@}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/\1/ +@end smallexample @noindent -Tag TCL files (this last example shows the usage of a @var{nameregexp}): +and then use it like this: -@example ---lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' -@end example +@smallexample +etags --regex=@@emacs.tags *.[ch] */*.[ch] +@end smallexample + + Here are some more examples. The regexps are quoted to protect them +from shell interpretation. + +@itemize @bullet - For a list of the other available @code{etags} options, execute -@code{etags --help}. +@item +Tag Octave files: + +@smallexample +etags --language=none \ + --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \ + --regex='/###key \(.*\)/\1/' \ + --regex='/[ \t]*global[ \t].*/' \ + *.m +@end smallexample + +@noindent +Note that tags are not generated for scripts so that you have to add a +line by yourself of the form `###key ' if you want to jump +to it. + +@item +Tag Tcl files: + +@smallexample +etags --language=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' *.tcl +@end smallexample + +@item +Tag VHDL files: + +@smallexample +--language=none \ +--regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' \ +--regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\ +\( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/' +@end smallexample +@end itemize -@node Select Tags Table, Find Tag, Create Tags Table, Tags +@node Select Tags Table, Find Tag, Etags Regexps, Tags @subsection Selecting a Tags Table @vindex tag-table-alist @@ -1555,7 +1644,7 @@ file in the tags table and prepare to advance sequentially by files. Visit the next file in the selected tags table. @end table -@node List Tags,, Tags Search, Tags +@node List Tags, , Tags Search, Tags @subsection Tags Table Inquiries @table @kbd @@ -1740,7 +1829,7 @@ indent some lines unaesthetically. However, a correct Fortran program will retain its meaning when reindented even if the conventions are not followed. -@node ForIndent Vars,, ForIndent Conv, Fortran Indent +@node ForIndent Vars, , ForIndent Conv, Fortran Indent @subsubsection Variables for Fortran Indentation @vindex fortran-do-indent @@ -1897,7 +1986,7 @@ command which splits the current window horizontally, resulting in a window 72 columns wide. When you edit in this window, you can immediately see when a line gets too wide to be correct Fortran. -@node Fortran Abbrev,, Fortran Columns, Fortran +@node Fortran Abbrev, , Fortran Columns, Fortran @subsection Fortran Keyword Abbrevs Fortran mode provides many built-in abbrevs for common keywords and @@ -1917,7 +2006,7 @@ automatically to @samp{continue}, provided Abbrev mode is enabled.@refill Type @samp{;?} or @samp{;C-h} to display a list of all built-in Fortran abbrevs and what they stand for. -@node Asm Mode,, Fortran, Programs +@node Asm Mode, , Fortran, Programs @section Asm Mode @cindex Asm mode diff --git a/man/xemacs/startup.texi b/man/xemacs/startup.texi index 35cba95..263feb5 100644 --- a/man/xemacs/startup.texi +++ b/man/xemacs/startup.texi @@ -89,7 +89,7 @@ they are locate the early, late, and last package hierarchies respectively. If two components are present, they locate the early and late hierarchies. If only one component is present, it locates the late hierarchy. At run time, the package path may also be specified via the -@code{PACKAGEPATH} environment variable. +@code{EMACSPACKAGEPATH} environment variable. An XEmacs package is laid out just like a normal installed XEmacs lisp directory. It may have @file{lisp}, @file{etc}, @file{info}, and diff --git a/man/xemacs/xemacs.texi b/man/xemacs/xemacs.texi index 2dbdb54..0ad18f7 100644 --- a/man/xemacs/xemacs.texi +++ b/man/xemacs/xemacs.texi @@ -1,5 +1,4 @@ - -\input ../texinfo @c -*-texinfo-*- +\input texinfo @c -*-texinfo-*- @setfilename ../../info/xemacs.info @comment node-name, next, previous, up diff --git a/modules/base64/Makefile b/modules/base64/Makefile index 43a70e3..4063805 100644 --- a/modules/base64/Makefile +++ b/modules/base64/Makefile @@ -25,6 +25,8 @@ MODTITLE="Encode objects in Base 64" all: $(MODNAME).ell +distclean: clean + clean: rm -f $(MODNAME).ell $(OBJS) base64_i.o base64_i.c diff --git a/modules/ldap/Makefile b/modules/ldap/Makefile index e0f1976..6e775ec 100644 --- a/modules/ldap/Makefile +++ b/modules/ldap/Makefile @@ -25,6 +25,8 @@ MODTITLE="LDAP Client Interface for XEmacs" all: $(MODNAME).ell +distclean: clean + clean: rm -f $(MODNAME).ell $(OBJS) eldap_i.o eldap_i.c diff --git a/modules/sample/Makefile b/modules/sample/Makefile index 09390d1..1e0849c 100644 --- a/modules/sample/Makefile +++ b/modules/sample/Makefile @@ -25,6 +25,8 @@ MODTITLE="Sample loadable module" all: $(MODNAME).ell +distclean: clean + clean: rm -f $(MODNAME).ell $(OBJS) sample_i.o sample_i.c diff --git a/modules/zlib/Makefile b/modules/zlib/Makefile index cb7aecd..45076e3 100644 --- a/modules/zlib/Makefile +++ b/modules/zlib/Makefile @@ -25,6 +25,8 @@ MODTITLE="ZLIB compression library interface" all: $(MODNAME).ell +distclean: clean + clean: rm -f $(MODNAME).ell $(OBJS) zlib_i.o zlib_i.c diff --git a/nt/ChangeLog b/nt/ChangeLog index 9d66963..3f537e4 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,70 @@ +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-11-28 Adrian Aichner + + * xemacs.mak (depend): Only update `depend' if there were changes. + Use "perl ./make-src-depend" instead of "mkdepend". + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-11-27 Adrian Aichner + + * xemacs.mak (SRCDIR): Make path to xemacs absolute to + facilitate building info in man subdirs. Echo all cd commands, + not just some of them. + + (makeinfo-test): Test for availability of `texinfo' package to + build info. Recommend use of external `makeinfo' program for + building info docs faster. + + (info): cd into man subdirs to support use of external `makeinfo' + program. + +1999-11-17 Martin Buchholz + + * xemacs.mak: Remove references to index.unperm, index.perm. + Fix dependencies. + Shouldn't .obj and .info be in SUFFIXES? + Remove extra `\'. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-10-07 Norbert Koch + + * xemacs.mak: Ignore return code of 'del' calls. Use a make + variable for 'del'. + +1999-09-26 Adrian Aichner + + * xemacs.mak (all): Update $(LISP)/auto-autoloads.elc? and + $(LISP)/custom-load.el using XEmacs itself, like xemacs-packages + do. + ($(LISP)\auto-autoloads.el): Add new rule. + ($(LISP)\custom-load.el): Ditto. + +1999-08-04 Andy Piper + + * xemacs.mak (HAVE_WIDGETS): add define to appropriate places. + +1999-07-26 Adrian Aichner + + * xemacs.mak ($(MANDIR)\lispref\lispref.texi): Replace bad + dependency. + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 31733b5..9090b73 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -30,6 +30,9 @@ MODULES=$(XEMACS)\modules NT=$(XEMACS)\nt OUTDIR=$(NT)\obj +# Define a variable for the 'del' command to use +DEL=-del + # Program name and version !include "..\version.sh" @@ -117,6 +120,9 @@ HAVE_MSW_C_DIRED=1 !if !defined(HAVE_NATIVE_SOUND) HAVE_NATIVE_SOUND=1 !endif +!if !defined(HAVE_WIDGETS) +HAVE_WIDGETS=1 +!endif !if !defined(DEBUG_XEMACS) DEBUG_XEMACS=0 !endif @@ -311,6 +317,9 @@ MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS MSW_DIALOG_SRC=$(XEMACS)\src\dialog.c $(XEMACS)\src\dialog-msw.c MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj !endif +!if $(HAVE_WIDGETS) +MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS +!endif !if $(HAVE_NATIVE_SOUND) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND !endif @@ -408,17 +417,17 @@ CONFIG_VALUES = $(LIB_SRC)\config.values # Inferred rule {$(LIB_SRC)}.c{$(LIB_SRC)}.exe : - @cd $(LIB_SRC) + cd $(LIB_SRC) $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no - @cd $(NT) + cd $(NT) # Individual dependencies ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(LIB_SRC)/../src/regex.c $(LIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS) $(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS) - @cd $(LIB_SRC) + cd $(LIB_SRC) $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no - @cd $(NT) + cd $(NT) LIB_SRC_TOOLS = \ $(LIB_SRC)/make-docfile.exe \ @@ -852,7 +861,7 @@ TEMACS_OBJS= \ # Rules .SUFFIXES: -.SUFFIXES: .c .texi +.SUFFIXES: .c .obj .texi .info # nmake rule !if $(DEBUG_XEMACS) @@ -881,7 +890,7 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) !if $(DEBUG_XEMACS) @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp - @del bscmake.tmp + @$(DEL) bscmake.tmp !endif link.exe @<< $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS) @@ -892,7 +901,7 @@ $(OUTDIR)\xemacs.res: xemacs.rc # Section handling automated tests starts here -SRCDIR=..\src +SRCDIR=$(MAKEDIR)\..\src PROGNAME=$(SRCDIR)\xemacs.exe blddir=$(MAKEDIR:\=\\)\\.. temacs_loadup=$(TEMACS) -batch -l $(SRCDIR)/../lisp/loadup.el @@ -917,7 +926,10 @@ check-temacs: # Section handling automated tests ends here # Section handling info starts here -MAKEINFO=$(PROGNAME) -no-site-file -no-init-file -batch -l texinfmt -f batch-texinfo-format + +!if !defined(MAKEINFO) +MAKEINFO=$(PROGNAME) -vanilla -batch -l texinfmt -f batch-texinfo-format +!endif MANDIR = $(XEMACS)\man INFODIR = $(XEMACS)\info @@ -939,12 +951,10 @@ INFO_FILES= \ $(INFODIR)\internals.info {$(MANDIR)}.texi{$(INFODIR)}.info: + cd $(MANDIR) $(MAKEINFO) $** -$(INFODIR)\xemacs.info: $(MANDIR)\xemacs\xemacs.texi - $(MAKEINFO) $** - -$(MANDIR)\xemacs\xemacs.texi: \ +XEMACS_SRCS = \ $(MANDIR)\xemacs\abbrevs.texi \ $(MANDIR)\xemacs\basic.texi \ $(MANDIR)\xemacs\buffers.texi \ @@ -956,13 +966,13 @@ $(MANDIR)\xemacs\xemacs.texi: \ $(MANDIR)\xemacs\entering.texi \ $(MANDIR)\xemacs\files.texi \ $(MANDIR)\xemacs\fixit.texi \ + $(MANDIR)\xemacs\frame.texi \ $(MANDIR)\xemacs\glossary.texi \ $(MANDIR)\xemacs\gnu.texi \ $(MANDIR)\xemacs\help.texi \ $(MANDIR)\xemacs\indent.texi \ $(MANDIR)\xemacs\keystrokes.texi \ $(MANDIR)\xemacs\killing.texi \ - $(MANDIR)\xemacs\\xemacs.texi \ $(MANDIR)\xemacs\m-x.texi \ $(MANDIR)\xemacs\major.texi \ $(MANDIR)\xemacs\mark.texi \ @@ -970,25 +980,23 @@ $(MANDIR)\xemacs\xemacs.texi: \ $(MANDIR)\xemacs\mini.texi \ $(MANDIR)\xemacs\misc.texi \ $(MANDIR)\xemacs\mouse.texi \ + $(MANDIR)\xemacs\mule.texi \ $(MANDIR)\xemacs\new.texi \ + $(MANDIR)\xemacs\packages.texi \ $(MANDIR)\xemacs\picture.texi \ $(MANDIR)\xemacs\programs.texi \ $(MANDIR)\xemacs\reading.texi \ $(MANDIR)\xemacs\regs.texi \ - $(MANDIR)\xemacs\frame.texi \ $(MANDIR)\xemacs\search.texi \ $(MANDIR)\xemacs\sending.texi \ + $(MANDIR)\xemacs\startup.texi \ $(MANDIR)\xemacs\text.texi \ $(MANDIR)\xemacs\trouble.texi \ $(MANDIR)\xemacs\undo.texi \ $(MANDIR)\xemacs\windows.texi \ + $(MANDIR)\xemacs\xemacs.texi - -$(INFODIR)\lispref.info: $(MANDIR)\lispref\lispref.texi - copy $(MANDIR)\lispref\index.perm $(MANDIR)\lispref\index.texi - $(MAKEINFO) $** - -$(MANDIR)\lispref\lispref.texi: \ +LISPREF_SRCS = \ $(MANDIR)\lispref\abbrevs.texi \ $(MANDIR)\lispref\annotations.texi \ $(MANDIR)\lispref\back.texi \ @@ -999,10 +1007,12 @@ $(MANDIR)\lispref\lispref.texi: \ $(MANDIR)\lispref\compile.texi \ $(MANDIR)\lispref\consoles-devices.texi \ $(MANDIR)\lispref\control.texi \ + $(MANDIR)\lispref\customize.texi \ $(MANDIR)\lispref\databases.texi \ $(MANDIR)\lispref\debugging.texi \ $(MANDIR)\lispref\dialog.texi \ $(MANDIR)\lispref\display.texi \ + $(MANDIR)\lispref\dragndrop.texi \ $(MANDIR)\lispref\edebug-inc.texi \ $(MANDIR)\lispref\edebug.texi \ $(MANDIR)\lispref\errors.texi \ @@ -1021,6 +1031,7 @@ $(MANDIR)\lispref\lispref.texi: \ $(MANDIR)\lispref\intro.texi \ $(MANDIR)\lispref\keymaps.texi \ $(MANDIR)\lispref\ldap.texi \ + $(MANDIR)\lispref\lispref.texi \ $(MANDIR)\lispref\lists.texi \ $(MANDIR)\lispref\loading.texi \ $(MANDIR)\lispref\locals.texi \ @@ -1052,37 +1063,62 @@ $(MANDIR)\lispref\lispref.texi: \ $(MANDIR)\lispref\tooltalk.texi \ $(MANDIR)\lispref\variables.texi \ $(MANDIR)\lispref\windows.texi \ - $(MANDIR)\lispref\x-windows.texi \ - $(MANDIR)\lispref\index.unperm \ - $(MANDIR)\lispref\index.perm \ + $(MANDIR)\lispref\x-windows.texi +INTERNALS_SRCS = \ + $(MANDIR)\internals\internals.texi \ + $(MANDIR)\internals\index.texi -$(INFODIR)\new-users-guide.info: $(MANDIR)\new-users-guide\new-users-guide.texi - $(MAKEINFO) $** - -$(MANDIR)\new-users-guide\new-users-guide.texi: \ +NEW_USERS_GUIDE_SRCS = \ $(MANDIR)\new-users-guide\custom1.texi \ - $(MANDIR)\new-users-guide\files.texi \ - $(MANDIR)\new-users-guide\region.texi \ $(MANDIR)\new-users-guide\custom2.texi \ - $(MANDIR)\new-users-guide\help.texi \ - $(MANDIR)\new-users-guide\search.texi \ $(MANDIR)\new-users-guide\edit.texi \ - $(MANDIR)\new-users-guide\modes.texi \ - $(MANDIR)\new-users-guide\xmenu.texi \ $(MANDIR)\new-users-guide\enter.texi \ - - -$(INFODIR)\internals.info: $(MANDIR)\internals\internals.texi - copy $(MANDIR)\internals\index.perm $(MANDIR)\internals\index.texi - $(MAKEINFO) $** - -$(MANDIR)\internals\internals.texi: \ - $(MANDIR)\internals\index.unperm \ - $(MANDIR)\internals\index.perm \ - - -info: $(INFO_FILES) + $(MANDIR)\new-users-guide\files.texi \ + $(MANDIR)\new-users-guide\help.texi \ + $(MANDIR)\new-users-guide\modes.texi \ + $(MANDIR)\new-users-guide\new-users-guide.texi \ + $(MANDIR)\new-users-guide\region.texi \ + $(MANDIR)\new-users-guide\search.texi \ + $(MANDIR)\new-users-guide\xmenu.texi + +$(INFODIR)\xemacs.info: $(XEMACS_SRCS) + cd $(MANDIR)\xemacs + $(MAKEINFO) xemacs.texi + cd .. + + +$(INFODIR)\lispref.info: $(LISPREF_SRCS) + cd $(MANDIR)\lispref + $(MAKEINFO) lispref.texi + cd .. + +$(INFODIR)\internals.info: $(INTERNALS_SRCS) + cd $(MANDIR)\internals + $(MAKEINFO) internals.texi + cd .. + +$(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS) + cd $(MANDIR)\new-users-guide + $(MAKEINFO) new-users-guide.texi + cd .. + +info: makeinfo-test $(INFO_FILES) + +makeinfo-test: + @< PlaceHolder @xcopy /q PROBLEMS "$(INSTALL_DIR)\" @xcopy /q PlaceHolder "$(INSTALL_DIR)\lock\" - @del "$(INSTALL_DIR)\lock\PlaceHolder" + @$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder" @xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @@ -1145,53 +1183,55 @@ install: all @xcopy /e /q $(XEMACS)\lisp "$(INSTALL_DIR)\lisp\" @echo Making skeleton package tree in $(PACKAGE_PREFIX) ... @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\site-packages\" - @del "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" + @$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\" - @del "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" + @$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\" - @del "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" - @del PlaceHolder + @$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" + @$(DEL) PlaceHolder distclean: - del *.bak - del *.orig - del *.rej - del *.tmp - del $(XEMACS)\Installation + $(DEL) *.bak + $(DEL) *.orig + $(DEL) *.rej + $(DEL) *.tmp + $(DEL) $(XEMACS)\Installation cd $(OUTDIR) - del *.lib - del *.obj - del *.pdb - del *.res - del *.sbr + $(DEL) *.lib + $(DEL) *.obj + $(DEL) *.pdb + $(DEL) *.res + $(DEL) *.sbr cd $(XEMACS)\$(TEMACS_DIR) - del config.h - del paths.h - del Emacs.ad.h - del *.bak - del *.orig - del *.rej - del *.exe - del *.map - del *.bsc - del *.pdb + $(DEL) config.h + $(DEL) paths.h + $(DEL) Emacs.ad.h + $(DEL) *.bak + $(DEL) *.orig + $(DEL) *.rej + $(DEL) *.exe + $(DEL) *.map + $(DEL) *.bsc + $(DEL) *.pdb cd $(LIB_SRC) - del DOC - del *.bak - del *.orig - del *.rej - del *.exe - del *.obj - del *.pdb - del *.res - del $(CONFIG_VALUES) + $(DEL) DOC + $(DEL) *.bak + $(DEL) *.orig + $(DEL) *.rej + $(DEL) *.exe + $(DEL) *.obj + $(DEL) *.pdb + $(DEL) *.res + $(DEL) $(CONFIG_VALUES) cd $(LISP) - -del /s /q *.bak *.elc *.orig *.rej + $(DEL) /s /q *.bak *.elc *.orig *.rej cd $(INFODIR) - del *.info* $(MANDIR)\internals\index.texi $(MANDIR)\lispref\index.texi + $(DEL) *.info* depend: - mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) -- $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c $(LIB_SRC)\run.c + cd $(SRCDIR) + perl ./make-src-depend > depend.tmp + perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')" $(XEMACS)\Installation: @type > $(XEMACS)\Installation << @@ -1257,6 +1297,9 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_ !if $(HAVE_DIALOGS) Compiling in support for dialogs. !endif +!if $(HAVE_WIDGETS) + Compiling in support for widgets. +!endif !if $(HAVE_NATIVE_SOUND) Compiling in support for native sounds. !endif @@ -1286,5 +1329,21 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_ @type $(XEMACS)\Installation @echo -------------------------------------------------------------------- +# Update auto-autoloads.el and custom-load.el similar to what +# XEmacs.rules does for xemacs-packages. +VANILLA=-vanilla +FORCE: +$(LISP)\auto-autoloads.el: FORCE + @$(DEL) $(LISP)\auto-autoloads.el + $(PROGNAME) $(VANILLA) -batch \ + -l autoload -f batch-update-directory $(LISP) + $(PROGNAME) $(VANILLA) -batch \ + -f batch-byte-compile $@ + @$(DEL) $(LISP)\auto-autoloads.el~ + +$(LISP)\custom-load.el: FORCE + $(PROGNAME) $(VANILLA) -batch -l cus-dep \ + -f Custom-make-dependencies $(LISP) + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/src/.cvsignore b/src/.cvsignore index 17d59ef..afa30ff 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -10,3 +10,4 @@ temacs xemacs SATISFIED update-elc.stamp +*.so.* \ No newline at end of file diff --git a/src/ChangeLog b/src/ChangeLog index 1541367..5bf1d3c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,24 @@ +2000-01-11 MORIOKA Tomohiko + + * mule-charset.c (split_builtin_char): Don't support OBS_94x94. + + * char-ucs.h (MIN_CHAR_OBS_94x94): Deleted. + (MAX_CHAR_OBS_94x94): Deleted. + +2000-01-11 MORIOKA Tomohiko + + * mule-charset.c (split_builtin_char): Use `MAX_CHAR_BMP'. + + * char-ucs.h (MAX_CHAR_BMP): New macro. + +2000-01-10 MORIOKA Tomohiko + + * text-coding.c: Sync with r21-2-24. + +2000-01-08 MORIOKA Tomohiko + + * file-coding.c: Modify for UTF-2000. + 2000-01-18 MORIOKA Tomohiko * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' @@ -1338,324 +1359,2637 @@ (map_over_other_charset): Likewise. (map_char_table): Likewise. - * buffer.h (find_charsets_in_bufbyte_string): Use `Charset_ID' - instead of `unsigned char'. + * buffer.h (find_charsets_in_bufbyte_string): Use `Charset_ID' + instead of `unsigned char'. + +1999-08-31 MORIOKA Tomohiko + + * character.h (PRE_LEADING_BYTE_PRIVATE_1): Deleted. + (PRE_LEADING_BYTE_PRIVATE_2): Deleted. + + * mule-charset.c (leading_code_private_11): Don't define in + UTF-2000. + + * mule-ccl.c (ccl_driver): Don't define `CCL_ReadMultibyteChar2' + in UTF-2000 because it is not ported yet and not to use + `PRE_LEADING_BYTE_PRIVATE_1' and `PRE_LEADING_BYTE_PRIVATE_2'. + +1999-08-30 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_COMPOSITE): Deleted. + +1999-08-29 MORIOKA Tomohiko + + * regex.c (re_compile_fastmap): Don't use `LEADING_BYTE_PREFIX_P' + in UTF-2000. + + * chartab.h (CHAR_TABLE_NON_ASCII_VALUE_UNSAFE): Use int instead + of unsigned char to store leading-byte. + + * chartab.c (get_non_ascii_char_table_value): Don't use + `BREAKUP_CHAR_1_UNSAFE' in UTF-2000. + + * file-coding.c (encode_coding_big5): Delete bogus implementation + in UTF2000. + + * character.h (LEADING_BYTE_*): Delete definition for + non-UTF-2000. + (LEADING_BYTE_PRIVATE_P): Deleted unconditionally. + (LEADING_BYTE_PREFIX_P): Deleted. + (PRIVATE_LEADING_BYTE_PREFIX): Deleted. + (BUFBYTE_FIRST_BYTE_P): Delete definition for non-UTF-2000. + (BUFBYTE_LEADING_BYTE_P): Deleted. + (CHARSET_PRIVATE_P): Deleted unconditionally. + (rep_bytes_by_first_byte): Deleted unconditionally. + (REP_BYTES_BY_FIRST_BYTE): Delete definition for non-UTF-2000. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Likewise. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Likewise. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Likewise. + (CHAR_FIELD2): Deleted. + (CHAR_FIELD3): Deleted. + (MAKE_CHAR): Delete definition for non-UTF-2000. + (BREAKUP_CHAR_1_UNSAFE): Deleted. + (breakup_char_1): New implementation. + (CHAR_CHARSET): Use `BREAKUP_CHAR'. + (CHAR_LEADING_BYTE): Use `CHAR_CHARSET'. + +1999-08-29 MORIOKA Tomohiko + + * character.h (REP_BYTES_BY_FIRST_BYTE): Change order of + condition. + +1999-08-28 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_PRIVATE_P): Don't define in UTF2000. + (CHARSET_PRIVATE_P): Likewise. + (XCHARSET_PRIVATE_P): Likewise. + (MAKE_CHAR): Don't use XCHARSET_PRIVATE_P in UTF2000. + + * file-coding.c (encode_coding_ucs4): Delete bogus implement in + UTF2000. + (decode_coding_iso2022): Don't use XCHARSET_PRIVATE_P in UTF2000. + +1999-08-28 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_*): Changed in UTF2000. + (NUM_LEADING_BYTES): Changed from 128 to 256. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Change value to 0x80 in + UTF2000. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. + + * mule-charset.c (Vcharset_chinese_cns11643_3): New variable in + UTF2000. + (Vcharset_chinese_cns11643_4): New variable in UTF2000. + (Vcharset_chinese_cns11643_5): New variable in UTF2000. + (Vcharset_chinese_cns11643_6): New variable in UTF2000. + (Vcharset_chinese_cns11643_7): New variable in UTF2000. + (Qchinese_cns11643_3): New variable in UTF2000. + (Qchinese_cns11643_4): New variable in UTF2000. + (Qchinese_cns11643_5): New variable in UTF2000. + (Qchinese_cns11643_6): New variable in UTF2000. + (Qchinese_cns11643_7): New variable in UTF2000. + (syms_of_mule_charset): Define `chinese-cns11643-3', + `chinese-cns11643-4', `chinese-cns11643-5', `chinese-cns11643-6' + and `chinese-cns11643-7' in UTF2000. + (vars_of_mule_charset): Initialize + next_allocated_2_byte_leading_byte by LEADING_BYTE_CHINESE_BIG5_2 + + 1 in UTF2000. + (complex_vars_of_mule_charset): Setup charset + `chinese-cns11643-3', `chinese-cns11643-4', `chinese-cns11643-5', + `chinese-cns11643-6' and `chinese-cns11643-7' in UTF2000. + +1999-08-27 MORIOKA Tomohiko + + * mule-charset.c: Move setting for `leading-code-private-11' from + `syms_of_mule_charset' to `vars_of_mule_charset'. + +1999-08-27 MORIOKA Tomohiko + + * mule-charset.h (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' + and `NUM_LEADING_BYTES' in assert. + +1999-08-27 MORIOKA Tomohiko + + * character.h (charset_by_leading_byte): Use `NUM_LEADING_BYTES' + instead of 128. + (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' and + `NUM_LEADING_BYTES' instead of 128. + +1999-08-26 MORIOKA Tomohiko + + * mule-charset.h (charset_by_leading_byte): Use + `NUM_LEADING_BYTES' instead of 128. + (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' instead of 128. + + * mule-charset.c (charset_by_leading_byte): Use + `NUM_LEADING_BYTES' instead of 128. + (make_charset): Use `MIN_LEADING_BYTE' instead of 128. + + * faces.h (FACE_CACHEL_FONT): Use `MIN_LEADING_BYTE' instead of + 128. + +1999-08-25 MORIOKA Tomohiko + + * mule-charset.c (syms_of_mule_charset): Update to + 0.4 (Shin-Imamiya). + +1999-07-13 Daiki Ueno + + * file-coding.c (encode_coding_sjis): New implementation for + UTF2000. (decode_coding_sjis): Ditto. + +1999-06-17 MORIOKA Tomohiko + + * mule-charset.c, character.h (Bytecount rep_bytes_by_first_byte): + Don't define in UTF2000. + + * character.h: Include mule-charset.h if CHAR_IS_UCS4 is not + defined. + + * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, + mule-ccl.c, lstream.h, buffer.h: Include character.h in every + MULE. + +1999-06-17 MORIOKA Tomohiko + + * config.h.in (CHAR_IS_UCS4): New macro. + + * mule-charset.c (rep_bytes_by_first_byte): Modify for + conventional MULE representation. + (syms_of_mule_charset): Update to 0.3 (Imamiya). + + * mule-charset.h: Reverted to original. + + * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, + mule-ccl.c, lstream.h, buffer.h: Use "character.h" instead of + "mule-charset.h" if CHAR_IS_UCS4 is defined. + + * character.h: New file. + + * file-coding.c (Fmake_coding_system): Set 1 to + `codesys->fixed.size' if TYPE is `no-conversion' and UTF2000 is + defined. + (encode_coding_no_conversion): New implementation for UTF2000. + + * file-coding.h (struct Lisp_Coding_System): Add new member + `fixed.size'. + +1999-06-16 MORIOKA Tomohiko + + * file-coding.c (decode_coding_iso2022): Code-point arguments of + `MAKE_CHAR' must be smaller than 0x80 in UTF2000. + (encode_coding_iso2022): New implementation for UTF2000. + +1999-06-15 MORIOKA Tomohiko + + * mule-canna.c (c2mu): New implementation for UTF2000. + (m2c): Likewise. + +1999-06-15 MORIOKA Tomohiko + + * file-coding.c (encode_coding_no_conversion): Modify for UTF2000. + +1999-06-15 MORIOKA Tomohiko + + * file-coding.c (reset_encoding_stream): Set 0 to + `str->iso2022.current_char_boundary' in UTF2000. + (encode_utf8): Don't define in UTF2000. + (encode_coding_utf8): New implementation for UTF-8 representation + of UTF2000. + (complex_vars_of_file_coding): Define coding-system `utf-8'. + +1999-06-15 MORIOKA Tomohiko + + * mule.c (vars_of_mule): Provide `utf-2000' in UTF2000. + + * mule-charset.h (BUFBYTE_FIRST_BYTE_P): Modify for UTF-8 in + UTF2000. + (REP_BYTES_BY_FIRST_BYTE): Likewise. + + * buffer.h (non_ascii_valid_char_p): Don't define in UTF2000. + + * mule-charset.c (non_ascii_set_charptr_emchar): Don't define + local variables `lb', `c1', `c2' and `charset' in UTF2000; encode + as UTF-8 in UTF2000. + (non_ascii_charptr_emchar): Decode as UTF-8 in UTF2000. + (non_ascii_valid_char_p): Don't define in UTF2000. + (non_ascii_charptr_copy_char): Add case 5 and 6 in UTF2000. + (Lstream_get_emchar_1): Likewise. + (utf-2000-version): New variable in UTF2000. + + * lread.c (read_escape): Add new reader `u'. + + * insdel.c (three_to_one_table): Don't define in UTF2000. + (bufpos_to_bytind_func): Use `buf->text->mule_size' instead of + `buf->text->mule_shifter' and `buf->text->mule_three_p' in + UTF2000. + (bytind_to_bufpos_func): Likewise. + (buffer_mule_signal_inserted_region): Likewise. + (vars_of_insdel): Don't initialize `three_to_one_table'. + (init_buffer_text): Use `buf->text->mule_size' instead of + `buf->text->mule_shifter' and `buf->text->mule_three_p' in + UTF2000. + + * file-coding.c (DECODE_ADD_BINARY_CHAR): New implementation for + UTF-8 representation in UTF2000. + (DECODE_ADD_UCS_CHAR): New macro in UTF2000. + (decode_ucs4): Use `DECODE_ADD_UCS_CHAR' in UTF2000. + (decode_coding_iso2022): Don't define local variable `lb' in + UTF2000; don't use LEADING_BYTE in UTF2000; use + `DECODE_ADD_UCS_CHAR' in UTF2000. + (convert_to_external_format): Decode as UTF-8 in UTF2000. + + * config.h.in (UTF2000): New macro. + + * buffer.h (struct buffer_text): Add new member `mule_size' and + don't add `mule_shifter' and `mule_three_p' in UTF2000. + (valid_char_p): Return always 1 in UTF2000. + (MAX_EMCHAR_LEN): 6 in UTF2000. + (three_to_one_table): Don't define in UTF2000. + (real_bufpos_to_bytind): Modify for UTF-8 representation in + UTF2000. + (real_bytind_to_bufpos): Likewise. + + * alloc.c (Fmake_string): Add case 5 and 6 for UTF2000. + +1999-06-10 MORIOKA Tomohiko + + * mule-charset.c (rep_bytes_by_first_byte): Modified for character + representation change. + (Vutf_2000_version): New variable. + (leading_code_private_11): New variable. + (syms_of_mule_charset): Add new variables `utf-2000-version' and + `leading-code-private-11'. + + * mule-charset.h (LEADING_BYTE_CHINESE_CCITT_GB): New macro. + (LEADING_BYTE_CHINESE_BIG5_1): Changed to 0x96 temporally. + (LEADING_BYTE_CHINESE_CNS11643_1): Changed to 0x97. + (LEADING_BYTE_CHINESE_CNS11643_2): Changed to 0x98. + (LEADING_BYTE_CHINESE_CNS11643_3): New macro. + (LEADING_BYTE_CHINESE_CNS11643_4): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_5): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_6): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_7): Likewise [but not used]. + (LEADING_BYTE_CHINESE_BIG5_2): Changed to 0x9D temporally. + (LEADING_BYTE_KOREAN_KPS9566): New macro [but not used]. + (CHAR_FIELD1_MASK): Changed to (0x7F << 14). + (MIN_CHAR_GREEK): New macro. + (MAX_CHAR_GREEK): New macro. + (MIN_CHAR_CYRILLIC): New macro. + (MAX_CHAR_CYRILLIC): New macro. + (MIN_CHAR_HEBREW): New macro. + (MAX_CHAR_HEBREW): New macro. + (MIN_CHAR_THAI): New macro. + (MAX_CHAR_THAI): New macro. + (MIN_CHAR_HALFWIDTH_KATAKANA): New macro. + (MAX_CHAR_HALFWIDTH_KATAKANA): New macro. + (CHAR_FIELD2_INTERNAL): New macro [renamed from `CHAR_FIELD2'. + (CHAR_FIELD3_INTERNAL): New macro [renamed from `CHAR_FIELD3'. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Changed to 0xc0. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Changed to 0x50. + (CHAR_FIELD2): New inline function. + (CHAR_FIELD3): New inline function. + (MULE_CHAR_PRIVATE_OFFSET): New macro. + (MIN_CHAR_OFFICIAL_TYPE9N): Shifted to `MULE_CHAR_PRIVATE_OFFSET'. + (MIN_CHAR_PRIVATE_TYPE9N): Likewise. + (MIN_CHAR_PRIVATE_TYPE9NX9N): Likewise. + (MIN_CHAR_OFFICIAL_TYPE9NX9N): Likewise. + (MIN_CHAR_COMPOSITION): Likewise. + (CHAR_LEADING_BYTE): Modified for character representation change. + (MAKE_CHAR): Likewise. + + * lisp.h (Vcharset_latin_iso8859_1): New variable. + (Vcharset_greek_iso8859_7): Likewise. + (Vcharset_cyrillic_iso8859_5): Likewise. + (Vcharset_hebrew_iso8859_8): Likewise. + (Vcharset_thai_tis620): Likewise. + (Vcharset_katakana_jisx0201): Likewise. + +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-13 Martin Buchholz + + * sound.c (vars_of_sound): Provide esd-sound if HAVE_ESD_SOUND + + * nas.c: Fix compiler warnings. Ansify. C++ compilation support. + +1999-12-13 Kazuyuki IENAGA + + * input-method-xlib.c: Make sure src/ does not use Athena, except + indirectly through lwlib. + +1999-12-13 Gunnar Evermann + + * dbxrc (pobj): Add opaque_ptr, remove opaque_list. + +1999-12-10 Shenghuo ZHU + + * file-coding.c (add_coding_system_to_list_mapper): + - (coding-system-list) should list aliases correctly. + +1999-12-07 Andy Piper + + * fileio.c (vars_of_fileio): directory separator fix from Mike Alexander. + * windowsnt.h (ditto): + +1999-11-27 Adrian Aichner + + * sysfile.h: Encapsulate `fstat' for Windows NT just like stat to + get consistent file modification times. + + * sysdep.h: Declare `wait_for_termination' to use process handle, + not PID, on Windows NT native. + + * sysdep.c (wait_for_termination): Use process handle, not PID, on + Windows NT native. Set exit code correctly on Windows NT. + (sys_subshell): Use process handle, not PID, + on Windows NT native. + (sys_fstat): Add ENCAPSULATE_FSTAT for Windows NT. + + * process-nt.c (nt_create_process): Remove negative pid hack for + Windows 95. + (nt_send_process): Declare vol_proc volatile. + (get_internet_address): warn_when_safe if IP address cannot be + found. + (nt_open_network_stream): warn_when_safe if network stream fails + to open. + + * ntproc.c (create_child): Remove negative pid hack for Windows + 95. Remove incorrect and unnecessary USE_UNION_TYPE handling. + + * nt.c (fstat): Encapsulate for Windows NT just like stat to get + consistent file modification times. + + * callproc.c (call_process_cleanup): Use process handle, not PID, + on Windows NT native. + (Fcall_process_internal): Ditto. Close fd_error in parent. Don't + check for negative pid on Windows NT/9[58]. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-12-06 Martin Buchholz + + * events.c (Fcopy_event): Don't copy the lrecord_header. + + * lisp.h (DO_REALLOC): + Optimize. + Remove redundant parens. + Remove generic hygienic macro comment. + + * lrecord.h (set_lheader_implementation): Remove redundant parens. + +1999-12-05 Martin Buchholz + + * lstream.c (Lstream_adding): + - Never compare a size_t and a possibly negative number. + - Optimize. + +1999-12-05 Kyle Jones + + * lisp/itimer.el: (require 'lisp-float-type). Use + floats directly in itimer-time-difference. + +1999-12-05 Andy Piper + + * redisplay-output.c (redisplay_output_layout): avoid name hiding. + + * gui.h: declare gui_add_item_keywords_to_plist. + + * window.c (Fdelete_window): mark subwindows as changed so that + they can be GC'd if necessary. + +1999-12-02 Jan Vroonhof + + * src/callproc.c (Fcall_process_internal): Be careful in writing + terminating null when copying args. nargs can be < 4. + Idea from Klaus Frank + +1999-11-29 Kyle Jones + + * src/sound.c (Fding): Remove zero initialization of + static variables to avoid crashes on systems that dump + the initialized data segment read-only. + +1999-12-05 Jan Vroonhof + + * glyphs-x.c (convert_EImage_to_XImage): Guard against other + visual classes. From Rasmus Borup Hansen + +1999-12-04 Martin Buchholz + + * lstream.c: (filedesc_reader): + (filedesc_writer): Try number 2: Support broken systems where + return type of read() and write() is different from ssize_t. + + * systty.h: + * sysdep.h: + * sysdep.c: + - Replace macro calls to EMACS_GET_TTY and EMACS_SET_TTY with + function equivalents emacs_get_tty() and emacs_set_tty(). + - Moved prototypes to systty.h, where struct event_tty is defined. + - Renamed bogus `waitp' parameter to `flushp'. + + * lstream.c (filedesc_reader): Support broken systems where return + type of read() is different from ssize_t. + + * events.c (Fcopy_event): Avoid redundant EQ test if event2 is nil. + + * event-stream.c (menu_move_up): Remove redundant if block. + (menu_move_down): Gratuitous rewriting. + (menu_move_left): Work around Cygnus codefusion-990706 compiler bug. + (menu_move_right): Ditto. + + * lrecord.h (copy_lcrecord): + (zero_lcrecord): + Always add parentheses around uses of macro arguments. + + * sysdll.c: #include for exit(). + * unexhp9k800.x: #include for malloc(). + Use proper prototype for Save_Shared_Data(void). + +1999-12-04 Jan Vroonhof + + * src/redisplay.c (point_would_be_visible): Correct for topclip. + +1999-12-02 Hrvoje Niksic + + * lisp.h: Declare Qself_insert_defer_undo. + + * event-stream.c (Fdispatch_event): Get the magic undo thing from + a symbol property, so commands other than self-insert-command can + install it. + (syms_of_event_stream): Define Qself_insert_defer_undo. + +1999-11-30 Martin Buchholz + + * floatfns.c (emacs_rint): Rename rint to emacs_rint, so that + `#undef HAVE_RINT' works. + + * sysdep.h: Fix up prototypes for sys_read_1(), sys_write_1() + +1999-11-25 Andy Piper + + * select-msw.c (Fmswindows_set_clipboard): selection fixes from + Mike Alexander. + (Fmswindows_delete_selection): ditto. + + * redisplay.h (CLASS_REDISPLAY_FLAGS_CHANGEDP): add size_changed. + (GLOBAL_REDISPLAY_FLAGS_CHANGEDP): ditto. + + * redisplay.c (redisplay_device): move size changed to macros in + redisplay.h + (redisplay_without_hooks): ditto. + + * redisplay-output.c (redisplay_output_layout): rename to avoid + name hiding. + + * process-nt.c (struct nt_process_data): mks toolkit fixes from + Mike Alexander. + (nt_create_process): ditto. + (nt_send_process): ditto. + + * nt.c (init_environment): make sure mingw32 gets the cached + system info. + + * gui.h: declare gui_add_item_keywords_to_plist. + + * event-msw.c (mswindows_wnd_proc): Clipboard fixes from Mike + Alexander. + + * console-msw.h: fix cygwin define/header 1.0 problems. + * glyphs-msw.c: ditto. + * ntplay.c: ditto. + * unexcw.c: ditto. + * s/cygwin32/h: ditto. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-26 Martin Buchholz + + * callproc.c (Fcall_process_internal): + * config.h.in: + * esd.c: + * event-msw.c (ntpipe_slurp_reader): + * event-msw.c (ntpipe_shove_writer): + * event-msw.c (winsock_reader): + * event-msw.c (winsock_writer): + * event-stream.c (dribble_out_event): + * fileio.c: + * fileio.c (Fexpand_file_name): + * glyphs-x.c (write_lisp_string_to_temp_file): + * gpmevent.c (tty_get_foreign_selection): + * lisp.h: Update prototypes. + * lstream.c (Lstream_flush_out): + * lstream.c (Lstream_write_1): + * lstream.c (Lstream_was_blocked_p): + * lstream.c (Lstream_read_more): + * lstream.c (Lstream_read): + * lstream.c (Lstream_fputc): + * lstream.c (make_stdio_output_stream): + * lstream.c (stdio_flusher): + * lstream.c (stdio_closer): + * lstream.c (make_filedesc_output_stream): + * lstream.c (errno_would_block_p): + * lstream.c (filedesc_writer): + * lstream.c (make_lisp_string_input_stream): + * lstream.c (make_fixed_buffer_output_stream): + * lstream.c (fixed_buffer_reader): + * lstream.c (make_resizing_buffer_output_stream): + * lstream.c (make_dynarr_output_stream): + * lstream.c (make_lisp_buffer_output_stream): + * lstream.c (lisp_buffer_reader): + * lstream.h (lstream_implementation): + * md5.c (Fmd5): + * miscplay.h (reset_parsestate): + * process-nt.c (nt_send_process): + * process-unix.c (unix_send_process): + * sound.c: + * sysdep.c (sys_close): + * sysdep.c (sys_read_1): + * sysdep.c (sys_write_1): + * sysfile.h: + * file-coding.c (determine_real_coding_system): + * file-coding.c (Fdetect_coding_region): + * file-coding.c (struct decoding_stream): + * file-coding.c (decoding_reader): + * file-coding.c (Fdecode_coding_region): + * file-coding.c (struct encoding_stream): + * file-coding.c (encoding_reader): + * file-coding.c (Fencode_coding_region): + * file-coding.c (convert_to_external_format): + * file-coding.c (convert_from_external_format): + - Lstream functions mirror Unix98 read(),write(). Therefore use + Unix98 types size_t and ssize_t. + - Try to make Lstream* functions 64-bit clean. Someday someone + may actually want to read from a Lstream with more than 2**32 bytes. + - Add configure support for ssize_t. + - Update all callers of Lstream_read and Lstream_write to + use the new types. + - Fix esd* initiated C++ compile errors. + - Remove comments referring to `fpurge' - we don't want to call it + even if it's there. + + * lisp.h + - Remove some lingering Lucid compiler support. + + * lisp.h + - Add prototype for Fdelete_process. + + * gpmevent.c (Freceive_gpm_event): Remove unused variables. + +1999-11-27 Martin Buchholz + + * Makefile.in.in (depend): Only update `depend' if there were changes. + +1999-11-26 Martin Buchholz + + * editfns.c (get_system_name): Remove. + +1999-11-26 Martin Buchholz + + * device-x.c (x_init_device): + - Replace magic number `17' with equivalent expn using sizeof. + - Replace strcmp with marginally more efficient memcmp. + - Avoid using C++ reserved word `class'. + + * file-coding.c (determine_real_coding_system): + - Look for both initial and final -*- cookies. + - Replace EQ (foo, Qnil) with NILP (foo) + - Make searching for cookies more efficient. + - Recognize only rfc 1521 characters in charset names. + +1999-11-22 Kazuyuki IENAGA + + * input-method-xlib.c (IMDestroyCallback): #ifdef'd by + "THIS_IS_X11R6", because it shouldn't be evaluated unless X11R6. + * input-method-xlib.c (IMInstantiateCallback): Ditto. + * input-method-xlib.c (XIM_init_device): Revive XOpenIM function + call for X11R5 systems. + * input-method-xlib.c (XIM_delete_frame): Enabled XDestroyIC() + again because XIM doesn't concern with frame deletion itself. + The XIC will be cleared by XIM when XIM is closing (at XIM destroy + callback). + +1999-10-25 Kazuyuki IENAGA + + * input-method-xlib.c: Added new lisp object Qxim_xlib. + New macro xim_warn(str), xim_warn1(fmt,str) and xim_info(str). + All the valid stderr_out were changed to those macros. + (IMDestroyCallback): Don't test the XIC if the frame is not X + frame. + (IMInstantiateCallback): Treat the client_data as "device" not + "frame" because the caller changed from frame to device. + Here initializes XIM and activates XICs for each frame which + doesn't have XIC. + (XIM_init_device): Register the XIM instantiation callback which + had been performed by XIM_init_frame() before. + (XIM_delete_frame): Added a test for the XIM before clearing XIC. + (XIM_init_frame): Placed an actual code for XIC activation which + was moved from IMInstantiateCallback. + (syms_of_input_method_xlib): New function which includes a symbol + Qxim_xlib that uses in emacs.c. + + * emacs.c: Added a function entry "syms_of_input_method_xlib" for + input_method_xlib. + + * symsinit.h: Added a declaration of "syms_of_input_method_xlib". + +1999-11-05 Robert Pluim + + * emacs.c (shut_down_emacs): Point users to PROBLEMS file + +1999-11-16 Jan Vroonhof + + * redisplay-output.c (compare_runes): Add comments about + results from profiling. + + * redisplay.h (struct rune): Do not use bitfields for members. + (struct rune): Add various comments about further optimizations. + +1999-11-19 Eric Darve + + * abbrev.c (abbrev_oblookup): Check whether wordend <= wordstart + if Vabbrev_start_location is used too. + +1999-10-27 Yoshiki Hayashi + + * file-coding.c (detect_eol_type): Return CR when two + sequential CR are found. + (determine_real_coding_system): Check EOL type when coding: + cookie is found and EOL type is not specified. + Don't assume 8bit char as part of coding: cookie. + +1999-10-26 Yoshiki Hayashi + + * file-coding.c (determine_real_coding_system): Check if + '-*-' exists. End searching for coding: cookie at the end + of line. Check whether character before coding: is space, + tab or ';'. + +1999-11-07 William M. Perry + + * gpmevent.c: Completely rewrote GPM mouse support for linux + console. The TTY console and event stream are modified at run + time, so this code can now be used as a module. + (tty_get_foreign_selection): New function to allow pasting from + other virtual consoles. + (Fgpm_enable): New lisp-visible function to turn GPM on or off + at run time. + + * device-tty.c (tty_asynch_device_change): No longer need to + notify GPM code of window/console height/width changes. + + * console-tty.c (tty_init_console): Removed outdated GPM support + that was part of the console/event code. + + * event-Xt.c (emacs_Xt_select_console): Ditto + + * event-Xt.c (emacs_Xt_unselect_console): Ditto + + * event-unixoid.c (read_event_from_tty_or_stream_desc): Ditto + + * frame-tty.c (console_type_create_frame_tty): Ditto + +1999-11-17 Martin Buchholz + + * nt.c: + * sysdep.c: + * s/mingw32.h: + * s/windowsnt.h: + - Use Unix 98 types uid_t, gid_t, pid_t. + - Define them. + +1999-11-01 Olivier Galibert + + * alloc.c (reinit_alloc_once_early): Move purify_flag init... + * emacs.c (main_1): ...here, to get the correct value even with + the portable dumper. + +1999-11-17 Martin Buchholz + + * lisp.h (BIT_VECTOR_LONG_STORAGE): Add extra parens. It's a macro! + + * tooltalk.c (tt_build_string): Remove extra parens. + * process.c (print_process): Remove extra parens. + * buffer.h (BI_BUF_PTR_BYTE_POS): + (BUF_PTR_BYTE_POS): + (BI_BUF_BYTE_ADDRESS): + (BI_BUF_BYTE_ADDRESS_BEFORE): + (valid_memind_p): + (bytind_to_memind): + (memind_to_bytind): + Remove extra parens. Inline functions are not macros. + + * editfns.c (Fuser_login_name): + (user_login_name): + Use proper type uid_t. + +1999-11-15 Martin Buchholz + + * syntax.c (complex_vars_of_syntax): Make more readable. + (define_standard_syntax): New function. + + * syntax.c (forward-comment): Gradually make XEmacs 64-bit-clean. + +1999-11-14 Martin Buchholz + + * mule-ccl.c (CCL_WRITE_STRING): Fix compiler warnings. + +1999-11-12 Yoshiki Hayashi + + * mule-charset.h (LEADING_BYTE_OFFICIAL_1, LEADING_BYTE_OFFICIAL_2): + New enum type to make sure no gap in the leading byte definition. + +1999-11-11 Yoshiki Hayashi + + * mule-charset.h (LEADING_BYTE_CYRILLIC_ISO_8859_5, + LEADING_BYTE_LATIN_ISO8859_9): Moved to 0x8B and 0x8C + to remove a hole in leading byte definition. + +1999-11-10 Yoshiki Hayashi + + * mule-charset.c (non_ascii_valid_charptr_p): Check if + private charset is defined. + +1999-11-09 Yoshiki Hayashi + + * mule-ccl.c (ccl_driver): Make sure generated sequences + are valid when doing `CCL_WRITE_STRING'. + (ccl-execute-on-string): Pass CCL_MODE_DECODING to ccl_driver. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + +1999-11-04 Martin Buchholz + + * mule-ccl.c (ccl_driver): Warning suppression + +1999-11-01 SL Baur + + * emacs.c (main_1): Guard call to reinit_vars_of_debug when not + building a debugged XEmacs. + +1999-10-28 Andreas Jaeger + + * src/emacs.c (main_1): Don't set the malloc hooks if using + DOUG_LEA_MALLOC. + +1999-10-30 Olivier Galibert + + * alloc.c (pdump_dump_rtables): Don't forget to dump the last + registered type. + (pdump): Ditto. + +1999-10-25 Olivier Galibert + + * emacs.c (main_1): Call reinit_vars_of_scrollbar_x. + + * symsinit.h: Declare reinit_vars_of_scrollbar_x. + +1999-10-25 Martin Buchholz + + * redisplay.h (CLASS_RESET_CHANGED_FLAGS): + (GLOBAL_RESET_CHANGED_FLAGS): + (CLASS_REDISPLAY_FLAGS_CHANGEDP): + (RESET_CHANGED_SET_FLAGS): + Fix C++ compile errors/warnings. + These macros were just a tad too clever. + + * process-unix.c (unix_open_network_stream): + * objects-x.c (allocate_nearest_color): + * mule-charset.c (vars_of_mule_charset): + * fileio.c (Ffile_truename): + * file-coding.c (vars_of_file_coding): + Fix compile errors/warnings. + + * alloc.c (xstrdup): Use fact that memcpy returns its first arg. + (allocate_lisp_storage): Simplify. + +1999-10-24 Olivier Galibert + + * conslots.h: Add defines with first and last slot names. + * bufslots.h: Add defines with first and last slot names. + + * buffer.c (common_init_complex_vars_of_buffer): Renamed from + reinit_complex_vars_of_buffer + (reinit_complex_vars_of_buffer): Reset the slots to the dumped + value. + (complex_vars_of_buffer): Dump the slots values. + + * console.c (common_init_complex_vars_of_console): Renamed from + reinit_complex_vars_of_console + (reinit_complex_vars_of_console): Reset the slots to the dumped + value. + (complex_vars_of_console): Dump the slots values. + + * alloc.c: Rename reloc_table to pdump_reloc_table, rt_list to + pdump_rt_list and move them at the beginning of the file. + (gc_sweep): Unmark pdumped objects after the sweep phase. + (pdump_dump_rtables): Change a bare 256 to + last_lrecord_type_index_assigned. Add a separator between the + adresses or lrecords and the ones of C structs in the dump file. + (pdump_load): Cope with the new separator and the renamings. Stop + looking for the hash tables list after it has been found (duh!). + +1999-10-24 Robert Bihlmeyer + + * sound.c: support HAVE_ESD_SOUND + + * miscplay.c: + * miscplay.h: + * linuxplay.c: Move large part of linuxplay to generalized file + miscplay. Make it platform independent. + + * esd.c: New file + +1999-10-24 Adrian Aichner + + * lisp.h (Dynarr_declare): Fix boo-boo. + +1999-10-24 Olivier Galibert + + * process-unix.c (allocate_pty): Fix HAVE_GETPT. + * process.h: Ditto. + +1999-10-24 Jan Vroonhof + + * redisplay.c (start_with_line_at_pixpos): Remove assert(cur_elt + >=0). Handle the cur_elt == 0 case. + +1999-10-24 Jan Vroonhof + + * unexelf.c: Merge Martin's c++ fixes back in + +1999-10-20 Jan Vroonhof + + * unexelf.c (unexec): Only copy the global offset + table from memory on sgi machines. + +1999-08-13 Alexandre Oliva , Vin Shelton + + * unexelf.c: Enable GNU/Linux/alpha to build with gcc 2.95 by + adding support for an sbss section. Get IRIX 5.2 to build using + unexelf.c. + + * m/iris4d.h: Use unexelf.o for unexec. + + * m/iris5d.h: Use unexelf.o for unexec. + +1999-10-24 Jan Vroonhof + + * unexelf.c: Revert to 21.1 version + +1999-08-28 Jan Vroonhof + + * window.c (Fwindow_truncated_p): New function. + +1999-08-25 Jonathan Marten + + * window.c (window_truncation_on): Always return 0 for minibuffer + windows, to enable auto scrolling. + +1999-10-24 Neal Becker + * process.h: Unix98 PTY support + +1999-10-17 Jan Vroonhof + + * fileio.c (Ffile_truename): Do proper mule decoding on + the argument to xrealpath() + +1999-08-19 Stephen Tse + + * process-unix.c (unix_open_network_stream): Add udp network + support; rename variable Qtcpip to Qtcp, parameter family to + protocol for consistency with Qudp. + + * process-nt.c (nt_open_network_stream): Rename variable Qtcpip to + Qtcp, parameter family to protocol for consistency with Qudp. + + * process.c (global_variables): Add a new variable Qudp for udp + network support; rename variable Qtcpip to Qtcp for consistency + with Qudp. + (Fopen_network_stream_internal): Rename parameter FAMILY to + PROTOCOL for consistency; fix a minor typo and add an explanation + in docstring for udp programming. + (Fopen_multicast_group_internal): Fix a minor typo in docstring. + (syms_of_process): Add a new variable Qudp for udp network + support; rename variable Qtcpip to Qtcp for consistency with Qudp. + + * process.h (extern_variables): Add a new variable Qudp for udp + network support; rename variable Qtcpip to Qtcp for consistency + with Qudp. + + * procimpl.h: Add a new variable Qudp for udp network support; + rename variable Qtcpip to Qtcp for consistency with Qudp. + (struct process_methods): Rename parameter family to protocol. + + +1999-10-24 Olivier Galibert + + * alloc.c (pdump_make_hash): Divide pointers by 8 for a better hash. + +1999-10-23 Olivier Galibert + + * lrecord.h (struct lrecord_header): Removed dumped flags. + + * dynarr.c: Use DUMPEDP instead of dumped flag. + + * lisp.h (DUMPEDP): Added. Removed dumped flag from dynarr. + + * alloc.c: Removed hash_next linked list pointer. + + * *.c *.h: Removed markobj and mark_object parameters, removed GC_ + and XGC macros. + +1999-10-14 Andy Piper + + * redisplay-x.c (x_output_shadows): fix dodgy maths for border + calculations. + + * gutter.c (output_gutter): be more accurate about the area to be + cleared since X seems to manage to do the clear after drawing the + border. + + * redisplay.h (RESET_CHANGED_FLAGS): new macro for setting + redisplay flags as a group. + (RESET_CHANGED_SET_FLAGS): ditto. + (CLASS_RESET_CHANGED_FLAGS): ditto. + (GLOBAL_RESET_CHANGED_FLAGS): ditto. + (REDISPLAY_FLAGS_CHANGEDP): new macro for testing redisplay flags + as a group. + (CLASS_REDISPLAY_FLAGS_CHANGEDP): ditto. + (GLOBAL_REDISPLAY_FLAGS_CHANGEDP): ditto. + + * redisplay.c (redisplay_frame): use CLASS_RESET_CHANGED_FLAGS + instead of setting flags individually. + (redisplay_device): ditto CLASS_REDISPLAY_FLAGS_CHANGEDP. + (redisplay_device): ditto. + (redisplay_device): ditto CLASS_RESET_CHANGED_FLAGS. + (redisplay_without_hooks): ditto GLOBAL_REDISPLAY_FLAGS_CHANGEDP. + (redisplay_without_hooks): ditto CLASS_REDISPLAY_FLAGS_CHANGEDP. + (redisplay_without_hooks): ditto. + (redisplay_without_hooks): ditto GLOBAL_RESET_CHANGED_FLAGS. + + * redisplay-x.c (x_output_string): unmap subwindows in the area. + (x_output_blank): ditto. + + * redisplay-output.c (redisplay_output_display_block): don't unmap + subwindows in case layout optimization can avoid it. + (redisplay_output_subwindow): unmap subwindows in the area. + (redisplay_output_layout): optimize the output of layouts - only + output glyphs that have changed if nothing else of redisplay + significance has occurred. + (redisplay_output_pixmap): change args to + redisplay_clear_clipped_region. + (redisplay_clear_clipped_region): allow the clipped region to be + cleared of all subwindows except the one passed in. + + * redisplay-msw.c (mswindows_output_blank): unmap subwindows in + the area. + (mswindows_output_cursor): ditto. + (mswindows_output_string): ditto. + + * gutter.c (calculate_gutter_size): if the window buffer is nil + then don't continue. + (update_frame_gutters): be more lenient about when we actually + update the gutter. Layout optimization makes this + non-costly. Cache redisplay flags that we want to temporarily + ignore. + + * glyphs.c (Fglyph_animated_timeout_handler): handle image + specific timeouts rather than iterating over the instance cache. + (glyph_animated_timeout_mapper): deleted. + (add_glyph_animated_timeout): use a weak list to hold onto the + image so that it can be GC'ed. + (disable_glyph_animated_timeout): disable a specific timeout. + (vars_of_glyphs): disable-animated-pixmaps is a new boolean for + controlling whether pixmaps are animated or not. + + * glyphs-msw.c (mswindows_finalize_image_instance): make sure the + image timeout gets disabled when the image gets freed. + + * glyphs-eimage.c (gif_instantiate): remove meaningless + comment. Cope with timeouts specified in the gif extension block. + + * event-msw.c (vars_of_event_mswindows): new variable + mswindows-meta-activates-menu. + (mswindows_wnd_proc): only goto defproc with VK_MENU if the user + wants it. + + * glyphs-x.c (x_finalize_image_instance): delete mask first so + that we can compare with image. + +1999-10-14 Jonathan Harris + + * event-msw.c (mswindows_key_to_emacs_keysym): + Recognise keypad keys as different from normal keys. + +1999-10-14 Didier Verna + + * glyphs-x.c (x_finalize_image_instance): avoid freeing null pixmaps. + +1999-10-10 Olivier Galibert + + * symbols.c (init_symbols_once_early): dump Vquit_flag. + + * symsinit.h: Updated. + + * ntproc.c (vars_of_ntproc): Use defsymbol. + + * emacs.c (main_1): Updated reinit calls. + + * lisp.h: Removed Fpurecopy and pure_put declarations. + * fns.c: Removed pure_put. + + * eval.c (Fdefvar): pure_put -> Fput + (Fdefconst): Ditto. + * frame-x.c (init_x_prop_symbols): Ditto. + * symbols.c (deferror): Ditto. + + * alloc.c (Fmake_byte_code): Remove Fpurecopy call. + * buffer.c (vars_of_buffer): Ditto. + * bytecode.c (Ffetch_bytecode): Ditto. + (optimize_compiled_function): Ditto. + * emacs.c (vars_of_emacs): Ditto. + * emodules.c (vars_of_module): Ditto. + * eval.c (define_function): Ditto. + (Fautoload): Ditto. + * frame.c (vars_of_frame): Ditto. + * intl.c (Fset_domain): Ditto. + * lread.c (load_force_doc_string_unwind): Ditto. + * menubar.c (vars_of_menubar): Ditto. + * minibuf.c (reinit_complex_vars_of_minibuf): Ditto. + + * debug.c (reinit_vars_of_debug): Extracted. + * device-x.c (reinit_vars_of_device_x): Ditto. + * emodules.c (reinit_vars_of_module): Ditto. + * font-lock.c (reinit_vars_of_font_lock): Ditto. + * glyphs-widget.c (reinit_vars_of_glyphs_widget): Ditto. + * glyphs.c (reinit_vars_of_glyphs): Ditto. + * gui-x.c (reinit_vars_of_gui_x): Ditto. + * insdel.c (reinit_vars_of_insdel): Ditto. + * menubar-x.c (reinit_vars_of_menubar_x): Ditto. + * minibuf.c (reinit_complex_vars_of_minibuf): Ditto. + * mule-wnnfns.c (reinit_vars_of_mule_wnn): Ditto. + * print.c (reinit_vars_of_print): Ditto. + * redisplay.c (reinit_vars_of_redisplay): Ditto. + * select-x.c (reinit_vars_of_xselect): Ditto. + * undo.c (reinit_vars_of_undo): Ditto. + +1999-10-10 Olivier Galibert + + * symsinit.h: Updated declarations, see other ChangeLog entries. + + * redisplay.c (init_redisplay): Ensure proper reinitialisation. + + * lrecord.h (XD_DYNARR_DESC): Introduce XD_INT_RESET and use it. + + * glyphs.c: Add the ii_keyword_entry and related descriptions. + Fix the image_instantiator_methods one. + + * file-coding.c: Plonk all data that needs to be dumped in a + dynamically allocated structure. + + * extents.c (reinit_vars_of_extents): Extracted from + vars_of_extents. + + * event-stream.c (vars_of_event_stream): Don't staticpro when + pdump_wire is enough. + + * event-msw.c (reinit_vars_of_event_mswindows): Extracted from + vars_of_event_mswindows. + + * event-Xt.c (reinit_vars_of_event_Xt): Extracted from + vars_of_event_Xt. + + * eval.c (vars_of_eval): Don't staticpro when pdump_wire is enough. + + * emacs.c (main_1): Added some reinit calls. + + * device-x.c (reinit_console_type_create_device_x): Extracted from + console_type_create_device_x. + + * console.h: Declare the console_type_entry_dynarr description. + + * console.c: Unstatic the console_type_entry_dynarr description. + + * alloc.c: Removed some dubious comments. Handle XD_INT_RESET. + +1999-10-07 Olivier Galibert + + * symsinit.h: Updated declarations, see other ChangeLog entries. + + * minibuf.c (reinit_complex_vars_of_minibuf): Extracted from + complex_vars_of_minibuf. + + * lrecord.h: Removed XD_PARENT_INDIRECT (unused and + unimplemented), added XD_LO_LINK. + + * lisp.h (pdump_wire_list): Add declaration. + + * glyphs.h (INITIALIZE_DEVICE_IIFORMAT): Fix bug found by Andy. + (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT): Fix stupid bug. + (REINITIALIZE_IMAGE_INSTANTIATOR_FORMAT): Remove, useless once the + stupid bug fixed. + + * glyphs.c (reinit_image_instantiator_format_create): Remove. + + * glyphs-x.c (reinit_image_instantiator_format_create_glyphs_x): + Remove. + + * glyphs-widget.c + (reinit_image_instantiator_format_create_glyphs_widget): Remove. + + * glyphs-msw.c + (reinit_image_instantiator_format_create_glyphs_mswindows): + Remove. + + * glyphs-eimage.c + (reinit_image_instantiator_format_create_glyphs_eimage): Remove. + + * frame.c (Fmake_frame): Don't reset the face cache when using the + stream device. + + * file-coding.c: Dumped the_codesys_prop_dynarr and added all + relevant descriptions. + + * events.c (reinit_vars_of_events): Extracted from vars_of_events. + + * eval.c: The subr is _not_ a lcrecord. + + * emacs.c (main_1): Call vars_of_specifier early before any + specifier creation (e.g in vars_of_glyphs, at least). Remove the + useless reinit_image_instantiator_format*. Add + reinit_vars_of_events and reinit_complex_vars_of_minibuf. Add + calls to lstream_type_create* and process_type_create*. + + * elhash.c: Dump Vall_weak_hash_tables correctly. + + * data.c: Dump Vall_weak_lists correctly. + + * console.c: Fix description. + + * console-stream.c (init_console_stream): Do initializations + correctly in the pdump case. + + * chartab.c: Fix description. Dump Vall_syntax_tables correctly. + (Fcopy_char_table): Link into Vall_syntax_tables. + + * alloc.c (pdump_wire_list): Added. + (Fgarbage_collect): Fix loop in stats couting missing the last + lrecord type. + (pdump_register_sub): Added XD_LO_LINK. + (pdump_dump_data): Ditto. Fixed XD_LO_RESET_NIL forgttting the + counter. + (pdump_reloc_one): Ditto. + (pdump_scan_by_alignement): Use last_lrecord_type_index_assigned + instead of 256. + (pdump_dump_wired): Added lists. + (pdump): Use last_lrecord_type_index_assigned instead of 256. + Dump last_lrecord_type_index_assigned value. Fix minor bugs. + +1999-10-07 Andy Piper + + * glyphs-msw.c (mswindows_finalize_image_instance): zero out + bitmap slices. + + * glyphs-x.c (x_finalize_image_instance): fix FMW problem. + +1999-10-06 Andy Piper + + * elhash.c (resize_hash_table): Correct reference to lrecord_header. + +1999-10-06 Damon Lipparelli + + * elhash.h: forward declare Lisp_Hash_Table. + +1999-10-06 Andy Piper + + * glyphs.c (Fset_image_instance_property): mark glyphs as dirty + after setting an image instance property. + +1999-10-05 Andy Piper + + * gutter.c (update_frame_gutters): output gutters if + windows_changed is set. This is the only way of catching changes + in selected window which obviously can affect the specifiers. + + * redisplay.c: new state flags, subwindows_state_changed and + subwindows_state_changed set. + (redisplay_window): use them. + (redisplay_device): ditto. + (redisplay_without_hooks): ditto. + (redisplay_frame): ditto. Reset subwindow cachels if + subwindows_changed is set. + (redisplay_window): call mark_glyph_cachels_as_clean after + redisplaying. + + * redisplay-x.c (x_output_x_pixmap): select correct + pixmap image for display depending on the currently selected + slice. + + * redisplay-output.c (compare_runes): check dirtiness when + checking RUNE_DGLYPH runes. + (compare_display_blocks): relax invalidation of display blocks + since we can now detect whether individual glyphs have changed or + not. + + * redisplay-msw.c (mswindows_output_dibitmap): select correct + bitmap image for display depending on the currently selected + slice. + + * glyphs.h (struct Lisp_Image_Instance): add a dirty flag. + (IMAGE_INSTANCE_DIRTYP): new macro. + (XIMAGE_INSTANCE_DIRTYP): ditto. + (MARK_IMAGE_INSTANCE_CHANGED): ditto. + (GLYPH_DIRTYP): ditto. + (XGLYPH_DIRTYP): ditto. + (MARK_GLYPH_CHANGED): ditto. + (GLYPH_CACHEL_DIRTYP): ditto. + (struct glyph_cachel): add a dirty flag. + + * glyphs.c (update_frame_subwindows): Don't update on + glyphs_changed. + (glyph_animated_timeout_mapper): new function. Map over the + instance cache lookinng for animated images to update. + (Fglyph_animated_timeout_handler): new function. Lisp callback for + handling animated image timeout events. + (disable_glyph_animated_timeout): new function. Add the animated + image timeout. + (disable_glyph_animated_timeout): new function. Remove the + animated image timeout. + (syms_of_glyphs): initialize Qglyph_animated_timeout_handler and + friends. + (vars_of_glyphs): initialize Vglyph_animated_ticker. + (image_instance_equal): add the currently displayed slice. + (image_instance_hash): ditto. + (allocate_glyph): initialize dirty flag. + (glyph_width): rename glyph -> glyph_or_image. + (glyph_height_internal): ditto. + (glyph_dirty_p): new function. Determine whether the image + instance in the domain and/or glyph is dirty. + (set_glyph_dirty_p): set the dirtiness. + (update_glyph_cachel_data): take dirtiness into account. Pass the + image instance we are interested in to glyph_width and friends. + (get_glyph_cachel_index): make non-static. Always call + update_glyph_cachel_data. + (mark_glyph_cachels_as_not_updated): meaningless formatting + change. + (mark_glyph_cachels_as_clean): new function. Clean dirtiness from + glyph cachels. + + * glyphs-x.h (struct x_image_instance_data): change + pixmap to a list of pixmaps. + (IMAGE_INSTANCE_X_PIXMAP_SLICE): new macro. + (IMAGE_INSTANCE_X_PIXMAP_SLICES): ditto. + (XIMAGE_INSTANCE_X_PIXMAP_SLICE): ditto. + (XIMAGE_INSTANCE_X_PIXMAP_SLICES): ditto. + + * glyphs-x.c (x_finalize_image_instance): make sure multi pixmap + images get deleted properly. + (init_image_instance_from_x_image): add slices paramater and use + it to initialize x_image_instance_data correctly. + (image_instance_add_x_image): new function. Add new pixmaps to our + set of instantiated pixmaps for an image. Used by animated images. + (x_init_image_instance_from_eimage): add a slices + parameter. Instantiate all images from the eimage. + (x_xpm_instantiate): update use of + init_image_instance_from_x_image. + (init_image_instance_from_xbm_inline): ditto. + (x_initialize_pixmap_image_instance): add slices paramater and use + it to allocate x_image_instance_data correctly. + + * glyphs-msw.h (struct mswindows_image_instance_data): change + bitmap to a list of bitmaps. + (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE): new macro. + (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES): ditto. + (XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE): ditto. + (XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES): ditto. + + * glyphs-msw.c (init_image_instance_from_dibitmap): add slices + paramater and use it to initialize mswindows_image_instance_data + correctly. + (image_instance_add_dibitmap): new function. Add new bitmaps to + our set of instantiated bitmaps for an image. Used by animated + images. + (mswindows_init_image_instance_from_eimage): add a slices + parameter. Instantiate all images from the eimage. + (mswindows_xpm_instantiate): update use of + init_image_instance_from_dibitmap. + (bmp_instantiate): ditto. + (init_image_instance_from_xbm_inline): ditto. + (mswindows_finalize_image_instance): make sure all the bitmap + slices get deleted. + (mswindows_initialize_dibitmap_image_instance): add slices + paramater and use it to allocate mswindows_image_instance_data + correctly. + + * glyphs-eimage.c (jpeg_instantiate): give extra paramter to + init_image_instance_from_eimage. + (png_instantiate): ditto. + (tiff_instantiate): ditto. + (gif_instantiate): allocate bitmaps for all gif slices not just + the first one. + + * device.h (struct device): add subwindows_state_changed flag. + (MARK_DEVICE_SUBWINDOWS_STATE_CHANGED): new macro. + (MARK_DEVICE_FRAMES_GLYPHS_CHANGED): ditto. + + * console.h (struct console_methods): add a slice parameter to + init_image_instance_from_eimage_method. + + * redisplay.c (create_string_text_block): Allow buffer to be nil + without crashing. + +1999-09-24 Andy Piper + + * glyphs-x.c: only include gui-x.h if we are building with + widgets. + + * gui-x.c (vars_of_gui_x): only set popup_up_p if we have popups. + +1999-09-28 Lee Kindness + + * objects-x.c (allocate_nearest_color): will return 0 (failure) + when the colormap is full and the color it has computed to be the + 'nearest' has been allocated read/write. + +1999-10-02 Olivier Galibert + + * search.c (reinit_vars_of_search): Reinit the search cache + correctly. + + * elhash.h: Make the description visible. Declare + resize_hash_table. + + * elhash.c (resize_hash_table): Extracted from enlarge_hash_table + to generalize the hash table reorganization. + (reorganize_hash_table): Added. + (enlarge_hash_table): Uses resize_has_table. + + * casetab.c (complex_vars_of_casetab): staticpro the mule mirror + tables. + + * alloc.c: Add correct management of blocks of structures. + Reorganize hash tables at reload since the hash values can change + with the pointers. + +1999-10-01 Olivier Galibert + + * lisp.h: Add pdump_wire declaration + + * elhash.c (vars_of_elhash): Wire Vall_weak_hash_tables. + * symbols.c (init_symbols_once_early): Wire Qnil and Qunbound. + + * alloc.c (pdump_wire): Added.. + (pdump_load): Support it. + (pdump): Support it + + * glyphs-msw.c + (reinit_image_instantiator_format_create_glyphs_mswindows): Fix + macro calls. + +1999-09-28 Olivier Galibert + + * symsinit.h: Added lots of prototypes. + + * symeval.h: Added defsymbol_nodump declaration. + + * symbols.c (find_symbol_value): Lame attempt at making the + startup go further. + (defsymbol_nodump): Added. + + * mule-charset.c: Collapsed global lisp objects arrays in one + dumpable structure. + + * lrecord.h: Added some flags. + + * lisp.h: Added dumped flag to dynarrs. Added dumpstruct + declaration. + + * glyphs.h (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM): Don't + staticpro dynamic variables. + + * glyphs.c (reinit_specifier_type_create_image): Added. + (image_instantiator_format_create): Dump image instantiator format + dynarr. + (reinit_image_instantiator_format_create): Added. + + * emacs.c (main_1): Added reinits calls. + + * dynarr.c: Protect dumped dynarrays from going berzek in free or + realloc. + + * specifier.h (INITIALIZE_SPECIFIER_TYPE): Don't staticpro dynamic + variables. + * specifier.c (specifier_type_create): Dump the specifier type + dynarr. + (reinit_specifier_type_create): Added. + * console.h (INITIALIZE_CONSOLE_TYPE): Don't staticpro dynamic + variables. + * console.c (console_type_create): Dump the console type dynarr. + (reinit_vars_of_console): Extracted from vars_of_console. + (reinit_complex_vars_of_console): Extracted from + complex_vars_of_console + * window.c (reinit_vars_of_window): Extracted from vars_of_window. + * toolbar.c (reinit_specifier_type_create_toolbar): Added. + * search.c (reinit_vars_of_search): Extracted from vars_of_search. + * objects.c (reinit_specifier_type_create_objects): Added. + (reinit_vars_of_objects): Extracted from vars_of_objects. + * lstream.c (reinit_vars_of_lstream): Extracted from + vars_of_lstream. + * lread.c (reinit_vars_of_lread): Extracted from vars_of_lread. + * gutter.c (reinit_specifier_type_create_gutter): Added. + * glyphs-x.c (reinit_image_instantiator_format_create_glyphs_x): + Added. + * glyphs-widget.c + (reinit_image_instantiator_format_create_glyphs_widget): Added + * glyphs-msw.c + (reinit_image_instantiator_format_create_glyphs_mswindows): Added. + * glyphs-eimage.c + (reinit_image_instantiator_format_create_glyphs_eimage): Added. + * event-stream.c (reinit_vars_of_event_stream): Extracted from + vars_of_event_stream + * eval.c (reinit_vars_of_eval): Extracted from vars_of_eval. + * device.c (reinit_vars_of_device): Extracted from vars_of_device. + * console-x.c (reinit_console_type_create_x): Added. + * console-tty.c (reinit_console_type_create_tty): Added + * console-stream.c (reinit_console_type_create_stream): Added. + (init_console_stream): If PDUMP, always reinitialise basic + devices. + * console-msw.c (reinit_console_type_create_mswindows): Added. + * buffer.c (reinit_vars_of_buffer): Extracted from + init_vars_of_buffer. + (reinit_complex_vars_of_buffer): Extracted from + complex_vars_of_buffer + + * alloc.c: Further with the portable dumping, the revenge. + (dumpstruct): Added. + (reinit_alloc_once_early): Extracted from init_alloc_once_early. + + * specifier.c (sizeof_specifier): Correct size computation. + (make_specifier_internal): Ditto. + +1999-09-27 Olivier Galibert + + * alloc.c: Further with the portable dumping. + +1999-09-27 Martin Buchholz + + * glyphs-x.c (update_widget_face): Remove bogus cast + + * data.c (sign_extent_lisp): + * data.c (check_int_range): + * data.c (Faref): + * data.c (Faset): + * data.c (number_char_or_marker_to_int): + * data.c (number_char_or_marker_to_double): + * data.c (Frem): + * data.c (Fmod): + * extents.c (print_extent_1): + * fns.c (print_bit_vector): + * fns.c (Flength): + * fns.c (Fsafe_length): + * fns.c (copy_list): + * fns.c (Fsubseq): + * fns.c (Felt): + * fns.c (Flast): + * fns.c (Fnbutlast): + * insdel.h: + * marker.c (print_marker): + * syntax.h: + * bytecode.c (bytecode_arithcompare): + * bytecode.c (bytecode_arithop): + * lisp.h: + * lisp.h (EXTERNAL_LIST_LOOP_DELETE_IF): + * lisp.h (TRUE_LIST_P): + * lisp.h (CHECK_TRUE_LIST): + * lisp.h (bit_vector_length): + * lisp.h (GCPRO4): Make consistent. + * lisp.h (NGCPRO4): Make consistent. + * lisp.h (NNGCPRO4): Make consistent. + * alloc.c (Fmake_list): + * alloc.c (Fmake_string): + Use proper 64-bit types, e.g. EMACS_INT or size_t instead of int. + This should make all arithmetic 64-bit clean. + + Use %ld with (long) casts in print statements of types with sizes + possibly larger than int. + + Following functions had mismatched prototypes!!: + do_marker_adjustment(), fixup_internal_substring(), scan_lists(), + char_quoted(), make_string_from_buffer(), + make_string_from_buffer_no_extents() + + The types of Bufpos, Bytind, Memind, Bytecount, Charcount, + Extcount are all now EMACS_INT. I hope to see the day when I can + create a buffer with more than INT_MAX characters, without having + XEmacs slow down to a crawl. I also hope to be able to create a + list with more than INT_MAX cons cells. + + * redisplay.c (decode_mode_spec): + The %p and %P specs in the mode line were not correct for buffers + larger than MAX_INT/100! The %p spec was off by .5% even for + small buffers! + +1999-09-27 Martin Buchholz + + * cmdloop.c (num_input_keys): + * print.c (debug_temp): + * emacs.c (Vinfo_directory): + Delete unused variables + + * console-x.h (x_interline_space): Mark as unimplemented. + * redisplay-x.c (x_interline_space): Mark as unimplemented. + + * event-Xt.c (pending_timeouts): + * linuxplay.c (linuxplay_sndbuf): + * profile.c (QS*): + * search.c (searchbufs): + * specifier.c (specifier_type_entry_dynarr): + * undo.c (pending_boundary): + * event-stream.c (the_low_level_timeout_blocktype): + * extents.c (gap_array_marker_freelist): + * extents.c (extent_list_marker_freelist): + * print.c (being_printed): + * print.c (alternate_do_pointer): + * alloc.c (first_string_chars_block): + * alloc.c (current_string_chars_block): + * emacs.c (initial_argv): + * emacs.c (initial_argc): + * eval.c (lisp_eval_depth): + * free-hook.c (pointer_table): + * free-hook.c (free_queue): + * free-hook.c (current_free): + * free-hook.c (strict_free_check): + * redisplay.c (formatted_string_emchar_dynarr): + * redisplay.c (formatted_string_display_line): + * redisplay.c (formatted_string_extent_dynarr): + * redisplay.c (formatted_string_extent_start_dynarr): + * redisplay.c (formatted_string_extent_end_dynarr): + * redisplay.c (updating_line_start_cache): + * redisplay.c (last_display_warning_tick): + * redisplay.c (display_warning_tick): + * redisplay.c (internal_cache): + * window.c (Vwindow_configuration_free_list): + Make static. + + * redisplay.c (Vinitial_window_system): Make CONST. + +1999-09-24 Martin Buchholz + + * redisplay-tty.c (term_get_fkeys_1): Minor aesthetic improvements. + + * doprnt.c (get_doprnt_args): Use int, not short, with va_arg. + +1999-09-24 Andy Piper + + * redisplay-output.c (output_display_line): only clear the borders + if we are not displaying the gutter. + +1999-09-24 Jan Vroonhof + + * frame-x.c (x_any_window_to_frame): Let Xt find the widget and + then use x_any_widget_or_parent_to_frame(). + (x_find_frame_for_window): remove special cases. + +1999-09-24 Andy Piper + + * scrollbar-x.c (x_window_is_scrollbar): deleted. + * scrollbar-x.h: ditto. + +1999-09-23 Martin Buchholz + + * alloc.c (this_marks_a_marked_record): Remove. + + * buffer.c (mark_buffer): + * buffer.c (nuke_all_buffer_slots): + * console.c (mark_console): + * console.c (nuke_all_console_slots): + * frame.c (mark_frame): + * frame.c (nuke_all_frame_slots): + Treat MARKED_SLOT() macros consistently. + + * device.h (error_check_device_type): + * faces.c (face_getprop): + * fileio.c (DRIVE_LETTER): + * filelock.c (lock_file_1): + * frame-x.c (x_create_widgets): + * frame.h (error_check_frame_type): + * keymap.c (print_keymap): + * keymap.c (Fkey_description): + * keymap.c (where_is_recursive_mapper): + * mule-charset.h (CHARSET_LEADING_BYTE): + * objects-msw.c (mswindows_color_instance_hash): + * objects.c (color_instance_equal): + * objects.h (struct color_specifier): + * objects.h (struct font_specifier): + * objects.h (struct face_boolean_specifier): + * opaque.h (get_opaque_ptr): + * opaque.h (set_opaque_ptr): + * process-unix.c (set_socket_nonblocking_maybe): + * specifier.h (SPECIFIER_TYPE_P): + * symbols.c (store_symval_forwarding): + * syssignal.h (EMACS_KILLPG): + * terminfo.c (emacs_tparam): + * glyphs.c (glyph_putprop): + * glyphs.c (glyph_remprop): + * glyphs.c (Fimage_instance_subwindow_id): + * window.c (mark_window): + * window.c (mark_window_config): + * window.c (Fset_window_configuration): + * window.c (save_window_save): + * eval.c (Fuser_variable_p): + * eval.c (Fcommand_execute): + * eval.c (Feval): + * eval.c (Ffuncall): + * lisp.h (XPNTR): + * lisp.h (INT_OR_FLOATP): + * lisp.h (GC_INT_OR_FLOATP): + * lisp.h (XFLOATINT): + * lisp.h (IS_ANY_SEP): + * mule-ccl.c (Fccl_execute): + * mule-ccl.c (Fccl_execute_on_string): + * redisplay-x.c (x_output_string): + Remove redundant extra parentheses. + +1999-09-22 Martin Buchholz + + * chartab.c (word_boundary_p): Add prototype for warning avoidance. + * eval.c (PRIMITIVE_FUNCALL): ANSIfy + * free-hook.c (fun_ptr): ANSIfy + * getloadavg.c: Remove declaration for errno. + * gui.c (allocate_gui_item): ANSIfy + * gui.h (allocate_gui_item): ANSIfy + * mule-ccl.c (resolve_symbol_ccl_program): Make static + * realpath.c: Remove K&R support. + * redisplay-x.c (x_output_display_block): Don't shadow previous local + * glyphs-widget.c (layout_instantiate): Don't shadow previous local + * gutter.c (get_gutter_coords): Make static. + * lread.c (locate_file_map_suffixes): Make static. + * ralloc.c (relinquish): ANSIfy + * redisplay.c: + * lisp.h: + Move prototypes from redisplay.c to lisp.h + +1999-09-22 Martin Buchholz + + * glyphs-x.c (x_widget_set_property): + - Remove unnecessary initialization. + - Use char*, not Bufbyte *, with GET_C_STRING_OS_DATA_ALLOCA + * glyphs-x.c (x_widget_instantiate): + - Use char*, not Bufbyte *, with GET_C_STRING_OS_DATA_ALLOCA + * unexelf.c (unexec): + Add cast for C++ compilability. + * redisplay.h: + Fix a typo. + * ralloc.c (r_alloc_reinit): + SET_FUN_PTR was broken wrt ANSI aliasing! + To compensate, use __typeof__ when using gcc, else live with + possible (but rare) warnings. + * ralloc.c (init_ralloc): + Ditto + * ralloc.c: Use the real dlmalloc prototype for __morecore. + * lread.c (locate_file_map_suffixes): + * input-method-xlib.c (XIM_init_frame): + - Xlib functions should use XPointer, not XtPointer. + * input-method-xlib.c (XIM_delete_frame): + - Xlib functions should use XPointer, not XtPointer. + * input-method-xlib.c (IMDestroyCallback): + - Simplify. + - XFRAME (obj) can never be NULL, so don't test for it. + * gutter.h: + Add GUTTER_POS_LOOP for iterating over all gutter_pos'es + * gutter.c (SET_GUTTER_WAS_VISIBLE_FLAG): + Run c-backslash-region on macro body. + * gutter.c (gutter_was_visible): + Remove redundant parens - this is not a macro. + * gutter.c (redraw_exposed_gutters): + Use GUTTER_POS_LOOP. + * gutter.c (gutter_specs_changed): + Use GUTTER_POS_LOOP. + * gutter.c (gutter_geometry_changed_in_window): + Use GUTTER_POS_LOOP. + * gutter.c (update_frame_gutters): + Use GUTTER_POS_LOOP. + * gutter.c (init_frame_gutters): + Use GUTTER_POS_LOOP. + * file-coding.c (determine_real_coding_system): + Fix C++ compile error. + * emodules.c (find_make_module): + Cast return value from xrealloc + * emacs.c (Fkill_emacs): + Use __typeof__, when available. + * emacs.c (voodoo_free_hook): + Use __typeof__, when available. + (Unfortunately, the type of __free_hook is glibc-version-dependent) + * dired.c (user_cache): Use Bufbyte *, not char * + * dired.c (Fuser_name_all_completions): Ditto. + +1999-09-22 Andy Piper + + * redisplay.c (redisplay_frame): reset the gutter display lines + when we reset the subwindows. + + * gutter.c (reset_gutter_display_lines): new function. + + * window.c (Flast_nonminibuf_window): new function equivalent to + FRAME_LAST_NONMINIBUF_WINDOW (). + (syms_of_window): declare it. + + * redisplay.c (create_string_text_block): don't add bogus eol + markers to gutter display lines. + + * glyphs.c (reset_subwindow_cachels): make sure we unmap + subwindows using unmap_subwindow so that expose events get + registered correctly. + + * window.c (window_scroll): use Vwindow_pixel_scroll_increment to + determine how much to scroll the window. + (vars_of_window): Vwindow_pixel_scroll_increment is a new + variable. + +1999-09-20 Robert Pluim + + * glyphs-x.c (update_widget_face): Guard fontList declaration for + non-motif uses. + +1999-09-20 Andy Piper + + * glyphs-msw.c (mswindows_update_subwindow): update faces. + +1999-09-19 Andy Piper + + * glyphs.c (update_frame_subwindows): update if faces have + changed. + + * glyphs-x.c (x_widget_instantiate): create the clip widget using + lwlib rather than directly. + (x_finalize_image_instance): delete the clip widget using lwlib. + (x_update_subwindow): update widget faces. + (update_widget_face): new function for updating the face + properties of a widget. + (x_widget_set_property): update widget faces. + + * lwlib-Xlw.c (xlw_create_clip_window): new function. We need to + manage the clip widgets using lwlib so that we can delete them in + a safe manner. + +1999-09-16 Martin Buchholz + + * lisp-union.h: + * lisp-disunion.h: + Define new, potentially faster INT arithmetic macros + INT_PLUS, INT_MINUS, INT_PLUS1, INT_MINUS1 + * bytecode.c (execute_optimized_function): + Use new macros. + Fix metering code + * bytecode.c (bytecode_negate): + Optimize for integer case. + +1999-08-29 Andreas Jaeger + + * m/mips.h: Support for mips-linux: Add !linux around places + that are not valid for linux, define TEXT_START, DATA_START, + DATA_SEG_BITS. + +1999-09-16 Andy Piper + + * redisplay-output.c (redisplay_output_subwindow): clip subwindows + that don't completely fit on-screen rather than just unmapping + them. + + * glyphs.h: change signature of map_subwindow. + + * glyphs.c (map_subwindow): add display_glyph_area to the + signature. make sure the mapped area saved in the subwindow_cachel + reflects this. + (Fforce_subwindow_map): make a no-op. I don't think this does + anything useful. + + * glyphs-x.h (struct x_subwindow_data): save the Display rather + than the Screen. Add a clipwindow and clipwidget handle. + (IMAGE_INSTANCE_X_CLIPWINDOW): new accessor. + (IMAGE_INSTANCE_X_CLIPWIDGET): ditto. + (XIMAGE_INSTANCE_X_CLIPWIDGET): ditto. + (XIMAGE_INSTANCE_X_CLIPWINDOW): ditto. + + * glyphs-x.c (x_finalize_image_instance): destroy the clipwidget + as well as the widget itself. + (x_unmap_subwindow): unmap the clipwindow and clipwidget rather + than the widgets and subwindows themselves. move the widget inside + the clipwidget. + (x_subwindow_instantiate): hold onto the Display rather than the + Screen. allocate a clipwindow to put the subwindow inside. + (x_resize_subwindow): use saved Display directly. + (x_widget_instantiate): allocate a clipwidget of type EmacsManager + to put widgets inside. + + * glyphs-widget.c: remove group stuff. + + * glyphs-msw.h (struct mswindows_subwindow_data): new structure to + hold the clipwindow. + (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW): new accessor. + (XIMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW): ditto. + + * glyphs-msw.c: remove group stuff. + (mswindows_finalize_image_instance): destroy clipwindow as well as + the widget itself. + (mswindows_unmap_subwindow): unmap the clipwindow rather than the + widget. + (mswindows_map_subwindow): ditto. move the widget within the + clipwindow. + (mswindows_subwindow_instantiate): allocate and initialize + mswindows_subwindow_data. allocate a clipwindow with the subwindow + as a child. + (mswindows_widget_instantiate): ditto. + (mswindows_control_wnd_proc): new function that allows us to + propagate events from the widget to the main windows control loop. + + * device-msw.c (mswindows_init_device): register new widget clip window + class. + + * console.h (struct console_methods): add display_glyph_area to + map_window. + + * console-msw.h: declare new window class and wnd proc for + widgets. + +1999-09-14 Martin Buchholz + + * general.c: + * eldap.c: + Move symbols used only by eldap.c into eldap.c as statics. + +1999-09-09 Martin Buchholz + + * window.c (syms_of_window): + * symbols.c (syms_of_symbols): + * redisplay.c (syms_of_redisplay): + * print.c (syms_of_print): + * lisp.h: + * intl.c (syms_of_intl): + * general.c (syms_of_general): + * frame.c (syms_of_frame): + * fileio.c (syms_of_fileio): + * file-coding.h: + * file-coding.c (syms_of_file_coding): + * extents.c (syms_of_extents): + * event-stream.c (syms_of_event_stream): + * event-stream.c (Fnext_event): + * device.c (syms_of_device): + * data.c (syms_of_data): + * casetab.c (syms_of_casetab): + * casetab.c (check_case_table): + * callint.c (syms_of_callint): + * buffer.c (syms_of_buffer): + Delete unused C symbols: + Qbuffer_file_name, Qbuffer_undo_list, Quser_variable_p, + Qcurrent_prefix_arg, Qtranslate_table, Qkeywordp, + Qnumber_or_marker_p, Qcons, Qkeyword, Qignore, Qdelete_device, + Qcommand_execute, Qglyph_invisible, + Qbuffer_file_coding_system, Qfile_name_handler_alist, + Qframe_x_p, Qframe_tty_p, Qblack, Qkeyboard, Qmenubar, Qpath, + Qvector, Qwhite, Qcase, Qdomain, Qalternate_debugging_output, + Qprint_escape_newlines, Qprint_readably, Qfloat_output_format, + Qwindow_scroll_functions, Qfboundp, Qscroll_up, Qscroll_down + + Rename symbols as required by the CHECK_RECORD macro: + - Qcase_table_p to Qcase_tablep + - Qcoding_system_p to Qcoding_systemp + + * debug.h: + * debug.c (syms_of_debug): + Make debug.c's internal Lisp_Objects static. + + * events.c (vars_of_events): + * events.c (syms_of_events): + Use regular old defsymbol instead of KEYSYM + staticpro(). + + * select-x.c (CHECK_CUTBUFFER): + Rewrite in accordance with coding standards. + + * keymap.c (syms_of_keymap): + Use SPC in the same way as RET, TAB, etc. + +1999-08-27 Jan Vroonhof + + * xemacs-20/src/menubar-x.c (make_dummy_xbutton_event): Don't add + offset twice if HAVE_WMCOMMAND is defined. + +1999-09-13 Mike McEwan + + * redisplay-x.c (x_output_vertical_divider): make sure + shadow_thickness is positive. + +1999-09-10 Julian Back + + * process-nt.c (nt_create_process): fixup to cope with + Vprocess_environment. + +1999-09-02 Andy Piper + + * redisplay-output.c (redisplay_output_layout): call output + routines with clear_clip false. output layout borders with text + correctly. + + * redisplay-msw.c (mswindows_output_blank): call output routines + with clear_clip true. + (mswindows_output_string): ditto. + (mswindows_output_display_block): ditto. + + * redisplay-x.c (x_output_display_block): call output routines + with clear_clip true. + + * redisplay.h: fix output routines for clear_clip parameter. + + * redisplay-output.c (redisplay_output_layout): cope with glyphs + in the border. + + * glyphs-widget.c (layout_instantiate): deal with border glyphs. + (check_valid_glyph_or_instantiator): renamed from + check_valid_glyph_or_image. + (check_valid_border): allow glyphs or their instantiators. + (check_valid_glyph_or_instantiator_list): renamed from + check_valid_glyph_or_image_list, + (glyph_instantiator_to_glyph): new function. make sure a glyph is + a glyph and not an instantiator. + (substitute_keyword_value): new function. replace a keyword value + with a new one. + +1999-09-01 Andy Piper + + * glyphs.c (string_set_property): new function to set the data of + a string. + (image_instantiator_format_create): use it. + +1999-09-07 Hrvoje Niksic + + * fns.c (Fmapc): Rename back to Fmapc_internal. + +1999-07-30 Gleb Arshinov + + * ntheap.h: CONST (semantically constant) name field of file_data + struct + + * unexnt.c (open_output_file): match function definition with + function declaration + + * editfns.c: #include "sysfile.h" for getcwd() prototype + + * gif_io.c: #include "sysfile.h" for close() prototype + +1999-09-02 Martin Buchholz + + * elhash.c: + * elhash.h: + Change the :type keyword to :weakness, for compatibility with the + GNU Emacs 20.5 hash table implementation. + Keep (but don't document) the :type keyword for compatibility. + Obsolete function hash-table-type + General cleanup. + Define function sxhash for compatibility with Common Lisp and GNU Emacs. + +1999-09-01 Martin Buchholz + + * floatfns.c (arith_error): + * floatfns.c (range_error): + * floatfns.c (range_error2): + * floatfns.c (domain_error): + * floatfns.c (domain_error2): + * lrecord.h (LRECORDP): + * console-x.h (X_ERROR_OCCURRED): + * console-x.h (HANDLING_X_ERROR): + * chartab.c (CATEGORYP): + * buffer.h (XCHAR_OR_CHAR_INT): + Remove redundant and confusing parentheses. + + * redisplay-output.c (redisplay_clear_to_window_end): + Remove redundant initialization. + + * redisplay.h: + * redisplay-msw.c: + * redisplay-x.c: + Move declarations of bevel_modeline() into redisplay.h. + +1999-08-30 Olivier Galibert + + * lisp.h: Add staticpro_nodump for undumped staticpro-ing. + * alloc.c: Add staticpro_nodump for undumped staticpro-ing. Add + alignment information for dumped data. Enhance + descriptions. Phase out Vterminal_* variables while + dumping. + * lrecord.h: Add chained descriptions and automagically-reset + lisp_objects to the description system. + + * console-stream.h: Declare the Vterminal_* variables. + + * buffer.c: Don't dump Vbuffer_alist, Vbuffer_defaults and + Vbuffer_local_symbols. + * console.c: Don't dump Vconsole_list, Vconsole_defaults and + Vconsole_local_symbols. + * eval.c: Don't dump Qunbound_suspended_errors_tag. + * lread.c: Don't dump Vread_buffer_stream. + * lstream.c: Don't dump Vlstream_free_list[]. + * search.c: Don't dump last_thing_searched. + * window.c: Don't dump minibuf_window and + Vwindow_configuration_free_list[]. + + * faces.c: Add face description. + * fns.c: Add bit_vector description. + * glyphs.c: Add image specifier description. + * objects.c: Add color, face and face boolean specifiers descriptions. + * opaque.c: Add opaque description. Don't dump Vopaque_ptr_free_list. + * rangetab.c: Add range table description. + * specifier.c: Add specifier and specifier methods description. + * specifier.h: Add specifier extra description support. + + * symbols.c: Fix symbol_value_buffer_local_description. + + * gdbinit (Lisp): Add opaque_ptr, remove opaque_list. + +1999-09-02 Hrvoje Niksic + + * extents.c (extent_remprop): Get extent's plist address + correctly. + +1999-08-31 Andy Piper + + * xmu.h: define Xmu/Converters.h things. + +1999-08-31 Andy Piper + + * opaque.c (equal_opaque_ptr): define. + (hash_opaque_ptr): define. + + * xmu.h: define Xmu/Misc.h things. + +1999-08-17 MORIOKA Tomohiko + + * file-coding.c (determine_real_coding_system): Treat `coding:' + cookie. + +1999-08-16 MORIOKA Tomohiko + + * file-coding.c (struct decoding_stream): New member `counter'. + (reset_decoding_stream): Initialize `counter'. + (decode_coding_ucs4): Use `counter'. + (decode_coding_utf8): Likewise. + +1999-08-31 Andy Piper + + * redisplay-output.c (redisplay_normalize_glyph_area): make sure + the clip offset doesn't exceed the height we have available to + show. + + * window.h (struct window): add top_yoffset and left_xoffset for + pixel scrolling. + (WINDOW_TEXT_TOP_CLIP): new macro. + + * window.c (window_scroll): add behaviour for pixel-scrolling of + tall lines. + + * redisplay.h (struct display_line): add top_clip. + (DISPLAY_LINE_HEIGHT): adjust for top_clip. + (DISPLAY_LINE_YPOS): ditto. + + * redisplay.c (position_redisplay_data_type): add + start_col_xoffset to prepare for pixel-based h-scrolling. + (WINDOW_SCROLLED): new macro. + (next_tab_position): use it. + (add_glyph_rune): use new hscoll vars. + (create_text_block): ditto. + (generate_displayable_area): adjust off-by-one error. + (regenerate_window): take top_clip into account. + (regenerate_window_extents_only_changed): ditto. + (regenerate_window_incrementally): ditto. + + * redisplay-x.c (x_output_display_block): use DISPLAY_LINE_YPOS, + DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. + (x_output_string): ditto. + (x_output_blank): ditto. + (x_output_hline): ditto. + (x_output_eol_cursor): ditto. + + * redisplay-output.c (output_display_line): allow for + top_clip. use DISPLAY_LINE_YPOS, DISPLAY_LINE_HEIGHT and + DISPLAY_LINE_YEND macros. + (redisplay_output_layout): output strings in layouts correctly. + (redisplay_clear_clipped_region): allow for top_clip. + (redisplay_calculate_display_boxes): ditto. + + * redisplay-msw.c (mswindows_output_blank): use DISPLAY_LINE_YPOS, + DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. + (mswindows_output_cursor): ditto. + (mswindows_output_string): ditto. + (mswindows_redraw_exposed_window): ditto. + (mswindows_output_display_block): ditto. + + * gutter.c: new specifier type gutter-size. + (gutter_size_validate): validate gutter-size specifier. + (Fgutter_size_specifier_p): predicate for gutter-size. + (Fredisplay_gutter_area): allow the gutter area to be redisplayed + under user contol, like Fredisplay_echo_area. + (syms_of_gutter): add new functions. + (specifier_type_create_gutter): add new specifier. + (specifier_vars_of_gutter): change specifier types of *-height to + gutter-size. + + * glyphs.c (glyph_width): make work with image instances. + + * console.h (struct console_methods): change api of output_string. + + * glyphs-x.c (x_map_subwindow): move before mapping as reported by + Stephen J. Turnbull + +1999-08-30 Andy Piper + + * glyphs-x.c (x_finalize_image_instance): X_MASK -> PIXMAP_MASK + for assignment. + (init_image_instance_from_x_image): ditto. + (x_xpm_instantiate): ditto. + (x_colorize_image_instance): ditto. Reported by Richard Cognot + + +1999-08-29 Andy Piper + + * glyphs-x.c (x_widget_instantiate): move font initialisation so + that it doesn't get saved in the user defined args. + (x_tab_control_instantiate): Set the fg color of the tab's + children. + (x_tab_control_set_property): ditto. + +1999-08-27 Damon Lipparelli + + * events.h (XTIMEOUT): must preface Lisp_Timeout with ``struct'' + (XSETTIMEOUT): fixup typo + +1999-08-11 Jan Vroonhof + + * syntax.c (scan_words): Unified Mule and Non-mule scanning. + Word boundary search looks back instead of forward so that it + doesn't peek over the limit. + +1999-08-20 Olivier Galibert + + * config.h.in: Add PDUMP define. + * emacs.c (Fdump_emacs): Hackish, call pdump() if configured in. + + * lrecord.h: Enhance description system. + * alloc.c: Fix vector and string description. Add portable + dumper enumeration fonctions. + + * symbols.c: Fix symbols description. Add symbol_value_forward + description. + * eval.c: Add subr description. + * elhash.c (CLEAR_HENTRY): Clean value pointer too. Fix hash + table description. + (remhash_1): CLEAR_HENTRY evaluates the parameter two times now. + +1999-08-20 Olivier Galibert + + * opaque.c: Kill opaque lists, make Lisp_Opaque_Ptr a lrecord of + its own. + * opaque.h: Ditto. + + * eval.c (eval_in_buffer_trapping_errors): + (run_hook_trapping_errors): + (safe_run_hook_trapping_errors): + (call0_trapping_errors): + (call1_trapping_errors): + (call2_trapping_errors): OPAQUEP -> OPAQUE_PTRP. make_opaque_ptr + now takes a non-const void *. + +1999-08-20 Olivier Galibert + + * opaque.c: Remove make_opaque_long. + + * opaque.h: Remove everything opaque_long related. + + * eval.c (vars_of_eval): Make Qunbound_suspended_errors_tag an + opaque_ptr. + + * emacs.c (main_1): Remove make_opaque_long from comment. + +1999-08-20 Olivier Galibert + + * event-stream.c (mark_timeout): + (print_timeout): + (event_stream_generate_wakeup): + (event_stream_resignal_wakeup): + (event_stream_disable_wakeup): + (event_stream_wakeup_pending_p): + (vars_of_event_stream): Lisp_Timeout is now a lrecord. + + * events.h (struct Lisp_Timeout): Added. + +1999-08-24 Andy Piper + + * console-x.h: declare new pixmap signatures. + +1999-08-23 Andy Piper + + * glyphs-x.c (x_update_subwindow): make sure the widget size is + maintained after an update. + + * event-Xt.c (emacs_Xt_handle_magic_event): use + find_matching_subwindow to check whether the exposure is totally + inside a subwindow, if it is then ignore it. + + * glyphs.c (find_matching_subwindow): new function. + + * toolbar-x.c (x_draw_blank_toolbar_button): use new + x_output_shadows signature. + (x_output_toolbar_button): use new x_output_x_pixmap signature. + + * redisplay.h (struct display_box): new structure. + (struct display_glyph_area): ditto. + declare new display_box functions. + + * redisplay-x.c (x_output_pixmap): update for new display + box stuff. + (x_bevel_area): update to allow multiple edge styles and border + segments. + (x_output_display_block): update for new display_box stuff and + signatures. + (x_clear_region): ditto. + (x_output_x_pixmap): ditto. adjust offsets rather than clip. + (console_type_create_redisplay_x): declare new console methods. + (x_output_vertical_divider): update for new bevel_area signature. + (x_output_shadows): update to allow selective drawing of edges. + + * redisplay-tty.c (tty_output_display_block): do nothing for + layouts. + + * redisplay-output.c (redisplay_output_subwindow): convert to use + display_box structure, this allows us to put subwindows anywhere + with any offset, useful for layout glyphs. + (redisplay_output_layout): new function. output a layout and its + sub-glyphs. + (redisplay_output_pixmap): new modular function combining generic + parts of the X and mswindows versions. convert to use display_box + structures. + (redisplay_clear_clipped_region): new function. clear the area a + glyph is going into. + (redisplay_normalize_glyph_area): new function. calculate the + bounds of a display_glyph_area given a display_box. + (redisplay_normalize_display_box): new function. shrink a + display_box to enclose a display_glyph_area. + (redisplay_display_boxes_in_window_p): check whether the input + display_box and display_glyph_area are actually in a window. + (redisplay_calculate_display_boxes): calculate display boxes based + on conventional display_line metrics. + (bevel_modeline): update for new bevel_area signature. + + * redisplay-msw.c (mswindows_output_blank): update for new + display_box stuff. + (mswindows_output_string): ditto. + (mswindows_output_dibitmap): ditto. + (mswindows_output_dibitmap_region): ditto. + (mswindows_output_pixmap): ditto. + (mswindows_bevel_area): update to allow multiple edge styles and + border segments. + (mswindows_output_display_block): update for new display_box stuff + and signatures. + (mswindows_clear_region): ditto. + (console_type_create_redisplay_mswindows): declare new console methods. + + * lisp.h (edge_style): new enum. + declare display_box and display_glyph_area. + + * gutter.c (output_gutter): update for new bevel_area signature. + + * glyphs.h (image_instance_type): add layout. + (IMAGE_LAYOUT_MASK): ditto. + (LAYOUT_IMAGE_INSTANCEP): new macro. + (CHECK_LAYOUT_IMAGE_INSTANCE): ditto. + (struct Lisp_Image_Instance): add offsets for layout and the + layout type itself. move mask here also. + (IMAGE_INSTANCE_LAYOUT_CHILDREN): new macro. + (IMAGE_INSTANCE_LAYOUT_BORDER): ditto. + (XIMAGE_INSTANCE_LAYOUT_CHILDREN): ditto. + (XIMAGE_INSTANCE_LAYOUT_BORDER): ditto. + + * glyphs.c (mark_image_instance): update for layouts. + (print_image_instance): ditto. + (image_instance_equal): ditto. + (image_instance_hash): ditto. + (allocate_image_instance): initialise offsets for layout. + (decode_image_instance_type): update for layouts. + (encode_image_instance_type): ditto. + (Fimage_instance_height): ditto. + (Fimage_instance_width): ditto. + (allocate_glyph): ditto. + (glyph_width): allow image instances as an argument. update for layouts. + (glyph_height_internal): ditto. + (syms_of_glyphs): add layout symbols. + + * glyphs-x.h (struct x_image_instance_data): remove mask entry. + (IMAGE_INSTANCE_X_MASK): update. -1999-08-31 MORIOKA Tomohiko + * glyphs-x.c (x_label_instantiate): new function. instantiate a + label. + (image_instantiator_format_create_glyphs_x): initialise new layout + glyph type. + + * glyphs-widget.c: new layout type. + (check_valid_orientation): new keyword checker for layouts. + (check_valid_justification): ditto. + (check_valid_border): ditto. + (check_valid_glyph_or_image_list): ditto. + (layout_possible_dest_types): new function for layout glyph type. + (layout_normalize): ditto. + (layout_instantiate): ditto. + (syms_of_glyphs_widget): new keywords for layout. + (image_instantiator_format_create_glyphs_widget): initialise the + layout glyph type. + + * glyphs-msw.h (struct mswindows_image_instance_data): remove mask + argument. + (IMAGE_INSTANCE_MSWINDOWS_MASK): update. + + * glyphs-msw.c: declare layout format. + (image_instantiator_format_create_glyphs_mswindows): initialise it. + + * general.c: new symbols for layouts. - * character.h (PRE_LEADING_BYTE_PRIVATE_1): Deleted. - (PRE_LEADING_BYTE_PRIVATE_2): Deleted. + * console.h (struct console_methods): new console methods for + outputting pixmaps and strings. - * mule-charset.c (leading_code_private_11): Don't define in - UTF-2000. +1999-08-23 Didier Verna - * mule-ccl.c (ccl_driver): Don't define `CCL_ReadMultibyteChar2' - in UTF-2000 because it is not ported yet and not to use - `PRE_LEADING_BYTE_PRIVATE_1' and `PRE_LEADING_BYTE_PRIVATE_2'. + * sound.c: revert the renaming of `bell_volume' to `Vbell_volume' + and `bell_inhibit_time' to `Vbell_inhibit_time'. -1999-08-30 MORIOKA Tomohiko +1999-08-18 Andy Piper - * character.h (LEADING_BYTE_COMPOSITE): Deleted. + * redisplay-output.c (redisplay_output_subwindow): disable + clipping attempt. -1999-08-29 MORIOKA Tomohiko +1999-08-17 Andy Piper - * regex.c (re_compile_fastmap): Don't use `LEADING_BYTE_PREFIX_P' - in UTF-2000. + * gutter.c (redraw_exposed_gutter): handle degenerate case of no + area to expose or no gutter to display. - * chartab.h (CHAR_TABLE_NON_ASCII_VALUE_UNSAFE): Use int instead - of unsigned char to store leading-byte. +1999-08-16 Charles G Waldman - * chartab.c (get_non_ascii_char_table_value): Don't use - `BREAKUP_CHAR_1_UNSAFE' in UTF-2000. + * sound.c: rename `bell_volume' to `Vbell_volume' and + `bell_inhibit_time' to `Vbell_inhibit_time'. - * file-coding.c (encode_coding_big5): Delete bogus implementation - in UTF2000. +1999-08-13 Charles G Waldman - * character.h (LEADING_BYTE_*): Delete definition for - non-UTF-2000. - (LEADING_BYTE_PRIVATE_P): Deleted unconditionally. - (LEADING_BYTE_PREFIX_P): Deleted. - (PRIVATE_LEADING_BYTE_PREFIX): Deleted. - (BUFBYTE_FIRST_BYTE_P): Delete definition for non-UTF-2000. - (BUFBYTE_LEADING_BYTE_P): Deleted. - (CHARSET_PRIVATE_P): Deleted unconditionally. - (rep_bytes_by_first_byte): Deleted unconditionally. - (REP_BYTES_BY_FIRST_BYTE): Delete definition for non-UTF-2000. - (FIELD1_TO_PRIVATE_LEADING_BYTE): Likewise. - (FIELD1_TO_OFFICIAL_LEADING_BYTE): Likewise. - (FIELD2_TO_PRIVATE_LEADING_BYTE): Likewise. - (CHAR_FIELD2): Deleted. - (CHAR_FIELD3): Deleted. - (MAKE_CHAR): Delete definition for non-UTF-2000. - (BREAKUP_CHAR_1_UNSAFE): Deleted. - (breakup_char_1): New implementation. - (CHAR_CHARSET): Use `BREAKUP_CHAR'. - (CHAR_LEADING_BYTE): Use `CHAR_CHARSET'. + * sound.c: (bell-inhibit-time): New variable. + (ding): Use it. + (sound-alist): Fix docstring. -1999-08-29 MORIOKA Tomohiko +1999-08-17 Andy Piper - * character.h (REP_BYTES_BY_FIRST_BYTE): Change order of - condition. + * gui-x.c (button_item_to_widget_value): xstrdup name so that + deleting it is ok. -1999-08-28 MORIOKA Tomohiko +1999-08-16 Jeff Miller - * character.h (LEADING_BYTE_PRIVATE_P): Don't define in UTF2000. - (CHARSET_PRIVATE_P): Likewise. - (XCHARSET_PRIVATE_P): Likewise. - (MAKE_CHAR): Don't use XCHARSET_PRIVATE_P in UTF2000. + * syntax.c (scan_words): make compile. - * file-coding.c (encode_coding_ucs4): Delete bogus implement in - UTF2000. - (decode_coding_iso2022): Don't use XCHARSET_PRIVATE_P in UTF2000. +1999-08-16 Andy Piper -1999-08-28 MORIOKA Tomohiko + * redisplay-output.c (redisplay_output_subwindow): try and be more + relaxed about clipping possibilities. - * character.h (LEADING_BYTE_*): Changed in UTF2000. - (NUM_LEADING_BYTES): Changed from 128 to 256. - (FIELD1_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. - (FIELD1_TO_OFFICIAL_LEADING_BYTE): Change value to 0x80 in - UTF2000. - (FIELD2_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. + * glyphs-x.c (x_tab_control_set_property): free_widget_value_tree + rather than just the widget_value. + (x_update_subwindow): ditto. + (x_widget_instantiate): ditto. - * mule-charset.c (Vcharset_chinese_cns11643_3): New variable in - UTF2000. - (Vcharset_chinese_cns11643_4): New variable in UTF2000. - (Vcharset_chinese_cns11643_5): New variable in UTF2000. - (Vcharset_chinese_cns11643_6): New variable in UTF2000. - (Vcharset_chinese_cns11643_7): New variable in UTF2000. - (Qchinese_cns11643_3): New variable in UTF2000. - (Qchinese_cns11643_4): New variable in UTF2000. - (Qchinese_cns11643_5): New variable in UTF2000. - (Qchinese_cns11643_6): New variable in UTF2000. - (Qchinese_cns11643_7): New variable in UTF2000. - (syms_of_mule_charset): Define `chinese-cns11643-3', - `chinese-cns11643-4', `chinese-cns11643-5', `chinese-cns11643-6' - and `chinese-cns11643-7' in UTF2000. - (vars_of_mule_charset): Initialize - next_allocated_2_byte_leading_byte by LEADING_BYTE_CHINESE_BIG5_2 - + 1 in UTF2000. - (complex_vars_of_mule_charset): Setup charset - `chinese-cns11643-3', `chinese-cns11643-4', `chinese-cns11643-5', - `chinese-cns11643-6' and `chinese-cns11643-7' in UTF2000. + * gutter.c (output_gutter): shrink current display lines if + required. -1999-08-27 MORIOKA Tomohiko +1999-08-15 Andy Piper - * mule-charset.c: Move setting for `leading-code-private-11' from - `syms_of_mule_charset' to `vars_of_mule_charset'. + * redisplay.h: declare free_display_lines. -1999-08-27 MORIOKA Tomohiko + * redisplay.c (free_display_lines): make non-static. - * mule-charset.h (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' - and `NUM_LEADING_BYTES' in assert. + * gutter.c (free_frame_gutters): use free_display_lines instead of + Dynarr_free. + (calculate_gutter_size): ditto. -1999-08-27 MORIOKA Tomohiko +1999-08-12 Jan Vroonhof - * character.h (charset_by_leading_byte): Use `NUM_LEADING_BYTES' - instead of 128. - (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' and - `NUM_LEADING_BYTES' instead of 128. + * eval.c (run_hook_with_args_in_buffer): GCPRO globals. -1999-08-26 MORIOKA Tomohiko +1999-08-14 Andy Piper - * mule-charset.h (charset_by_leading_byte): Use - `NUM_LEADING_BYTES' instead of 128. - (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' instead of 128. + * glyphs.c (update_subwindow_cachel): make it less brittle. - * mule-charset.c (charset_by_leading_byte): Use - `NUM_LEADING_BYTES' instead of 128. - (make_charset): Use `MIN_LEADING_BYTE' instead of 128. +1999-08-04 Mike Woolley - * faces.h (FACE_CACHEL_FONT): Use `MIN_LEADING_BYTE' instead of - 128. + * scrollbar-msw.c (mswindows_handle_mousewheel_event): Fixed + problem in wheelmouse code occurring when the horizontal scrollbar + is enabled but not visible. -1999-08-25 MORIOKA Tomohiko +1999-08-08 Andy Piper - * mule-charset.c (syms_of_mule_charset): Update to - 0.4 (Shin-Imamiya). + * toolbar-msw.c (mswindows_redraw_frame_toolbars): new function. + (console_type_create_toolbar_mswindows): use it. -1999-07-13 Daiki Ueno + * glyphs.c (Fset_image_instance_property): fiddly reorganisation. - * file-coding.c (encode_coding_sjis): New implementation for - UTF2000. (decode_coding_sjis): Ditto. + * redisplay-output.c (redisplay_output_display_block): unmap + subwindows in the block area before outputting the block. -1999-06-17 MORIOKA Tomohiko + * event-msw.c (mswindows_wnd_proc): check the update rect before + painting and disable expose registration while painting. - * mule-charset.c, character.h (Bytecount rep_bytes_by_first_byte): - Don't define in UTF2000. + * glyphs.c (register_ignored_expose): check + hold_ignored_expose_registration before registering expose events. - * character.h: Include mule-charset.h if CHAR_IS_UCS4 is not - defined. + * redisplay.c (redisplay_frame): reset the subwindow cache before + displaying the gutter. - * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, - mule-ccl.c, lstream.h, buffer.h: Include character.h in every - MULE. + * glyphs-msw.c (mswindows_map_subwindow): move the window before + mapping. -1999-06-17 MORIOKA Tomohiko + * gutter.c (update_frame_gutters): check for glyphs_changed as if + it is the subwindow cache will have been reset. - * config.h.in (CHAR_IS_UCS4): New macro. +1999-08-06 Andy Piper - * mule-charset.c (rep_bytes_by_first_byte): Modify for - conventional MULE representation. - (syms_of_mule_charset): Update to 0.3 (Imamiya). + * gui-x.c (button_item_to_widget_value): cope with strings. - * mule-charset.h: Reverted to original. + * glyphs.h: declare global widget functions. + (IIFORMAT_HAS_SHARED_DEVMETHOD): new macro. - * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, - mule-ccl.c, lstream.h, buffer.h: Use "character.h" instead of - "mule-charset.h" if CHAR_IS_UCS4 is defined. + * glyphs-x.c (x_combo_box_instantiate): do generic initialization + here. remove dead code. + (image_instantiator_format_create_glyphs_x): enable combo boxes + for Motif 2.0. - * character.h: New file. + * glyphs-widget.c (widget_instantiate_1): make non-static. + (tree_view_instantiate): renamed from combo_box_instantiate. + (image_instantiator_format_create_glyphs_widget): use new/changed methods. - * file-coding.c (Fmake_coding_system): Set 1 to - `codesys->fixed.size' if TYPE is `no-conversion' and UTF2000 is - defined. - (encode_coding_no_conversion): New implementation for UTF2000. + * glyphs-msw.c (mswindows_combo_box_instantiate): do generic + initialization here. - * file-coding.h (struct Lisp_Coding_System): Add new member - `fixed.size'. + * lwlib-Xm.c (xm_update_combo_box): new function. + (xm_update_one_widget): call it. + (xm_update_one_value): deal with combo boxes as well as lists. + (xm_create_combo_box): create a drop-down combo box. -1999-06-16 MORIOKA Tomohiko + * toolbar-msw.c (mswindows_output_toolbar): call + mswindows_move_toolbar. - * file-coding.c (decode_coding_iso2022): Code-point arguments of - `MAKE_CHAR' must be smaller than 0x80 in UTF2000. - (encode_coding_iso2022): New implementation for UTF2000. +1999-08-05 Andy Piper -1999-06-15 MORIOKA Tomohiko + * window.c (Fcurrent_pixel_column): new function. use display + lines to calculate pixel position of point. + * window.c (syms_of_window): declare it. - * mule-canna.c (c2mu): New implementation for UTF2000. - (m2c): Likewise. +1999-08-05 Andy Piper -1999-06-15 MORIOKA Tomohiko + * glyphs.c (check_for_ignored_expose): ignore exposures wholly + contained in our ignore list. - * file-coding.c (encode_coding_no_conversion): Modify for UTF2000. + * buffer.c (Frecord_buffer): add call to record-buffer-hook. + (syms_of_buffer): declare record-buffer-hook. -1999-06-15 MORIOKA Tomohiko + * s/mingw32.h: define mousewheel things. - * file-coding.c (reset_encoding_stream): Set 0 to - `str->iso2022.current_char_boundary' in UTF2000. - (encode_utf8): Don't define in UTF2000. - (encode_coding_utf8): New implementation for UTF-8 representation - of UTF2000. - (complex_vars_of_file_coding): Define coding-system `utf-8'. +1999-08-04 Mike Woolley -1999-06-15 MORIOKA Tomohiko + * windowsnt.h (_WIN32_WINNT): enable for win95 - * mule.c (vars_of_mule): Provide `utf-2000' in UTF2000. + * s/cygwin32.h: define mousewheel things. - * mule-charset.h (BUFBYTE_FIRST_BYTE_P): Modify for UTF-8 in - UTF2000. - (REP_BYTES_BY_FIRST_BYTE): Likewise. + * scrollbar-msw.h: declare mousewheel handler. - * buffer.h (non_ascii_valid_char_p): Don't define in UTF2000. + * scrollbar-msw.c (mswindows_handle_mousewheel_event): new function. - * mule-charset.c (non_ascii_set_charptr_emchar): Don't define - local variables `lb', `c1', `c2' and `charset' in UTF2000; encode - as UTF-8 in UTF2000. - (non_ascii_charptr_emchar): Decode as UTF-8 in UTF2000. - (non_ascii_valid_char_p): Don't define in UTF2000. - (non_ascii_charptr_copy_char): Add case 5 and 6 in UTF2000. - (Lstream_get_emchar_1): Likewise. - (utf-2000-version): New variable in UTF2000. +1999-08-04 Andy Piper - * lread.c (read_escape): Add new reader `u'. + * gui-x.c (gui_items_to_widget_values): remove unused variable. + (gui_items_to_widget_values_1): ditto. - * insdel.c (three_to_one_table): Don't define in UTF2000. - (bufpos_to_bytind_func): Use `buf->text->mule_size' instead of - `buf->text->mule_shifter' and `buf->text->mule_three_p' in - UTF2000. - (bytind_to_bufpos_func): Likewise. - (buffer_mule_signal_inserted_region): Likewise. - (vars_of_insdel): Don't initialize `three_to_one_table'. - (init_buffer_text): Use `buf->text->mule_size' instead of - `buf->text->mule_shifter' and `buf->text->mule_three_p' in - UTF2000. + * gui-x.h: unconditionally define since it is used everywhere. - * file-coding.c (DECODE_ADD_BINARY_CHAR): New implementation for - UTF-8 representation in UTF2000. - (DECODE_ADD_UCS_CHAR): New macro in UTF2000. - (decode_ucs4): Use `DECODE_ADD_UCS_CHAR' in UTF2000. - (decode_coding_iso2022): Don't define local variable `lb' in - UTF2000; don't use LEADING_BYTE in UTF2000; use - `DECODE_ADD_UCS_CHAR' in UTF2000. - (convert_to_external_format): Decode as UTF-8 in UTF2000. +1999-08-04 Andy Piper - * config.h.in (UTF2000): New macro. + * glyphs-x.c (x_finalize_image_instance): only free pixels if we + have that type of image. - * buffer.h (struct buffer_text): Add new member `mule_size' and - don't add `mule_shifter' and `mule_three_p' in UTF2000. - (valid_char_p): Return always 1 in UTF2000. - (MAX_EMCHAR_LEN): 6 in UTF2000. - (three_to_one_table): Don't define in UTF2000. - (real_bufpos_to_bytind): Modify for UTF-8 representation in - UTF2000. - (real_bytind_to_bufpos): Likewise. +1999-07-30 Andy Piper - * alloc.c (Fmake_string): Add case 5 and 6 for UTF2000. + * redisplay-output.c (redisplay_unmap_subwindows): add comparison + subwindow to not unmap if required. + (redisplay_unmap_subwindows_maybe): comparison is Qnil. + (redisplay_unmap_subwindows_except_us): new function. + (redisplay_output_subwindow): use it to unmap windows in the area + we are displaying into. -1999-06-10 MORIOKA Tomohiko + * glyphs.c (update_subwindow_cachel_data): always update as we + only ever get called when an update is required. + (update_subwindow_cachel): new function. sync a subwindow with its + cachel. + (Fresize_subwindow): use it. + (register_ignored_expose): make sure we set the tail correctly. - * mule-charset.c (rep_bytes_by_first_byte): Modified for character - representation change. - (Vutf_2000_version): New variable. - (leading_code_private_11): New variable. - (syms_of_mule_charset): Add new variables `utf-2000-version' and - `leading-code-private-11'. +1999-07-28 Andy Piper - * mule-charset.h (LEADING_BYTE_CHINESE_CCITT_GB): New macro. - (LEADING_BYTE_CHINESE_BIG5_1): Changed to 0x96 temporally. - (LEADING_BYTE_CHINESE_CNS11643_1): Changed to 0x97. - (LEADING_BYTE_CHINESE_CNS11643_2): Changed to 0x98. - (LEADING_BYTE_CHINESE_CNS11643_3): New macro. - (LEADING_BYTE_CHINESE_CNS11643_4): Likewise. - (LEADING_BYTE_CHINESE_CNS11643_5): Likewise. - (LEADING_BYTE_CHINESE_CNS11643_6): Likewise. - (LEADING_BYTE_CHINESE_CNS11643_7): Likewise [but not used]. - (LEADING_BYTE_CHINESE_BIG5_2): Changed to 0x9D temporally. - (LEADING_BYTE_KOREAN_KPS9566): New macro [but not used]. - (CHAR_FIELD1_MASK): Changed to (0x7F << 14). - (MIN_CHAR_GREEK): New macro. - (MAX_CHAR_GREEK): New macro. - (MIN_CHAR_CYRILLIC): New macro. - (MAX_CHAR_CYRILLIC): New macro. - (MIN_CHAR_HEBREW): New macro. - (MAX_CHAR_HEBREW): New macro. - (MIN_CHAR_THAI): New macro. - (MAX_CHAR_THAI): New macro. - (MIN_CHAR_HALFWIDTH_KATAKANA): New macro. - (MAX_CHAR_HALFWIDTH_KATAKANA): New macro. - (CHAR_FIELD2_INTERNAL): New macro [renamed from `CHAR_FIELD2'. - (CHAR_FIELD3_INTERNAL): New macro [renamed from `CHAR_FIELD3'. - (FIELD1_TO_PRIVATE_LEADING_BYTE): Changed to 0xc0. - (FIELD1_TO_OFFICIAL_LEADING_BYTE): Changed to 0x50. - (CHAR_FIELD2): New inline function. - (CHAR_FIELD3): New inline function. - (MULE_CHAR_PRIVATE_OFFSET): New macro. - (MIN_CHAR_OFFICIAL_TYPE9N): Shifted to `MULE_CHAR_PRIVATE_OFFSET'. - (MIN_CHAR_PRIVATE_TYPE9N): Likewise. - (MIN_CHAR_PRIVATE_TYPE9NX9N): Likewise. - (MIN_CHAR_OFFICIAL_TYPE9NX9N): Likewise. - (MIN_CHAR_COMPOSITION): Likewise. - (CHAR_LEADING_BYTE): Modified for character representation change. - (MAKE_CHAR): Likewise. + * redisplay-output.c (redisplay_clear_bottom_of_window): remove + unneeded device. - * lisp.h (Vcharset_latin_iso8859_1): New variable. - (Vcharset_greek_iso8859_7): Likewise. - (Vcharset_cyrillic_iso8859_5): Likewise. - (Vcharset_hebrew_iso8859_8): Likewise. - (Vcharset_thai_tis620): Likewise. - (Vcharset_katakana_jisx0201): Likewise. + * gutter.c (redraw_exposed_gutter): unmap subwindows from the + whole gutter. -1999-08-17 MORIOKA Tomohiko + * gui.h: declare parse_gui_item_tree_list and + parse_gui_item_tree_children. - * file-coding.c (determine_real_coding_system): Treat `coding:' - cookie. + * gui.c (parse_gui_item_tree_item): new function for parsing item + lists into gui-item trees. + (parse_gui_item_tree_children): ditto. + (parse_gui_item_tree_list): ditto. -1999-08-16 MORIOKA Tomohiko + * gui-x.h: declare gui_items_to_widget_values. - * file-coding.c (struct decoding_stream): New member `counter'. - (reset_decoding_stream): Initialize `counter'. - (decode_coding_ucs4): Use `counter'. - (decode_coding_utf8): Likewise. + * gui-x.c (gui_items_to_widget_values_1): new function for + recursively parsing gui-items into widget_values. + (gui_item_children_to_widget_values): ditto. + (gui_items_to_widget_values): ditto. + (sanity_check_lwlib): add widgets macrolets. + + * glyphs.h (IMAGE_INSTANCE_WIDGET_ITEMS): rename from *ITEM. + (XIMAGE_INSTANCE_WIDGET_ITEMS): ditto. + (IMAGE_INSTANCE_WIDGET_ITEM): rename from *SINGLE_ITEM. + (XIMAGE_INSTANCE_WIDGET_ITEM): ditto. + (struct expose_ignore): new structure for storing ignorable expose + events. + + * glyphs.c (valid_image_instantiator_format_p): fix so that using + a console-type as a locale works. + (mark_image_instance): ITEM->ITEMS. + (image_instance_equal): ditto. + (image_instance_hash): ditto. + (struct expose_ignore_blocktype): new blocktype. + (check_for_ignored_expose): new function. checks frame exposure + list for events to ignore. + (register_ignored_expose): new function. registers an expose event + as ignorable. + (unmap_subwindow): register the expose event as ignorable. + (vars_of_glyphs): initialise the exposure blocktype. + + * glyphs-x.c (x_finalize_image_instance): use lw_destroy_widget. + (x_update_subwindow): modify all widgets using widget_value tree + rather than just a single widget value. + (x_widget_instantiate): LWLIB_USES_MOTIF -> LWLIB_WIDGETS_MOTIF. + make sure widgets don't resize themselves. + (x_tab_control_instantiate): new function. use lwlib tab functions. + (x_tab_control_set_property): new function. + (image_instantiator_format_create_glyphs_x): add tab_control. + + * glyphs-widget.c (widget_text_to_pixel_conversion): calculate + slightly more sensibly. + (initialize_widget_image_instance): ITEM->ITEMS. + (widget_instantiate_1): parse gui items generically into the ITEMS + entry. + + * glyphs-msw.c (mswindows_update_subwindow): replace + SINGLE_ITEM->ITEM. + (mswindows_register_widget_instance): ditto. + (add_tree_item): modify to use new pre-initialised gui-item + structure. + (add_tab_item): ditto. + (mswindows_tab_control_instantiate): ditto. + (mswindows_tab_control_set_property): ditto. + (image_instantiator_format_create_glyphs_mswindows): predicate + existance of widgets on HAVE_WIDGETS. + + * frame.h (struct frame): add subwindow_exposures variables. + + * frame.c (allocate_frame_core): reset subwindow_exposures links. + + * event-msw.c (mswindows_wnd_proc): check for ignored + expose events before redrawing. + + * event-Xt.c (emacs_Xt_handle_magic_event): check for ignored + expose events before redrawing. + +1999-07-30 SL Baur + + * scrollbar-x.c: should include EmacsFrame.h. + From Jeff Miller 1999-07-30 XEmacs Build Bot @@ -1663,7 +3997,7 @@ 1999-07-27 Jeff Miller - * add a "#ifdef HAVE_MENUBARS" wrapper to gui.c around + * add a "#ifdef HAVE_MENUBARS" wrapper to gui.c around menubar_show_keybindings. 1999-07-23 SL Baur @@ -1759,10 +4093,10 @@ * event-Xt.c (handle_focus_event_1): Re-enable Motif/XIM to get focus the event (XIM_focus_event). - (emacs_Xt_handle_magic_event): No side effect on Motif/XIM because + (emacs_Xt_handle_magic_event): No side effect on Motif/XIM because XIM_SetGeometry does nothing in input_method_motif.c, but re-unify the interface for future use (XIM_SetGeometry). - * redisplay-x.c (x_output_string): Re-enable Motif/XIM to set spot + * redisplay-x.c (x_output_string): Re-enable Motif/XIM to set spot location (XIM_SetSpotLocation). (x_output_eol_cursor): Ditto. @@ -1870,7 +4204,7 @@ * redisplay-x.c (redisplay_clear_to_window_end): moved to redisplay.c - + * redisplay-msw.c (redisplay_clear_to_window_end): deleted. * gutter.c: new file - implements gutters. All new functions are @@ -2009,9 +4343,9 @@ 1999-07-03 Gunnar Evermann - * tooltalk.c (init_tooltalk): save signal actions for SIGQUIT, - SIGINT and SIGCHLD before calling tt_open and restore the - afterwards. This fixes e.g. the zombie subprocesses on Solaris + * tooltalk.c (init_tooltalk): save signal actions for SIGQUIT, + SIGINT and SIGCHLD before calling tt_open and restore the + afterwards. This fixes e.g. the zombie subprocesses on Solaris 1999-07-06 SL Baur @@ -3936,8 +6270,8 @@ 1998-12-11 Martin Buchholz - * event-msw.c (mswindows_cancel_dispatch_event): - Gratuitous code prettification + * event-msw.c (mswindows_cancel_dispatch_event): + Gratuitous code prettification 1998-12-07 Hrvoje Niksic @@ -5762,7 +8096,7 @@ 1998-08-07 Matt Stupple - * ntproc.c: don't wait on char_consumed at thread entry. + * ntproc.c: don't wait on char_consumed at thread entry. Additionally, to get the 'process' marked as finished, ensure that the CHILD_ACTIVE macro returns false, so before exiting close char_avail and set it to NULL, and close other handles @@ -7055,7 +9389,7 @@ Wed May 27, 1998 Darryl Okahata 1998-05-14 Damon Lipparelli - * winslots.h: close comment + * winslots.h: close comment 1998-05-16 Kirill M. Katsnelson diff --git a/src/Makefile.in.in b/src/Makefile.in.in index 8a02b11..cef8f86 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -739,5 +739,8 @@ install: ${PROGNAME} FRC.depend: depend: FRC.depend cd ${srcdir} && $(RM) depend.tmp && \ - perl make-src-depend > depend.tmp && \ - $(RM) depend && mv depend.tmp depend + perl ./make-src-depend > depend.tmp && \ + if cmp -s depend depend.tmp; \ + then $(RM) depend.tmp; \ + else $(RM) depend && mv depend.tmp depend; \ + fi diff --git a/src/abbrev.c b/src/abbrev.c index 2add8a9..80f08ad 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -222,10 +222,11 @@ abbrev_oblookup (struct buffer *buf, Lisp_Object obarray) because of consistency with abbrev_match. */ if (wordend < point) return 0; - if (wordend <= wordstart) - return 0; } + if (wordend <= wordstart) + return 0; + p = word = (Bufbyte *) alloca (MAX_EMCHAR_LEN * (wordend - wordstart)); for (idx = wordstart; idx < wordend; idx++) { diff --git a/src/alloc.c b/src/alloc.c index b01489c..ca3bb7c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ Added lcrecord lists for 19.14. slb: Lots of work on the purification and dump time code. Synched Doug Lea malloc support from Emacs 20.2. - og: Killed the purespace. + og: Killed the purespace. Portable dumper. */ #include @@ -57,11 +57,27 @@ Boston, MA 02111-1307, USA. */ #include "specifier.h" #include "sysfile.h" #include "window.h" +#include "console-stream.h" #ifdef DOUG_LEA_MALLOC #include #endif +#ifdef HAVE_MMAP +#include +#include +#endif + +#ifdef PDUMP +typedef struct +{ + const struct lrecord_description *desc; + int count; +} pdump_reloc_table; + +static char *pdump_rt_list = 0; +#endif + EXFUN (Fgarbage_collect, 0); /* Return the true size of a struct with a variable-length array field. */ @@ -183,13 +199,13 @@ Error_behavior ERROR_ME, ERROR_ME_NOT, ERROR_ME_WARN; int c_readonly (Lisp_Object obj) { - return POINTER_TYPE_P (XGCTYPE (obj)) && C_READONLY (obj); + return POINTER_TYPE_P (XTYPE (obj)) && C_READONLY (obj); } int lisp_readonly (Lisp_Object obj) { - return POINTER_TYPE_P (XGCTYPE (obj)) && LISP_READONLY (obj); + return POINTER_TYPE_P (XTYPE (obj)) && LISP_READONLY (obj); } @@ -359,8 +375,7 @@ xstrdup (CONST char *str) void *val = xmalloc (len); if (val == 0) return 0; - memcpy (val, str, len); - return (char *) val; + return (char *) memcpy (val, str, len); } #ifdef NEED_STRDUP @@ -375,8 +390,7 @@ strdup (CONST char *s) static void * allocate_lisp_storage (size_t size) { - void *p = xmalloc (size); - return p; + return xmalloc (size); } @@ -465,42 +479,17 @@ disksave_object_finalization_1 (void) } } - -/* This must not be called -- it just serves as for EQ test - * If lheader->implementation->finalizer is this_marks_a_marked_record, - * then lrecord has been marked by the GC sweeper - * header->implementation is put back to its correct value by - * sweep_records */ -void -this_marks_a_marked_record (void *dummy0, int dummy1) -{ - abort (); -} - /* Semi-kludge -- lrecord_symbol_value_forward objects get stuck in CONST space and you get SEGV's if you attempt to mark them. This sits in lheader->implementation->marker. */ Lisp_Object -this_one_is_unmarkable (Lisp_Object obj, void (*markobj) (Lisp_Object)) +this_one_is_unmarkable (Lisp_Object obj) { abort (); return Qnil; } -/* XGCTYPE for records */ -int -gc_record_type_p (Lisp_Object frob, CONST struct lrecord_implementation *type) -{ - CONST struct lrecord_implementation *imp; - - if (XGCTYPE (frob) != Lisp_Type_Record) - return 0; - - imp = XRECORD_LHEADER_IMPLEMENTATION (frob); - return imp == type; -} - /************************************************************************/ /* Debugger support */ @@ -943,12 +932,12 @@ DECLARE_FIXED_TYPE_ALLOC (cons, struct Lisp_Cons); #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000 static Lisp_Object -mark_cons (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_cons (Lisp_Object obj) { - if (GC_NILP (XCDR (obj))) + if (NILP (XCDR (obj))) return XCAR (obj); - markobj (XCAR (obj)); + mark_object (XCAR (obj)); return XCDR (obj); } @@ -1096,9 +1085,9 @@ Return a new list of length LENGTH, with each element being INIT. { Lisp_Object val = Qnil; - int size = XINT (length); + size_t size = XINT (length); - while (size-- > 0) + while (size--) val = Fcons (init, val); return val; } @@ -1135,14 +1124,14 @@ make_float (double float_value) /************************************************************************/ static Lisp_Object -mark_vector (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_vector (Lisp_Object obj) { Lisp_Vector *ptr = XVECTOR (obj); int len = vector_length (ptr); int i; for (i = 0; i < len - 1; i++) - markobj (ptr->contents[i]); + mark_object (ptr->contents[i]); return (len > 0) ? ptr->contents[len - 1] : Qnil; } @@ -1172,7 +1161,8 @@ vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) static const struct lrecord_description vector_description[] = { { XD_LONG, offsetof(struct Lisp_Vector, size) }, - { XD_LISP_OBJECT, offsetof(struct Lisp_Vector, contents), XD_INDIRECT(0) } + { XD_LISP_OBJECT, offsetof(struct Lisp_Vector, contents), XD_INDIRECT(0, 0) }, + { XD_END } }; DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector, @@ -1545,7 +1535,7 @@ This is terrible behavior which is retained for compatibility with old f->constants = constants; CHECK_NATNUM (stack_depth); - f->stack_depth = XINT (stack_depth); + f->stack_depth = XINT (stack_depth); #ifdef COMPILED_FUNCTION_ANNOTATION_HACK if (!NILP (Vcurrent_compiled_function_annotation)) @@ -1557,7 +1547,7 @@ This is terrible behavior which is retained for compatibility with old struct gcpro gcpro1; GCPRO1 (fun); /* don't let fun get reaped */ Vload_file_name_internal_the_purecopy = - Fpurecopy (Ffile_name_nondirectory (Vload_file_name_internal)); + Ffile_name_nondirectory (Vload_file_name_internal); f->annotated = Vload_file_name_internal_the_purecopy; UNGCPRO; } @@ -1736,11 +1726,11 @@ DECLARE_FIXED_TYPE_ALLOC (string, struct Lisp_String); #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 1000 static Lisp_Object -mark_string (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_string (Lisp_Object obj) { struct Lisp_String *ptr = XSTRING (obj); - if (GC_CONSP (ptr->plist) && GC_EXTENT_INFOP (XCAR (ptr->plist))) + if (CONSP (ptr->plist) && EXTENT_INFOP (XCAR (ptr->plist))) flush_cached_extent_info (XCAR (ptr->plist)); return ptr->plist; } @@ -1754,8 +1744,9 @@ string_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) } static const struct lrecord_description string_description[] = { - { XD_STRING_DATA, offsetof(Lisp_String, data) }, - { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, + { XD_BYTECOUNT, offsetof(Lisp_String, size) }, + { XD_OPAQUE_DATA_PTR, offsetof(Lisp_String, data), XD_INDIRECT(0, 1) }, + { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, { XD_END } }; @@ -1791,8 +1782,8 @@ struct string_chars_block unsigned char string_chars[STRING_CHARS_BLOCK_SIZE]; }; -struct string_chars_block *first_string_chars_block; -struct string_chars_block *current_string_chars_block; +static struct string_chars_block *first_string_chars_block; +static struct string_chars_block *current_string_chars_block; /* If SIZE is the length of a string, this returns how many bytes * the string occupies in string_chars_block->string_chars @@ -2079,7 +2070,7 @@ LENGTH must be an integer and INIT must be a character. memset (XSTRING_DATA (val), XCHAR (init), XSTRING_LENGTH (val)); else { - int i; + size_t i; Bufbyte *ptr = XSTRING_DATA (val); for (i = XINT (length); i; i--) @@ -2206,7 +2197,7 @@ make_string_nocopy (CONST Bufbyte *contents, Bytecount length) It works like this: 1) Create an lcrecord-list object using make_lcrecord_list(). - This is often done at initialization. Remember to staticpro + This is often done at initialization. Remember to staticpro_nodump this object! The arguments to make_lcrecord_list() are the same as would be passed to alloc_lcrecord(). 2) Instead of calling alloc_lcrecord(), call allocate_managed_lcrecord() @@ -2227,7 +2218,7 @@ make_string_nocopy (CONST Bufbyte *contents, Bytecount length) */ static Lisp_Object -mark_lcrecord_list (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_lcrecord_list (Lisp_Object obj) { struct lcrecord_list *list = XLCRECORD_LIST (obj); Lisp_Object chain = list->free; @@ -2380,6 +2371,7 @@ struct gcpro *gcprolist; /* 415 used Mly 29-Jun-93 */ /* 1327 used slb 28-Feb-98 */ +/* 1328 used og 03-Oct-99 (moving slowly, heh?) */ #ifdef HAVE_SHLIB #define NSTATICS 4000 #else @@ -2403,24 +2395,89 @@ staticpro (Lisp_Object *varaddress) staticvec[staticidx++] = varaddress; } +/* Not "static" because of linker lossage on some systems */ +Lisp_Object *staticvec_nodump[200] + /* Force it into data space! */ + = {0}; +static int staticidx_nodump; + +/* Put an entry in staticvec_nodump, pointing at the variable whose address is given + */ +void +staticpro_nodump (Lisp_Object *varaddress) +{ + if (staticidx_nodump >= countof (staticvec_nodump)) + /* #### This is now a dubious abort() since this routine may be called */ + /* by Lisp attempting to load a DLL. */ + abort (); + staticvec_nodump[staticidx_nodump++] = varaddress; +} + +/* Not "static" because of linker lossage on some systems */ +struct { + void *data; + const struct struct_description *desc; +} dumpstructvec[200]; + +static int dumpstructidx; + +/* Put an entry in dumpstructvec, pointing at the variable whose address is given + */ +void +dumpstruct (void *varaddress, const struct struct_description *desc) +{ + if (dumpstructidx >= countof (dumpstructvec)) + abort (); + dumpstructvec[dumpstructidx].data = varaddress; + dumpstructvec[dumpstructidx].desc = desc; + dumpstructidx++; +} + +Lisp_Object *pdump_wirevec[50]; +static int pdump_wireidx; + +/* Put an entry in pdump_wirevec, pointing at the variable whose address is given + */ +void +pdump_wire (Lisp_Object *varaddress) +{ + if (pdump_wireidx >= countof (pdump_wirevec)) + abort (); + pdump_wirevec[pdump_wireidx++] = varaddress; +} + + +Lisp_Object *pdump_wirevec_list[50]; +static int pdump_wireidx_list; + +/* Put an entry in pdump_wirevec_list, pointing at the variable whose address is given + */ +void +pdump_wire_list (Lisp_Object *varaddress) +{ + if (pdump_wireidx_list >= countof (pdump_wirevec_list)) + abort (); + pdump_wirevec_list[pdump_wireidx_list++] = varaddress; +} + /* Mark reference to a Lisp_Object. If the object referred to has not been seen yet, recursively mark all the references contained in it. */ -static void +void mark_object (Lisp_Object obj) { tail_recurse: #ifdef ERROR_CHECK_GC - assert (! (GC_EQ (obj, Qnull_pointer))); + assert (! (EQ (obj, Qnull_pointer))); #endif /* Checks we used to perform */ /* if (EQ (obj, Qnull_pointer)) return; */ /* if (!POINTER_TYPE_P (XGCTYPE (obj))) return; */ /* if (PURIFIED (XPNTR (obj))) return; */ - if (XGCTYPE (obj) == Lisp_Type_Record) + if (XTYPE (obj) == Lisp_Type_Record) { struct lrecord_header *lheader = XRECORD_LHEADER (obj); #if defined (ERROR_CHECK_GC) @@ -2441,8 +2498,8 @@ mark_object (Lisp_Object obj) #endif if (implementation->marker) { - obj = implementation->marker (obj, mark_object); - if (!GC_NILP (obj)) goto tail_recurse; + obj = implementation->marker (obj); + if (!NILP (obj)) goto tail_recurse; } } } @@ -2915,7 +2972,7 @@ free_marker (struct Lisp_Marker *ptr) /* Perhaps this will catch freeing an already-freed marker. */ Lisp_Object temmy; XSETMARKER (temmy, ptr); - assert (GC_MARKERP (temmy)); + assert (MARKERP (temmy)); #endif /* ERROR_CHECK_GC */ #ifndef ALLOC_NO_POOLS @@ -3128,18 +3185,18 @@ sweep_strings (void) /* I hate duplicating all this crap! */ -static int +int marked_p (Lisp_Object obj) { #ifdef ERROR_CHECK_GC - assert (! (GC_EQ (obj, Qnull_pointer))); + assert (! (EQ (obj, Qnull_pointer))); #endif /* Checks we used to perform. */ /* if (EQ (obj, Qnull_pointer)) return 1; */ /* if (!POINTER_TYPE_P (XGCTYPE (obj))) return 1; */ /* if (PURIFIED (XPNTR (obj))) return 1; */ - if (XGCTYPE (obj) == Lisp_Type_Record) + if (XTYPE (obj) == Lisp_Type_Record) { struct lrecord_header *lheader = XRECORD_LHEADER (obj); #if defined (ERROR_CHECK_GC) @@ -3209,6 +3266,27 @@ gc_sweep (void) sweep_events (); +#ifdef PDUMP + /* Unmark all dumped objects */ + { + int i; + char *p = pdump_rt_list; + if(p) + for(;;) + { + pdump_reloc_table *rt = (pdump_reloc_table *)p; + p += sizeof (pdump_reloc_table); + if (rt->desc) { + for (i=0; icount; i++) + { + UNMARK_RECORD_HEADER ((struct lrecord_header *)(*(EMACS_INT *)p)); + p += sizeof (EMACS_INT); + } + } else + break; + } + } +#endif } /* Clearing for disksave. */ @@ -3410,6 +3488,8 @@ garbage_collect_1 (void) int i; for (i = 0; i < staticidx; i++) mark_object (*(staticvec[i])); + for (i = 0; i < staticidx_nodump; i++) + mark_object (*(staticvec_nodump[i])); } { /* GCPRO() */ @@ -3454,8 +3534,8 @@ garbage_collect_1 (void) } } - mark_redisplay (mark_object); - mark_profiling_info (mark_object); + mark_redisplay (); + mark_profiling_info (); /* OK, now do the after-mark stuff. This is for things that are only marked when something else is marked (e.g. weak hash tables). @@ -3464,18 +3544,18 @@ garbage_collect_1 (void) weak hash table, the former one might get marked. So we have to iterate until nothing more gets marked. */ - while (finish_marking_weak_hash_tables (marked_p, mark_object) > 0 || - finish_marking_weak_lists (marked_p, mark_object) > 0) + while (finish_marking_weak_hash_tables () > 0 || + finish_marking_weak_lists () > 0) ; /* And prune (this needs to be called after everything else has been marked and before we do any sweeping). */ /* #### this is somewhat ad-hoc and should probably be an object method */ - prune_weak_hash_tables (marked_p); - prune_weak_lists (marked_p); - prune_specifiers (marked_p); - prune_syntax_tables (marked_p); + prune_weak_hash_tables (); + prune_weak_lists (); + prune_specifiers (); + prune_syntax_tables (); gc_sweep (); @@ -3569,7 +3649,7 @@ Garbage collection happens automatically if you cons more than garbage_collect_1 (); - for (i = 0; i < last_lrecord_type_index_assigned; i++) + for (i = 0; i <= last_lrecord_type_index_assigned; i++) { if (lcrecord_stats[i].bytes_in_use != 0 || lcrecord_stats[i].bytes_freed != 0 @@ -3843,36 +3923,9 @@ fixed_type_block_overhead (size_t size) /* Initialization */ void -init_alloc_once_early (void) +reinit_alloc_once_early (void) { - int iii; - - last_lrecord_type_index_assigned = -1; - for (iii = 0; iii < countof (lrecord_implementations_table); iii++) - { - lrecord_implementations_table[iii] = 0; - } - - /* - * All the staticly - * defined subr lrecords were initialized with lheader->type == 0. - * See subr_lheader_initializer in lisp.h. Force type index 0 to be - * assigned to lrecord_subr so that those predefined indexes match - * reality. - */ - lrecord_type_index (&lrecord_subr); - assert (*(lrecord_subr.lrecord_type_index) == 0); - /* - * The same is true for symbol_value_forward objects, except the - * type is 1. - */ - lrecord_type_index (&lrecord_symbol_value_forward); - assert (*(lrecord_symbol_value_forward.lrecord_type_index) == 1); - gc_generation_number[0] = 0; - /* purify_flag 1 is correct even if CANNOT_DUMP. - * loadup.el will set to nil at end. */ - purify_flag = 1; breathing_space = 0; XSETINT (all_bit_vectors, 0); /* Qzero may not be set yet. */ XSETINT (Vgc_message, 0); @@ -3898,7 +3951,11 @@ init_alloc_once_early (void) init_event_alloc (); ignore_malloc_warnings = 0; - staticidx = 0; + + staticidx_nodump = 0; + dumpstructidx = 0; + pdump_wireidx = 0; + consing_since_gc = 0; #if 1 gc_cons_threshold = 500000; /* XEmacs change */ @@ -3927,6 +3984,38 @@ init_alloc_once_early (void) #endif /* ERROR_CHECK_TYPECHECK */ } +void +init_alloc_once_early (void) +{ + int iii; + + reinit_alloc_once_early (); + + last_lrecord_type_index_assigned = -1; + for (iii = 0; iii < countof (lrecord_implementations_table); iii++) + { + lrecord_implementations_table[iii] = 0; + } + + /* + * All the staticly + * defined subr lrecords were initialized with lheader->type == 0. + * See subr_lheader_initializer in lisp.h. Force type index 0 to be + * assigned to lrecord_subr so that those predefined indexes match + * reality. + */ + lrecord_type_index (&lrecord_subr); + assert (*(lrecord_subr.lrecord_type_index) == 0); + /* + * The same is true for symbol_value_forward objects, except the + * type is 1. + */ + lrecord_type_index (&lrecord_symbol_value_forward); + assert (*(lrecord_symbol_value_forward.lrecord_type_index) == 1); + + staticidx = 0; +} + int pure_bytes_used = 0; void @@ -4034,8 +4123,7 @@ window system and `gc-pointer-glyph' specifies a value (i.e. a pointer image instance) in the domain of the selected frame, the mouse pointer will change instead of this message being printed. */ ); - Vgc_message = make_string_nocopy ((CONST Bufbyte *) gc_default_message, - countof (gc_default_message) - 1); + Vgc_message = build_string (gc_default_message); DEFVAR_LISP ("gc-pointer-glyph", &Vgc_pointer_glyph /* Pointer glyph used to indicate that a garbage collection is in progress. @@ -4052,3 +4140,982 @@ complex_vars_of_alloc (void) { Vgc_pointer_glyph = Fmake_glyph_internal (Qpointer); } + + +#ifdef PDUMP + +/* The structure of the file + * + * 0 - header + * 256 - dumped objects + * stab_offset - nb_staticpro*(Lisp_Object *) from staticvec + * - nb_staticpro*(relocated Lisp_Object) pointed to by staticpro + * - nb_structdmp*pair(void *, adr) for pointers to structures + * - lrecord_implementations_table[] + * - relocation table + * - wired variable address/value couples with the count preceding the list + */ +typedef struct +{ + char signature[8]; + EMACS_UINT stab_offset; + EMACS_UINT reloc_address; + int nb_staticpro; + int nb_structdmp; + int last_type; +} dump_header; + +char *pdump_start, *pdump_end; + +static const unsigned char align_table[256] = +{ + 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +}; + +typedef struct pdump_entry_list_elmt +{ + struct pdump_entry_list_elmt *next; + const void *obj; + size_t size; + int count; + int is_lrecord; + EMACS_INT save_offset; +} pdump_entry_list_elmt; + +typedef struct +{ + pdump_entry_list_elmt *first; + int align; + int count; +} pdump_entry_list; + +typedef struct pdump_struct_list_elmt +{ + pdump_entry_list list; + const struct struct_description *sdesc; +} pdump_struct_list_elmt; + +typedef struct +{ + pdump_struct_list_elmt *list; + int count; + int size; +} pdump_struct_list; + +static pdump_entry_list pdump_object_table[256]; +static pdump_entry_list pdump_opaque_data_list; +static pdump_struct_list pdump_struct_table; +static pdump_entry_list_elmt *pdump_qnil; + +static int pdump_alert_undump_object[256]; + +static unsigned long cur_offset; +static size_t max_size; +static int pdump_fd; +static void *pdump_buf; + +#define PDUMP_HASHSIZE 200001 + +static pdump_entry_list_elmt **pdump_hash; + +/* Since most pointers are eight bytes aligned, the >>3 allows for a better hash */ +static int +pdump_make_hash (const void *obj) +{ + return ((unsigned long)(obj)>>3) % PDUMP_HASHSIZE; +} + +static pdump_entry_list_elmt * +pdump_get_entry (const void *obj) +{ + int pos = pdump_make_hash(obj); + pdump_entry_list_elmt *e; + while ((e = pdump_hash[pos]) != 0) + { + if (e->obj == obj) + return e; + + pos++; + if (pos == PDUMP_HASHSIZE) + pos = 0; + } + return 0; +} + +static void +pdump_add_entry (pdump_entry_list *list, const void *obj, size_t size, int count, int is_lrecord) +{ + pdump_entry_list_elmt *e; + int align; + int pos = pdump_make_hash (obj); + + while ((e = pdump_hash[pos]) != 0) + { + if (e->obj == obj) + return; + + pos++; + if (pos == PDUMP_HASHSIZE) + pos = 0; + } + + e = malloc (sizeof (pdump_entry_list_elmt)); + + e->next = list->first; + e->obj = obj; + e->size = size; + e->count = count; + e->is_lrecord = is_lrecord; + list->first = e; + + list->count += count; + pdump_hash[pos] = e; + + align = align_table[size & 255]; + if (align<2 && is_lrecord) + align = 2; + + if(align < list->align) + list->align = align; +} + +static pdump_entry_list * +pdump_get_entry_list(const struct struct_description *sdesc) +{ + int i; + for(i=0; iname, + backtrace[i].position, + backtrace[i].offset); + } + } +} + +static void pdump_register_object (Lisp_Object obj); +static void pdump_register_struct (const void *data, const struct struct_description *sdesc, int count); + +static EMACS_INT +pdump_get_indirect_count (EMACS_INT code, const struct lrecord_description *idesc, const void *idata) +{ + EMACS_INT count; + const void *irdata; + + int line = XD_INDIRECT_VAL (code); + int delta = XD_INDIRECT_DELTA (code); + + irdata = ((char *)idata) + idesc[line].offset; + switch (idesc[line].type) { + case XD_SIZE_T: + count = *(size_t *)irdata; + break; + case XD_INT: + count = *(int *)irdata; + break; + case XD_LONG: + count = *(long *)irdata; + break; + case XD_BYTECOUNT: + count = *(Bytecount *)irdata; + break; + default: + fprintf (stderr, "Unsupported count type : %d (line = %d, code=%ld)\n", idesc[line].type, line, (long)code); + pdump_backtrace (); + abort (); + } + count += delta; + return count; +} + +static void +pdump_register_sub (const void *data, const struct lrecord_description *desc, int me) +{ + int pos; + const void *rdata; + + restart: + for (pos = 0; desc[pos].type != XD_END; pos++) + { + backtrace[me].position = pos; + backtrace[me].offset = desc[pos].offset; + + rdata = ((const char *)data) + desc[pos].offset; + switch(desc[pos].type) + { + case XD_SPECIFIER_END: + pos = 0; + desc = ((const struct Lisp_Specifier *)data)->methods->extra_description; + goto restart; + case XD_SIZE_T: + case XD_INT: + case XD_LONG: + case XD_BYTECOUNT: + case XD_LO_RESET_NIL: + case XD_INT_RESET: + case XD_LO_LINK: + break; + case XD_OPAQUE_DATA_PTR: + { + EMACS_INT count = desc[pos].data1; + if (XD_IS_INDIRECT(count)) + count = pdump_get_indirect_count (count, desc, data); + + pdump_add_entry (&pdump_opaque_data_list, + *(void **)rdata, + count, + 1, + 0); + break; + } + case XD_C_STRING: + { + const char *str = *(const char **)rdata; + if (str) + pdump_add_entry (&pdump_opaque_data_list, str, strlen (str)+1, 1, 0); + break; + } + case XD_DOC_STRING: + { + const char *str = *(const char **)rdata; + if ((EMACS_INT)str > 0) + pdump_add_entry (&pdump_opaque_data_list, str, strlen (str)+1, 1, 0); + break; + } + case XD_LISP_OBJECT: + { + EMACS_INT count = desc[pos].data1; + int i; + if (XD_IS_INDIRECT (count)) + count = pdump_get_indirect_count (count, desc, data); + + for(i=0;idescription) + { + int me = depth++; + if (me>65536) + { + fprintf (stderr, "Backtrace overflow, loop ?\n"); + abort (); + } + backtrace[me].obj = obj; + backtrace[me].position = 0; + backtrace[me].offset = 0; + + pdump_add_entry (pdump_object_table + XRECORD_LHEADER (obj)->type, + XRECORD_LHEADER (obj), + XRECORD_LHEADER_IMPLEMENTATION (obj)->static_size ? + XRECORD_LHEADER_IMPLEMENTATION (obj)->static_size : + XRECORD_LHEADER_IMPLEMENTATION (obj)->size_in_bytes_method (XRECORD_LHEADER (obj)), + 1, + 1); + pdump_register_sub (XRECORD_LHEADER (obj), + XRECORD_LHEADER_IMPLEMENTATION (obj)->description, + me); + --depth; + } + else + { + pdump_alert_undump_object[XRECORD_LHEADER (obj)->type]++; + fprintf (stderr, "Undumpable object type : %s\n", XRECORD_LHEADER_IMPLEMENTATION (obj)->name); + pdump_backtrace (); + } +} + +static void +pdump_register_struct (const void *data, const struct struct_description *sdesc, int count) +{ + if (data && !pdump_get_entry (data)) + { + int me = depth++; + int i; + if (me>65536) + { + fprintf (stderr, "Backtrace overflow, loop ?\n"); + abort (); + } + backtrace[me].obj = 0; + backtrace[me].position = 0; + backtrace[me].offset = 0; + + pdump_add_entry (pdump_get_entry_list (sdesc), + data, + sdesc->size, + count, + 0); + for (i=0; isize*i, + sdesc->description, + me); + } + --depth; + } +} + +static void +pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *desc) +{ + size_t size = elmt->size; + int count = elmt->count; + if (desc) + { + int pos, i; + void *rdata; + memcpy (pdump_buf, elmt->obj, size*count); + + for (i=0; iobj))->methods->extra_description; + goto restart; + case XD_SIZE_T: + case XD_INT: + case XD_LONG: + case XD_BYTECOUNT: + break; + case XD_LO_RESET_NIL: + { + EMACS_INT count = desc[pos].data1; + int i; + if (XD_IS_INDIRECT (count)) + count = pdump_get_indirect_count (count, desc, elmt->obj); + for (i=0; isave_offset; + break; + } + case XD_INT_RESET: + { + EMACS_INT val = desc[pos].data1; + if (XD_IS_INDIRECT (val)) + val = pdump_get_indirect_count (val, desc, elmt->obj); + *(int *)rdata = val; + break; + } + case XD_OPAQUE_DATA_PTR: + case XD_C_STRING: + case XD_STRUCT_PTR: + { + void *ptr = *(void **)rdata; + if (ptr) + *(EMACS_INT *)rdata = pdump_get_entry (ptr)->save_offset; + break; + } + case XD_LO_LINK: + { + Lisp_Object obj = *(Lisp_Object *)rdata; + pdump_entry_list_elmt *elmt1; + for(;;) + { + elmt1 = pdump_get_entry (XRECORD_LHEADER(obj)); + if (elmt1) + break; + obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj))); + } + *(EMACS_INT *)rdata = elmt1->save_offset; + break; + } + case XD_LISP_OBJECT: + { + EMACS_INT count = desc[pos].data1; + int i; + if (XD_IS_INDIRECT (count)) + count = pdump_get_indirect_count (count, desc, elmt->obj); + + for(i=0; isave_offset; + } + break; + } + case XD_DOC_STRING: + { + EMACS_INT str = *(EMACS_INT *)rdata; + if (str > 0) + *(EMACS_INT *)rdata = pdump_get_entry ((void *)str)->save_offset; + break; + } + default: + fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type); + abort (); + }; + } + } + } + write (pdump_fd, desc ? pdump_buf : elmt->obj, size*count); + if (elmt->is_lrecord && ((size*count) & 3)) + write (pdump_fd, "\0\0\0", 4-((size*count) & 3)); +} + +static void +pdump_reloc_one (void *data, EMACS_INT delta, const struct lrecord_description *desc) +{ + int pos; + void *rdata; + + restart: + for (pos = 0; desc[pos].type != XD_END; pos++) + { + rdata = ((char *)data) + desc[pos].offset; + switch (desc[pos].type) { + case XD_SPECIFIER_END: + pos = 0; + desc = ((const struct Lisp_Specifier *)data)->methods->extra_description; + goto restart; + case XD_SIZE_T: + case XD_INT: + case XD_LONG: + case XD_BYTECOUNT: + case XD_INT_RESET: + break; + case XD_OPAQUE_DATA_PTR: + case XD_C_STRING: + case XD_STRUCT_PTR: + case XD_LO_LINK: + { + EMACS_INT ptr = *(EMACS_INT *)rdata; + if (ptr) + *(EMACS_INT *)rdata = ptr+delta; + break; + } + case XD_LISP_OBJECT: + case XD_LO_RESET_NIL: + { + EMACS_INT count = desc[pos].data1; + int i; + if (XD_IS_INDIRECT (count)) + count = pdump_get_indirect_count (count, desc, data); + + for (i=0; i 0) + *(EMACS_INT *)rdata = str + delta; + break; + } + default: + fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type); + abort (); + }; + } +} + +static void +pdump_allocate_offset (pdump_entry_list_elmt *elmt, const struct lrecord_description *desc) +{ + size_t size = (elmt->is_lrecord ? (elmt->size + 3) & ~3 : elmt->size)*elmt->count; + elmt->save_offset = cur_offset; + if (size>max_size) + max_size = size; + cur_offset += size; +} + +static void +pdump_scan_by_alignement (void (*f)(pdump_entry_list_elmt *, const struct lrecord_description *)) +{ + int align, i; + const struct lrecord_description *idesc; + pdump_entry_list_elmt *elmt; + for (align=8; align>=0; align--) + { + for (i=0; i<=last_lrecord_type_index_assigned; i++) + if (pdump_object_table[i].align == align) + { + elmt = pdump_object_table[i].first; + if (!elmt) + continue; + idesc = lrecord_implementations_table[i]->description; + while (elmt) + { + f (elmt, idesc); + elmt = elmt->next; + } + } + + for (i=0; idescription; + while (elmt) + { + f (elmt, idesc); + elmt = elmt->next; + } + } + + elmt = pdump_opaque_data_list.first; + while (elmt) + { + if (align_table[elmt->size & 255] == align) + f (elmt, 0); + elmt = elmt->next; + } + } +} + +static void +pdump_dump_staticvec (void) +{ + Lisp_Object *reloc = malloc (staticidx*sizeof (Lisp_Object)); + int i; + write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *)); + + for(i=0; isave_offset; + else + reloc[i] = obj; + } + write (pdump_fd, reloc, staticidx*sizeof (Lisp_Object)); + free (reloc); +} + +static void +pdump_dump_structvec (void) +{ + int i; + for (i=0; isave_offset; + write (pdump_fd, &adr, sizeof (adr)); + } +} + +static void +pdump_dump_itable (void) +{ + write (pdump_fd, lrecord_implementations_table, sizeof (lrecord_implementations_table)); +} + +static void +pdump_dump_rtables (void) +{ + int i, j; + pdump_entry_list_elmt *elmt; + pdump_reloc_table rt; + + for (i=0; i<=last_lrecord_type_index_assigned; i++) + { + elmt = pdump_object_table[i].first; + if(!elmt) + continue; + rt.desc = lrecord_implementations_table[i]->description; + rt.count = pdump_object_table[i].count; + write (pdump_fd, &rt, sizeof (rt)); + while (elmt) + { + EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset; + write (pdump_fd, &rdata, sizeof (rdata)); + elmt = elmt->next; + } + } + + rt.desc = 0; + rt.count = 0; + write (pdump_fd, &rt, sizeof (rt)); + + for (i=0; idescription; + rt.count = pdump_struct_table.list[i].list.count; + write (pdump_fd, &rt, sizeof (rt)); + while (elmt) + { + EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset; + for (j=0; jcount; j++) { + write (pdump_fd, &rdata, sizeof (rdata)); + rdata += elmt->size; + } + elmt = elmt->next; + } + } + rt.desc = 0; + rt.count = 0; + write (pdump_fd, &rt, sizeof (rt)); +} + +static void +pdump_dump_wired (void) +{ + EMACS_INT count = pdump_wireidx + pdump_wireidx_list; + int i; + + write (pdump_fd, &count, sizeof (count)); + + for (i=0; isave_offset; + write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i])); + write (pdump_fd, &obj, sizeof (obj)); + } + + for (i=0; idescription; + for (pos = 0; desc[pos].type != XD_LO_LINK; pos++) + if (desc[pos].type == XD_END) + abort (); + + obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj))); + } + res = elmt->save_offset; + + write (pdump_fd, &pdump_wirevec_list[i], sizeof (pdump_wirevec_list[i])); + write (pdump_fd, &res, sizeof (res)); + } +} + +void +pdump (void) +{ + int i; + Lisp_Object t_console, t_device, t_frame; + int none; + dump_header hd; + + /* These appear in a DEFVAR_LISP, which does a staticpro() */ + t_console = Vterminal_console; + t_frame = Vterminal_frame; + t_device = Vterminal_device; + + Vterminal_console = Qnil; + Vterminal_frame = Qnil; + Vterminal_device = Qnil; + + pdump_hash = malloc (PDUMP_HASHSIZE*sizeof (pdump_entry_list_elmt *)); + memset (pdump_hash, 0, PDUMP_HASHSIZE*sizeof (pdump_entry_list_elmt *)); + + for (i=0; i<=last_lrecord_type_index_assigned; i++) + { + pdump_object_table[i].first = 0; + pdump_object_table[i].align = 8; + pdump_object_table[i].count = 0; + pdump_alert_undump_object[i] = 0; + } + pdump_struct_table.count = 0; + pdump_struct_table.size = -1; + + pdump_opaque_data_list.first = 0; + pdump_opaque_data_list.align = 8; + pdump_opaque_data_list.count = 0; + depth = 0; + + for (i=0; iname, pdump_alert_undump_object[i]); + } + if (!none) + return; + + for (i=0; inb_staticpro; + last_lrecord_type_index_assigned = ((dump_header *)(pdump_start))->last_type; + delta = ((EMACS_INT)pdump_start) - ((dump_header *)pdump_start)->reloc_address; + p = pdump_start + ((dump_header *)pdump_start)->stab_offset; + + /* Put back the staticvec in place */ + memcpy (staticvec, p, staticidx*sizeof (Lisp_Object *)); + p += staticidx*sizeof (Lisp_Object *); + for (i=0; inb_structdmp; i++) + { + void **adr = *(void **)p; + p += sizeof (void *); + *adr = (void *)((*(EMACS_INT *)p) + delta); + p += sizeof (EMACS_INT); + } + + /* Put back the lrecord_implementations_table */ + memcpy (lrecord_implementations_table, p, sizeof (lrecord_implementations_table)); + p += sizeof (lrecord_implementations_table); + + /* Give back their numbers to the lrecord implementations */ + for (i=0; ilrecord_type_index) = i; + last_lrecord_type_index_assigned = i; + } + + /* Do the relocations */ + pdump_rt_list = p; + count = 2; + for(;;) + { + pdump_reloc_table *rt = (pdump_reloc_table *)p; + p += sizeof (pdump_reloc_table); + if (rt->desc) { + for (i=0; icount; i++) + { + EMACS_INT adr = delta + *(EMACS_INT *)p; + *(EMACS_INT *)p = adr; + pdump_reloc_one ((void *)adr, delta, rt->desc); + p += sizeof (EMACS_INT); + } + } else + if(!(--count)) + break; + } + + /* Put the pdump_wire variables in place */ + count = *(EMACS_INT *)p; + p += sizeof(EMACS_INT); + + for (i=0; idesc) + break; + if (rt->desc == hash_table_description) + { + for (i=0; icount; i++) + { + struct Lisp_Hash_Table *ht = XHASH_TABLE (*(EMACS_INT *)p); + reorganize_hash_table (ht); + p += sizeof (EMACS_INT); + } + break; + } else + p += sizeof (EMACS_INT)*rt->count; + } + return 1; +} + +#endif diff --git a/src/buffer.c b/src/buffer.c index 0c59b8e..ec6afef 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -96,6 +96,7 @@ struct buffer *current_buffer; /* the current buffer */ Setting the default value also goes through the alist of buffers and stores into each buffer that does not say it has a local value. */ Lisp_Object Vbuffer_defaults; +static void *buffer_defaults_saved_slots; /* This structure marks which slots in a buffer have corresponding default values in Vbuffer_defaults. @@ -133,6 +134,7 @@ char initial_directory[MAXPATHLEN+1]; /* This structure holds the names of symbols whose values may be buffer-local. It is indexed and accessed in the same way as the above. */ static Lisp_Object Vbuffer_local_symbols; +static void *buffer_local_symbols_saved_slots; /* Alist of all buffer names vs the buffers. */ /* This used to be a variable, but is no longer, @@ -189,7 +191,7 @@ Lisp_Object QSscratch; /* "*scratch*" */ Lisp_Object Qdefault_directory; Lisp_Object Qkill_buffer_hook; -Lisp_Object Qbuffer_file_name, Qbuffer_undo_list; +Lisp_Object Qrecord_buffer_hook; Lisp_Object Qrename_auto_save_file; @@ -220,7 +222,7 @@ make_buffer (struct buffer *buf) } static Lisp_Object -mark_buffer (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_buffer (Lisp_Object obj) { struct buffer *buf = XBUFFER (obj); @@ -229,13 +231,13 @@ mark_buffer (Lisp_Object obj, void (*markobj) (Lisp_Object)) undo_threshold, undo_high_threshold); -#define MARKED_SLOT(x) ((void) (markobj (buf->x))); +#define MARKED_SLOT(x) mark_object (buf->x) #include "bufslots.h" #undef MARKED_SLOT - markobj (buf->extent_info); + mark_object (buf->extent_info); if (buf->text) - markobj (buf->text->line_number_cache); + mark_object (buf->text->line_number_cache); /* Don't mark normally through the children slot. (Actually, in this case, it doesn't matter.) */ @@ -1406,6 +1408,9 @@ buffer. See `other-buffer' for more information. XCDR (prev) = XCDR (XCDR (prev)); XCDR (lynk) = f->buffer_alist; f->buffer_alist = lynk; + + va_run_hook_with_args (Qrecord_buffer_hook, 1, buffer); + return Qnil; } @@ -1806,6 +1811,7 @@ syms_of_buffer (void) defsymbol (&Qmode_class, "mode-class"); defsymbol (&Qrename_auto_save_file, "rename-auto-save-file"); defsymbol (&Qkill_buffer_hook, "kill-buffer-hook"); + defsymbol (&Qrecord_buffer_hook, "record-buffer-hook"); defsymbol (&Qpermanent_local, "permanent-local"); defsymbol (&Qfirst_change_hook, "first-change-hook"); @@ -1816,8 +1822,6 @@ syms_of_buffer (void) defsymbol (&Qbefore_change_function, "before-change-function"); defsymbol (&Qafter_change_function, "after-change-function"); - defsymbol (&Qbuffer_file_name, "buffer-file-name"); - defsymbol (&Qbuffer_undo_list, "buffer-undo-list"); defsymbol (&Qdefault_directory, "default-directory"); defsymbol (&Qget_file_buffer, "get-file-buffer"); @@ -1870,20 +1874,26 @@ syms_of_buffer (void) "Attempt to modify a protected field", Qerror); } +void +reinit_vars_of_buffer (void) +{ + staticpro_nodump (&Vbuffer_alist); + Vbuffer_alist = Qnil; + current_buffer = 0; +} + /* initialize the buffer routines */ void vars_of_buffer (void) { /* This function can GC */ + reinit_vars_of_buffer (); + staticpro (&QSFundamental); staticpro (&QSscratch); - staticpro (&Vbuffer_alist); - QSFundamental = Fpurecopy (build_string ("Fundamental")); - QSscratch = Fpurecopy (build_string (DEFER_GETTEXT ("*scratch*"))); - - Vbuffer_alist = Qnil; - current_buffer = 0; + QSFundamental = build_string ("Fundamental"); + QSscratch = build_string (DEFER_GETTEXT ("*scratch*")); DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook /* List of hooks to be run before killing local variables in a buffer. @@ -2063,21 +2073,21 @@ nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap) b->indirect_children = Qnil; b->own_text.line_number_cache = Qnil; -#define MARKED_SLOT(x) b->x = (zap); +#define MARKED_SLOT(x) b->x = zap #include "bufslots.h" #undef MARKED_SLOT } -void -complex_vars_of_buffer (void) +static void +common_init_complex_vars_of_buffer (void) { /* Make sure all markable slots in buffer_defaults are initialized reasonably, so mark_buffer won't choke. */ struct buffer *defs = alloc_lcrecord_type (struct buffer, &lrecord_buffer); struct buffer *syms = alloc_lcrecord_type (struct buffer, &lrecord_buffer); - staticpro (&Vbuffer_defaults); - staticpro (&Vbuffer_local_symbols); + staticpro_nodump (&Vbuffer_defaults); + staticpro_nodump (&Vbuffer_local_symbols); XSETBUFFER (Vbuffer_defaults, defs); XSETBUFFER (Vbuffer_local_symbols, syms); @@ -2193,11 +2203,57 @@ complex_vars_of_buffer (void) buffer_local_flags.buffer_file_coding_system = make_int (1<<14); #endif - /* #### Warning: 1<<28 is the largest number currently allowable + /* #### Warning: 1<<31 is the largest number currently allowable due to the XINT() handling of this value. With some rearrangement you can get 3 more bits. */ } +} + +#define BUFFER_SLOTS_SIZE (offsetof (struct buffer, BUFFER_SLOTS_LAST_NAME) - offsetof (struct buffer, BUFFER_SLOTS_FIRST_NAME) + sizeof (Lisp_Object)) +#define BUFFER_SLOTS_COUNT (BUFFER_SLOTS_SIZE / sizeof (Lisp_Object)) + +void +reinit_complex_vars_of_buffer (void) +{ + struct buffer *defs, *syms; + + common_init_complex_vars_of_buffer (); + + defs = XBUFFER (Vbuffer_defaults); + syms = XBUFFER (Vbuffer_local_symbols); + memcpy (&defs->BUFFER_SLOTS_FIRST_NAME, + buffer_defaults_saved_slots, + BUFFER_SLOTS_SIZE); + memcpy (&syms->BUFFER_SLOTS_FIRST_NAME, + buffer_local_symbols_saved_slots, + BUFFER_SLOTS_SIZE); +} + + +static const struct lrecord_description buffer_slots_description_1[] = { + { XD_LISP_OBJECT, 0, BUFFER_SLOTS_COUNT }, + { XD_END } +}; + +static const struct struct_description buffer_slots_description = { + BUFFER_SLOTS_SIZE, + buffer_slots_description_1 +}; + +void +complex_vars_of_buffer (void) +{ + struct buffer *defs, *syms; + + common_init_complex_vars_of_buffer (); + defs = XBUFFER (Vbuffer_defaults); + syms = XBUFFER (Vbuffer_local_symbols); + buffer_defaults_saved_slots = &defs->BUFFER_SLOTS_FIRST_NAME; + buffer_local_symbols_saved_slots = &syms->BUFFER_SLOTS_FIRST_NAME; + dumpstruct (&buffer_defaults_saved_slots, &buffer_slots_description); + dumpstruct (&buffer_local_symbols_saved_slots, &buffer_slots_description); + DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /* Default value of `modeline-format' for buffers that don't override it. This is the same as (default-value 'modeline-format). diff --git a/src/buffer.h b/src/buffer.h index e3830ce..02fe840 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -222,7 +222,6 @@ DECLARE_LRECORD (buffer, struct buffer); #define XBUFFER(x) XRECORD (x, buffer, struct buffer) #define XSETBUFFER(x, p) XSETRECORD (x, p, buffer) #define BUFFERP(x) RECORDP (x, buffer) -#define GC_BUFFERP(x) GC_RECORDP (x, buffer) #define CHECK_BUFFER(x) CHECK_RECORD (x, buffer) #define CONCHECK_BUFFER(x) CONCHECK_RECORD (x, buffer) @@ -323,9 +322,9 @@ INLINE Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr); INLINE Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr) { - return ((ptr) - (buf)->text->beg + 1 - - ((ptr - (buf)->text->beg + 1) > (buf)->text->gpt - ? (buf)->text->gap_size : 0)); + return (ptr - buf->text->beg + 1 + - ((ptr - buf->text->beg + 1) > buf->text->gpt + ? buf->text->gap_size : 0)); } #define BUF_PTR_BYTE_POS(buf, ptr) \ @@ -336,8 +335,8 @@ INLINE Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos); INLINE Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos) { - return ((buf)->text->beg + - ((pos >= (buf)->text->gpt ? (pos + (buf)->text->gap_size) : pos) + return (buf->text->beg + + ((pos >= buf->text->gpt ? (pos + buf->text->gap_size) : pos) - 1)); } @@ -349,8 +348,8 @@ INLINE Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos); INLINE Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos) { - return ((buf)->text->beg + - ((pos > (buf)->text->gpt ? (pos + (buf)->text->gap_size) : pos) + return (buf->text->beg + + ((pos > buf->text->gpt ? (pos + buf->text->gap_size) : pos) - 2)); } @@ -365,16 +364,16 @@ INLINE int valid_memind_p (struct buffer *buf, Memind x); INLINE int valid_memind_p (struct buffer *buf, Memind x) { - return ((x >= 1 && x <= (Memind) (buf)->text->gpt) || - (x > (Memind) ((buf)->text->gpt + (buf)->text->gap_size) && - x <= (Memind) ((buf)->text->z + (buf)->text->gap_size))); + return ((x >= 1 && x <= (Memind) buf->text->gpt) || + (x > (Memind) (buf->text->gpt + buf->text->gap_size) && + x <= (Memind) (buf->text->z + buf->text->gap_size))); } INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x); INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x) { - return (Memind) ((x > (buf)->text->gpt) ? (x + (buf)->text->gap_size) : x); + return (Memind) ((x > buf->text->gpt) ? (x + buf->text->gap_size) : x); } @@ -385,8 +384,8 @@ memind_to_bytind (struct buffer *buf, Memind x) #ifdef ERROR_CHECK_BUFPOS assert (valid_memind_p (buf, x)); #endif - return (Bytind) ((x > (Memind) (buf)->text->gpt) ? - x - (buf)->text->gap_size : + return (Bytind) ((x > (Memind) buf->text->gpt) ? + x - buf->text->gap_size : x); } diff --git a/src/bufslots.h b/src/bufslots.h index 88f5daf..a5430e0 100644 --- a/src/bufslots.h +++ b/src/bufslots.h @@ -32,6 +32,10 @@ Boston, MA 02111-1307, USA. */ definition. In the garbage collector this file is included after defining MARKED_SLOT(x) to be mark_object(buffer->x). */ +#ifndef BUFFER_SLOTS_FIRST_NAME +#define BUFFER_SLOTS_FIRST_NAME name +#endif + /* The name of this buffer. */ MARKED_SLOT (name); @@ -235,6 +239,11 @@ Boston, MA 02111-1307, USA. */ /* A hash table that maps from a "generic extent" (an extent in `modeline-format') into a buffer-specific extent. */ MARKED_SLOT (modeline_extent_table); + +#ifndef BUFFER_SLOTS_LAST_NAME +#define BUFFER_SLOTS_LAST_NAME modeline_extent_table +#endif + #if 0 /* FSFmacs */ /* This is silly and stupid */ /* These are so we don't have to recompile everything diff --git a/src/bytecode.c b/src/bytecode.c index af9d3f4..e39fe3f 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA. */ FSF: long ago. -hacked on by jwz@netscape.com 1991-06 +hacked on by jwz@jwz.org 1991-06 o added a compile-time switch to turn on simple sanity checking; o put back the obsolete byte-codes for error-detection; o added a new instruction, unbind_all, which I will use for @@ -235,21 +235,17 @@ extern Lisp_Object Qand_rest, Qand_optional; Lisp_Object Vbyte_code_meter, Qbyte_code_meter; int byte_metering_on; -#define METER_2(code1, code2) \ - XINT (XVECTOR_DATA (XVECTOR_DATA (Vbyte_code_meter)[(code1)])[(code2)]) - -#define METER_1(code) METER_2 (0, (code)) - -#define METER_CODE(last_code, this_code) do { \ - if (byte_metering_on) \ - { \ - if (METER_1 (this_code) != ((1<specpdl_depth = XINT (Flength (f->arglist)) + varbind_count; f->instructions = - Fpurecopy (make_opaque (program_length * sizeof (Opbyte), - (CONST void *) program)); + make_opaque (program_length * sizeof (Opbyte), + (CONST void *) program); } assert (OPAQUEP (f->instructions)); @@ -1981,15 +1977,15 @@ print_compiled_function (Lisp_Object obj, Lisp_Object printcharfun, static Lisp_Object -mark_compiled_function (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_compiled_function (Lisp_Object obj) { Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (obj); - markobj (f->instructions); - markobj (f->arglist); - markobj (f->doc_and_interactive); + mark_object (f->instructions); + mark_object (f->arglist); + mark_object (f->doc_and_interactive); #ifdef COMPILED_FUNCTION_ANNOTATION_HACK - markobj (f->annotated); + mark_object (f->annotated); #endif /* tail-recurse on constants */ return f->constants; @@ -2350,10 +2346,8 @@ If the byte code for compiled function FUNCTION is lazy-loaded, fetch it now. /* v18 or v19 bytecode file. Need to Ebolify. */ if (f->flags.ebolified && VECTORP (XCDR (tem))) ebolify_bytecode_constants (XCDR (tem)); - /* VERY IMPORTANT to purecopy here!!!!! - See load_force_doc_string_unwind. */ - f->instructions = Fpurecopy (XCAR (tem)); - f->constants = Fpurecopy (XCDR (tem)); + f->instructions = XCAR (tem); + f->constants = XCDR (tem); return function; } abort (); diff --git a/src/bytecode.h b/src/bytecode.h index 3387b93..71674ec 100644 --- a/src/bytecode.h +++ b/src/bytecode.h @@ -93,7 +93,6 @@ DECLARE_LRECORD (compiled_function, Lisp_Compiled_Function); Lisp_Compiled_Function) #define XSETCOMPILED_FUNCTION(x, p) XSETRECORD (x, p, compiled_function) #define COMPILED_FUNCTIONP(x) RECORDP (x, compiled_function) -#define GC_COMPILED_FUNCTIONP(x) GC_RECORDP (x, compiled_function) #define CHECK_COMPILED_FUNCTION(x) CHECK_RECORD (x, compiled_function) #define CONCHECK_COMPILED_FUNCTION(x) CONCHECK_RECORD (x, compiled_function) diff --git a/src/callint.c b/src/callint.c index 14d9e23..2e6832a 100644 --- a/src/callint.c +++ b/src/callint.c @@ -58,9 +58,6 @@ Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; Lisp_Object Qlet, QletX, Qsave_excursion; -Lisp_Object Qcurrent_prefix_arg; - -Lisp_Object Quser_variable_p; Lisp_Object Qread_from_minibuffer; Lisp_Object Qread_file_name; Lisp_Object Qread_directory_name; @@ -995,8 +992,6 @@ syms_of_callint (void) defsymbol (&Qevents_to_keys, "events-to-keys"); defsymbol (&Qcommand_debug_status, "command-debug-status"); defsymbol (&Qenable_recursive_minibuffers, "enable-recursive-minibuffers"); - defsymbol (&Quser_variable_p, "user-variable-p"); - defsymbol (&Qcurrent_prefix_arg, "current-prefix-arg"); defsymbol (&Qlet, "let"); defsymbol (&QletX, "let*"); diff --git a/src/callproc.c b/src/callproc.c index 4b5a5dc..8694b38 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -104,6 +104,9 @@ call_process_cleanup (Lisp_Object fdpid) { int fd = XINT (Fcar (fdpid)); int pid = XINT (Fcdr (fdpid)); +#ifdef WINDOWSNT + HANDLE pHandle; +#endif if (!call_process_exited && EMACS_KILLPG (pid, SIGINT) == 0) @@ -114,7 +117,17 @@ call_process_cleanup (Lisp_Object fdpid) /* #### "c-G" -- need non-consing Single-key-description */ message ("Waiting for process to die...(type C-g again to kill it instantly)"); +#ifdef WINDOWSNT + pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); + if (pHandle == NULL) + { + warn_when_safe (Qprocess, Qwarning, + "cannot open process (PID %d) for cleanup", pid); + } + wait_for_termination (pHandle); +#else wait_for_termination (pid); +#endif /* "Discard" the unwind protect. */ XCAR (fdpid) = Qnil; @@ -170,6 +183,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you Lisp_Object infile, buffer, current_dir, display, path; int fd[2]; int filefd; +#ifdef WINDOWSNT + HANDLE pHandle; +#endif int pid; char buf[16384]; char *bufptr = buf; @@ -287,8 +303,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you CHECK_STRING (args[i]); new_argv[i - 3] = (char *) XSTRING_DATA (args[i]); } - new_argv[nargs - 3] = 0; } + new_argv[max(nargs - 3,1)] = 0; if (NILP (path)) report_file_error ("Searching for program", Fcons (args[0], Qnil)); @@ -359,6 +375,23 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you #ifdef WINDOWSNT pid = child_setup (filefd, fd1, fd_error, new_argv, (char *) XSTRING_DATA (current_dir)); + if (!INTP (buffer)) + { + /* OpenProcess() as soon after child_setup as possible. It's too + late once the process terminated. */ + pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); +#if 0 + if (pHandle == NULL) + { + /* #### seems to cause crash in unbind_to(...) below. APA */ + warn_when_safe (Qprocess, Qwarning, + "cannot open process to wait for"); + } +#endif + } + /* Close STDERR into the parent process. We no longer need it. */ + if (fd_error >= 0) + close (fd_error); #else /* not WINDOWSNT */ pid = fork (); @@ -394,12 +427,14 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you if (!NILP (fork_error)) signal_error (Qfile_error, fork_error); +#ifndef WINDOWSNT if (pid < 0) { if (fd[0] >= 0) close (fd[0]); report_file_error ("Doing fork", Qnil); } +#endif if (INTP (buffer)) { @@ -450,7 +485,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you nread = 0; while (nread < bufsize - 1024) { - int this_read + ssize_t this_read = Lstream_read (XLSTREAM (instream), bufptr + nread, bufsize - nread); @@ -507,7 +542,11 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you QUIT; /* Wait for it to terminate, unless it already has. */ +#ifdef WINDOWSNT + wait_for_termination (pHandle); +#else wait_for_termination (pid); +#endif /* Don't kill any children that the subprocess may have left behind when exiting. */ diff --git a/src/casetab.c b/src/casetab.c index ff9443c..af2d31c 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -42,14 +42,13 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "opaque.h" -Lisp_Object Qcase_table_p; +Lisp_Object Qcase_tablep; Lisp_Object Vascii_downcase_table, Vascii_upcase_table; Lisp_Object Vascii_canon_table, Vascii_eqv_table; #ifdef MULE Lisp_Object Vmirror_ascii_downcase_table, Vmirror_ascii_upcase_table; Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_eqv_table; #endif -Lisp_Object Qtranslate_table; static void compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse); @@ -81,7 +80,7 @@ check_case_table (Lisp_Object obj) REGISTER Lisp_Object tem; while (tem = Fcase_table_p (obj), NILP (tem)) - obj = wrong_type_argument (Qcase_table_p, obj); + obj = wrong_type_argument (Qcase_tablep, obj); return (obj); } @@ -289,8 +288,7 @@ compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse) void syms_of_casetab (void) { - defsymbol (&Qcase_table_p, "case-table-p"); - defsymbol (&Qtranslate_table, "translate-table"); + defsymbol (&Qcase_tablep, "case-table-p"); DEFSUBR (Fcase_table_p); DEFSUBR (Fcurrent_case_table); @@ -310,6 +308,13 @@ complex_vars_of_casetab (void) staticpro (&Vascii_canon_table); staticpro (&Vascii_eqv_table); +#ifdef MULE + staticpro (&Vmirror_ascii_downcase_table); + staticpro (&Vmirror_ascii_upcase_table); + staticpro (&Vmirror_ascii_canon_table); + staticpro (&Vmirror_ascii_eqv_table); +#endif + tem = MAKE_TRT_TABLE (); Vascii_downcase_table = tem; Vascii_canon_table = tem; diff --git a/src/char-ucs.h b/src/char-ucs.h index dd9aacf..1e3fbe1 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -356,11 +356,15 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); #define XCHARSET_CODE_OFFSET(cs) CHARSET_CODE_OFFSET(XCHARSET(cs)) #define XCHARSET_BYTE_OFFSET(cs) CHARSET_BYTE_OFFSET(XCHARSET(cs)) -/* Table of charsets indexed by (leading byte - 128). */ -extern Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; +struct charset_lookup { + /* Table of charsets indexed by (leading byte - 128). */ + Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; + + /* Table of charsets indexed by type/final-byte/direction. */ + Lisp_Object charset_by_attributes[4][128]; +}; -/* Table of charsets indexed by type/final-byte. */ -extern Lisp_Object charset_by_attributes[4][128]; +extern struct charset_lookup *chlook; #ifdef ERROR_CHECK_TYPECHECK /* int not Bufbyte even though that is the actual type of a leading byte. @@ -372,18 +376,18 @@ CHARSET_BY_LEADING_BYTE (Charset_ID lb) { assert (lb >= MIN_LEADING_BYTE && lb < (MIN_LEADING_BYTE + NUM_LEADING_BYTES)); - return charset_by_leading_byte[lb - MIN_LEADING_BYTE]; + return chlook->charset_by_leading_byte[lb - MIN_LEADING_BYTE]; } #else #define CHARSET_BY_LEADING_BYTE(lb) \ - (charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) + (chlook->charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) #endif #define CHARSET_BY_ATTRIBUTES(type, final, dir) \ - (charset_by_attributes[type][final]) + (chlook->charset_by_attributes[type][final]) /************************************************************************/ @@ -404,22 +408,21 @@ CHARSET_BY_LEADING_BYTE (Charset_ID lb) #define MIN_CHAR_THAI 0x0E00 #define MAX_CHAR_THAI 0x0E5F +/* #define MIN_CHAR_HIRAGANA 0x3041 #define MAX_CHAR_HIRAGANA 0x3093 #define MIN_CHAR_KATAKANA 0x30A1 #define MAX_CHAR_KATAKANA 0x30F6 +*/ #define MIN_CHAR_HALFWIDTH_KATAKANA 0xFF61 #define MAX_CHAR_HALFWIDTH_KATAKANA 0xFF9F -#define MIN_CHAR_OBS_94x94 0xE00000 -#define MIN_CHAR_JIS_X0208_1990 0xE04508 -#define MAX_CHAR_JIS_X0208_1990 0XE0678B -#define MAX_CHAR_OBS_94x94 0XE1E337 +#define MAX_CHAR_BMP 0x00FFFF -#define MIN_CHAR_DAIKANWA 0xE50000 -#define MAX_CHAR_DAIKANWA 0xE5FFFF +#define MIN_CHAR_DAIKANWA 0xE00000 +#define MAX_CHAR_DAIKANWA 0xE0FFFF #define MIN_CHAR_94 0xE90940 #define MAX_CHAR_94 (MIN_CHAR_94 + 94 * 80 - 1) @@ -427,7 +430,9 @@ CHARSET_BY_LEADING_BYTE (Charset_ID lb) #define MAX_CHAR_96 (MIN_CHAR_96 + 96 * 80 - 1) #define MIN_CHAR_94x94 0xE9F6C0 +#define MIN_CHAR_JIS_X0208_1990 (MIN_CHAR_94x94 + 94 * 94 * 79) #define MAX_CHAR_94x94 (MIN_CHAR_94x94 + 94 * 94 * 80 - 1) +#define MAX_CHAR_JIS_X0208_1990 MAX_CHAR_94x94 #define MIN_CHAR_96x96 0xF4C000 #define MAX_CHAR_96x96 (MIN_CHAR_96x96 + 96 * 96 * 80 - 1) diff --git a/src/chartab.c b/src/chartab.c index 003c919..0096b43 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -95,14 +95,14 @@ Lisp_Object Vword_combining_categories, Vword_separating_categories; #ifdef MULE static Lisp_Object -mark_char_table_entry (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_char_table_entry (Lisp_Object obj) { struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); int i; for (i = 0; i < 96; i++) { - markobj (cte->level2[i]); + mark_object (cte->level2[i]); } return Qnil; } @@ -143,16 +143,16 @@ DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry, #endif /* MULE */ static Lisp_Object -mark_char_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_char_table (Lisp_Object obj) { struct Lisp_Char_Table *ct = XCHAR_TABLE (obj); int i; for (i = 0; i < NUM_ASCII_CHARS; i++) - markobj (ct->ascii[i]); + mark_object (ct->ascii[i]); #ifdef MULE for (i = 0; i < NUM_LEADING_BYTES; i++) - markobj (ct->level1[i]); + mark_object (ct->level1[i]); #endif return ct->mirror_table; } @@ -162,18 +162,18 @@ mark_char_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) and prune_weak_hash_tables(). */ void -prune_syntax_tables (int (*obj_marked_p) (Lisp_Object)) +prune_syntax_tables (void) { Lisp_Object rest, prev = Qnil; for (rest = Vall_syntax_tables; - !GC_NILP (rest); + !NILP (rest); rest = XCHAR_TABLE (rest)->next_table) { - if (! obj_marked_p (rest)) + if (! marked_p (rest)) { /* This table is garbage. Remove it from the list. */ - if (GC_NILP (prev)) + if (NILP (prev)) Vall_syntax_tables = XCHAR_TABLE (rest)->next_table; else XCHAR_TABLE (prev)->next_table = @@ -431,6 +431,8 @@ static const struct lrecord_description char_table_description[] = { #ifdef MULE { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, level1), NUM_LEADING_BYTES }, #endif + { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, mirror_table), 1 }, + { XD_LO_LINK, offsetof(struct Lisp_Char_Table, next_table) }, { XD_END } }; @@ -707,7 +709,13 @@ as OLD-TABLE. The values will not themselves be copied. ctnew->mirror_table = Fcopy_char_table (ct->mirror_table); else ctnew->mirror_table = ct->mirror_table; + ctnew->next_table = Qnil; XSETCHAR_TABLE (obj, ctnew); + if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX) + { + ctnew->next_table = Vall_syntax_tables; + Vall_syntax_tables = obj; + } return obj; } @@ -1740,7 +1748,7 @@ Valid values are nil or a bit vector of size 95. #define CATEGORYP(x) \ - (CHARP ((x)) && XCHAR ((x)) >= 0x20 && XCHAR ((x)) <= 0x7E) + (CHARP (x) && XCHAR (x) >= 0x20 && XCHAR (x) <= 0x7E) #define CATEGORY_SET(c) \ (get_char_table(c, XCHAR_TABLE(current_buffer->category_table))) @@ -1755,6 +1763,7 @@ Valid values are nil or a bit vector of size 95. Use the macro WORD_BOUNDARY_P instead of calling this function directly. */ +int word_boundary_p (Emchar c1, Emchar c2); int word_boundary_p (Emchar c1, Emchar c2) { @@ -1848,6 +1857,7 @@ vars_of_chartab (void) { /* DO NOT staticpro this. It works just like Vweak_hash_tables. */ Vall_syntax_tables = Qnil; + pdump_wire_list (&Vall_syntax_tables); } void diff --git a/src/chartab.h b/src/chartab.h index dc4301a..7fd20dd 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -42,7 +42,6 @@ DECLARE_LRECORD (char_table_entry, struct Lisp_Char_Table_Entry); XRECORD (x, char_table_entry, struct Lisp_Char_Table_Entry) #define XSETCHAR_TABLE_ENTRY(x, p) XSETRECORD (x, p, char_table_entry) #define CHAR_TABLE_ENTRYP(x) RECORDP (x, char_table_entry) -#define GC_CHAR_TABLE_ENTRYP(x) GC_RECORDP (x, char_table_entry) /* #define CHECK_CHAR_TABLE_ENTRY(x) CHECK_RECORD (x, char_table_entry) char table entries should never escape to Lisp */ @@ -63,7 +62,6 @@ DECLARE_LRECORD (char_table, struct Lisp_Char_Table); XRECORD (x, char_table, struct Lisp_Char_Table) #define XSETCHAR_TABLE(x, p) XSETRECORD (x, p, char_table) #define CHAR_TABLEP(x) RECORDP (x, char_table) -#define GC_CHAR_TABLEP(x) GC_RECORDP (x, char_table) #define CHECK_CHAR_TABLE(x) CHECK_RECORD (x, char_table) #define CONCHECK_CHAR_TABLE(x) CONCHECK_RECORD (x, char_table) @@ -190,7 +188,7 @@ int map_char_table (struct Lisp_Char_Table *ct, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), void *arg); -void prune_syntax_tables (int (*obj_marked_p) (Lisp_Object)); +void prune_syntax_tables (void); EXFUN (Fcopy_char_table, 1); EXFUN (Fmake_char_table, 1); diff --git a/src/cmdloop.c b/src/cmdloop.c index 5c3d8a6..4d0cab8 100644 --- a/src/cmdloop.c +++ b/src/cmdloop.c @@ -40,9 +40,6 @@ Boston, MA 02111-1307, USA. */ /* Current depth in recursive edits. */ int command_loop_level; -/* Total number of times command_loop has read a key sequence. */ -int num_input_keys; - #ifndef LISP_COMMAND_LOOP /* Form to evaluate (if non-nil) when Emacs is started. */ Lisp_Object Vtop_level; diff --git a/src/config.h.in b/src/config.h.in index 48757e2..ade27a5 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -272,6 +272,7 @@ char *alloca(); #undef HAVE_GETTIMEOFDAY #undef HAVE_GETWD #undef HAVE_GETCWD +#undef HAVE_GETPT #undef HAVE_LOGB #undef HAVE_LRAND48 #undef HAVE_MATHERR @@ -294,6 +295,7 @@ char *alloca(); #undef HAVE_SIGPROCMASK #undef HAVE_SIGSETJMP #undef HAVE_SNPRINTF +#undef HAVE_STPCPY #undef HAVE_STRCASECMP #undef HAVE_STRERROR #undef HAVE_TZSET @@ -553,6 +555,7 @@ extern "C" { #endif /* Allow the source to use standard types */ +#undef ssize_t #undef size_t #undef pid_t #undef mode_t @@ -581,6 +584,9 @@ extern "C" { #undef HAVE_NAS_SOUND #undef NAS_NO_ERROR_JUMP +/* Compile in support for ESD (Enlightened Sound Daemon)? */ +#undef HAVE_ESD_SOUND + /* Compile in support for SunPro usage-tracking code? */ #undef USAGE_TRACKING @@ -601,12 +607,16 @@ extern "C" { #undef LWLIB_DIALOGS_MOTIF #undef LWLIB_DIALOGS_ATHENA #undef LWLIB_DIALOGS_ATHENA3D +#undef LWLIB_TABS_LUCID +#undef LWLIB_WIDGETS_MOTIF +#undef LWLIB_WIDGETS_ATHENA /* Other things that can be disabled by configure. */ #undef HAVE_MENUBARS #undef HAVE_SCROLLBARS #undef HAVE_DIALOGS #undef HAVE_TOOLBARS +#undef HAVE_WIDGETS #if defined (HAVE_MENUBARS) || defined (HAVE_DIALOGS) @@ -816,4 +826,6 @@ on various systems. */ #undef INFODIR_USER_DEFINED #undef INFOPATH_USER_DEFINED +#undef PDUMP + #endif /* _SRC_CONFIG_H_ */ diff --git a/src/conslots.h b/src/conslots.h index dfa9752..3c39a94 100644 --- a/src/conslots.h +++ b/src/conslots.h @@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA. */ definition. In the garbage collector this file is included after defining MARKED_SLOT(x) to be mark_object(console->x). */ +#ifndef CONSOLE_SLOTS_FIRST_NAME +#define CONSOLE_SLOTS_FIRST_NAME name +#endif + /* Name of this console, for resourcing and printing purposes. If not explicitly given, it's initialized in a console-specific manner. */ @@ -93,4 +97,7 @@ Boston, MA 02111-1307, USA. */ Initialized by the terminal-specific lisp files. */ MARKED_SLOT (function_key_map); +#ifndef CONSOLE_SLOTS_LAST_NAME +#define CONSOLE_SLOTS_LAST_NAME function_key_map +#endif diff --git a/src/console-msw.c b/src/console-msw.c index ddda9f6..3370b56 100644 --- a/src/console-msw.c +++ b/src/console-msw.c @@ -70,6 +70,12 @@ console_type_create_mswindows (void) } void +reinit_console_type_create_mswindows (void) +{ + REINITIALIZE_CONSOLE_TYPE (mswindows); +} + +void vars_of_console_mswindows (void) { Fprovide (Qmswindows); diff --git a/src/console-msw.h b/src/console-msw.h index 0bb2fc5..f3a6c3b 100644 --- a/src/console-msw.h +++ b/src/console-msw.h @@ -38,7 +38,8 @@ Boston, MA 02111-1307, USA. */ #endif #include #include /* DDE management library */ -#if !defined (__CYGWIN32__) && !defined(__MINGW32__) +#if !defined(__CYGWIN32__) && !defined(__MINGW32__) \ + || CYGWIN_VERSION_DLL_MAJOR > 20 #include /* FileManager/Explorer drag and drop */ #include #endif @@ -66,6 +67,7 @@ Boston, MA 02111-1307, USA. */ /* The name of the main window class */ #define XEMACS_CLASS "XEmacs" +#define XEMACS_CONTROL_CLASS "XEmacsControl" /* * Console @@ -224,6 +226,9 @@ struct mswindows_frame /* win32 "Windows" procedure */ LRESULT WINAPI mswindows_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +LRESULT WINAPI mswindows_control_wnd_proc (HWND hwnd, + UINT msg, WPARAM wParam, + LPARAM lParam); void mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int height); diff --git a/src/console-stream.c b/src/console-stream.c index 3953850..7899bc6 100644 --- a/src/console-stream.c +++ b/src/console-stream.c @@ -298,6 +298,12 @@ console_type_create_stream (void) } void +reinit_console_type_create_stream (void) +{ + REINITIALIZE_CONSOLE_TYPE (stream); +} + +void vars_of_console_stream (void) { DEFVAR_LISP ("terminal-console", &Vterminal_console /* @@ -320,6 +326,7 @@ The initial frame-object, which represents XEmacs' stdout. staticpro (&Vstdio_str); } +#ifndef PDUMP void init_console_stream (void) { @@ -339,3 +346,22 @@ init_console_stream (void) event_stream_select_console (XCONSOLE (Vterminal_console)); } } + +#else + +void +init_console_stream (void) +{ + /* This function can GC */ + Vterminal_device = Fmake_device (Qstream, Qnil, Qnil); + Vterminal_console = Fdevice_console (Vterminal_device); + Vterminal_frame = Fmake_frame (Qnil, Vterminal_device); + minibuf_window = XFRAME (Vterminal_frame)->minibuffer_window; + if (initialized) + { + stream_init_console (XCONSOLE (Vterminal_console), Qnil); + if (noninteractive) + event_stream_select_console (XCONSOLE (Vterminal_console)); + } +} +#endif diff --git a/src/console-stream.h b/src/console-stream.h index a097e13..e70165c 100644 --- a/src/console-stream.h +++ b/src/console-stream.h @@ -40,6 +40,8 @@ struct stream_console #define CONSOLE_STREAM_DATA(con) CONSOLE_TYPE_DATA (con, stream) +extern Lisp_Object Vterminal_console, Vterminal_frame, Vterminal_device; + Lisp_Object stream_semi_canonicalize_console_connection(Lisp_Object, Error_behavior); Lisp_Object stream_canonicalize_console_connection(Lisp_Object, diff --git a/src/console-tty.c b/src/console-tty.c index c57c0f7..c836d8c 100644 --- a/src/console-tty.c +++ b/src/console-tty.c @@ -38,9 +38,6 @@ Boston, MA 02111-1307, USA. */ #ifdef FILE_CODING #include "file-coding.h" #endif -#ifdef HAVE_GPM -#include "gpmevent.h" -#endif DEFINE_CONSOLE_TYPE (tty); DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); @@ -130,10 +127,6 @@ tty_init_console (struct console *con, Lisp_Object props) tty_con->terminal_type = terminal_type; tty_con->controlling_process = controlling_process; -#ifdef HAVE_GPM - connect_to_gpm (con); -#endif - if (NILP (CONSOLE_NAME (con))) CONSOLE_NAME (con) = Ffile_name_nondirectory (tty); { @@ -166,12 +159,12 @@ tty_init_console (struct console *con, Lisp_Object props) } static void -tty_mark_console (struct console *con, void (*markobj) (Lisp_Object)) +tty_mark_console (struct console *con) { struct tty_console *tty_con = CONSOLE_TTY_DATA (con); - markobj (tty_con->terminal_type); - markobj (tty_con->instream); - markobj (tty_con->outstream); + mark_object (tty_con->terminal_type); + mark_object (tty_con->instream); + mark_object (tty_con->outstream); } static int @@ -372,6 +365,12 @@ console_type_create_tty (void) } void +reinit_console_type_create_tty (void) +{ + REINITIALIZE_CONSOLE_TYPE (tty); +} + +void image_instantiator_format_create_glyphs_tty (void) { IIFORMAT_VALID_CONSOLE (tty, nothing); diff --git a/src/console-tty.h b/src/console-tty.h index bc5aacd..a7bbd2b 100644 --- a/src/console-tty.h +++ b/src/console-tty.h @@ -41,9 +41,6 @@ DECLARE_CONSOLE_TYPE (tty); struct tty_console { int infd, outfd; -#ifdef HAVE_GPM - int mouse_fd; -#endif Lisp_Object instream, outstream; Lisp_Object terminal_type; Lisp_Object controlling_process; @@ -203,9 +200,6 @@ struct tty_console unsigned int is_stdio :1; }; -#ifdef HAVE_GPM -#define CONSOLE_TTY_MOUSE_FD(c) (CONSOLE_TTY_DATA (c)->mouse_fd) -#endif #define CONSOLE_TTY_DATA(c) CONSOLE_TYPE_DATA (c, tty) #define CONSOLE_TTY_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->cursor_x) #define CONSOLE_TTY_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->cursor_y) diff --git a/src/console-x.c b/src/console-x.c index 4a4ab21..2470521 100644 --- a/src/console-x.c +++ b/src/console-x.c @@ -280,3 +280,9 @@ console_type_create_x (void) CONSOLE_HAS_METHOD (x, initially_selected_for_input); } + +void +reinit_console_type_create_x (void) +{ + REINITIALIZE_CONSOLE_TYPE (x); +} diff --git a/src/console-x.h b/src/console-x.h index e285226..cbf0161 100644 --- a/src/console-x.h +++ b/src/console-x.h @@ -381,7 +381,7 @@ extern struct console_type *x_console_type; extern Lisp_Object Vdefault_x_device; /* Number of pixels below each line. */ -extern int x_interline_space; +extern int x_interline_space; /* #### implement me */ extern int x_selection_timeout; @@ -420,15 +420,14 @@ void x_output_string (struct window *w, struct display_line *dl, int cursor, int cursor_start, int cursor_width, int cursor_height); void x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, - int x, int y, int clip_x, int clip_y, - int clip_width, int clip_height, int width, - int height, int pixmap_offset, + int x, int y, int xoffset, int yoffset, + int width, int height, unsigned long fg, unsigned long bg, GC override_gc); void x_output_shadows (struct frame *f, int x, int y, int width, int height, GC top_shadow_gc, GC bottom_shadow_gc, GC background_gc, - int shadow_thickness); + int shadow_thickness, int edges); void x_generate_shadow_pixels (struct frame *f, unsigned long *top_shadow, unsigned long *bottom_shadow, @@ -439,10 +438,10 @@ int x_initialize_frame_menubar (struct frame *f); void x_init_modifier_mapping (struct device *d); #define X_ERROR_OCCURRED(dpy, body) \ - (expect_x_error ((dpy)), (body), x_error_occurred_p (dpy)) + (expect_x_error (dpy), body, x_error_occurred_p (dpy)) #define HANDLING_X_ERROR(dpy, body) \ - ( expect_x_error ((dpy)), (body), signal_if_x_error ((dpy), 0)) + (expect_x_error (dpy), body, signal_if_x_error (dpy, 0)) void Initialize_Locale (void); diff --git a/src/console.c b/src/console.c index 7e27f86..00c1f13 100644 --- a/src/console.c +++ b/src/console.c @@ -53,6 +53,7 @@ Lisp_Object Qsuspend_resume_hook; list of consoles and stores into each console that does not say it has a local value. */ Lisp_Object Vconsole_defaults; +static void *console_defaults_saved_slots; /* This structure marks which slots in a console have corresponding default values in console_defaults. @@ -69,7 +70,7 @@ Lisp_Object Vconsole_defaults; consoles. If a slot is -1, then there is a DEFVAR_CONSOLE_LOCAL for it - as well as a default value which is used to initialize newly-created + as well as a default value which is used to initialize newly-created consoles and as a reset-value when local-vars are killed. If a slot is -2, there is no DEFVAR_CONSOLE_LOCAL for it. @@ -87,6 +88,7 @@ struct console console_local_flags; /* This structure holds the names of symbols whose values may be console-local. It is indexed and accessed in the same way as the above. */ static Lisp_Object Vconsole_local_symbols; +static void *console_local_symbols_saved_slots; DEFINE_CONSOLE_TYPE (dead); @@ -96,19 +98,19 @@ console_type_entry_dynarr *the_console_type_entry_dynarr; static Lisp_Object -mark_console (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_console (Lisp_Object obj) { struct console *con = XCONSOLE (obj); -#define MARKED_SLOT(x) ((void) (markobj (con->x))); +#define MARKED_SLOT(x) mark_object (con->x) #include "conslots.h" #undef MARKED_SLOT /* Can be zero for Vconsole_defaults, Vconsole_local_symbols */ if (con->conmeths) { - markobj (con->conmeths->symbol); - MAYBE_CONMETH (con, mark_console, (con, markobj)); + mark_object (con->conmeths->symbol); + MAYBE_CONMETH (con, mark_console, (con)); } return Qnil; @@ -1096,10 +1098,44 @@ syms_of_console (void) defsymbol (&Qsuspend_resume_hook, "suspend-resume-hook"); } +static const struct lrecord_description cte_description_1[] = { + { XD_LISP_OBJECT, offsetof(console_type_entry, symbol), 1 }, + { XD_STRUCT_PTR, offsetof(console_type_entry, meths), 1, &console_methods_description }, + { XD_END } +}; + +static const struct struct_description cte_description = { + sizeof(console_type_entry), + cte_description_1 +}; + +static const struct lrecord_description cted_description_1[] = { + XD_DYNARR_DESC(console_type_entry_dynarr, &cte_description), + { XD_END } +}; + +const struct struct_description cted_description = { + sizeof(console_type_entry_dynarr), + cted_description_1 +}; + +static const struct lrecord_description console_methods_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct console_methods, symbol), 2 }, + { XD_LISP_OBJECT, offsetof(struct console_methods, image_conversion_list), 1 }, + { XD_END } +}; + +const struct struct_description console_methods_description = { + sizeof(struct console_methods), + console_methods_description_1 +}; + + void console_type_create (void) { the_console_type_entry_dynarr = Dynarr_new (console_type_entry); + dumpstruct(&the_console_type_entry_dynarr, &cted_description); Vconsole_type_list = Qnil; staticpro (&Vconsole_type_list); @@ -1114,8 +1150,19 @@ console_type_create (void) } void +reinit_vars_of_console (void) +{ + staticpro_nodump (&Vconsole_list); + Vconsole_list = Qnil; + staticpro_nodump (&Vselected_console); + Vselected_console = Qnil; +} + +void vars_of_console (void) { + reinit_vars_of_console (); + DEFVAR_LISP ("create-console-hook", &Vcreate_console_hook /* Function or functions to call when a console is created. One argument, the newly-created console. @@ -1131,11 +1178,6 @@ One argument, the to-be-deleted console. */ ); Vdelete_console_hook = Qnil; - staticpro (&Vconsole_list); - Vconsole_list = Qnil; - staticpro (&Vselected_console); - Vselected_console = Qnil; - #ifdef HAVE_WINDOW_SYSTEM Fprovide (intern ("window-system")); #endif @@ -1184,13 +1226,13 @@ nuke_all_console_slots (struct console *con, Lisp_Object zap) { zero_lcrecord (con); -#define MARKED_SLOT(x) con->x = (zap); +#define MARKED_SLOT(x) con->x = zap #include "conslots.h" #undef MARKED_SLOT } -void -complex_vars_of_console (void) +static void +common_init_complex_vars_of_console (void) { /* Make sure all markable slots in console_defaults are initialized reasonably, so mark_console won't choke. @@ -1198,8 +1240,8 @@ complex_vars_of_console (void) struct console *defs = alloc_lcrecord_type (struct console, &lrecord_console); struct console *syms = alloc_lcrecord_type (struct console, &lrecord_console); - staticpro (&Vconsole_defaults); - staticpro (&Vconsole_local_symbols); + staticpro_nodump (&Vconsole_defaults); + staticpro_nodump (&Vconsole_local_symbols); XSETCONSOLE (Vconsole_defaults, defs); XSETCONSOLE (Vconsole_local_symbols, syms); @@ -1254,6 +1296,53 @@ complex_vars_of_console (void) currently allowable due to the XINT() handling of this value. With some rearrangement you can get 4 more bits. */ } +} + + +#define CONSOLE_SLOTS_SIZE (offsetof (struct console, CONSOLE_SLOTS_LAST_NAME) - offsetof (struct console, CONSOLE_SLOTS_FIRST_NAME) + sizeof (Lisp_Object)) +#define CONSOLE_SLOTS_COUNT (CONSOLE_SLOTS_SIZE / sizeof (Lisp_Object)) + +void +reinit_complex_vars_of_console (void) +{ + struct console *defs, *syms; + + common_init_complex_vars_of_console (); + + defs = XCONSOLE (Vconsole_defaults); + syms = XCONSOLE (Vconsole_local_symbols); + memcpy (&defs->CONSOLE_SLOTS_FIRST_NAME, + console_defaults_saved_slots, + CONSOLE_SLOTS_SIZE); + memcpy (&syms->CONSOLE_SLOTS_FIRST_NAME, + console_local_symbols_saved_slots, + CONSOLE_SLOTS_SIZE); +} + + +static const struct lrecord_description console_slots_description_1[] = { + { XD_LISP_OBJECT, 0, CONSOLE_SLOTS_COUNT }, + { XD_END } +}; + +static const struct struct_description console_slots_description = { + CONSOLE_SLOTS_SIZE, + console_slots_description_1 +}; + +void +complex_vars_of_console (void) +{ + struct console *defs, *syms; + + common_init_complex_vars_of_console (); + + defs = XCONSOLE (Vconsole_defaults); + syms = XCONSOLE (Vconsole_local_symbols); + console_defaults_saved_slots = &defs->CONSOLE_SLOTS_FIRST_NAME; + console_local_symbols_saved_slots = &syms->CONSOLE_SLOTS_FIRST_NAME; + dumpstruct (&console_defaults_saved_slots, &console_slots_description); + dumpstruct (&console_local_symbols_saved_slots, &console_slots_description); DEFVAR_CONSOLE_DEFAULTS ("default-function-key-map", function_key_map /* Default value of `function-key-map' for consoles that don't override it. diff --git a/src/console.h b/src/console.h index e19c15a..ffee406 100644 --- a/src/console.h +++ b/src/console.h @@ -60,6 +60,9 @@ enum device_metrics DM_slow_device, DM_security }; +extern const struct struct_description cted_description; +extern const struct struct_description console_methods_description; + struct console_methods { CONST char *name; /* Used by print_console, print_device, print_frame */ @@ -68,7 +71,7 @@ struct console_methods /* console methods */ void (*init_console_method) (struct console *, Lisp_Object props); - void (*mark_console_method) (struct console *, void (*)(Lisp_Object)); + void (*mark_console_method) (struct console *); int (*initially_selected_for_input_method) (struct console *); void (*delete_console_method) (struct console *); Lisp_Object (*semi_canonicalize_console_connection_method) @@ -86,7 +89,7 @@ struct console_methods void (*init_device_method) (struct device *, Lisp_Object props); void (*finish_init_device_method) (struct device *, Lisp_Object props); void (*delete_device_method) (struct device *); - void (*mark_device_method) (struct device *, void (*)(Lisp_Object)); + void (*mark_device_method) (struct device *); void (*asynch_device_change_method) (void); Lisp_Object (*device_system_metrics_method) (struct device *, enum device_metrics); unsigned int (*device_implementation_flags_method) (void); @@ -103,7 +106,7 @@ struct console_methods void (*init_frame_3_method) (struct frame *); void (*after_init_frame_method) (struct frame *, int first_on_device, int first_on_console); - void (*mark_frame_method) (struct frame *, void (*)(Lisp_Object)); + void (*mark_frame_method) (struct frame *); void (*delete_frame_method) (struct frame *); void (*focus_on_frame_method) (struct frame *); void (*raise_frame_method) (struct frame *); @@ -155,15 +158,23 @@ struct console_methods int duration); void (*frame_redraw_cursor_method) (struct frame *f); void (*set_final_cursor_coords_method) (struct frame *, int, int); - void (*bevel_area_method) (struct window *, face_index, int, int, int, int, int); - + void (*bevel_area_method) (struct window *, face_index, int, int, int, int, int, + int, enum edge_style); + void (*output_pixmap_method) (struct window *w, Lisp_Object image_instance, + struct display_box *db, struct display_glyph_area *dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height, int offset_bitmap); + void (*output_string_method) (struct window *w, struct display_line *dl, + Emchar_dynarr *buf, int xpos, int xoffset, + int start_pixpos, int width, face_index findex, + int cursor, int cursor_start, int cursor_width, + int cursor_height); /* color methods */ int (*initialize_color_instance_method) (struct Lisp_Color_Instance *, Lisp_Object name, Lisp_Object device, Error_behavior errb); - void (*mark_color_instance_method) (struct Lisp_Color_Instance *, - void (*)(Lisp_Object)); + void (*mark_color_instance_method) (struct Lisp_Color_Instance *); void (*print_color_instance_method) (struct Lisp_Color_Instance *, Lisp_Object printcharfun, int escapeflag); @@ -182,8 +193,7 @@ struct console_methods Lisp_Object name, Lisp_Object device, Error_behavior errb); - void (*mark_font_instance_method) (struct Lisp_Font_Instance *, - void (*)(Lisp_Object)); + void (*mark_font_instance_method) (struct Lisp_Font_Instance *); void (*print_font_instance_method) (struct Lisp_Font_Instance *, Lisp_Object printcharfun, int escapeflag); @@ -204,14 +214,14 @@ struct console_methods Bytecount length); /* image methods */ - void (*mark_image_instance_method) (struct Lisp_Image_Instance *, - void (*)(Lisp_Object)); + void (*mark_image_instance_method) (struct Lisp_Image_Instance *); void (*print_image_instance_method) (struct Lisp_Image_Instance *, Lisp_Object printcharfun, int escapeflag); void (*finalize_image_instance_method) (struct Lisp_Image_Instance *); void (*unmap_subwindow_method) (struct Lisp_Image_Instance *); - void (*map_subwindow_method) (struct Lisp_Image_Instance *, int x, int y); + void (*map_subwindow_method) (struct Lisp_Image_Instance *, int x, int y, + struct display_glyph_area* dga); void (*resize_subwindow_method) (struct Lisp_Image_Instance *, int w, int h); void (*update_subwindow_method) (struct Lisp_Image_Instance *); int (*image_instance_equal_method) (struct Lisp_Image_Instance *, @@ -221,6 +231,7 @@ struct console_methods int depth); void (*init_image_instance_from_eimage_method) (struct Lisp_Image_Instance *ii, int width, int height, + int slices, unsigned char *eimage, int dest_mask, Lisp_Object instantiator, @@ -346,12 +357,19 @@ struct console_methods * type##_console_methods type##_console_methods = xnew_and_zero (struct console_methods); \ type##_console_methods->name = obj_name; \ type##_console_methods->symbol = Q##type; \ - defsymbol (&type##_console_methods->predicate_symbol, pred_sym); \ + defsymbol_nodump (&type##_console_methods->predicate_symbol, pred_sym); \ add_entry_to_console_type_list (Q##type, type##_console_methods); \ type##_console_methods->image_conversion_list = Qnil; \ - staticpro (&type##_console_methods->image_conversion_list); \ + staticpro_nodump (&type##_console_methods->image_conversion_list); \ + dumpstruct (&type##_console_methods, &console_methods_description); \ } while (0) +#define REINITIALIZE_CONSOLE_TYPE(type) do { \ + staticpro_nodump (&type##_console_methods->predicate_symbol); \ + staticpro_nodump (&type##_console_methods->image_conversion_list); \ +} while (0) + + /* Declare that console-type TYPE has method M; used in initialization routines */ #define CONSOLE_HAS_METHOD(type, m) \ @@ -402,7 +420,6 @@ DECLARE_LRECORD (console, struct console); #define XCONSOLE(x) XRECORD (x, console, struct console) #define XSETCONSOLE(x, p) XSETRECORD (x, p, console) #define CONSOLEP(x) RECORDP (x, console) -#define GC_CONSOLEP(x) GC_RECORDP (x, console) #define CHECK_CONSOLE(x) CHECK_RECORD (x, console) #define CONCHECK_CONSOLE(x) CONCHECK_RECORD (x, console) diff --git a/src/data.c b/src/data.c index 310d76a..a761561 100644 --- a/src/data.c +++ b/src/data.c @@ -50,14 +50,14 @@ Lisp_Object Qio_error, Qend_of_file; Lisp_Object Qarith_error, Qrange_error, Qdomain_error; Lisp_Object Qsingularity_error, Qoverflow_error, Qunderflow_error; Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; -Lisp_Object Qintegerp, Qnatnump, Qsymbolp, Qkeywordp; +Lisp_Object Qintegerp, Qnatnump, Qsymbolp; Lisp_Object Qlistp, Qtrue_list_p, Qweak_listp; Lisp_Object Qconsp, Qsubrp; Lisp_Object Qcharacterp, Qstringp, Qarrayp, Qsequencep, Qvectorp; Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qbufferp; Lisp_Object Qinteger_or_char_p, Qinteger_char_or_marker_p; -Lisp_Object Qnumberp, Qnumber_or_marker_p, Qnumber_char_or_marker_p; -Lisp_Object Qbit_vectorp, Qbitp, Qcons, Qkeyword, Qcdr, Qignore; +Lisp_Object Qnumberp, Qnumber_char_or_marker_p; +Lisp_Object Qbit_vectorp, Qbitp, Qcdr; Lisp_Object Qfloatp; @@ -147,7 +147,7 @@ args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3) } void -check_int_range (int val, int min, int max) +check_int_range (EMACS_INT val, EMACS_INT min, EMACS_INT max) { if (val < min || val > max) args_out_of_range_3 (make_int (val), make_int (min), make_int (max)); @@ -160,8 +160,8 @@ EMACS_INT sign_extend_temp; /* On a few machines, XINT can only be done by calling this. */ /* XEmacs: only used by m/convex.h */ -int sign_extend_lisp_int (EMACS_INT num); -int +EMACS_INT sign_extend_lisp_int (EMACS_INT num); +EMACS_INT sign_extend_lisp_int (EMACS_INT num) { if (num & (1L << (VALBITS - 1))) @@ -615,7 +615,6 @@ Set the car of CONSCELL to be NEWCAR. Return NEWCAR. if (!CONSP (conscell)) conscell = wrong_type_argument (Qconsp, conscell); - CHECK_LISP_WRITEABLE (conscell); XCAR (conscell) = newcar; return newcar; } @@ -628,7 +627,6 @@ Set the cdr of CONSCELL to be NEWCDR. Return NEWCDR. if (!CONSP (conscell)) conscell = wrong_type_argument (Qconsp, conscell); - CHECK_LISP_WRITEABLE (conscell); XCDR (conscell) = newcdr; return newcdr; } @@ -689,7 +687,7 @@ ARRAY may be a vector, bit vector, or string. INDEX starts at 0. */ (array, index_)) { - int idx; + EMACS_INT idx; retry: @@ -743,7 +741,7 @@ ARRAY may be a vector, bit vector, or string. INDEX starts at 0. */ (array, index_, newval)) { - int idx; + EMACS_INT idx; retry: @@ -757,8 +755,6 @@ ARRAY may be a vector, bit vector, or string. INDEX starts at 0. if (idx < 0) goto range_error; - CHECK_LISP_WRITEABLE (array); - if (VECTORP (array)) { if (idx >= XVECTOR_LENGTH (array)) goto range_error; @@ -839,7 +835,7 @@ number_char_or_marker_to_double (Lisp_Object obj) } } -static int +static EMACS_INT integer_char_or_marker_to_int (Lisp_Object obj) { retry: @@ -1416,8 +1412,8 @@ Both must be integers, characters or markers. */ (num1, num2)) { - int ival1 = integer_char_or_marker_to_int (num1); - int ival2 = integer_char_or_marker_to_int (num2); + EMACS_INT ival1 = integer_char_or_marker_to_int (num1); + EMACS_INT ival2 = integer_char_or_marker_to_int (num2); if (ival2 == 0) Fsignal (Qarith_error, Qnil); @@ -1468,7 +1464,7 @@ If either argument is a float, a float will be returned. } #endif /* LISP_FLOAT_TYPE */ { - int ival; + EMACS_INT ival; if (iod2.c.ival == 0) goto divide_by_zero; ival = iod1.c.ival % iod2.c.ival; @@ -1570,7 +1566,7 @@ static Lisp_Object Vall_weak_lists; /* Gemarke es nicht!!! */ static Lisp_Object encode_weak_list_type (enum weak_list_type type); static Lisp_Object -mark_weak_list (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_weak_list (Lisp_Object obj) { return Qnil; /* nichts ist gemarkt */ } @@ -1625,7 +1621,7 @@ make_weak_list (enum weak_list_type type) static const struct lrecord_description weak_list_description[] = { { XD_LISP_OBJECT, offsetof(struct weak_list, list), 1 }, - { XD_LISP_OBJECT, offsetof(struct weak_list, next_weak), 1 }, + { XD_LO_LINK, offsetof(struct weak_list, next_weak) }, { XD_END } }; @@ -1652,20 +1648,19 @@ DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list, */ int -finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), - void (*markobj) (Lisp_Object)) +finish_marking_weak_lists (void) { Lisp_Object rest; int did_mark = 0; for (rest = Vall_weak_lists; - !GC_NILP (rest); + !NILP (rest); rest = XWEAK_LIST (rest)->next_weak) { Lisp_Object rest2; enum weak_list_type type = XWEAK_LIST (rest)->type; - if (! obj_marked_p (rest)) + if (! marked_p (rest)) /* The weak list is probably garbage. Ignore it. */ continue; @@ -1673,7 +1668,7 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), /* We need to be trickier since we're inside of GC; use CONSP instead of !NILP in case of user-visible imperfect lists */ - GC_CONSP (rest2); + CONSP (rest2); rest2 = XCDR (rest2)) { Lisp_Object elem; @@ -1688,7 +1683,7 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), (either because of an external pointer or because of a previous call to this function), and likewise for all the rest of the elements in the list, so we can stop now. */ - if (obj_marked_p (rest2)) + if (marked_p (rest2)) break; elem = XCAR (rest2); @@ -1696,19 +1691,19 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), switch (type) { case WEAK_LIST_SIMPLE: - if (obj_marked_p (elem)) + if (marked_p (elem)) need_to_mark_cons = 1; break; case WEAK_LIST_ASSOC: - if (!GC_CONSP (elem)) + if (!CONSP (elem)) { /* just leave bogus elements there */ need_to_mark_cons = 1; need_to_mark_elem = 1; } - else if (obj_marked_p (XCAR (elem)) && - obj_marked_p (XCDR (elem))) + else if (marked_p (XCAR (elem)) && + marked_p (XCDR (elem))) { need_to_mark_cons = 1; /* We still need to mark elem, because it's @@ -1718,13 +1713,13 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), break; case WEAK_LIST_KEY_ASSOC: - if (!GC_CONSP (elem)) + if (!CONSP (elem)) { /* just leave bogus elements there */ need_to_mark_cons = 1; need_to_mark_elem = 1; } - else if (obj_marked_p (XCAR (elem))) + else if (marked_p (XCAR (elem))) { need_to_mark_cons = 1; /* We still need to mark elem and XCDR (elem); @@ -1734,13 +1729,13 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), break; case WEAK_LIST_VALUE_ASSOC: - if (!GC_CONSP (elem)) + if (!CONSP (elem)) { /* just leave bogus elements there */ need_to_mark_cons = 1; need_to_mark_elem = 1; } - else if (obj_marked_p (XCDR (elem))) + else if (marked_p (XCDR (elem))) { need_to_mark_cons = 1; /* We still need to mark elem and XCAR (elem); @@ -1753,23 +1748,23 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), abort (); } - if (need_to_mark_elem && ! obj_marked_p (elem)) + if (need_to_mark_elem && ! marked_p (elem)) { - markobj (elem); + mark_object (elem); did_mark = 1; } /* We also need to mark the cons that holds the elem or - assoc-pair. We do *not* want to call (markobj) here + assoc-pair. We do *not* want to call (mark_object) here because that will mark the entire list; we just want to mark the cons itself. */ if (need_to_mark_cons) { - struct Lisp_Cons *ptr = XCONS (rest2); - if (!CONS_MARKED_P (ptr)) + Lisp_Cons *c = XCONS (rest2); + if (!CONS_MARKED_P (c)) { - MARK_CONS (ptr); + MARK_CONS (c); did_mark = 1; } } @@ -1777,9 +1772,9 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), /* In case of imperfect list, need to mark the final cons because we're not removing it */ - if (!GC_NILP (rest2) && ! obj_marked_p (rest2)) + if (!NILP (rest2) && ! marked_p (rest2)) { - markobj (rest2); + mark_object (rest2); did_mark = 1; } } @@ -1788,18 +1783,18 @@ finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), } void -prune_weak_lists (int (*obj_marked_p) (Lisp_Object)) +prune_weak_lists (void) { Lisp_Object rest, prev = Qnil; for (rest = Vall_weak_lists; - !GC_NILP (rest); + !NILP (rest); rest = XWEAK_LIST (rest)->next_weak) { - if (! (obj_marked_p (rest))) + if (! (marked_p (rest))) { /* This weak list itself is garbage. Remove it from the list. */ - if (GC_NILP (prev)) + if (NILP (prev)) Vall_weak_lists = XWEAK_LIST (rest)->next_weak; else XWEAK_LIST (prev)->next_weak = @@ -1815,7 +1810,7 @@ prune_weak_lists (int (*obj_marked_p) (Lisp_Object)) /* We need to be trickier since we're inside of GC; use CONSP instead of !NILP in case of user-visible imperfect lists */ - GC_CONSP (rest2);) + CONSP (rest2);) { /* It suffices to check the cons for marking, regardless of the type of weak list: @@ -1826,10 +1821,10 @@ prune_weak_lists (int (*obj_marked_p) (Lisp_Object)) have been marked in finish_marking_weak_lists(). -- otherwise, it's not marked and should disappear. */ - if (! obj_marked_p (rest2)) + if (! marked_p (rest2)) { /* bye bye :-( */ - if (GC_NILP (prev2)) + if (NILP (prev2)) XWEAK_LIST (rest)->list = XCDR (rest2); else XCDR (prev2) = XCDR (rest2); @@ -1870,7 +1865,7 @@ prune_weak_lists (int (*obj_marked_p) (Lisp_Object)) if (go_tortoise) tortoise = XCDR (tortoise); go_tortoise = !go_tortoise; - if (GC_EQ (rest2, tortoise)) + if (EQ (rest2, tortoise)) break; } } @@ -2081,17 +2076,13 @@ init_errors_once_early (void) void syms_of_data (void) { - defsymbol (&Qcons, "cons"); - defsymbol (&Qkeyword, "keyword"); defsymbol (&Qquote, "quote"); defsymbol (&Qlambda, "lambda"); - defsymbol (&Qignore, "ignore"); defsymbol (&Qlistp, "listp"); defsymbol (&Qtrue_list_p, "true-list-p"); defsymbol (&Qconsp, "consp"); defsymbol (&Qsubrp, "subrp"); defsymbol (&Qsymbolp, "symbolp"); - defsymbol (&Qkeywordp, "keywordp"); defsymbol (&Qintegerp, "integerp"); defsymbol (&Qcharacterp, "characterp"); defsymbol (&Qnatnump, "natnump"); @@ -2108,7 +2099,6 @@ syms_of_data (void) defsymbol (&Qinteger_or_char_p, "integer-or-char-p"); defsymbol (&Qinteger_char_or_marker_p, "integer-char-or-marker-p"); defsymbol (&Qnumberp, "numberp"); - defsymbol (&Qnumber_or_marker_p, "number-or-marker-p"); defsymbol (&Qnumber_char_or_marker_p, "number-char-or-marker-p"); defsymbol (&Qcdr, "cdr"); defsymbol (&Qweak_listp, "weak-list-p"); @@ -2207,6 +2197,7 @@ vars_of_data (void) { /* This must not be staticpro'd */ Vall_weak_lists = Qnil; + pdump_wire_list (&Vall_weak_lists); #ifdef DEBUG_XEMACS DEFVAR_BOOL ("debug-issue-ebola-notices", &debug_issue_ebola_notices /* diff --git a/src/database.c b/src/database.c index c17c827..31739ab 100644 --- a/src/database.c +++ b/src/database.c @@ -148,12 +148,10 @@ allocate_database (void) } static Lisp_Object -mark_database (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_database (Lisp_Object obj) { Lisp_Database *db = XDATABASE (obj); - - markobj (db->fname); - return Qnil; + return db->fname; } static void diff --git a/src/dbxrc b/src/dbxrc index bae532e..166922b 100644 --- a/src/dbxrc +++ b/src/dbxrc @@ -279,8 +279,8 @@ function pobj { pstruct Lisp_Marker elif lrecord_type_p opaque; then pstruct Lisp_Opaque - elif lrecord_type_p opaque_list; then - pstruct Lisp_Opaque_List + elif lrecord_type_p opaque_ptr; then + pstruct Lisp_Opaque_Ptr elif lrecord_type_p popup_data; then pstruct popup_data elif lrecord_type_p process; then diff --git a/src/debug.c b/src/debug.c index d3eb58d..3e50d0a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -39,8 +39,7 @@ Boston, MA 02111-1307, USA. */ * 4. Add a FROB line for it in xemacs_debug_loop. */ -Lisp_Object Qredisplay, Qbuffers, Qfaces; -Lisp_Object Qwindows, Qframes, Qdevices; +static Lisp_Object Qredisplay, Qbuffers, Qfaces, Qwindows, Qframes, Qdevices; struct debug_classes active_debug_classes; @@ -194,7 +193,6 @@ syms_of_debug (void) defsymbol (&Qwindows, "windows"); defsymbol (&Qframes, "frames"); defsymbol (&Qdevices, "devices"); - /* defsymbol (&Qbyte_code, "byte-code"); in bytecode.c */ DEFSUBR (Fadd_debug_class_to_check); DEFSUBR (Fdelete_debug_class_to_check); @@ -206,7 +204,7 @@ syms_of_debug (void) } void -vars_of_debug (void) +reinit_vars_of_debug (void) { /* If you need to have any classes active early on in startup, then the flags should be set here. @@ -214,3 +212,9 @@ vars_of_debug (void) to emacs.c. */ xemacs_debug_loop (INIT, Qnil, Qnil); } + +void +vars_of_debug (void) +{ + reinit_vars_of_debug (); +} diff --git a/src/debug.h b/src/debug.h index 06efdd3..6bee237 100644 --- a/src/debug.h +++ b/src/debug.h @@ -53,8 +53,6 @@ struct debug_classes unsigned int types_of_byte_code; }; -extern Lisp_Object Qbuffers, Qdevices, Qfaces, Qframes, Qredisplay, Qwindows; - extern struct debug_classes active_debug_classes; #define DASSERT(class, desired_type, action, assertion) do \ diff --git a/src/depend b/src/depend index 934c98e..c9db857 100644 --- a/src/depend +++ b/src/depend @@ -11,7 +11,7 @@ console-msw.o: $(LISP_H) conslots.h console-msw.h console.h events.h lisp-disuni device-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h dialog-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h dired-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h ndir.h nt.h regex.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h systime.h -event-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h menubar-msw.h mule-charset.h multibyte.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h +event-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h menubar-msw.h mule-charset.h multibyte.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h frame-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h glyphs-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h device.h elhash.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h gui-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h elhash.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h @@ -19,7 +19,7 @@ menubar-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h c objects-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h device.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-msw.h objects.h specifier.h symeval.h symsinit.h redisplay-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h debug.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-ccl.h mule-charset.h multibyte.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h window.h winslots.h scrollbar-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h -select-msw.o: $(LISP_H) conslots.h console-msw.h console.h lisp-disunion.h lisp-union.h lrecord.h select.h symeval.h symsinit.h +select-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h toolbar-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-msw.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h #endif #ifdef HAVE_X_WINDOWS @@ -35,7 +35,7 @@ input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h char-1byte.h cha menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h objects-x.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-x.h objects.h specifier.h symeval.h symsinit.h xintrinsic.h redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h debug.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-ccl.h mule-charset.h multibyte.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmprimitivep.h -scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h +scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h select-x.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h systime.h toolbar.h xintrinsic.h toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h #endif @@ -62,7 +62,7 @@ EmacsManager.o: EmacsManager.h EmacsManagerP.h config.h xintrinsicp.h xmmanagerp EmacsShell-sub.o: EmacsShell.h EmacsShellP.h config.h xintrinsic.h xintrinsicp.h EmacsShell.o: EmacsShell.h ExternalShell.h config.h xintrinsicp.h abbrev.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h window.h winslots.h -alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console.h device.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h toolbar.h window.h winslots.h +alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-stream.h console.h device.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h toolbar.h window.h winslots.h alloca.o: config.h balloon_help.o: balloon_help.h config.h xintrinsic.h blocktype.o: $(LISP_H) blocktype.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h @@ -77,7 +77,7 @@ cm.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console cmdloop.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h cmds.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h syntax.h console-stream.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h -console-tty.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gpmevent.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h +console-tty.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.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 symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h console.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h data.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h sysfloat.h syssignal.h debug.o: $(LISP_H) bytecode.h debug.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h @@ -91,16 +91,17 @@ doprnt.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h charac dragdrop.o: $(LISP_H) dragdrop.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h dynarr.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h ecrt0.o: config.h -editfns.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syspwd.h systime.h toolbar.h window.h winslots.h +editfns.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syspwd.h systime.h toolbar.h window.h winslots.h eldap.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h eldap.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h symeval.h symsinit.h sysdep.h elhash.o: $(LISP_H) bytecode.h elhash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h paths.h process.h redisplay.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h emodules.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h emodules.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h toolbar.h window.h winslots.h +esd.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h symeval.h symsinit.h event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h blocktype.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h toolbar.h xintrinsic.h xintrinsicp.h -event-stream.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h blocktype.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-x.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui-x.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h macros.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h xintrinsic.h +event-stream.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h blocktype.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-x.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui-x.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h macros.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h xintrinsic.h event-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h -event-unixoid.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console-tty.h console.h device.h events.h gpmevent.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h process.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h +event-unixoid.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console-tty.h console.h device.h events.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h process.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h events.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h extents.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h faces.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h @@ -116,12 +117,12 @@ frame.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h charact free-hook.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h general.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h getloadavg.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h -gif_io.o: gifrlib.h +gif_io.o: gifrlib.h sysfile.h glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h faces.h file-coding.h frame.h frameslots.h gifrlib.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h glyphs-widget.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h -glyphs.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h +glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h gmalloc.o: config.h getpagesize.h -gpmevent.o: $(LISP_H) conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h +gpmevent.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h process.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h gui.o: $(LISP_H) bytecode.h elhash.h gui.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h gutter.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h hash.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h @@ -136,7 +137,7 @@ intl.o: $(LISP_H) bytecode.h conslots.h console.h device.h lisp-disunion.h lisp- keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h elhash.h events-mod.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h libsst.o: $(LISP_H) libsst.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h line-number.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h -linuxplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h syssignal.h +linuxplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h sysfile.h syssignal.h lread.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h elhash.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h symeval.h symsinit.h sysfile.h sysfloat.h lstream.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h sysfile.h macros.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h macros.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h @@ -145,6 +146,7 @@ marker.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h charac md5.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h menubar.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h menubar.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h minibuf.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-stream.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h +miscplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h sysfile.h syssignal.h nas.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysdep.h syssignal.h nt.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nt.h ntheap.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h ntheap.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h ntheap.h symeval.h symsinit.h diff --git a/src/device-msw.c b/src/device-msw.c index 49231f7..18231ba 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -139,7 +139,9 @@ mswindows_init_device (struct device *d, Lisp_Object props) wc.lpfnWndProc = (WNDPROC) mswindows_wnd_proc; wc.cbClsExtra = 0; wc.cbWndExtra = MSWINDOWS_WINDOW_EXTRA_BYTES; - wc.hInstance = NULL; /* ? */ + /* This must match whatever is passed to CreateWIndowEx, NULL is ok + for this. */ + wc.hInstance = NULL; wc.hIcon = LoadIcon (GetModuleHandle(NULL), XEMACS_CLASS); wc.hCursor = LoadCursor (NULL, IDC_ARROW); /* Background brush is only used during sizing, when XEmacs cannot @@ -151,6 +153,17 @@ mswindows_init_device (struct device *d, Lisp_Object props) wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS, IMAGE_ICON, 16, 16, 0); RegisterClassEx (&wc); + +#ifdef HAVE_WIDGETS + xzero (wc); + /* Register the main window class */ + wc.cbSize = sizeof (WNDCLASSEX); + wc.lpfnWndProc = (WNDPROC) mswindows_control_wnd_proc; + wc.lpszClassName = XEMACS_CONTROL_CLASS; + wc.hInstance = NULL; + RegisterClassEx (&wc); +#endif + #ifdef HAVE_TOOLBARS InitCommonControls (); #endif diff --git a/src/device-tty.c b/src/device-tty.c index 754905d..4a8c0ca 100644 --- a/src/device-tty.c +++ b/src/device-tty.c @@ -38,10 +38,6 @@ Boston, MA 02111-1307, USA. */ #include "syssignal.h" /* for SIGWINCH */ -#ifdef HAVE_GPM -#include -#endif - #include Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win; @@ -155,15 +151,6 @@ tty_asynch_device_change (void) CONSOLE_TTY_DATA (con)->width = width; CONSOLE_TTY_DATA (con)->height = height; -#ifdef HAVE_GPM - /* We need to tell GPM how big our screen is now - ** I am pretty sure the GPM library will get incredibly confused - ** if you try to connect to more than one mouse-capable device, - ** so I don't think it will cause any more damage in that case. - */ - gpm_mx = width; - gpm_my = height; -#endif for (tail = DEVICE_FRAME_LIST (d); !NILP (tail); tail = XCDR (tail)) diff --git a/src/device-x.c b/src/device-x.c index 9ea7f0b..a1a8196 100644 --- a/src/device-x.c +++ b/src/device-x.c @@ -387,8 +387,8 @@ x_try_best_visual_class (Screen *screen, int scrnum, int visual_class) vi_out [i].depth == 1 || vi_out [i].depth == 8) #endif - - /* SGI has 30-bit deep visuals. Ignore them. + + /* SGI has 30-bit deep visuals. Ignore them. (We only have 24-bit data anyway.) */ && (vi_out [i].depth <= 24) @@ -566,8 +566,10 @@ x_init_device (struct device *d, Lisp_Object props) XtGetApplicationNameAndClass (dpy, (char **) &app_name, (char **) &app_class); /* search for a matching visual if requested by the user, or setup the display default */ { - char *buf1 = (char *)alloca (strlen (app_name) + 17); - char *buf2 = (char *)alloca (strlen (app_class) + 17); + int resource_name_length = max (sizeof (".emacsVisual"), + sizeof (".privateColormap")); + char *buf1 = alloca_array (char, strlen (app_name) + resource_name_length); + char *buf2 = alloca_array (char, strlen (app_class) + resource_name_length); char *type; XrmValue value; @@ -575,13 +577,14 @@ x_init_device (struct device *d, Lisp_Object props) sprintf (buf2, "%s.EmacsVisual", app_class); if (XrmGetResource (XtDatabase (dpy), buf1, buf2, &type, &value) == True) { - int cnt = 0, vis_class = PseudoColor; + int cnt = 0; + int vis_class = PseudoColor; XVisualInfo vinfo; - char *res, *str = (char*)value.addr; + char *str = (char*) value.addr; -#define CHECK_VIS_CLASS(class) \ - else if (strncmp (str, #class, sizeof (#class) - 1) == 0) \ - cnt = sizeof (#class) - 1, vis_class = class +#define CHECK_VIS_CLASS(visual_class) \ + else if (memcmp (str, #visual_class, sizeof (#visual_class) - 1) == 0) \ + cnt = sizeof (#visual_class) - 1, vis_class = visual_class if (1) ; @@ -594,8 +597,7 @@ x_init_device (struct device *d, Lisp_Object props) if (cnt) { - res = str + cnt; - depth = atoi (res); + depth = atoi (str + cnt); if (depth == 0) { stderr_out ("Invalid Depth specification in %s... ignoring...\n", str); @@ -743,10 +745,10 @@ x_finish_init_device (struct device *d, Lisp_Object props) } static void -x_mark_device (struct device *d, void (*markobj) (Lisp_Object)) +x_mark_device (struct device *d) { - markobj (DEVICE_X_WM_COMMAND_FRAME (d)); - markobj (DEVICE_X_DATA (d)->x_keysym_map_hash_table); + mark_object (DEVICE_X_WM_COMMAND_FRAME (d)); + mark_object (DEVICE_X_DATA (d)->x_keysym_map_hash_table); } @@ -1335,7 +1337,7 @@ The returned value of this function is nil if the queried resource is not found. If the third arg is `string', a string is returned, and if it is `integer', an integer is returned. If the third arg is `boolean', then the returned value is the list (t) for true, (nil) for false, and is nil to -mean ``unspecified.'' +mean ``unspecified''. */ (name, class, type, locale, device, no_error)) { @@ -1750,7 +1752,7 @@ Grab the keyboard on the given device (defaulting to the selected one). So long as the keyboard is grabbed, all keyboard events will be delivered to emacs -- it is not possible for other X clients to eavesdrop on them. Ungrab the keyboard with `x-ungrab-keyboard' (use an unwind-protect). -Returns t if the grab was successful; nil otherwise. +Returns t if the grab is successful, nil otherwise. */ (device)) { @@ -1809,7 +1811,7 @@ See also `x-set-font-path'. signal_simple_error ("Can't get X font path", device); while (ndirs_return--) - font_path = Fcons (build_ext_string (directories[ndirs_return], + font_path = Fcons (build_ext_string (directories[ndirs_return], FORMAT_FILENAME), font_path); return font_path; @@ -1893,29 +1895,43 @@ syms_of_device_x (void) } void +reinit_console_type_create_device_x (void) +{ + /* Initialize variables to speed up X resource interactions */ + CONST char *valid_resource_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + while (*valid_resource_chars) + valid_resource_char_p[(unsigned int) (*valid_resource_chars++)] = 1; + + name_char_dynarr = Dynarr_new (char); + class_char_dynarr = Dynarr_new (char); +} + +void console_type_create_device_x (void) { + reinit_console_type_create_device_x (); CONSOLE_HAS_METHOD (x, init_device); CONSOLE_HAS_METHOD (x, finish_init_device); CONSOLE_HAS_METHOD (x, mark_device); CONSOLE_HAS_METHOD (x, delete_device); CONSOLE_HAS_METHOD (x, device_system_metrics); +} - { - /* Initialize variables to speed up X resource interactions */ - CONST char *valid_resource_chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - while (*valid_resource_chars) - valid_resource_char_p[(unsigned int) (*valid_resource_chars++)] = 1; - - name_char_dynarr = Dynarr_new (char); - class_char_dynarr = Dynarr_new (char); - } +void +reinit_vars_of_device_x (void) +{ + error_expected = 0; + error_occurred = 0; + + in_resource_setting = 0; } void vars_of_device_x (void) { + reinit_vars_of_device_x (); + DEFVAR_LISP ("x-emacs-application-class", &Vx_emacs_application_class /* The X application class of the XEmacs process. This controls, among other things, the name of the `app-defaults' file @@ -1958,9 +1974,4 @@ where the localized init files are. staticpro (&Vdefault_x_device); Vdefault_x_device = Qnil; - - error_expected = 0; - error_occurred = 0; - - in_resource_setting = 0; } diff --git a/src/device.c b/src/device.c index dd98407..a080d09 100644 --- a/src/device.c +++ b/src/device.c @@ -73,41 +73,40 @@ Lisp_Object Qslow_device, Qsecurity; Lisp_Object Qdevicep, Qdevice_live_p; -Lisp_Object Qdelete_device; Lisp_Object Qcreate_device_hook; Lisp_Object Qdelete_device_hook; Lisp_Object Vdevice_class_list; static Lisp_Object -mark_device (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_device (Lisp_Object obj) { struct device *d = XDEVICE (obj); - markobj (d->name); - markobj (d->connection); - markobj (d->canon_connection); - markobj (d->console); - markobj (d->selected_frame); - markobj (d->frame_with_focus_real); - markobj (d->frame_with_focus_for_hooks); - markobj (d->frame_that_ought_to_have_focus); - markobj (d->device_class); - markobj (d->user_defined_tags); - markobj (d->pixel_to_glyph_cache.obj1); - markobj (d->pixel_to_glyph_cache.obj2); - - markobj (d->color_instance_cache); - markobj (d->font_instance_cache); + mark_object (d->name); + mark_object (d->connection); + mark_object (d->canon_connection); + mark_object (d->console); + mark_object (d->selected_frame); + mark_object (d->frame_with_focus_real); + mark_object (d->frame_with_focus_for_hooks); + mark_object (d->frame_that_ought_to_have_focus); + mark_object (d->device_class); + mark_object (d->user_defined_tags); + mark_object (d->pixel_to_glyph_cache.obj1); + mark_object (d->pixel_to_glyph_cache.obj2); + + mark_object (d->color_instance_cache); + mark_object (d->font_instance_cache); #ifdef MULE - markobj (d->charset_font_cache); + mark_object (d->charset_font_cache); #endif - markobj (d->image_instance_cache); + mark_object (d->image_instance_cache); if (d->devmeths) { - markobj (d->devmeths->symbol); - MAYBE_DEVMETH (d, mark_device, (d, markobj)); + mark_object (d->devmeths->symbol); + MAYBE_DEVMETH (d, mark_device, (d)); } return (d->frame_list); @@ -1250,7 +1249,6 @@ syms_of_device (void) defsymbol (&Qdevicep, "devicep"); defsymbol (&Qdevice_live_p, "device-live-p"); - defsymbol (&Qdelete_device, "delete-device"); defsymbol (&Qcreate_device_hook, "create-device-hook"); defsymbol (&Qdelete_device_hook, "delete-device-hook"); @@ -1299,8 +1297,18 @@ syms_of_device (void) } void +reinit_vars_of_device (void) +{ + staticpro_nodump (&Vdefault_device); + Vdefault_device = Qnil; + asynch_device_change_pending = 0; +} + +void vars_of_device (void) { + reinit_vars_of_device (); + DEFVAR_LISP ("create-device-hook", &Vcreate_device_hook /* Function or functions to call when a device is created. One argument, the newly-created device. @@ -1316,11 +1324,6 @@ One argument, the to-be-deleted device. */ ); Vdelete_device_hook = Qnil; - staticpro (&Vdefault_device); - Vdefault_device = Qnil; - - asynch_device_change_pending = 0; - Vdevice_class_list = list3 (Qcolor, Qgrayscale, Qmono); staticpro (&Vdevice_class_list); diff --git a/src/device.h b/src/device.h index 1e8f0b5..b144afa 100644 --- a/src/device.h +++ b/src/device.h @@ -168,6 +168,7 @@ struct device unsigned int frame_changed :1; unsigned int glyphs_changed :1; unsigned int subwindows_changed :1; + unsigned int subwindows_state_changed :1; unsigned int icon_changed :1; unsigned int menubar_changed :1; unsigned int modeline_changed :1; @@ -220,7 +221,6 @@ DECLARE_LRECORD (device, struct device); #define XDEVICE(x) XRECORD (x, device, struct device) #define XSETDEVICE(x, p) XSETRECORD (x, p, device) #define DEVICEP(x) RECORDP (x, device) -#define GC_DEVICEP(x) GC_RECORDP (x, device) #define CHECK_DEVICE(x) CHECK_RECORD (x, device) #define CONCHECK_DEVICE(x) CONCHECK_RECORD (x, device) @@ -247,7 +247,7 @@ error_check_device_type (struct device *d, Lisp_Object sym) return d; } # define DEVICE_TYPE_DATA(d, type) \ - ((struct type##_device *) (error_check_device_type (d, Q##type))->device_data) + ((struct type##_device *) error_check_device_type (d, Q##type)->device_data) #else # define DEVICE_TYPE_DATA(d, type) \ ((struct type##_device *) (d)->device_data) @@ -348,6 +348,9 @@ int valid_device_class_p (Lisp_Object class); #define MARK_DEVICE_SUBWINDOWS_CHANGED(d) \ ((void) (subwindows_changed = (d)->subwindows_changed = 1)) +#define MARK_DEVICE_SUBWINDOWS_STATE_CHANGED(d) \ + ((void) (subwindows_state_changed = (d)->subwindows_state_changed = 1)) + #define MARK_DEVICE_TOOLBARS_CHANGED(d) \ ((void) (toolbar_changed = (d)->toolbar_changed = 1)) @@ -365,6 +368,14 @@ int valid_device_class_p (Lisp_Object class); MARK_DEVICE_FACES_CHANGED (mdffc_d); \ } while (0) +#define MARK_DEVICE_FRAMES_GLYPHS_CHANGED(d) do { \ + struct device *mdffc_d = (d); \ + Lisp_Object frmcons; \ + DEVICE_FRAME_LOOP (frmcons, mdffc_d) \ + XFRAME (XCAR (frmcons))->glyphs_changed = 1; \ + MARK_DEVICE_GLYPHS_CHANGED (mdffc_d); \ +} while (0) + #define MARK_DEVICE_FRAME_CHANGED(d) \ ((void) (frame_changed = (d)->frame_changed = 1)) diff --git a/src/dired.c b/src/dired.c index 472133e..e247ac5 100644 --- a/src/dired.c +++ b/src/dired.c @@ -558,7 +558,7 @@ These are all user names which begin with USER. } struct user_cache { - char **data; + Bufbyte **data; int length; int size; EMACS_TIME last_rebuild_time; @@ -634,9 +634,10 @@ user_name_completion (Lisp_Object user, int all_flag, int *uniq) Bufbyte *pwuser; QUIT; DO_REALLOC (user_cache.data, user_cache.size, - user_cache.length + 1, char *); + user_cache.length + 1, Bufbyte *); GET_C_CHARPTR_INT_DATA_ALLOCA (pwd->pw_name, FORMAT_OS, pwuser); - user_cache.data[user_cache.length++] = xstrdup (pwuser); + user_cache.data[user_cache.length++] = + (Bufbyte *) xstrdup ((char *) pwuser); } endpwent (); speed_up_interrupts (); diff --git a/src/doprnt.c b/src/doprnt.c index 7df3f9c..43524ee 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -386,7 +386,7 @@ get_doprnt_args (printf_spec_dynarr *specs, va_list vargs) if (strchr (int_converters, ch)) { if (spec->h_flag) - arg.i = va_arg (vargs, short); + arg.i = va_arg (vargs, int /* short */); else if (spec->l_flag) arg.l = va_arg (vargs, long); else @@ -395,7 +395,7 @@ get_doprnt_args (printf_spec_dynarr *specs, va_list vargs) else if (strchr (unsigned_int_converters, ch)) { if (spec->h_flag) - arg.ui = va_arg (vargs, unsigned short); + arg.ui = va_arg (vargs, unsigned int /* unsigned short */); else if (spec->l_flag) arg.ul = va_arg (vargs, unsigned long); else diff --git a/src/dynarr.c b/src/dynarr.c index 4167b5b..02f4343 100644 --- a/src/dynarr.c +++ b/src/dynarr.c @@ -111,6 +111,19 @@ Use the following global variable: int Dynarr_min_size = 1; +static void +Dynarr_realloc (Dynarr *dy, int new_size) +{ + if (DUMPEDP (dy->base)) + { + void *new_base = malloc (new_size); + memcpy (new_base, dy->base, dy->max > new_size ? new_size : dy->max); + dy->base = new_base; + } + else + dy->base = xrealloc (dy->base, new_size); +} + void * Dynarr_newf (int elsize) { @@ -138,7 +151,7 @@ Dynarr_resize (void *d, int size) /* Don't do anything if the array is already big enough. */ if (newsize > dy->max) { - dy->base = xrealloc (dy->base, newsize*dy->elsize); + Dynarr_realloc (dy, newsize*dy->elsize); dy->max = newsize; } } @@ -186,9 +199,10 @@ Dynarr_free (void *d) { Dynarr *dy = (Dynarr *) d; - if (dy->base) + if (dy->base && !DUMPEDP (dy->base)) xfree (dy->base); - xfree (dy); + if(!DUMPEDP (dy)) + xfree (dy); } #ifdef MEMORY_USAGE_STATS diff --git a/src/editfns.c b/src/editfns.c index b914b4a..30b173d 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA. */ #include "systime.h" #include "sysdep.h" #include "syspwd.h" +#include "sysfile.h" /* for getcwd */ /* Some static data, and a function to initialize it for each run */ @@ -65,8 +66,6 @@ Lisp_Object Vuser_login_name; /* user name from LOGNAME or USER. */ Lisp_Object Vuser_full_name; EXFUN (Fuser_full_name, 1); -char *get_system_name (void); - Lisp_Object Qformat; Lisp_Object Qpoint, Qmark, Qregion_beginning, Qregion_end; @@ -638,17 +637,17 @@ ignored and this function returns the login name for that UID, or nil. (uid)) { char *returned_name; - int local_uid; + uid_t local_uid; if (!NILP (uid)) { CHECK_INT (uid); - local_uid = XINT(uid); - returned_name = user_login_name(&local_uid); + local_uid = XINT (uid); + returned_name = user_login_name (&local_uid); } else { - returned_name = user_login_name(NULL); + returned_name = user_login_name (NULL); } /* #### - I believe this should return nil instead of "unknown" when pw==0 pw=0 is indicated by a null return from user_login_name @@ -664,14 +663,12 @@ ignored and this function returns the login name for that UID, or nil. corresponds to a nil argument to Fuser_login_name. */ char* -user_login_name (int *uid) +user_login_name (uid_t *uid) { - struct passwd *pw = NULL; - /* uid == NULL to return name of this user */ if (uid != NULL) { - pw = getpwuid (*uid); + struct passwd *pw = getpwuid (*uid); return pw ? pw->pw_name : NULL; } else @@ -692,7 +689,7 @@ user_login_name (int *uid) return (user_name); else { - pw = getpwuid (geteuid ()); + struct passwd *pw = getpwuid (geteuid ()); #ifdef __CYGWIN32__ /* Since the Cygwin environment may not have an /etc/passwd, return "unknown" instead of the null if the username @@ -912,14 +909,6 @@ Return the name of the machine you are running on, as a string. return Fcopy_sequence (Vsystem_name); } -/* For the benefit of callers who don't want to include lisp.h. - Caller must free! */ -char * -get_system_name (void) -{ - return xstrdup ((char *) XSTRING_DATA (Vsystem_name)); -} - DEFUN ("emacs-pid", Femacs_pid, 0, 0, 0, /* Return the process ID of Emacs, as an integer. */ diff --git a/src/eldap.c b/src/eldap.c index 8dd06bd..a0dd5f7 100644 --- a/src/eldap.c +++ b/src/eldap.c @@ -47,14 +47,13 @@ static Lisp_Object Vldap_default_base; Lisp_Object Qldapp; /* ldap-open plist keywords */ -extern Lisp_Object Qport, Qauth, Qbinddn, Qpasswd, Qderef, Qtimelimit, - Qsizelimit; +static Lisp_Object Qport, Qauth, Qbinddn, Qpasswd, Qderef, Qtimelimit, Qsizelimit; /* Search scope limits */ -extern Lisp_Object Qbase, Qonelevel, Qsubtree; +static Lisp_Object Qbase, Qonelevel, Qsubtree; /* Authentication methods */ -extern Lisp_Object Qkrbv41, Qkrbv42; +static Lisp_Object Qkrbv41, Qkrbv42; /* Deref policy */ -extern Lisp_Object Qnever, Qalways, Qfind; +static Lisp_Object Qnever, Qalways, Qfind; /************************************************************************/ /* Utility Functions */ @@ -98,7 +97,7 @@ make_ldap (struct Lisp_LDAP *ldap) } static Lisp_Object -mark_ldap (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_ldap (Lisp_Object obj) { return XLDAP (obj)->host; } @@ -579,6 +578,22 @@ void syms_of_eldap (void) { defsymbol (&Qldapp, "ldapp"); + defsymbol (&Qport, "port"); + defsymbol (&Qauth, "auth"); + defsymbol (&Qbinddn, "binddn"); + defsymbol (&Qpasswd, "passwd"); + defsymbol (&Qderef, "deref"); + defsymbol (&Qtimelimit, "timelimit"); + defsymbol (&Qsizelimit, "sizelimit"); + defsymbol (&Qbase, "base"); + defsymbol (&Qonelevel, "onelevel"); + defsymbol (&Qsubtree, "subtree"); + defsymbol (&Qkrbv41, "krbv41"); + defsymbol (&Qkrbv42, "krbv42"); + defsymbol (&Qnever, "never"); + defsymbol (&Qalways, "always"); + defsymbol (&Qfind, "find"); + DEFSUBR (Fldapp); DEFSUBR (Fldap_host); DEFSUBR (Fldap_status); diff --git a/src/eldap.h b/src/eldap.h index 29f9aa9..788f88e 100644 --- a/src/eldap.h +++ b/src/eldap.h @@ -44,7 +44,6 @@ DECLARE_LRECORD (ldap, struct Lisp_LDAP); #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP) #define XSETLDAP(x, p) XSETRECORD (x, p, ldap) #define LDAPP(x) RECORDP (x, ldap) -#define GC_LDAPP(x) GC_RECORDP (x, ldap) #define CHECK_LDAP(x) CHECK_RECORD (x, ldap) #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap) diff --git a/src/elhash.c b/src/elhash.c index b53f7a0..384b1e5 100644 --- a/src/elhash.c +++ b/src/elhash.c @@ -27,11 +27,15 @@ Boston, MA 02111-1307, USA. */ #include "bytecode.h" #include "elhash.h" -Lisp_Object Qhash_tablep, Qhashtable, Qhash_table; -Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qnon_weak; +Lisp_Object Qhash_tablep; +static Lisp_Object Qhashtable, Qhash_table; +static Lisp_Object Qweakness, Qvalue; static Lisp_Object Vall_weak_hash_tables; static Lisp_Object Qrehash_size, Qrehash_threshold; -static Lisp_Object Q_size, Q_test, Q_type, Q_rehash_size, Q_rehash_threshold; +static Lisp_Object Q_size, Q_test, Q_weakness, Q_rehash_size, Q_rehash_threshold; + +/* obsolete as of 19990901 in xemacs-21.2 */ +static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qnon_weak, Q_type; typedef struct hentry { @@ -51,14 +55,16 @@ struct Lisp_Hash_Table hash_table_hash_function_t hash_function; hash_table_test_function_t test_function; hentry *hentries; - enum hash_table_type type; /* whether and how this hash table is weak */ + enum hash_table_weakness weakness; Lisp_Object next_weak; /* Used to chain together all of the weak hash tables. Don't mark through this. */ }; typedef struct Lisp_Hash_Table Lisp_Hash_Table; #define HENTRY_CLEAR_P(hentry) ((*(EMACS_UINT*)(&((hentry)->key))) == 0) -#define CLEAR_HENTRY(hentry) ((*(EMACS_UINT*)(&((hentry)->key))) = 0) +#define CLEAR_HENTRY(hentry) \ + ((*(EMACS_UINT*)(&((hentry)->key))) = 0, \ + (*(EMACS_UINT*)(&((hentry)->value))) = 0) #define HASH_TABLE_DEFAULT_SIZE 16 #define HASH_TABLE_DEFAULT_REHASH_SIZE 1.3 @@ -190,29 +196,29 @@ lisp_object_equal_hash (Lisp_Object obj) static Lisp_Object -mark_hash_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_hash_table (Lisp_Object obj) { Lisp_Hash_Table *ht = XHASH_TABLE (obj); /* If the hash table is weak, we don't want to mark the keys and values (we scan over them after everything else has been marked, and mark or remove them as necessary). */ - if (ht->type == HASH_TABLE_NON_WEAK) + if (ht->weakness == HASH_TABLE_NON_WEAK) { hentry *e, *sentinel; for (e = ht->hentries, sentinel = e + ht->size; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) { - markobj (e->key); - markobj (e->value); + mark_object (e->key); + mark_object (e->value); } } return Qnil; } /* Equality of hash tables. Two hash tables are equal when they are of - the same type and test function, they have the same number of + the same weakness and test function, they have the same number of elements, and for each key in the hash table, the values are `equal'. This is similar to Common Lisp `equalp' of hash tables, with the @@ -229,7 +235,7 @@ hash_table_equal (Lisp_Object hash_table1, Lisp_Object hash_table2, int depth) hentry *e, *sentinel; if ((ht1->test_function != ht2->test_function) || - (ht1->type != ht2->type) || + (ht1->weakness != ht2->weakness) || (ht1->count != ht2->count)) return 0; @@ -256,12 +262,15 @@ hash_table_equal (Lisp_Object hash_table1, Lisp_Object hash_table2, int depth) #s(hash-table size 2 data (key1 value1 key2 value2)) - The supported keywords are `type' (non-weak (or nil), weak, - key-weak and value-weak), `test' (eql (or nil), eq or equal), - `size' (a natnum or nil) and `data' (a list). + The supported hash table structure keywords and their values are: + `test' (eql (or nil), eq or equal) + `size' (a natnum or nil) + `rehash-size' (a float) + `rehash-threshold' (a float) + `weakness' (nil, t, key or value) + `data' (a list) - If `print-readably' is non-nil, then a simpler syntax is used; for - instance: + If `print-readably' is nil, then a simpler syntax is used, for example # @@ -307,16 +316,6 @@ print_hash_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (print_readably ? "#s(hash-table" : "#type != HASH_TABLE_NON_WEAK) - { - sprintf (buf, " type %s", - (ht->type == HASH_TABLE_WEAK ? "weak" : - ht->type == HASH_TABLE_KEY_WEAK ? "key-weak" : - ht->type == HASH_TABLE_VALUE_WEAK ? "value-weak" : - "you-d-better-not-see-this")); - write_c_string (buf, printcharfun); - } - /* These checks have a kludgy look to them, but they are safe. Due to nature of hashing, you cannot use arbitrary test functions anyway. */ @@ -340,6 +339,16 @@ print_hash_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } + if (ht->weakness != HASH_TABLE_NON_WEAK) + { + sprintf (buf, " weakness %s", + (ht->weakness == HASH_TABLE_WEAK ? "t" : + ht->weakness == HASH_TABLE_KEY_WEAK ? "key" : + ht->weakness == HASH_TABLE_VALUE_WEAK ? "value" : + "you-d-better-not-see-this")); + write_c_string (buf, printcharfun); + } + if (ht->count) print_hash_table_data (ht, printcharfun); @@ -374,9 +383,10 @@ static const struct struct_description hentry_description = { hentry_description_1 }; -static const struct lrecord_description hash_table_description[] = { +const struct lrecord_description hash_table_description[] = { { XD_SIZE_T, offsetof(Lisp_Hash_Table, size) }, - { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0), &hentry_description }, + { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0, 1), &hentry_description }, + { XD_LO_LINK, offsetof(Lisp_Hash_Table, next_weak) }, { XD_END } }; @@ -421,18 +431,18 @@ compute_hash_table_derived_values (Lisp_Hash_Table *ht) } Lisp_Object -make_general_lisp_hash_table (size_t size, - enum hash_table_type type, - enum hash_table_test test, - double rehash_size, - double rehash_threshold) +make_general_lisp_hash_table (enum hash_table_test test, + size_t size, + double rehash_size, + double rehash_threshold, + enum hash_table_weakness weakness) { Lisp_Object hash_table; Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table); - ht->type = type; ht->rehash_size = rehash_size; ht->rehash_threshold = rehash_threshold; + ht->weakness = weakness; switch (test) { @@ -477,7 +487,7 @@ make_general_lisp_hash_table (size_t size, XSETHASH_TABLE (hash_table, ht); - if (type == HASH_TABLE_NON_WEAK) + if (weakness == HASH_TABLE_NON_WEAK) ht->next_weak = Qunbound; else ht->next_weak = Vall_weak_hash_tables, Vall_weak_hash_tables = hash_table; @@ -487,11 +497,11 @@ make_general_lisp_hash_table (size_t size, Lisp_Object make_lisp_hash_table (size_t size, - enum hash_table_type type, + enum hash_table_weakness weakness, enum hash_table_test test) { - return make_general_lisp_hash_table (size, type, test, - HASH_TABLE_DEFAULT_REHASH_SIZE, -1.0); + return make_general_lisp_hash_table + (test, size, HASH_TABLE_DEFAULT_REHASH_SIZE, -1.0, weakness); } /* Pretty reading of hash tables. @@ -524,30 +534,40 @@ decode_hash_table_size (Lisp_Object obj) } static int -hash_table_type_validate (Lisp_Object keyword, Lisp_Object value, - Error_behavior errb) +hash_table_weakness_validate (Lisp_Object keyword, Lisp_Object value, + Error_behavior errb) { if (EQ (value, Qnil)) return 1; + if (EQ (value, Qt)) return 1; + if (EQ (value, Qkey)) return 1; + if (EQ (value, Qvalue)) return 1; + + /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (value, Qnon_weak)) return 1; if (EQ (value, Qweak)) return 1; if (EQ (value, Qkey_weak)) return 1; if (EQ (value, Qvalue_weak)) return 1; - maybe_signal_simple_error ("Invalid hash table type", + maybe_signal_simple_error ("Invalid hash table weakness", value, Qhash_table, errb); return 0; } -static enum hash_table_type -decode_hash_table_type (Lisp_Object obj) +static enum hash_table_weakness +decode_hash_table_weakness (Lisp_Object obj) { if (EQ (obj, Qnil)) return HASH_TABLE_NON_WEAK; + if (EQ (obj, Qt)) return HASH_TABLE_WEAK; + if (EQ (obj, Qkey)) return HASH_TABLE_KEY_WEAK; + if (EQ (obj, Qvalue)) return HASH_TABLE_VALUE_WEAK; + + /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (obj, Qnon_weak)) return HASH_TABLE_NON_WEAK; if (EQ (obj, Qweak)) return HASH_TABLE_WEAK; if (EQ (obj, Qkey_weak)) return HASH_TABLE_KEY_WEAK; if (EQ (obj, Qvalue_weak)) return HASH_TABLE_VALUE_WEAK; - signal_simple_error ("Invalid hash table type", obj); + signal_simple_error ("Invalid hash table weakness", obj); return HASH_TABLE_NON_WEAK; /* not reached */ } @@ -579,7 +599,7 @@ decode_hash_table_test (Lisp_Object obj) static int hash_table_rehash_size_validate (Lisp_Object keyword, Lisp_Object value, - Error_behavior errb) + Error_behavior errb) { if (!FLOATP (value)) { @@ -668,11 +688,11 @@ hash_table_instantiate (Lisp_Object plist) { Lisp_Object hash_table; Lisp_Object test = Qnil; - Lisp_Object type = Qnil; Lisp_Object size = Qnil; - Lisp_Object data = Qnil; Lisp_Object rehash_size = Qnil; Lisp_Object rehash_threshold = Qnil; + Lisp_Object weakness = Qnil; + Lisp_Object data = Qnil; while (!NILP (plist)) { @@ -681,22 +701,23 @@ hash_table_instantiate (Lisp_Object plist) value = XCAR (plist); plist = XCDR (plist); if (EQ (key, Qtest)) test = value; - else if (EQ (key, Qtype)) type = value; else if (EQ (key, Qsize)) size = value; - else if (EQ (key, Qdata)) data = value; else if (EQ (key, Qrehash_size)) rehash_size = value; else if (EQ (key, Qrehash_threshold)) rehash_threshold = value; + else if (EQ (key, Qweakness)) weakness = value; + else if (EQ (key, Qdata)) data = value; + else if (EQ (key, Qtype))/*obsolete*/ weakness = value; else abort (); } /* Create the hash table. */ hash_table = make_general_lisp_hash_table - (decode_hash_table_size (size), - decode_hash_table_type (type), - decode_hash_table_test (test), + (decode_hash_table_test (test), + decode_hash_table_size (size), decode_hash_table_rehash_size (rehash_size), - decode_hash_table_rehash_threshold (rehash_threshold)); + decode_hash_table_rehash_threshold (rehash_threshold), + decode_hash_table_weakness (weakness)); /* I'm not sure whether this can GC, but better safe than sorry. */ { @@ -723,17 +744,20 @@ structure_type_create_hash_table_structure_name (Lisp_Object structure_name) struct structure_type *st; st = define_structure_type (structure_name, 0, hash_table_instantiate); - define_structure_type_keyword (st, Qsize, hash_table_size_validate); define_structure_type_keyword (st, Qtest, hash_table_test_validate); - define_structure_type_keyword (st, Qtype, hash_table_type_validate); - define_structure_type_keyword (st, Qdata, hash_table_data_validate); + define_structure_type_keyword (st, Qsize, hash_table_size_validate); define_structure_type_keyword (st, Qrehash_size, hash_table_rehash_size_validate); define_structure_type_keyword (st, Qrehash_threshold, hash_table_rehash_threshold_validate); + define_structure_type_keyword (st, Qweakness, hash_table_weakness_validate); + define_structure_type_keyword (st, Qdata, hash_table_data_validate); + + /* obsolete as of 19990901 in xemacs-21.2 */ + define_structure_type_keyword (st, Qtype, hash_table_weakness_validate); } /* Create a built-in Lisp structure type named `hash-table'. We make #s(hashtable ...) equivalent to #s(hash-table ...), - for backward comptabibility. + for backward compatibility. This is called from emacs.c. */ void structure_type_create_hash_table (void) @@ -758,17 +782,23 @@ Return t if OBJECT is a hash table, else nil. DEFUN ("make-hash-table", Fmake_hash_table, 0, MANY, 0, /* Return a new empty hash table object. Use Common Lisp style keywords to specify hash table properties. - (make-hash-table &key :size :test :type :rehash-size :rehash-threshold) - -Keyword :size specifies the number of keys likely to be inserted. -This number of entries can be inserted without enlarging the hash table. + (make-hash-table &key test size rehash-size rehash-threshold weakness) Keyword :test can be `eq', `eql' (default) or `equal'. Comparison between keys is done using this function. If speed is important, consider using `eq'. When storing strings in the hash table, you will likely need to use `equal'. -Keyword :type can be `non-weak' (default), `weak', `key-weak' or `value-weak'. +Keyword :size specifies the number of keys likely to be inserted. +This number of entries can be inserted without enlarging the hash table. + +Keyword :rehash-size must be a float greater than 1.0, and specifies +the factor by which to increase the size of the hash table when enlarging. + +Keyword :rehash-threshold must be a float between 0.0 and 1.0, +and specifies the load factor of the hash table which triggers enlarging. + +Non-standard keyword :weakness can be `nil' (default), `t', `key' or `value'. A weak hash table is one whose pointers do not count as GC referents: for any key-value pair in the hash table, if the only remaining pointer @@ -788,58 +818,48 @@ that a key-value pair will be removed only if the value remains unmarked outside of weak hash tables. The pair will remain in the hash table if the value is pointed to by something other than a weak hash table, even if the key is not. - -Keyword :rehash-size must be a float greater than 1.0, and specifies -the factor by which to increase the size of the hash table when enlarging. - -Keyword :rehash-threshold must be a float between 0.0 and 1.0, -and specifies the load factor of the hash table which triggers enlarging. - */ (int nargs, Lisp_Object *args)) { - int j = 0; - Lisp_Object size = Qnil; - Lisp_Object type = Qnil; + int i = 0; Lisp_Object test = Qnil; + Lisp_Object size = Qnil; Lisp_Object rehash_size = Qnil; Lisp_Object rehash_threshold = Qnil; + Lisp_Object weakness = Qnil; - while (j < nargs) + while (i + 1 < nargs) { - Lisp_Object keyword, value; - - keyword = args[j++]; - if (!KEYWORDP (keyword)) - signal_simple_error ("Invalid hash table property keyword", keyword); - if (j == nargs) - signal_simple_error ("Hash table property requires a value", keyword); - - value = args[j++]; + Lisp_Object keyword = args[i++]; + Lisp_Object value = args[i++]; - if (EQ (keyword, Q_size)) size = value; - else if (EQ (keyword, Q_type)) type = value; - else if (EQ (keyword, Q_test)) test = value; + if (EQ (keyword, Q_test)) test = value; + else if (EQ (keyword, Q_size)) size = value; else if (EQ (keyword, Q_rehash_size)) rehash_size = value; else if (EQ (keyword, Q_rehash_threshold)) rehash_threshold = value; + else if (EQ (keyword, Q_weakness)) weakness = value; + else if (EQ (keyword, Q_type))/*obsolete*/ weakness = value; else signal_simple_error ("Invalid hash table property keyword", keyword); } + if (i < nargs) + signal_simple_error ("Hash table property requires a value", args[i]); + #define VALIDATE_VAR(var) \ if (!NILP (var)) hash_table_##var##_validate (Q##var, var, ERROR_ME); - VALIDATE_VAR (size); - VALIDATE_VAR (type); VALIDATE_VAR (test); + VALIDATE_VAR (size); VALIDATE_VAR (rehash_size); VALIDATE_VAR (rehash_threshold); + VALIDATE_VAR (weakness); return make_general_lisp_hash_table - (decode_hash_table_size (size), - decode_hash_table_type (type), - decode_hash_table_test (test), + (decode_hash_table_test (test), + decode_hash_table_size (size), decode_hash_table_rehash_size (rehash_size), - decode_hash_table_rehash_threshold (rehash_threshold)); + decode_hash_table_rehash_threshold (rehash_threshold), + decode_hash_table_weakness (weakness)); } DEFUN ("copy-hash-table", Fcopy_hash_table, 1, 1, 0, /* @@ -868,14 +888,13 @@ The keys and values will not themselves be copied. } static void -enlarge_hash_table (Lisp_Hash_Table *ht) +resize_hash_table (Lisp_Hash_Table *ht, size_t new_size) { hentry *old_entries, *new_entries, *old_sentinel, *new_sentinel, *e; - size_t old_size, new_size; + size_t old_size; old_size = ht->size; - new_size = ht->size = - hash_table_size ((size_t) ((double) old_size * ht->rehash_size)); + ht->size = new_size; old_entries = ht->hentries; @@ -899,7 +918,22 @@ enlarge_hash_table (Lisp_Hash_Table *ht) *probe = *e; } - xfree (old_entries); + if (!DUMPEDP (old_entries)) + xfree (old_entries); +} + +void +reorganize_hash_table (Lisp_Hash_Table *ht) +{ + resize_hash_table (ht, ht->size); +} + +static void +enlarge_hash_table (Lisp_Hash_Table *ht) +{ + size_t new_size = + hash_table_size ((size_t) ((double) ht->size * ht->rehash_size)); + resize_hash_table (ht, new_size); } static hentry * @@ -955,7 +989,8 @@ static void remhash_1 (Lisp_Hash_Table *ht, hentry *entries, hentry *probe) { size_t size = ht->size; - CLEAR_HENTRY (probe++); + CLEAR_HENTRY (probe); + probe++; ht->count--; LINEAR_PROBING_LOOP (probe, entries, size) @@ -1016,30 +1051,6 @@ Return the number of entries in HASH-TABLE. return make_int (xhash_table (hash_table)->count); } -DEFUN ("hash-table-size", Fhash_table_size, 1, 1, 0, /* -Return the size of HASH-TABLE. -This is the current number of slots in HASH-TABLE, whether occupied or not. -*/ - (hash_table)) -{ - return make_int (xhash_table (hash_table)->size); -} - -DEFUN ("hash-table-type", Fhash_table_type, 1, 1, 0, /* -Return the type of HASH-TABLE. -This can be one of `non-weak', `weak', `key-weak' or `value-weak'. -*/ - (hash_table)) -{ - switch (xhash_table (hash_table)->type) - { - case HASH_TABLE_WEAK: return Qweak; - case HASH_TABLE_KEY_WEAK: return Qkey_weak; - case HASH_TABLE_VALUE_WEAK: return Qvalue_weak; - default: return Qnon_weak; - } -} - DEFUN ("hash-table-test", Fhash_table_test, 1, 1, 0, /* Return the test function of HASH-TABLE. This can be one of `eq', `eql' or `equal'. @@ -1053,6 +1064,15 @@ This can be one of `eq', `eql' or `equal'. Qeq); } +DEFUN ("hash-table-size", Fhash_table_size, 1, 1, 0, /* +Return the size of HASH-TABLE. +This is the current number of slots in HASH-TABLE, whether occupied or not. +*/ + (hash_table)) +{ + return make_int (xhash_table (hash_table)->size); +} + DEFUN ("hash-table-rehash-size", Fhash_table_rehash_size, 1, 1, 0, /* Return the current rehash size of HASH-TABLE. This is a float greater than 1.0; the factor by which HASH-TABLE @@ -1073,6 +1093,37 @@ beyond which the HASH-TABLE is enlarged by rehashing. return make_float (hash_table_rehash_threshold (xhash_table (hash_table))); } +DEFUN ("hash-table-weakness", Fhash_table_weakness, 1, 1, 0, /* +Return the weakness of HASH-TABLE. +This can be one of `nil', `t', `key' or `value'. +*/ + (hash_table)) +{ + switch (xhash_table (hash_table)->weakness) + { + case HASH_TABLE_WEAK: return Qt; + case HASH_TABLE_KEY_WEAK: return Qkey; + case HASH_TABLE_VALUE_WEAK: return Qvalue; + default: return Qnil; + } +} + +/* obsolete as of 19990901 in xemacs-21.2 */ +DEFUN ("hash-table-type", Fhash_table_type, 1, 1, 0, /* +Return the type of HASH-TABLE. +This can be one of `non-weak', `weak', `key-weak' or `value-weak'. +*/ + (hash_table)) +{ + switch (xhash_table (hash_table)->weakness) + { + case HASH_TABLE_WEAK: return Qweak; + case HASH_TABLE_KEY_WEAK: return Qkey_weak; + case HASH_TABLE_VALUE_WEAK: return Qvalue_weak; + default: return Qnon_weak; + } +} + /************************************************************************/ /* Mapping Functions */ /************************************************************************/ @@ -1156,21 +1207,20 @@ elisp_map_remhash (maphash_function_t predicate, /* Complete the marking for semi-weak hash tables. */ int -finish_marking_weak_hash_tables (int (*obj_marked_p) (Lisp_Object), - void (*markobj) (Lisp_Object)) +finish_marking_weak_hash_tables (void) { Lisp_Object hash_table; int did_mark = 0; for (hash_table = Vall_weak_hash_tables; - !GC_NILP (hash_table); + !NILP (hash_table); hash_table = XHASH_TABLE (hash_table)->next_weak) { CONST Lisp_Hash_Table *ht = XHASH_TABLE (hash_table); CONST hentry *e = ht->hentries; CONST hentry *sentinel = e + ht->size; - if (! obj_marked_p (hash_table)) + if (! marked_p (hash_table)) /* The hash table is probably garbage. Ignore it. */ continue; @@ -1178,28 +1228,28 @@ finish_marking_weak_hash_tables (int (*obj_marked_p) (Lisp_Object), half-marked, we may need to mark the other half if we're keeping this pair. */ #define MARK_OBJ(obj) \ -do { if (!obj_marked_p (obj)) markobj (obj), did_mark = 1; } while (0) +do { if (!marked_p (obj)) mark_object (obj), did_mark = 1; } while (0) - switch (ht->type) + switch (ht->weakness) { case HASH_TABLE_KEY_WEAK: for (; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) - if (obj_marked_p (e->key)) + if (marked_p (e->key)) MARK_OBJ (e->value); break; case HASH_TABLE_VALUE_WEAK: for (; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) - if (obj_marked_p (e->value)) + if (marked_p (e->value)) MARK_OBJ (e->key); break; case HASH_TABLE_KEY_CAR_WEAK: for (; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) - if (!CONSP (e->key) || obj_marked_p (XCAR (e->key))) + if (!CONSP (e->key) || marked_p (XCAR (e->key))) { MARK_OBJ (e->key); MARK_OBJ (e->value); @@ -1209,7 +1259,7 @@ do { if (!obj_marked_p (obj)) markobj (obj), did_mark = 1; } while (0) case HASH_TABLE_VALUE_CAR_WEAK: for (; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) - if (!CONSP (e->value) || obj_marked_p (XCAR (e->value))) + if (!CONSP (e->value) || marked_p (XCAR (e->value))) { MARK_OBJ (e->key); MARK_OBJ (e->value); @@ -1225,17 +1275,17 @@ do { if (!obj_marked_p (obj)) markobj (obj), did_mark = 1; } while (0) } void -prune_weak_hash_tables (int (*obj_marked_p) (Lisp_Object)) +prune_weak_hash_tables (void) { Lisp_Object hash_table, prev = Qnil; for (hash_table = Vall_weak_hash_tables; - !GC_NILP (hash_table); + !NILP (hash_table); hash_table = XHASH_TABLE (hash_table)->next_weak) { - if (! obj_marked_p (hash_table)) + if (! marked_p (hash_table)) { /* This hash table itself is garbage. Remove it from the list. */ - if (GC_NILP (prev)) + if (NILP (prev)) Vall_weak_hash_tables = XHASH_TABLE (hash_table)->next_weak; else XHASH_TABLE (prev)->next_weak = XHASH_TABLE (hash_table)->next_weak; @@ -1244,7 +1294,7 @@ prune_weak_hash_tables (int (*obj_marked_p) (Lisp_Object)) { /* Now, scan over all the pairs. Remove all of the pairs in which the key or value, or both, is unmarked - (depending on the type of weak hash table). */ + (depending on the weakness of the hash table). */ Lisp_Hash_Table *ht = XHASH_TABLE (hash_table); hentry *entries = ht->hentries; hentry *sentinel = entries + ht->size; @@ -1254,7 +1304,7 @@ prune_weak_hash_tables (int (*obj_marked_p) (Lisp_Object)) if (!HENTRY_CLEAR_P (e)) { again: - if (!obj_marked_p (e->key) || !obj_marked_p (e->value)) + if (!marked_p (e->key) || !marked_p (e->value)) { remhash_1 (ht, entries, e); if (!HENTRY_CLEAR_P (e)) @@ -1337,6 +1387,15 @@ internal_hash (Lisp_Object obj, int depth) return LISP_HASH (obj); } +DEFUN ("sxhash", Fsxhash, 1, 1, 0, /* +Return a hash value for OBJECT. +(equal obj1 obj2) implies (= (sxhash obj1) (sxhash obj2)). +*/ + (object)) +{ + return make_int (internal_hash (object, 0)); +} + #if 0 xxDEFUN ("internal-hash-value", Finternal_hash_value, 1, 1, 0, /* Hash value of OBJECT. For debugging. @@ -1367,11 +1426,13 @@ syms_of_elhash (void) DEFSUBR (Fclrhash); DEFSUBR (Fmaphash); DEFSUBR (Fhash_table_count); + DEFSUBR (Fhash_table_test); DEFSUBR (Fhash_table_size); DEFSUBR (Fhash_table_rehash_size); DEFSUBR (Fhash_table_rehash_threshold); - DEFSUBR (Fhash_table_type); - DEFSUBR (Fhash_table_test); + DEFSUBR (Fhash_table_weakness); + DEFSUBR (Fhash_table_type); /* obsolete */ + DEFSUBR (Fsxhash); #if 0 DEFSUBR (Finternal_hash_value); #endif @@ -1379,18 +1440,22 @@ syms_of_elhash (void) defsymbol (&Qhash_tablep, "hash-table-p"); defsymbol (&Qhash_table, "hash-table"); defsymbol (&Qhashtable, "hashtable"); - defsymbol (&Qweak, "weak"); - defsymbol (&Qkey_weak, "key-weak"); - defsymbol (&Qvalue_weak, "value-weak"); - defsymbol (&Qnon_weak, "non-weak"); + defsymbol (&Qweakness, "weakness"); + defsymbol (&Qvalue, "value"); defsymbol (&Qrehash_size, "rehash-size"); defsymbol (&Qrehash_threshold, "rehash-threshold"); - defkeyword (&Q_size, ":size"); + defsymbol (&Qweak, "weak"); /* obsolete */ + defsymbol (&Qkey_weak, "key-weak"); /* obsolete */ + defsymbol (&Qvalue_weak, "value-weak"); /* obsolete */ + defsymbol (&Qnon_weak, "non-weak"); /* obsolete */ + defkeyword (&Q_test, ":test"); - defkeyword (&Q_type, ":type"); + defkeyword (&Q_size, ":size"); defkeyword (&Q_rehash_size, ":rehash-size"); defkeyword (&Q_rehash_threshold, ":rehash-threshold"); + defkeyword (&Q_weakness, ":weakness"); + defkeyword (&Q_type, ":type"); /* obsolete */ } void @@ -1398,4 +1463,5 @@ vars_of_elhash (void) { /* This must NOT be staticpro'd */ Vall_weak_hash_tables = Qnil; + pdump_wire_list (&Vall_weak_hash_tables); } diff --git a/src/elhash.h b/src/elhash.h index 982a729..e780626 100644 --- a/src/elhash.h +++ b/src/elhash.h @@ -28,11 +28,10 @@ DECLARE_LRECORD (hash_table, struct Lisp_Hash_Table); #define XHASH_TABLE(x) XRECORD (x, hash_table, struct Lisp_Hash_Table) #define XSETHASH_TABLE(x, p) XSETRECORD (x, p, hash_table) #define HASH_TABLEP(x) RECORDP (x, hash_table) -#define GC_HASH_TABLEP(x) GC_RECORDP (x, hash_table) #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table) #define CONCHECK_HASH_TABLE(x) CONCHECK_RECORD (x, hash_table) -enum hash_table_type +enum hash_table_weakness { HASH_TABLE_NON_WEAK, HASH_TABLE_KEY_WEAK, @@ -49,6 +48,8 @@ enum hash_table_test HASH_TABLE_EQUAL }; +extern const struct lrecord_description hash_table_description[]; + EXFUN (Fcopy_hash_table, 1); EXFUN (Fhash_table_count, 1); EXFUN (Fgethash, 3); @@ -62,15 +63,16 @@ typedef unsigned long (*hash_table_hash_function_t) (Lisp_Object obj); typedef int (*maphash_function_t) (Lisp_Object key, Lisp_Object value, void* extra_arg); +struct Lisp_Hash_Table; -Lisp_Object make_general_lisp_hash_table (size_t size, - enum hash_table_type type, - enum hash_table_test test, +Lisp_Object make_general_lisp_hash_table (enum hash_table_test test, + size_t size, + double rehash_size, double rehash_threshold, - double rehash_size); + enum hash_table_weakness weakness); Lisp_Object make_lisp_hash_table (size_t size, - enum hash_table_type type, + enum hash_table_weakness weakness, enum hash_table_test test); void elisp_maphash (maphash_function_t function, @@ -79,8 +81,9 @@ void elisp_maphash (maphash_function_t function, void elisp_map_remhash (maphash_function_t predicate, Lisp_Object hash_table, void *extra_arg); -int finish_marking_weak_hash_tables (int (*obj_marked_p) (Lisp_Object), - void (*markobj) (Lisp_Object)); -void prune_weak_hash_tables (int (*obj_marked_p) (Lisp_Object)); +int finish_marking_weak_hash_tables (void); +void prune_weak_hash_tables (void); + +void reorganize_hash_table (struct Lisp_Hash_Table *ht); #endif /* _XEMACS_ELHASH_H_ */ diff --git a/src/emacs.c b/src/emacs.c index a60922f..bf999a0 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -151,7 +151,7 @@ Lisp_Object Vdata_directory, Vconfigure_data_directory; Lisp_Object Vdoc_directory, Vconfigure_doc_directory; Lisp_Object Vconfigure_lock_directory; Lisp_Object Vdata_directory_list; -Lisp_Object Vinfo_directory, Vconfigure_info_directory; +Lisp_Object Vconfigure_info_directory; Lisp_Object Vsite_directory, Vconfigure_site_directory; Lisp_Object Vconfigure_info_path; Lisp_Object Vinternal_error_checking; @@ -221,8 +221,8 @@ int inhibit_autoloads; int debug_paths; /* Save argv and argc. */ -char **initial_argv; -int initial_argc; +static char **initial_argv; +static int initial_argc; static void sort_args (int argc, char **argv); @@ -547,7 +547,8 @@ main_1 (int argc, char **argv, char **envp, int restart) extern int malloc_cookie; #endif -#if !defined(SYSTEM_MALLOC) && !defined(HAVE_LIBMCHECK) +#if (!defined (SYSTEM_MALLOC) && !defined (HAVE_LIBMCHECK) \ + && !defined (DOUG_LEA_MALLOC)) /* Make sure that any libraries we link against haven't installed a hook for a gmalloc of a potentially incompatible version. */ /* If we're using libmcheck, the hooks have already been initialized, */ @@ -555,7 +556,7 @@ main_1 (int argc, char **argv, char **envp, int restart) __malloc_hook = NULL; __realloc_hook = NULL; __free_hook = NULL; -#endif /* not SYSTEM_MALLOC */ +#endif /* not SYSTEM_MALLOC or HAVE_LIBMCHECK or DOUG_LEA_MALLOC */ noninteractive = 0; @@ -855,6 +856,22 @@ main_1 (int argc, char **argv, char **envp, int restart) We try to do things in an order that minimizes the non-obvious dependencies between functions. */ + /* purify_flag 1 is correct even if CANNOT_DUMP. + * loadup.el will set to nil at end. */ + + purify_flag = 0; +#ifdef PDUMP + if (restart) + initialized = 1; + else { + initialized = pdump_load (); + purify_flag = !initialized; + } +#else + if (!initialized) + purify_flag = 1; +#endif + if (!initialized) { /* Initialize things so that new Lisp objects @@ -1013,6 +1030,11 @@ main_1 (int argc, char **argv, char **envp, int restart) #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) syms_of_gui_x (); #endif +#ifdef HAVE_XIM +#ifdef XIM_XLIB + syms_of_input_method_xlib (); +#endif +#endif /* HAVE_XIM */ #endif /* HAVE_X_WINDOWS */ #ifdef HAVE_MS_WINDOWS @@ -1083,6 +1105,10 @@ main_1 (int argc, char **argv, char **envp, int restart) syms_of_eldap (); #endif +#ifdef HAVE_GPM + syms_of_gpmevent (); +#endif + /* Now create the subtypes for the types that have them. We do this before the vars_*() because more symbols may get initialized here. */ @@ -1253,7 +1279,7 @@ main_1 (int argc, char **argv, char **envp, int restart) staticpro() Fprovide(symbol) intern() - pure_put() + Fput() xmalloc() defsymbol(), if it's absolutely necessary and you're sure that the symbol isn't referenced anywhere else in the initialization @@ -1266,7 +1292,6 @@ main_1 (int argc, char **argv, char **envp, int restart) Any of the object-creating functions on alloc.c: e.g. make_pure_*() - Fpurecopy() make_string() build_string() make_vector() @@ -1276,7 +1301,6 @@ main_1 (int argc, char **argv, char **envp, int restart) Fcons() listN() make_opaque_ptr() - make_opaque_long() perhaps a few others. */ @@ -1284,6 +1308,9 @@ main_1 (int argc, char **argv, char **envp, int restart) /* Now allow Fprovide() statements to be made. */ init_provide_once (); + /* Do that before any specifier creation (esp. vars_of_glyphs()) */ + vars_of_specifier (); + vars_of_abbrev (); vars_of_alloc (); #ifdef HAVE_X_WINDOWS @@ -1393,7 +1420,6 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_search (); vars_of_select (); vars_of_sound (); - vars_of_specifier (); vars_of_symbols (); vars_of_syntax (); #ifdef HAVE_TOOLBARS @@ -1478,6 +1504,10 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_eldap (); #endif +#ifdef HAVE_GPM + vars_of_gpmevent (); +#endif + /* Now initialize any specifier variables. We do this later because it has some dependence on the vars initialized above. @@ -1609,8 +1639,113 @@ main_1 (int argc, char **argv, char **envp, int restart) garbage_collect_1 (); } #endif +#ifdef PDUMP + } else if (!restart) { + reinit_alloc_once_early (); + reinit_opaque_once_early (); + + reinit_console_type_create_stream (); +#ifdef HAVE_TTY + reinit_console_type_create_tty (); +#endif +#ifdef HAVE_X_WINDOWS + reinit_console_type_create_x (); + reinit_console_type_create_device_x (); +#endif +#ifdef HAVE_MS_WINDOWS + reinit_console_type_create_mswindows (); +#endif + + reinit_specifier_type_create (); + reinit_specifier_type_create_image (); + reinit_specifier_type_create_gutter (); + reinit_specifier_type_create_objects (); +#ifdef HAVE_TOOLBARS + reinit_specifier_type_create_toolbar (); +#endif + + structure_type_create (); + + structure_type_create_chartab (); + structure_type_create_faces (); + structure_type_create_rangetab (); + structure_type_create_hash_table (); + + lstream_type_create (); +#ifdef FILE_CODING + lstream_type_create_file_coding (); +#endif +#if defined (HAVE_MS_WINDOWS) && !defined(HAVE_MSG_SELECT) + lstream_type_create_mswindows_selectable (); +#endif +#ifdef HAVE_UNIX_PROCESSES + process_type_create_unix (); +#endif +#ifdef HAVE_WIN32_PROCESSES + process_type_create_nt (); +#endif + + reinit_vars_of_buffer (); + reinit_vars_of_console (); +#ifdef DEBUG_XEMACS + reinit_vars_of_debug (); +#endif + reinit_vars_of_device (); + reinit_vars_of_eval (); +#ifdef HAVE_X_WINDOWS + reinit_vars_of_event_Xt (); +#endif +#if defined(HAVE_TTY) && (defined (DEBUG_TTY_EVENT_STREAM) || !defined (HAVE_X_WINDOWS)) + reinit_vars_of_event_tty (); +#endif +#ifdef HAVE_MS_WINDOWS + reinit_vars_of_event_mswindows (); +#endif + reinit_vars_of_event_stream (); + reinit_vars_of_events (); + reinit_vars_of_extents (); + reinit_vars_of_font_lock (); + reinit_vars_of_glyphs (); + reinit_vars_of_glyphs_widget (); + reinit_vars_of_insdel (); + reinit_vars_of_lread (); + reinit_vars_of_lstream (); + reinit_vars_of_minibuf (); + reinit_vars_of_module (); + reinit_vars_of_objects (); + reinit_vars_of_print (); + reinit_vars_of_redisplay (); + reinit_vars_of_search (); + reinit_vars_of_scrollbar_x (); + reinit_vars_of_undo (); + reinit_vars_of_window (); + +#ifdef HAVE_MS_WINDOWS + reinit_vars_of_frame_mswindows (); +#endif + +#ifdef HAVE_X_WINDOWS + reinit_vars_of_device_x (); +#ifdef HAVE_MENUBARS + reinit_vars_of_menubar_x (); +#endif + reinit_vars_of_xselect (); +#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) + reinit_vars_of_gui_x (); +#endif +#endif + +#if defined(MULE) && defined(HAVE_WNN) + reinit_vars_of_mule_wnn (); +#endif + + reinit_complex_vars_of_buffer (); + reinit_complex_vars_of_console (); + reinit_complex_vars_of_minibuf (); +#endif } + /* CONGRATULATIONS!!! We have successfully initialized the Lisp engine. */ @@ -2200,9 +2335,13 @@ voodoo_free_hook (void *mem) { /* Disable all calls to free() when XEmacs is exiting and it doesn't */ /* matter. */ - __free_hook = voodoo_free_hook; -} + __free_hook = +#ifdef __GNUC__ /* prototype of __free_hook varies with glibc version */ + (__typeof__ (__free_hook)) #endif + voodoo_free_hook; +} +#endif /* GNU_MALLOC */ DEFUN ("kill-emacs", Fkill_emacs, 0, 1, "P", /* Exit the XEmacs job and kill it. Ask for confirmation, without argument. @@ -2256,13 +2395,17 @@ all of which are called before XEmacs is actually killed. UNGCPRO; - shut_down_emacs (0, ((STRINGP (arg)) ? arg : Qnil)); + shut_down_emacs (0, STRINGP (arg) ? arg : Qnil); #if defined(GNU_MALLOC) - __free_hook = voodoo_free_hook; + __free_hook = +#ifdef __GNUC__ /* prototype of __free_hook varies with glibc version */ + (__typeof__ (__free_hook)) +#endif + voodoo_free_hook; #endif - exit ((INTP (arg)) ? XINT (arg) : 0); + exit (INTP (arg) ? XINT (arg) : 0); /* NOTREACHED */ return Qnil; /* I'm sick of the compiler warning */ } @@ -2318,12 +2461,16 @@ shut_down_emacs (int sig, Lisp_Object stuff) ("Your files have been auto-saved.\n" "Use `M-x recover-session' to recover them.\n" "\n" + "If you have access to the PROBLEMS file that came with your\n" + "version of XEmacs, please check to see if your crash is described\n" + "there, as there may be a workaround available.\n" #ifdef INFODOCK - "Please report this bug by selecting `Report-Bug' in the InfoDock\n" - "menu.\n" + "Otherwise, please report this bug by selecting `Report-Bug'\n" + "in the InfoDock menu.\n" #else - "Please report this bug by running the send-pr script included\n" - "with XEmacs, or selecting `Send Bug Report' from the help menu.\n" + "Otherwise, please report this bug by running the send-pr\n" + "script included with XEmacs, or selecting `Send Bug Report'\n" + "from the help menu.\n" "As a last resort send ordinary email to `crashes@xemacs.org'.\n" #endif "*MAKE SURE* to include the information in the command\n" @@ -2344,11 +2491,11 @@ shut_down_emacs (int sig, Lisp_Object stuff) /* Now try to determine the actual path to the executable, to try to make the backtrace-determination process as foolproof as possible. */ - if (GC_STRINGP (Vinvocation_name)) + if (STRINGP (Vinvocation_name)) name = (char *) XSTRING_DATA (Vinvocation_name); else name = "xemacs"; - if (GC_STRINGP (Vinvocation_directory)) + if (STRINGP (Vinvocation_directory)) dir = (char *) XSTRING_DATA (Vinvocation_directory); if (!dir || dir[0] != '/') stderr_out ("`which %s`", name); @@ -2512,6 +2659,11 @@ and announce itself normally when it is run. symname_ext = 0; garbage_collect_1 (); + +#ifdef PDUMP + pdump (); +#else + #ifdef DOUG_LEA_MALLOC malloc_state_ptr = malloc_get_state (); #endif @@ -2525,6 +2677,7 @@ and announce itself normally when it is run. #ifdef DOUG_LEA_MALLOC free (malloc_state_ptr); #endif +#endif /* not PDUMP */ } #endif /* not MSDOS and EMX */ @@ -2784,7 +2937,7 @@ Symbol indicating type of operating system you are using. DEFVAR_LISP ("system-configuration", &Vsystem_configuration /* String naming the configuration XEmacs was built for. */ ); - Vsystem_configuration = Fpurecopy (build_string (EMACS_CONFIGURATION)); + Vsystem_configuration = build_string (EMACS_CONFIGURATION); #ifndef EMACS_CONFIG_OPTIONS # define EMACS_CONFIG_OPTIONS "UNKNOWN" @@ -2792,8 +2945,7 @@ String naming the configuration XEmacs was built for. DEFVAR_LISP ("system-configuration-options", &Vsystem_configuration_options /* String containing the configuration options XEmacs was built with. */ ); - Vsystem_configuration_options = Fpurecopy (build_string - (EMACS_CONFIG_OPTIONS)); + Vsystem_configuration_options = build_string (EMACS_CONFIG_OPTIONS); DEFVAR_LISP ("emacs-major-version", &Vemacs_major_version /* Major version number of this version of Emacs, as an integer. @@ -2859,7 +3011,7 @@ Codename of this version of Emacs (a string). #ifndef XEMACS_CODENAME #define XEMACS_CODENAME "Noname" #endif - Vxemacs_codename = Fpurecopy (build_string (XEMACS_CODENAME)); + Vxemacs_codename = build_string (XEMACS_CODENAME); DEFVAR_BOOL ("noninteractive", &noninteractive1 /* Non-nil means XEmacs is running without interactive terminal. @@ -2933,7 +3085,6 @@ bufpos - check buffer positions. Vinternal_error_checking = Fcons (intern ("bufpos"), Vinternal_error_checking); #endif - Vinternal_error_checking = Fpurecopy (Vinternal_error_checking); DEFVAR_LISP ("path-separator", &Vpath_separator /* The directory separator in search paths, as a string. @@ -3160,7 +3311,7 @@ The configured initial path for info documentation. #endif } -#ifdef __sgi +#if defined(__sgi) && !defined(PDUMP) /* This is so tremendously ugly I'd puke. But then, it works. * The target is to override the static constructor from the * libiflPNG.so library which is maskerading as libz, and diff --git a/src/emodules.c b/src/emodules.c index b8f2e6e..3f33e0a 100644 --- a/src/emodules.c +++ b/src/emodules.c @@ -215,7 +215,7 @@ find_make_module (CONST char *mod, CONST char *name, CONST char *ver, int mof) if (modules == (emodules_list *)0) modules = (emodules_list *)xmalloc (sizeof(emodules_list)); modnum++; - modules = xrealloc (modules, modnum * sizeof(emodules_list)); + modules = (emodules_list *) xrealloc (modules, modnum * sizeof(emodules_list)); fs = modnum - 1; memset (&modules[fs], 0, sizeof(emodules_list)); @@ -526,8 +526,18 @@ syms_of_module (void) } void +reinit_vars_of_module (void) +{ + emodules_depth = 0; + modules = (emodules_list *)0; + modnum = 0; +} + +void vars_of_module (void) { + reinit_vars_of_module (); + DEFVAR_LISP ("module-version", &Vmodule_version /* Emacs dynamic loading mechanism version, as a string. @@ -537,7 +547,7 @@ This variable can be used to distinquish between different versions of the dynamic loading technology used in Emacs, if required. It is not a given that this value will be the same as the Emacs version number. */ ); - Vmodule_version = Fpurecopy (build_string (EMODULES_VERSION)); + Vmodule_version = build_string (EMODULES_VERSION); DEFVAR_BOOL ("load-modules-quietly", &load_modules_quietly /* *Set to t if module loading is to be silent. @@ -575,9 +585,6 @@ when a dynamic module is loaded. staticpro (&Vmodule_extensions); load_modules_quietly = 0; - emodules_depth = 0; - modules = (emodules_list *)0; - modnum = 0; Vmodule_load_path = Qnil; Fprovide (intern ("modules")); } diff --git a/src/eval.c b/src/eval.c index 22310ec..6ace437 100644 --- a/src/eval.c +++ b/src/eval.c @@ -73,7 +73,7 @@ struct backtrace *backtrace_list; a SUBR with more than 8 arguments, use max_args == MANY. See the DEFUN macro in lisp.h) */ #define PRIMITIVE_FUNCALL(rv, fn, av, ac) do { \ - void (*PF_fn)() = (void (*)()) (fn); \ + void (*PF_fn)(void) = (void (*)(void)) fn; \ Lisp_Object *PF_av = (av); \ switch (ac) \ { \ @@ -170,7 +170,7 @@ int specpdl_depth_counter; int max_specpdl_size; /* Depth in Lisp evaluations and function calls. */ -int lisp_eval_depth; +static int lisp_eval_depth; /* Maximum allowed depth in Lisp evaluations and function calls. */ int max_lisp_eval_depth; @@ -295,9 +295,15 @@ print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (trailer, printcharfun); } -DEFINE_LRECORD_IMPLEMENTATION ("subr", subr, - this_one_is_unmarkable, print_subr, 0, 0, 0, 0, - Lisp_Subr); +static const struct lrecord_description subr_description[] = { + { XD_DOC_STRING, offsetof(Lisp_Subr, doc) }, + { XD_END } +}; + +DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr, + this_one_is_unmarkable, print_subr, 0, 0, 0, + subr_description, + Lisp_Subr); /************************************************************************/ /* Entering the debugger */ @@ -1004,8 +1010,6 @@ In byte compilation, `function' causes its argument to be compiled. static Lisp_Object define_function (Lisp_Object name, Lisp_Object defn) { - if (purify_flag) - defn = Fpurecopy (defn); Ffset (name, defn); LOADHIST_ATTACH (name); return name; @@ -1078,14 +1082,7 @@ In lisp-interaction-mode defvar is treated as defconst. if (!NILP (args = XCDR (args))) { Lisp_Object doc = XCAR (args); -#if 0 /* FSFmacs */ - /* #### We should probably do this but it might be dangerous */ - if (purify_flag) - doc = Fpurecopy (doc); Fput (sym, Qvariable_documentation, doc); -#else - pure_put (sym, Qvariable_documentation, doc); -#endif if (!NILP (args = XCDR (args))) error ("too many arguments"); } @@ -1093,7 +1090,7 @@ In lisp-interaction-mode defvar is treated as defconst. #ifdef I18N3 if (!NILP (Vfile_domain)) - pure_put (sym, Qvariable_domain, Vfile_domain); + Fput (sym, Qvariable_domain, Vfile_domain); #endif LOADHIST_ATTACH (sym); @@ -1133,21 +1130,14 @@ Since `defconst' unconditionally assigns the variable, if (!NILP (args = XCDR (args))) { Lisp_Object doc = XCAR (args); -#if 0 /* FSFmacs */ - /* #### We should probably do this but it might be dangerous */ - if (purify_flag) - doc = Fpurecopy (doc); Fput (sym, Qvariable_documentation, doc); -#else - pure_put (sym, Qvariable_documentation, doc); -#endif if (!NILP (args = XCDR (args))) error ("too many arguments"); } #ifdef I18N3 if (!NILP (Vfile_domain)) - pure_put (sym, Qvariable_domain, Vfile_domain); + Fput (sym, Qvariable_domain, Vfile_domain); #endif LOADHIST_ATTACH (sym); @@ -1167,7 +1157,7 @@ for the variable is `*'. return ((INTP (documentation) && XINT (documentation) < 0) || - ((STRINGP (documentation)) && + (STRINGP (documentation) && (string_byte (XSTRING (documentation), 0) == '*')) || /* If (STRING . INTEGER), a negative integer means a user variable. */ @@ -2633,7 +2623,7 @@ when reading the arguments. { Fsignal (Qwrong_type_argument, Fcons (Qcommandp, - ((EQ (cmd, final)) + (EQ (cmd, final) ? list1 (cmd) : list2 (cmd, final)))); return Qnil; @@ -2750,12 +2740,11 @@ this does nothing and returns nil. /* Attempt to avoid consing identical (string=) pure strings. */ file = Fsymbol_name (Fintern (file, Qnil)); } - - return Ffset (function, - Fpurecopy (Fcons (Qautoload, list4 (file, - docstring, - interactive, - type)))); + + return Ffset (function, Fcons (Qautoload, list4 (file, + docstring, + interactive, + type))); } Lisp_Object @@ -2955,7 +2944,7 @@ Evaluate FORM and return its value. if (max_args == UNEVALLED) /* Optimize for the common case */ { backtrace.evalargs = 0; - val = (((Lisp_Object (*) (Lisp_Object)) (subr_function (subr))) + val = (((Lisp_Object (*) (Lisp_Object)) subr_function (subr)) (original_args)); } else if (nargs <= max_args) @@ -3009,7 +2998,7 @@ Evaluate FORM and return its value. backtrace.args = args; backtrace.nargs = nargs; - val = (((Lisp_Object (*) (int, Lisp_Object *)) (subr_function (subr))) + val = (((Lisp_Object (*) (int, Lisp_Object *)) subr_function (subr)) (nargs, args)); UNGCPRO; @@ -3203,7 +3192,7 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). } else if (max_args == MANY) { - val = ((Lisp_Object (*) (int, Lisp_Object *)) (subr_function (subr))) + val = ((Lisp_Object (*) (int, Lisp_Object *)) subr_function (subr)) (fun_nargs, fun_args); } else if (max_args == UNEVALLED) /* Can't funcall a special form */ @@ -3627,8 +3616,9 @@ run_hook_with_args_in_buffer (struct buffer *buf, int nargs, Lisp_Object *args, } else { - struct gcpro gcpro1, gcpro2; - GCPRO2 (sym, val); + struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object globals = Qnil; + GCPRO3 (sym, val, globals); for (; CONSP (val) && ((cond == RUN_HOOKS_TO_COMPLETION) @@ -3640,7 +3630,7 @@ run_hook_with_args_in_buffer (struct buffer *buf, int nargs, Lisp_Object *args, { /* t indicates this hook has a local binding; it means to run the global binding too. */ - Lisp_Object globals = Fdefault_value (sym); + globals = Fdefault_value (sym); if ((! CONSP (globals) || EQ (XCAR (globals), Qlambda)) && ! NILP (globals)) @@ -4207,14 +4197,14 @@ eval_in_buffer_trapping_errors (CONST char *warning_string, /* gc_currently_forbidden = 1; Currently no reason to do this; */ cons = noseeum_cons (buffer, form); - opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); + opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); GCPRO2 (cons, opaque); /* Qerror not Qt, so you can get a backtrace */ tem = condition_case_1 (Qerror, catch_them_squirmers_eval_in_buffer, cons, caught_a_squirmer, opaque); free_cons (XCONS (cons)); - if (OPAQUEP (opaque)) + if (OPAQUE_PTRP (opaque)) free_opaque_ptr (opaque); UNGCPRO; @@ -4247,13 +4237,13 @@ run_hook_trapping_errors (CONST char *warning_string, Lisp_Object hook_symbol) speccount = specpdl_depth(); specbind (Qinhibit_quit, Qt); - opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); + opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); GCPRO1 (opaque); /* Qerror not Qt, so you can get a backtrace */ tem = condition_case_1 (Qerror, catch_them_squirmers_run_hook, hook_symbol, caught_a_squirmer, opaque); - if (OPAQUEP (opaque)) + if (OPAQUE_PTRP (opaque)) free_opaque_ptr (opaque); UNGCPRO; @@ -4283,7 +4273,7 @@ safe_run_hook_trapping_errors (CONST char *warning_string, specbind (Qinhibit_quit, Qt); cons = noseeum_cons (hook_symbol, - warning_string ? make_opaque_ptr (warning_string) + warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); GCPRO1 (cons); /* Qerror not Qt, so you can get a backtrace */ @@ -4294,7 +4284,7 @@ safe_run_hook_trapping_errors (CONST char *warning_string, allow_quit_safe_run_hook_caught_a_squirmer : safe_run_hook_caught_a_squirmer, cons); - if (OPAQUEP (XCDR (cons))) + if (OPAQUE_PTRP (XCDR (cons))) free_opaque_ptr (XCDR (cons)); free_cons (XCONS (cons)); UNGCPRO; @@ -4329,12 +4319,12 @@ call0_trapping_errors (CONST char *warning_string, Lisp_Object function) specbind (Qinhibit_quit, Qt); /* gc_currently_forbidden = 1; Currently no reason to do this; */ - opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); + opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); /* Qerror not Qt, so you can get a backtrace */ tem = condition_case_1 (Qerror, catch_them_squirmers_call0, function, caught_a_squirmer, opaque); - if (OPAQUEP (opaque)) + if (OPAQUE_PTRP (opaque)) free_opaque_ptr (opaque); UNGCPRO; @@ -4379,12 +4369,12 @@ call1_trapping_errors (CONST char *warning_string, Lisp_Object function, /* gc_currently_forbidden = 1; Currently no reason to do this; */ cons = noseeum_cons (function, object); - opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); + opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); /* Qerror not Qt, so you can get a backtrace */ tem = condition_case_1 (Qerror, catch_them_squirmers_call1, cons, caught_a_squirmer, opaque); - if (OPAQUEP (opaque)) + if (OPAQUE_PTRP (opaque)) free_opaque_ptr (opaque); free_cons (XCONS (cons)); UNGCPRO; @@ -4415,12 +4405,12 @@ call2_trapping_errors (CONST char *warning_string, Lisp_Object function, /* gc_currently_forbidden = 1; Currently no reason to do this; */ cons = list3 (function, object1, object2); - opaque = (warning_string ? make_opaque_ptr (warning_string) : Qnil); + opaque = (warning_string ? make_opaque_ptr ((void *)warning_string) : Qnil); /* Qerror not Qt, so you can get a backtrace */ tem = condition_case_1 (Qerror, catch_them_squirmers_call2, cons, caught_a_squirmer, opaque); - if (OPAQUEP (opaque)) + if (OPAQUE_PTRP (opaque)) free_opaque_ptr (opaque); free_list (cons); UNGCPRO; @@ -5053,8 +5043,28 @@ reinit_eval (void) } void +reinit_vars_of_eval (void) +{ + preparing_for_armageddon = 0; + in_warnings = 0; + Qunbound_suspended_errors_tag = make_opaque_ptr (&Qunbound_suspended_errors_tag); + staticpro_nodump (&Qunbound_suspended_errors_tag); + + specpdl_size = 50; + specpdl = xnew_array (struct specbinding, specpdl_size); + /* XEmacs change: increase these values. */ + max_specpdl_size = 3000; + max_lisp_eval_depth = 500; +#if 0 /* no longer used */ + throw_level = 0; +#endif +} + +void vars_of_eval (void) { + reinit_vars_of_eval (); + DEFVAR_INT ("max-specpdl-size", &max_specpdl_size /* Limit on number of Lisp variable bindings & unwind-protects before error. */ ); @@ -5156,13 +5166,10 @@ If due to `eval' entry, one arg, t. */ ); Vdebugger = Qnil; - preparing_for_armageddon = 0; - staticpro (&Vpending_warnings); Vpending_warnings = Qnil; - Vpending_warnings_tail = Qnil; /* no need to protect this */ - - in_warnings = 0; + pdump_wire (&Vpending_warnings_tail); + Vpending_warnings_tail = Qnil; staticpro (&Vautoload_queue); Vautoload_queue = Qnil; @@ -5175,18 +5182,5 @@ If due to `eval' entry, one arg, t. staticpro (&Vcurrent_error_state); Vcurrent_error_state = Qnil; /* errors as normal */ - Qunbound_suspended_errors_tag = make_opaque_long (0); - staticpro (&Qunbound_suspended_errors_tag); - - specpdl_size = 50; - specpdl_depth_counter = 0; - specpdl = xnew_array (struct specbinding, specpdl_size); - /* XEmacs change: increase these values. */ - max_specpdl_size = 3000; - max_lisp_eval_depth = 500; -#if 0 /* no longer used */ - throw_level = 0; -#endif - reinit_eval (); } diff --git a/src/event-Xt.c b/src/event-Xt.c index 38b1781..4bea4e7 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -1569,8 +1569,13 @@ emacs_Xt_handle_magic_event (struct Lisp_Event *emacs_event) break; case Expose: - x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y, - event->xexpose.width, event->xexpose.height); + if (!check_for_ignored_expose (f, event->xexpose.x, event->xexpose.y, + event->xexpose.width, event->xexpose.height) + && + !find_matching_subwindow (f, event->xexpose.x, event->xexpose.y, + event->xexpose.width, event->xexpose.height)) + x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y, + event->xexpose.width, event->xexpose.height); break; case GraphicsExpose: /* This occurs when an XCopyArea's source area was @@ -1663,14 +1668,14 @@ static int timeout_id_tick; /* Xt interval id's might not fit into an int (they're pointers, as it happens), so we need to provide a conversion list. */ -struct Xt_timeout +static struct Xt_timeout { int id; XtIntervalId interval_id; struct Xt_timeout *next; } *pending_timeouts, *completed_timeouts; -struct Xt_timeout_blocktype +static struct Xt_timeout_blocktype { Blocktype_declare (struct Xt_timeout); } *the_Xt_timeout_blocktype; @@ -2029,9 +2034,6 @@ emacs_Xt_select_console (struct console *con) { Lisp_Object console; int infd; -#ifdef HAVE_GPM - int mousefd; -#endif if (CONSOLE_X_P (con)) return; /* X consoles are automatically selected for when we @@ -2039,22 +2041,6 @@ emacs_Xt_select_console (struct console *con) infd = event_stream_unixoid_select_console (con); XSETCONSOLE (console, con); select_filedesc (infd, console); -#ifdef HAVE_GPM - /* On a stream device (ie: noninteractive), bad things can happen. */ - if (EQ (CONSOLE_TYPE (con), Qtty)) { - mousefd = CONSOLE_TTY_MOUSE_FD (con); - /* We check filedesc_to_what_closure[fd] here because if you run - ** XEmacs from a TTY, it will fire up GPM, select the mouse fd, then - ** if you run gnuattach to connect to another TTY, it will fire up - ** GPM again, and try to reselect the mouse fd. GPM uses the same - ** fd for every connection apparently, and select_filedesc will - ** fail its assertion if we try to select it twice. - */ - if ((mousefd >= 0) && !filedesc_to_what_closure[mousefd]) { - select_filedesc (mousefd, console); - } - } -#endif } static void @@ -2062,9 +2048,6 @@ emacs_Xt_unselect_console (struct console *con) { Lisp_Object console; int infd; -#ifdef HAVE_GPM - int mousefd; -#endif if (CONSOLE_X_P (con)) return; /* X consoles are automatically selected for when we @@ -2072,15 +2055,6 @@ emacs_Xt_unselect_console (struct console *con) infd = event_stream_unixoid_unselect_console (con); XSETCONSOLE (console, con); unselect_filedesc (infd); -#ifdef HAVE_GPM - /* On a stream device (ie: noninteractive), bad things can happen. */ - if (EQ (CONSOLE_TYPE (con), Qtty)) { - mousefd = CONSOLE_TTY_MOUSE_FD (con); - if (mousefd >= 0) { - unselect_filedesc (mousefd); - } - } -#endif } /* read an event from a tty, if one is available. Returns non-zero @@ -2918,15 +2892,8 @@ syms_of_event_Xt (void) } void -vars_of_event_Xt (void) +reinit_vars_of_event_Xt (void) { - dispatch_event_queue = Qnil; - staticpro (&dispatch_event_queue); - dispatch_event_queue_tail = Qnil; - - /* this function only makes safe calls */ - init_what_input_once (); - Xt_event_stream = xnew (struct event_stream); Xt_event_stream->event_pending_p = emacs_Xt_event_pending_p; Xt_event_stream->next_event_cb = emacs_Xt_next_event; @@ -2941,6 +2908,24 @@ vars_of_event_Xt (void) Xt_event_stream->create_stream_pair_cb = emacs_Xt_create_stream_pair; Xt_event_stream->delete_stream_pair_cb = emacs_Xt_delete_stream_pair; + the_Xt_timeout_blocktype = Blocktype_new (struct Xt_timeout_blocktype); + + last_quit_check_signal_tick_count = 0; + + /* this function only makes safe calls */ + init_what_input_once (); +} + +void +vars_of_event_Xt (void) +{ + reinit_vars_of_event_Xt (); + + dispatch_event_queue = Qnil; + staticpro (&dispatch_event_queue); + dispatch_event_queue_tail = Qnil; + pdump_wire (&dispatch_event_queue_tail); + DEFVAR_BOOL ("modifier-keys-are-sticky", &modifier_keys_are_sticky /* *Non-nil makes modifier keys sticky. This means that you can release the modifier key before pressing down @@ -2966,10 +2951,6 @@ Information is displayed on stderr. Currently defined values are: */ ); x_debug_events = 0; #endif - - the_Xt_timeout_blocktype = Blocktype_new (struct Xt_timeout_blocktype); - - last_quit_check_signal_tick_count = 0; } /* This mess is a hack that patches the shell widget to treat visual inheritance diff --git a/src/event-msw.c b/src/event-msw.c index 45e77ee..6a0c91c 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -56,6 +56,7 @@ Boston, MA 02111-1307, USA. */ #include "lstream.h" #include "process.h" #include "redisplay.h" +#include "select.h" #include "sysproc.h" #include "syswait.h" #include "systime.h" @@ -89,7 +90,7 @@ typedef NMHDR *LPNMHDR; /* Timer ID used for button2 emulation */ #define BUTTON_2_TIMER_ID 1 -extern Lisp_Object +extern Lisp_Object mswindows_get_toolbar_button_text (struct frame* f, int command_id); extern Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id); @@ -98,7 +99,8 @@ mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id); static Lisp_Object mswindows_find_frame (HWND hwnd); static Lisp_Object mswindows_find_console (HWND hwnd); -static Lisp_Object mswindows_key_to_emacs_keysym(int mswindows_key, int mods); +static Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods, + int extendedp); static int mswindows_modifier_state (BYTE* keymap, int has_AltGr); static void mswindows_set_chord_timer (HWND hwnd); static int mswindows_button2_near_enough (POINTS p1, POINTS p2); @@ -144,6 +146,7 @@ int mswindows_quit_chars_count = 0; /* These are Lisp integers; see DEFVARS in this file for description. */ int mswindows_dynamic_frame_resize; +int mswindows_meta_activates_menu; int mswindows_num_mouse_buttons; int mswindows_mouse_button_max_skew_x; int mswindows_mouse_button_max_skew_y; @@ -197,7 +200,7 @@ struct ntpipe_slurp_stream_shared_data }; #define MAX_SLURP_STREAMS 32 -struct ntpipe_slurp_stream_shared_data +struct ntpipe_slurp_stream_shared_data shared_data_block[MAX_SLURP_STREAMS]={{0}}; struct ntpipe_slurp_stream @@ -269,7 +272,7 @@ slurp_thread (LPVOID vparam) /* Now we got something to notify caller, either a byte or an error/eof indication. Before we do, allow internal pipe - buffer to accumulate little bit more data. + buffer to accumulate little bit more data. Reader function pulses this event before waiting for a character, to avoid pipe delay, and to get the byte immediately. */ @@ -358,11 +361,11 @@ get_ntpipe_input_stream_waitable (Lstream *stream) return s->thread_data->hev_caller; } -static int +static ssize_t ntpipe_slurp_reader (Lstream *stream, unsigned char *data, size_t size) { /* This function must be called from the main thread only */ - struct ntpipe_slurp_stream_shared_data* s = + struct ntpipe_slurp_stream_shared_data* s = NTPIPE_SLURP_STREAM_DATA(stream)->thread_data; if (!s->die_p) @@ -371,7 +374,7 @@ ntpipe_slurp_reader (Lstream *stream, unsigned char *data, size_t size) /* Disallow pipe read delay for the thread: we need a character ASAP */ SetEvent (s->hev_unsleep); - + /* Check if we have a character ready. Give it a short delay, for the thread to awake from pipe delay, just ion case*/ wait_result = WaitForSingleObject (s->hev_caller, 2); @@ -422,7 +425,7 @@ ntpipe_slurp_reader (Lstream *stream, unsigned char *data, size_t size) ReadFile (s->hpipe, data, min (bytes_available, size), &bytes_read, NULL); } - + /* Now we can unblock thread, so it attempts to read more */ SetEvent (s->hev_thread); return bytes_read + 1; @@ -431,11 +434,11 @@ ntpipe_slurp_reader (Lstream *stream, unsigned char *data, size_t size) return 0; } -static int +static int ntpipe_slurp_closer (Lstream *stream) { /* This function must be called from the main thread only */ - struct ntpipe_slurp_stream_shared_data* s = + struct ntpipe_slurp_stream_shared_data* s = NTPIPE_SLURP_STREAM_DATA(stream)->thread_data; /* Force thread to stop */ @@ -467,7 +470,7 @@ init_slurp_stream (void) LSTREAM_TYPE_DATA (stream, ntpipe_shove) #define MAX_SHOVE_BUFFER_SIZE 128 - + struct ntpipe_shove_stream { LPARAM user_data; /* Any user data stored in the stream object */ @@ -494,7 +497,7 @@ shove_thread (LPVOID vparam) for (;;) { - DWORD bytes_written; + DWORD bytes_written; /* Block on event and wait for a job */ InterlockedIncrement (&s->idle_p); @@ -531,7 +534,7 @@ make_ntpipe_output_stream (HANDLE hpipe, LPARAM param) s->hpipe = hpipe; s->user_data = param; - /* Create reader thread. This could fail, so do not + /* Create reader thread. This could fail, so do not create the event until thread is created */ s->hthread = CreateThread (NULL, 0, shove_thread, (LPVOID)s, CREATE_SUSPENDED, &thread_id_unused); @@ -560,7 +563,7 @@ get_ntpipe_output_stream_param (Lstream *stream) } #endif -static int +static ssize_t ntpipe_shove_writer (Lstream *stream, const unsigned char *data, size_t size) { struct ntpipe_shove_stream* s = NTPIPE_SHOVE_STREAM_DATA(stream); @@ -669,7 +672,7 @@ winsock_initiate_read (struct winsock_stream *str) str->eof_p = 1; } -static int +static ssize_t winsock_reader (Lstream *stream, unsigned char *data, size_t size) { struct winsock_stream *str = WINSOCK_STREAM_DATA (stream); @@ -702,7 +705,7 @@ winsock_reader (Lstream *stream, unsigned char *data, size_t size) return 0; if (str->error_p) return -1; - + /* Return as much of buffer as we have */ size = min (size, (size_t) (str->bufsize - str->bufpos)); memcpy (data, (void*)((BYTE*)str->buffer + str->bufpos), size); @@ -715,7 +718,7 @@ winsock_reader (Lstream *stream, unsigned char *data, size_t size) return size; } -static int +static ssize_t winsock_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct winsock_stream *str = WINSOCK_STREAM_DATA (stream); @@ -743,7 +746,7 @@ winsock_writer (Lstream *stream, CONST unsigned char *data, size_t size) if (size == 0) return 0; - + { ResetEvent (str->ov.hEvent); @@ -865,7 +868,7 @@ mswindows_user_event_p (struct Lisp_Event* sevt) || sevt->event_type == misc_user_event); } -/* +/* * Add an emacs event to the proper dispatch queue */ static void @@ -873,7 +876,7 @@ mswindows_enqueue_dispatch_event (Lisp_Object event) { int user_p = mswindows_user_event_p (XEVENT(event)); enqueue_event (event, - user_p ? &mswindows_u_dispatch_event_queue : + user_p ? &mswindows_u_dispatch_event_queue : &mswindows_s_dispatch_event_queue, user_p ? &mswindows_u_dispatch_event_queue_tail : &mswindows_s_dispatch_event_queue_tail); @@ -951,7 +954,7 @@ mswindows_enqueue_mouse_button_event (HWND hwnd, UINT message, POINTS where, DWO event->event.button.x = where.x; event->event.button.y = where.y; event->event.button.modifiers = mswindows_modifier_state (NULL, 0); - + if (message==WM_LBUTTONDOWN || message==WM_MBUTTONDOWN || message==WM_RBUTTONDOWN) { @@ -970,7 +973,7 @@ mswindows_enqueue_mouse_button_event (HWND hwnd, UINT message, POINTS where, DWO event->event_type = button_release_event; ReleaseCapture (); } - + mswindows_enqueue_dispatch_event (emacs_event); } @@ -1002,10 +1005,10 @@ mswindows_dequeue_dispatch_event () !NILP(mswindows_s_dispatch_event_queue)); event = dequeue_event ( - NILP(mswindows_u_dispatch_event_queue) ? - &mswindows_s_dispatch_event_queue : + NILP(mswindows_u_dispatch_event_queue) ? + &mswindows_s_dispatch_event_queue : &mswindows_u_dispatch_event_queue, - NILP(mswindows_u_dispatch_event_queue) ? + NILP(mswindows_u_dispatch_event_queue) ? &mswindows_s_dispatch_event_queue_tail : &mswindows_u_dispatch_event_queue_tail); @@ -1035,9 +1038,9 @@ mswindows_cancel_dispatch_event (struct Lisp_Event *match) Lisp_Object event; Lisp_Object previous_event = Qnil; int user_p = mswindows_user_event_p (match); - Lisp_Object* head = user_p ? &mswindows_u_dispatch_event_queue : + Lisp_Object* head = user_p ? &mswindows_u_dispatch_event_queue : &mswindows_s_dispatch_event_queue; - Lisp_Object* tail = user_p ? &mswindows_u_dispatch_event_queue_tail : + Lisp_Object* tail = user_p ? &mswindows_u_dispatch_event_queue_tail : &mswindows_s_dispatch_event_queue_tail; assert (match->event_type == timeout_event @@ -1060,7 +1063,7 @@ mswindows_cancel_dispatch_event (struct Lisp_Event *match) if (EQ (*tail, event)) *tail = previous_event; } - + return event; } previous_event = event; @@ -1101,7 +1104,7 @@ remove_waitable_handle (HANDLE h) if (ix < 0) return; - mswindows_waitable_handles [ix] = + mswindows_waitable_handles [ix] = mswindows_waitable_handles [--mswindows_waitable_count]; } #endif /* HAVE_MSG_SELECT */ @@ -1125,7 +1128,7 @@ mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg), { Lisp_Object tmp; - ++mswindows_in_modal_loop; + ++mswindows_in_modal_loop; tmp = condition_case_1 (Qt, bfun, barg, mswindows_modal_loop_error_handler, Qnil); @@ -1149,7 +1152,7 @@ mswindows_unmodalize_signal_maybe (void) } /* - * This is an unsafe part of event pump, guarded by + * This is an unsafe part of event pump, guarded by * condition_case. See mswindows_pump_outstanding_events */ static Lisp_Object @@ -1173,7 +1176,7 @@ mswindows_unsafe_pump_events (Lisp_Object u_n_u_s_e_d) Fdeallocate_event (event); UNGCPRO; - + /* Qt becomes return value of mswindows_pump_outstanding_events once we get here */ return Qt; @@ -1221,14 +1224,14 @@ mswindows_pump_outstanding_events (void) Lisp_Object result = Qt; struct gcpro gcpro1; GCPRO1 (result); - + if (NILP(mswindows_error_caught_in_modal_loop)) result = mswindows_protect_modal_loop (mswindows_unsafe_pump_events, Qnil); UNGCPRO; return result; } -static void +static void mswindows_drain_windows_queue () { MSG msg; @@ -1247,7 +1250,7 @@ mswindows_drain_windows_queue () } } -/* +/* * This is a special flavor of the mswindows_need_event function, * used while in event pump. Actually, there is only kind of events * allowed while in event pump: a timer. An attempt to fetch any @@ -1280,7 +1283,7 @@ mswindows_need_event_in_modal_loop (int badly_p) /* We'll deadlock if go waiting */ if (mswindows_pending_timers_count == 0) error ("Deadlock due to an attempt to call next-event in a wrong context"); - + /* Fetch and dispatch any pending timers */ GetMessage (&msg, NULL, WM_TIMER, WM_TIMER); DispatchMessage (&msg); @@ -1317,7 +1320,7 @@ mswindows_need_event (int badly_p) SELECT_TYPE temp_mask = input_wait_mask; EMACS_TIME sometime; EMACS_SELECT_TIME select_time_to_block, *pointer_to_this; - + if (badly_p) pointer_to_this = 0; else @@ -1328,7 +1331,7 @@ mswindows_need_event (int badly_p) } active = select (MAXDESC, &temp_mask, 0, 0, pointer_to_this); - + if (active == 0) { assert (!badly_p); @@ -1340,7 +1343,7 @@ mswindows_need_event (int badly_p) { mswindows_drain_windows_queue (); } -#ifdef HAVE_TTY +#ifdef HAVE_TTY /* Look for a TTY event */ for (i = 0; i < MAXDESC-1; i++) { @@ -1352,7 +1355,7 @@ mswindows_need_event (int badly_p) struct console *c = tty_find_console_from_fd (i); Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); struct Lisp_Event* event = XEVENT (emacs_event); - + assert (c); if (read_event_from_tty_or_stream_desc (event, c, i)) { @@ -1371,7 +1374,7 @@ mswindows_need_event (int badly_p) { struct Lisp_Process *p = get_process_from_usid (FD_TO_USID(i)); - + mswindows_enqueue_process_event (p); } else @@ -1410,7 +1413,7 @@ mswindows_need_event (int badly_p) assert ((!badly_p && active == WAIT_TIMEOUT) || (active >= WAIT_OBJECT_0 && active <= WAIT_OBJECT_0 + mswindows_waitable_count)); - + if (active == WAIT_TIMEOUT) { /* No luck trying - just return what we've already got */ @@ -1425,7 +1428,7 @@ mswindows_need_event (int badly_p) { int ix = active - WAIT_OBJECT_0; /* First, try to find which process' output has signaled */ - struct Lisp_Process *p = + struct Lisp_Process *p = get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix])); if (p != NULL) { @@ -1453,7 +1456,7 @@ mswindows_need_event (int badly_p) /* Event generators */ /************************************************************************/ -/* +/* * Callback procedure for synchronous timer messages */ static void CALLBACK @@ -1475,7 +1478,7 @@ mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime) mswindows_enqueue_dispatch_event (emacs_event); } -/* +/* * Callback procedure for dde messages * * We execute a dde Open("file") by simulating a file drop, so dde support @@ -1486,9 +1489,9 @@ HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, HSZ hszTopic, HSZ hszItem, HDDEDATA hdata, DWORD dwData1, DWORD dwData2) -{ +{ switch (uType) - { + { case XTYP_CONNECT: if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)) return (HDDEDATA)TRUE; @@ -1505,7 +1508,7 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, return (DdeCreateDataHandle (mswindows_dde_mlid, (LPBYTE)pairs, sizeof (pairs), 0L, 0, uFmt, 0)); } - return (HDDEDATA)NULL; + return (HDDEDATA)NULL; case XTYP_EXECUTE: if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)) @@ -1586,12 +1589,12 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, UNGCPRO; return (HDDEDATA) DDE_FACK; } - DdeFreeDataHandle (hdata); + DdeFreeDataHandle (hdata); return (HDDEDATA) DDE_FNOTPROCESSED; - default: - return (HDDEDATA) NULL; - } + default: + return (HDDEDATA) NULL; + } } #endif @@ -1612,6 +1615,13 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { + case WM_DESTROYCLIPBOARD: + /* We own the clipboard and someone else wants it. Delete our + cached copy of the clipboard contents so we'll ask for it from + Windows again when someone does a paste. */ + handle_selection_clear(QCLIPBOARD); + break; + case WM_ERASEBKGND: /* Erase background only during non-dynamic sizing */ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); @@ -1659,21 +1669,23 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) BYTE keymap[256]; int has_AltGr = mswindows_current_layout_has_AltGr (); int mods; + int extendedp = lParam & 0x1000000; Lisp_Object keysym; GetKeyboardState (keymap); mods = mswindows_modifier_state (keymap, has_AltGr); - /* Handle those keys for which TranslateMessage won't generate a WM_CHAR */ - if (!NILP (keysym = mswindows_key_to_emacs_keysym(wParam, mods))) + /* Handle non-printables */ + if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods, + extendedp))) mswindows_enqueue_keypress_event (hwnd, keysym, mods); - else + else /* Normal keys & modifiers */ { int quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); BYTE keymap_orig[256]; POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; MSG msg; - + msg.hwnd = hwnd; msg.message = message; msg.wParam = wParam; @@ -1685,9 +1697,9 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) * to loosely track Left and Right modifiers on behalf of the OS, * without screwing up Windows NT which tracks them properly. */ if (wParam == VK_CONTROL) - keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + keymap [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; else if (wParam == VK_MENU) - keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] |= 0x80; + keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80; memcpy (keymap_orig, keymap, 256); @@ -1734,7 +1746,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } /* else */ } /* F10 causes menu activation by default. We do not want this */ - if (wParam != VK_F10) + if (wParam != VK_F10 && (mswindows_meta_activates_menu || wParam != VK_MENU)) goto defproc; break; @@ -1746,7 +1758,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) mswindows_enqueue_mouse_button_event (hwnd, message, MAKEPOINTS (lParam), GetMessageTime()); break; - + case WM_LBUTTONUP: msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); msframe->last_click_time = GetMessageTime(); @@ -1868,7 +1880,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } msframe->last_click_time = GetMessageTime(); break; - + case WM_TIMER: if (wParam == BUTTON_2_TIMER_ID) { @@ -1917,7 +1929,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) event->event.motion.x = MAKEPOINTS(lParam).x; event->event.motion.y = MAKEPOINTS(lParam).y; event->event.motion.modifiers = mswindows_modifier_state (NULL, 0); - + mswindows_enqueue_dispatch_event (emacs_event); } break; @@ -1942,9 +1954,9 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* find out which toolbar */ frame = XFRAME (mswindows_find_frame (hwnd)); - btext = mswindows_get_toolbar_button_text ( frame, + btext = mswindows_get_toolbar_button_text ( frame, nmhdr->idFrom ); - + tttext->lpszText = NULL; tttext->hinst = NULL; @@ -1952,7 +1964,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { /* I think this is safe since the text will only go away when the toolbar does...*/ - GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, + GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, tttext->lpszText); } #endif @@ -1974,23 +1986,43 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) item.mask = TCIF_PARAM; SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index, (LPARAM)&item); - + mswindows_handle_gui_wm_command (frame, 0, item.lParam); } } break; - + case WM_PAINT: { - PAINTSTRUCT paintStruct; - - frame = XFRAME (mswindows_find_frame (hwnd)); + /* According to the docs we need to check GetUpdateRect() before + actually doing a WM_PAINT */ + if (GetUpdateRect (hwnd, NULL, FALSE)) + { + PAINTSTRUCT paintStruct; + int x, y, width, height; - BeginPaint (hwnd, &paintStruct); - mswindows_redraw_exposed_area (frame, - paintStruct.rcPaint.left, paintStruct.rcPaint.top, - paintStruct.rcPaint.right, paintStruct.rcPaint.bottom); - EndPaint (hwnd, &paintStruct); + frame = XFRAME (mswindows_find_frame (hwnd)); + + BeginPaint (hwnd, &paintStruct); + x = paintStruct.rcPaint.left; + y = paintStruct.rcPaint.top; + width = paintStruct.rcPaint.right - paintStruct.rcPaint.left; + height = paintStruct.rcPaint.bottom - paintStruct.rcPaint.top; + /* Normally we want to ignore expose events when child + windows are unmapped, however once we are in the guts of + WM_PAINT we need to make sure that we don't register + unmaps then because they will not actually occur. */ + if (!check_for_ignored_expose (frame, x, y, width, height)) + { + hold_ignored_expose_registration = 1; + mswindows_redraw_exposed_area (frame, x, y, width, height); + hold_ignored_expose_registration = 0; + } + + EndPaint (hwnd, &paintStruct); + } + else + goto defproc; } break; @@ -2033,8 +2065,8 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (FRAME_MSWINDOWS_TARGET_RECT (frame)) { /* Yes, we have to size again */ - mswindows_size_frame_internal ( frame, - FRAME_MSWINDOWS_TARGET_RECT + mswindows_size_frame_internal ( frame, + FRAME_MSWINDOWS_TARGET_RECT (frame)); /* Reset so we do not get here again. The SetWindowPos call in * mswindows_size_frame_internal can cause recursion here. */ @@ -2049,7 +2081,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); FRAME_VISIBLE_P (frame) = 1; - + if (!msframe->sizing || mswindows_dynamic_frame_resize) redisplay (); } @@ -2140,7 +2172,24 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage (hwndScrollBar, WM_CANCELMODE, 0, 0); } UNGCPRO; - break; + break; + } + + case WM_MOUSEWHEEL: + { + int keys = LOWORD (wParam); /* Modifier key flags */ + int delta = (short) HIWORD (wParam); /* Wheel rotation amount */ + struct gcpro gcpro1, gcpro2; + + if (mswindows_handle_mousewheel_event (mswindows_find_frame (hwnd), keys, delta)) + { + GCPRO2 (emacs_event, fobj); + mswindows_pump_outstanding_events (); /* Can GC */ + UNGCPRO; + } + else + goto defproc; + break; } #endif @@ -2214,7 +2263,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) Lisp_Object image_instance; VOID_TO_LISP (image_instance, ii); if (IMAGE_INSTANCEP (image_instance) - && + && IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET) && !NILP (XIMAGE_INSTANCE_WIDGET_FACE (image_instance))) @@ -2225,27 +2274,27 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { if (widget_brush) DeleteObject (widget_brush); - widget_brush = CreateSolidBrush - (COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_BACKGROUND + widget_brush = CreateSolidBrush + (COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); } last_widget_brushed = ii; SetTextColor (hdc, - COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_FOREGROUND + COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_FOREGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); SetBkMode (hdc, OPAQUE); SetBkColor (hdc, - COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_BACKGROUND + COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); return (LRESULT)widget_brush; @@ -2417,67 +2466,100 @@ int mswindows_modifier_state (BYTE* keymap, int has_AltGr) * Only returns non-Qnil for keys that don't generate WM_CHAR messages * or whose ASCII codes (like space) xemacs doesn't like. * Virtual key values are defined in winresrc.h - * XXX I'm not sure that KEYSYM("name") is the best thing to use here. */ -Lisp_Object mswindows_key_to_emacs_keysym(int mswindows_key, int mods) +Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods, + int extendedp) { - switch (mswindows_key) - { - /* First the predefined ones */ - case VK_BACK: return QKbackspace; - case VK_TAB: return QKtab; - case '\n': return QKlinefeed; /* No VK_LINEFEED in winresrc.h */ - case VK_RETURN: return QKreturn; - case VK_ESCAPE: return QKescape; - case VK_SPACE: return QKspace; - case VK_DELETE: return QKdelete; - - /* The rest */ - case VK_CLEAR: return KEYSYM ("clear"); /* Should do ^L ? */ - case VK_PRIOR: return KEYSYM ("prior"); - case VK_NEXT: return KEYSYM ("next"); - case VK_END: return KEYSYM ("end"); - case VK_HOME: return KEYSYM ("home"); - case VK_LEFT: return KEYSYM ("left"); - case VK_UP: return KEYSYM ("up"); - case VK_RIGHT: return KEYSYM ("right"); - case VK_DOWN: return KEYSYM ("down"); - case VK_SELECT: return KEYSYM ("select"); - case VK_PRINT: return KEYSYM ("print"); - case VK_EXECUTE: return KEYSYM ("execute"); - case VK_SNAPSHOT: return KEYSYM ("print"); - case VK_INSERT: return KEYSYM ("insert"); - case VK_HELP: return KEYSYM ("help"); -#if 0 /* XXX What are these supposed to do? */ - case VK_LWIN return KEYSYM (""); - case VK_RWIN return KEYSYM (""); + if (extendedp) /* Keys not present on a 82 key keyboard */ + { + switch (mswindows_key) + { + case VK_RETURN: return KEYSYM ("kp-enter"); + case VK_PRIOR: return KEYSYM ("prior"); + case VK_NEXT: return KEYSYM ("next"); + case VK_END: return KEYSYM ("end"); + case VK_HOME: return KEYSYM ("home"); + case VK_LEFT: return KEYSYM ("left"); + case VK_UP: return KEYSYM ("up"); + case VK_RIGHT: return KEYSYM ("right"); + case VK_DOWN: return KEYSYM ("down"); + case VK_INSERT: return KEYSYM ("insert"); + case VK_DELETE: return QKdelete; + } + } + else + { + switch (mswindows_key) + { + case VK_BACK: return QKbackspace; + case VK_TAB: return QKtab; + case '\n': return QKlinefeed; + case VK_CLEAR: return KEYSYM ("clear"); + case VK_RETURN: return QKreturn; + case VK_ESCAPE: return QKescape; + case VK_SPACE: return QKspace; + case VK_PRIOR: return KEYSYM ("kp-prior"); + case VK_NEXT: return KEYSYM ("kp-next"); + case VK_END: return KEYSYM ("kp-end"); + case VK_HOME: return KEYSYM ("kp-home"); + case VK_LEFT: return KEYSYM ("kp-left"); + case VK_UP: return KEYSYM ("kp-up"); + case VK_RIGHT: return KEYSYM ("kp-right"); + case VK_DOWN: return KEYSYM ("kp-down"); + case VK_SELECT: return KEYSYM ("select"); + case VK_PRINT: return KEYSYM ("print"); + case VK_EXECUTE: return KEYSYM ("execute"); + case VK_SNAPSHOT: return KEYSYM ("print"); + case VK_INSERT: return KEYSYM ("kp-insert"); + case VK_DELETE: return KEYSYM ("kp-delete"); + case VK_HELP: return KEYSYM ("help"); +#if 0 /* FSF Emacs allows these to return configurable syms/mods */ + case VK_LWIN return KEYSYM (""); + case VK_RWIN return KEYSYM (""); #endif - case VK_APPS: return KEYSYM ("menu"); - case VK_F1: return KEYSYM ("f1"); - case VK_F2: return KEYSYM ("f2"); - case VK_F3: return KEYSYM ("f3"); - case VK_F4: return KEYSYM ("f4"); - case VK_F5: return KEYSYM ("f5"); - case VK_F6: return KEYSYM ("f6"); - case VK_F7: return KEYSYM ("f7"); - case VK_F8: return KEYSYM ("f8"); - case VK_F9: return KEYSYM ("f9"); - case VK_F10: return KEYSYM ("f10"); - case VK_F11: return KEYSYM ("f11"); - case VK_F12: return KEYSYM ("f12"); - case VK_F13: return KEYSYM ("f13"); - case VK_F14: return KEYSYM ("f14"); - case VK_F15: return KEYSYM ("f15"); - case VK_F16: return KEYSYM ("f16"); - case VK_F17: return KEYSYM ("f17"); - case VK_F18: return KEYSYM ("f18"); - case VK_F19: return KEYSYM ("f19"); - case VK_F20: return KEYSYM ("f20"); - case VK_F21: return KEYSYM ("f21"); - case VK_F22: return KEYSYM ("f22"); - case VK_F23: return KEYSYM ("f23"); - case VK_F24: return KEYSYM ("f24"); - } + case VK_APPS: return KEYSYM ("menu"); + case VK_NUMPAD0: return KEYSYM ("kp-0"); + case VK_NUMPAD1: return KEYSYM ("kp-1"); + case VK_NUMPAD2: return KEYSYM ("kp-2"); + case VK_NUMPAD3: return KEYSYM ("kp-3"); + case VK_NUMPAD4: return KEYSYM ("kp-4"); + case VK_NUMPAD5: return KEYSYM ("kp-5"); + case VK_NUMPAD6: return KEYSYM ("kp-6"); + case VK_NUMPAD7: return KEYSYM ("kp-7"); + case VK_NUMPAD8: return KEYSYM ("kp-8"); + case VK_NUMPAD9: return KEYSYM ("kp-9"); + case VK_MULTIPLY: return KEYSYM ("kp-multiply"); + case VK_ADD: return KEYSYM ("kp-add"); + case VK_SEPARATOR: return KEYSYM ("kp-separator"); + case VK_SUBTRACT: return KEYSYM ("kp-subtract"); + case VK_DECIMAL: return KEYSYM ("kp-decimal"); + case VK_DIVIDE: return KEYSYM ("kp-divide"); + case VK_F1: return KEYSYM ("f1"); + case VK_F2: return KEYSYM ("f2"); + case VK_F3: return KEYSYM ("f3"); + case VK_F4: return KEYSYM ("f4"); + case VK_F5: return KEYSYM ("f5"); + case VK_F6: return KEYSYM ("f6"); + case VK_F7: return KEYSYM ("f7"); + case VK_F8: return KEYSYM ("f8"); + case VK_F9: return KEYSYM ("f9"); + case VK_F10: return KEYSYM ("f10"); + case VK_F11: return KEYSYM ("f11"); + case VK_F12: return KEYSYM ("f12"); + case VK_F13: return KEYSYM ("f13"); + case VK_F14: return KEYSYM ("f14"); + case VK_F15: return KEYSYM ("f15"); + case VK_F16: return KEYSYM ("f16"); + case VK_F17: return KEYSYM ("f17"); + case VK_F18: return KEYSYM ("f18"); + case VK_F19: return KEYSYM ("f19"); + case VK_F20: return KEYSYM ("f20"); + case VK_F21: return KEYSYM ("f21"); + case VK_F22: return KEYSYM ("f22"); + case VK_F23: return KEYSYM ("f23"); + case VK_F24: return KEYSYM ("f24"); + } + } return Qnil; } @@ -2593,7 +2675,7 @@ emacs_mswindows_handle_magic_event (struct Lisp_Event *emacs_event) { case XM_BUMPQUEUE: break; - + case WM_SETFOCUS: case WM_KILLFOCUS: { @@ -2621,13 +2703,13 @@ emacs_mswindows_handle_magic_event (struct Lisp_Event *emacs_event) case XM_UNMAPFRAME: { Lisp_Object frame = EVENT_CHANNEL (emacs_event); - va_run_hook_with_args (EVENT_MSWINDOWS_MAGIC_TYPE(emacs_event) + va_run_hook_with_args (EVENT_MSWINDOWS_MAGIC_TYPE(emacs_event) == XM_MAPFRAME ? - Qmap_frame_hook : Qunmap_frame_hook, + Qmap_frame_hook : Qunmap_frame_hook, 1, frame); } break; - + /* #### What about Enter & Leave */ #if 0 va_run_hook_with_args (in_p ? Qmouse_enter_frame_hook : @@ -2877,20 +2959,10 @@ debug_process_finalization (struct Lisp_Process *p) /************************************************************************/ /* initialization */ /************************************************************************/ - + void -vars_of_event_mswindows (void) +reinit_vars_of_event_mswindows (void) { - mswindows_u_dispatch_event_queue = Qnil; - staticpro (&mswindows_u_dispatch_event_queue); - mswindows_u_dispatch_event_queue_tail = Qnil; - - mswindows_s_dispatch_event_queue = Qnil; - staticpro (&mswindows_s_dispatch_event_queue); - mswindows_s_dispatch_event_queue_tail = Qnil; - - mswindows_error_caught_in_modal_loop = Qnil; - staticpro (&mswindows_error_caught_in_modal_loop); mswindows_in_modal_loop = 0; mswindows_pending_timers_count = 0; @@ -2905,9 +2977,9 @@ vars_of_event_mswindows (void) mswindows_event_stream->select_console_cb = emacs_mswindows_select_console; mswindows_event_stream->unselect_console_cb = emacs_mswindows_unselect_console; #ifdef HAVE_MSG_SELECT - mswindows_event_stream->select_process_cb = + mswindows_event_stream->select_process_cb = (void (*)(struct Lisp_Process*))event_stream_unixoid_select_process; - mswindows_event_stream->unselect_process_cb = + mswindows_event_stream->unselect_process_cb = (void (*)(struct Lisp_Process*))event_stream_unixoid_unselect_process; mswindows_event_stream->create_stream_pair_cb = event_stream_unixoid_create_stream_pair; mswindows_event_stream->delete_stream_pair_cb = event_stream_unixoid_delete_stream_pair; @@ -2917,6 +2989,31 @@ vars_of_event_mswindows (void) mswindows_event_stream->create_stream_pair_cb = emacs_mswindows_create_stream_pair; mswindows_event_stream->delete_stream_pair_cb = emacs_mswindows_delete_stream_pair; #endif +} + +void +vars_of_event_mswindows (void) +{ + reinit_vars_of_event_mswindows (); + + mswindows_u_dispatch_event_queue = Qnil; + staticpro (&mswindows_u_dispatch_event_queue); + mswindows_u_dispatch_event_queue_tail = Qnil; + pdump_wire (&mswindows_u_dispatch_event_queue_tail); + + mswindows_s_dispatch_event_queue = Qnil; + staticpro (&mswindows_s_dispatch_event_queue); + mswindows_s_dispatch_event_queue_tail = Qnil; + pdump_wire (&mswindows_u_dispatch_event_queue_tail); + + mswindows_error_caught_in_modal_loop = Qnil; + staticpro (&mswindows_error_caught_in_modal_loop); + + DEFVAR_BOOL ("mswindows-meta-activates-menu", &mswindows_meta_activates_menu /* +*Controls whether pressing and releasing the Meta (Alt) key should +activate the menubar. +Default is t. +*/ ); DEFVAR_BOOL ("mswindows-dynamic-frame-resize", &mswindows_dynamic_frame_resize /* *Controls redrawing frame contents during mouse-drag or keyboard resize @@ -2962,6 +3059,7 @@ If negative or zero, currently set system default is used instead. mswindows_mouse_button_max_skew_x = 0; mswindows_mouse_button_max_skew_y = 0; mswindows_mouse_button_tolerance = 0; + mswindows_meta_activates_menu = 1; } void diff --git a/src/event-stream.c b/src/event-stream.c index f008935..48bd9fc 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -81,7 +81,6 @@ Boston, MA 02111-1307, USA. */ #include "keymap.h" #include "lstream.h" #include "macros.h" /* for defining_keyboard_macro */ -#include "opaque.h" #include "process.h" #include "window.h" @@ -102,8 +101,6 @@ static int auto_save_interval; Lisp_Object Qundefined_keystroke_sequence; -Lisp_Object Qcommand_execute; - Lisp_Object Qcommand_event_p; /* Hooks to run before and after each command. */ @@ -262,6 +259,8 @@ Lisp_Object Qmenu_right; Lisp_Object Qmenu_select; Lisp_Object Qmenu_escape; +Lisp_Object Qself_insert_defer_undo; + /* this is in keymap.c */ extern Lisp_Object Fmake_keymap (Lisp_Object name); @@ -389,15 +388,15 @@ static Lisp_Object recursive_sit_for; #define CHECK_COMMAND_BUILDER(x) CHECK_RECORD (x, command_builder) static Lisp_Object -mark_command_builder (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_command_builder (Lisp_Object obj) { struct command_builder *builder = XCOMMAND_BUILDER (obj); - markobj (builder->prefix_events); - markobj (builder->current_events); - markobj (builder->most_current_event); - markobj (builder->last_non_munged_event); - markobj (builder->munge_me[0].first_mungeable_event); - markobj (builder->munge_me[1].first_mungeable_event); + mark_object (builder->prefix_events); + mark_object (builder->current_events); + mark_object (builder->most_current_event); + mark_object (builder->last_non_munged_event); + mark_object (builder->munge_me[0].first_mungeable_event); + mark_object (builder->munge_me[1].first_mungeable_event); return builder->console; } @@ -985,7 +984,7 @@ Actually, the value is nil only if we can be sure that no input is available. used to indicate an absence of a timer. */ static int low_level_timeout_id_tick; -struct low_level_timeout_blocktype +static struct low_level_timeout_blocktype { Blocktype_declare (struct low_level_timeout); } *the_low_level_timeout_blocktype; @@ -1101,38 +1100,39 @@ pop_low_level_timeout (struct low_level_timeout **timeout_list, static int timeout_id_tick; -/* Since timeout structures contain Lisp_Objects, they need to be GC'd - properly. The opaque data type provides a convenient way of doing - this without having to create a new Lisp object, since we can - provide our own mark function. */ - -struct timeout -{ - int id; /* Id we use to identify the timeout over its lifetime */ - int interval_id; /* Id for this particular interval; this may - be different each time the timeout is - signalled.*/ - Lisp_Object function, object; /* Function and object associated - with timeout. */ - EMACS_TIME next_signal_time; /* Absolute time when the timeout - is next going to be signalled. */ - unsigned int resignal_msecs; /* How far after the next timeout - should the one after that - occur? */ -}; - static Lisp_Object pending_timeout_list, pending_async_timeout_list; static Lisp_Object Vtimeout_free_list; static Lisp_Object -mark_timeout (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_timeout (Lisp_Object obj) { - struct timeout *tm = (struct timeout *) XOPAQUE_DATA (obj); - markobj (tm->function); + struct Lisp_Timeout *tm = XTIMEOUT (obj); + mark_object (tm->function); return tm->object; } +/* Should never, ever be called. (except by an external debugger) */ +static void +print_timeout (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) +{ + CONST struct Lisp_Timeout *t = XTIMEOUT (obj); + char buf[64]; + + sprintf (buf, "#", + (unsigned long) t); + write_c_string (buf, printcharfun); +} + +static const struct lrecord_description timeout_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Timeout, function), 2 }, + { XD_END } +}; + +DEFINE_LRECORD_IMPLEMENTATION ("timeout", timeout, + mark_timeout, print_timeout, + 0, 0, 0, timeout_description, struct Lisp_Timeout); + /* Generate a timeout and return its ID. */ int @@ -1141,8 +1141,8 @@ event_stream_generate_wakeup (unsigned int milliseconds, Lisp_Object function, Lisp_Object object, int async_p) { - Lisp_Object op = allocate_managed_opaque (Vtimeout_free_list, 0); - struct timeout *timeout = (struct timeout *) XOPAQUE_DATA (op); + Lisp_Object op = allocate_managed_lcrecord (Vtimeout_free_list); + struct Lisp_Timeout *timeout = XTIMEOUT (op); EMACS_TIME current_time; EMACS_TIME interval; @@ -1191,7 +1191,7 @@ event_stream_resignal_wakeup (int interval_id, int async_p, Lisp_Object *function, Lisp_Object *object) { Lisp_Object op = Qnil, rest; - struct timeout *timeout; + struct Lisp_Timeout *timeout; Lisp_Object *timeout_list; struct gcpro gcpro1; int id; @@ -1204,16 +1204,16 @@ event_stream_resignal_wakeup (int interval_id, int async_p, /* Find the timeout on the list of pending ones. */ LIST_LOOP (rest, *timeout_list) { - timeout = (struct timeout *) XOPAQUE_DATA (XCAR (rest)); + timeout = XTIMEOUT (XCAR (rest)); if (timeout->interval_id == interval_id) break; } assert (!NILP (rest)); op = XCAR (rest); - timeout = (struct timeout *) XOPAQUE_DATA (op); + timeout = XTIMEOUT (op); /* We make sure to snarf the data out of the timeout object before - we free it with free_managed_opaque(). */ + we free it with free_managed_lcrecord(). */ id = timeout->id; *function = timeout->function; *object = timeout->object; @@ -1255,7 +1255,7 @@ event_stream_resignal_wakeup (int interval_id, int async_p, *timeout_list = noseeum_cons (op, *timeout_list); } else - free_managed_opaque (Vtimeout_free_list, op); + free_managed_lcrecord (Vtimeout_free_list, op); UNGCPRO; return id; @@ -1264,7 +1264,7 @@ event_stream_resignal_wakeup (int interval_id, int async_p, void event_stream_disable_wakeup (int id, int async_p) { - struct timeout *timeout = 0; + struct Lisp_Timeout *timeout = 0; Lisp_Object rest; Lisp_Object *timeout_list; @@ -1276,7 +1276,7 @@ event_stream_disable_wakeup (int id, int async_p) /* Find the timeout on the list of pending ones, if it's still there. */ LIST_LOOP (rest, *timeout_list) { - timeout = (struct timeout *) XOPAQUE_DATA (XCAR (rest)); + timeout = XTIMEOUT (XCAR (rest)); if (timeout->id == id) break; } @@ -1292,14 +1292,14 @@ event_stream_disable_wakeup (int id, int async_p) event_stream_remove_async_timeout (timeout->interval_id); else event_stream_remove_timeout (timeout->interval_id); - free_managed_opaque (Vtimeout_free_list, op); + free_managed_lcrecord (Vtimeout_free_list, op); } } static int event_stream_wakeup_pending_p (int id, int async_p) { - struct timeout *timeout; + struct Lisp_Timeout *timeout; Lisp_Object rest; Lisp_Object timeout_list; int found = 0; @@ -1313,7 +1313,7 @@ event_stream_wakeup_pending_p (int id, int async_p) /* Find the element on the list of pending ones, if it's still there. */ LIST_LOOP (rest, timeout_list) { - timeout = (struct timeout *) XOPAQUE_DATA (XCAR (rest)); + timeout = XTIMEOUT (XCAR (rest)); if (timeout->id == id) { found = 1; @@ -3100,20 +3100,15 @@ command_builder_find_leaf_1 (struct command_builder *builder) static void menu_move_up (void) { - widget_value *current, *prev; - widget_value *entries; + widget_value *current = lw_get_entries (False); + widget_value *entries = lw_get_entries (True); + widget_value *prev = NULL; - current = lw_get_entries (False); - entries = lw_get_entries (True); - prev = NULL; - if (current != entries) + while (entries != current) { - while (entries != current) - { - if (entries->name /*&& entries->enabled*/) prev = entries; - entries = entries->next; - assert (entries); - } + if (entries->name /*&& entries->enabled*/) prev = entries; + entries = entries->next; + assert (entries); } if (!prev) @@ -3142,11 +3137,8 @@ menu_move_up (void) static void menu_move_down (void) { - widget_value *current; - widget_value *new; - - current = lw_get_entries (False); - new = current; + widget_value *current = lw_get_entries (False); + widget_value *new = current; while (new->next) { @@ -3179,11 +3171,9 @@ menu_move_left (void) int l = level; widget_value *current; - while (level >= 3) - { - --level; - lw_pop_menu (); - } + while (level-- >= 3) + lw_pop_menu (); + menu_move_up (); current = lw_get_entries (False); if (l > 2 && current->contents) @@ -3197,11 +3187,9 @@ menu_move_right (void) int l = level; widget_value *current; - while (level >= 3) - { - --level; - lw_pop_menu (); - } + while (level-- >= 3) + lw_pop_menu (); + menu_move_down (); current = lw_get_entries (False); if (l > 2 && current->contents) @@ -4606,15 +4594,35 @@ Magic events are handled as necessary. } else /* key sequence is bound to a command */ { + int magic_undo = 0; + int magic_undo_count = 20; + Vthis_command = leaf; + /* Don't push an undo boundary if the command set the prefix arg, or if we are executing a keyboard macro, or if in the minibuffer. If the command we are about to execute is self-insert, it's tricky: up to 20 consecutive self-inserts may be done without an undo boundary. This counter is reset as soon as a command other than self-insert-command is executed. - */ - if (! EQ (leaf, Qself_insert_command)) + + Programmers can also use the `self-insert-undo-magic' + property to install that behaviour on functions other + than `self-insert-command', or to change the magic + number 20 to something else. */ + + if (SYMBOLP (leaf)) + { + Lisp_Object prop = Fget (leaf, Qself_insert_defer_undo, Qnil); + if (NATNUMP (prop)) + magic_undo = 1, magic_undo_count = XINT (prop); + else if (!NILP (prop)) + magic_undo = 1; + else if (EQ (leaf, Qself_insert_command)) + magic_undo = 1; + } + + if (!magic_undo) command_builder->self_insert_countdown = 0; if (NILP (XCONSOLE (console)->prefix_arg) && NILP (Vexecuting_macro) @@ -4628,10 +4636,10 @@ Magic events are handled as necessary. && command_builder->self_insert_countdown == 0) Fundo_boundary (); - if (EQ (leaf, Qself_insert_command)) + if (magic_undo) { if (--command_builder->self_insert_countdown < 0) - command_builder->self_insert_countdown = 20; + command_builder->self_insert_countdown = magic_undo_count; } execute_command_event (command_builder, @@ -4817,7 +4825,7 @@ That is not right. Calling this function directs the translated event to replace the original event, so that only one version of the event actually -appears in the echo area and in the value of `this-command-keys.'. +appears in the echo area and in the value of `this-command-keys'. */ ()) { @@ -4841,9 +4849,7 @@ dribble_out_event (Lisp_Object event) { Emchar ch = XCHAR (keysym); Bufbyte str[MAX_EMCHAR_LEN]; - Bytecount len; - - len = set_charptr_emchar (str, ch); + Bytecount len = set_charptr_emchar (str, ch); Lstream_write (XLSTREAM (Vdribble_file), str, len); } else if (string_char_length (XSYMBOL (keysym)->name) == 1) @@ -4909,7 +4915,6 @@ syms_of_event_stream (void) deferror (&Qundefined_keystroke_sequence, "undefined-keystroke-sequence", "Undefined keystroke sequence", Qerror); - defsymbol (&Qcommand_execute, "command-execute"); DEFSUBR (Frecent_keys); DEFSUBR (Frecent_keys_ring_size); @@ -4962,26 +4967,41 @@ syms_of_event_stream (void) defsymbol (&Qmenu_select, "menu-select"); defsymbol (&Qmenu_escape, "menu-escape"); + defsymbol (&Qself_insert_defer_undo, "self-insert-defer-undo"); defsymbol (&Qcancel_mode_internal, "cancel-mode-internal"); } void -vars_of_event_stream (void) +reinit_vars_of_event_stream (void) { recent_keys_ring_index = 0; recent_keys_ring_size = 100; + num_input_chars = 0; + Vtimeout_free_list = make_lcrecord_list (sizeof (struct Lisp_Timeout), + &lrecord_timeout); + staticpro_nodump (&Vtimeout_free_list); + the_low_level_timeout_blocktype = + Blocktype_new (struct low_level_timeout_blocktype); + something_happened = 0; + recursive_sit_for = Qnil; +} + +void +vars_of_event_stream (void) +{ + reinit_vars_of_event_stream (); Vrecent_keys_ring = Qnil; staticpro (&Vrecent_keys_ring); Vthis_command_keys = Qnil; staticpro (&Vthis_command_keys); Vthis_command_keys_tail = Qnil; - - num_input_chars = 0; + pdump_wire (&Vthis_command_keys_tail); command_event_queue = Qnil; staticpro (&command_event_queue); command_event_queue_tail = Qnil; + pdump_wire (&command_event_queue_tail); Vlast_selected_frame = Qnil; staticpro (&Vlast_selected_frame); @@ -4992,20 +5012,9 @@ vars_of_event_stream (void) pending_async_timeout_list = Qnil; staticpro (&pending_async_timeout_list); - Vtimeout_free_list = make_opaque_list (sizeof (struct timeout), - mark_timeout); - staticpro (&Vtimeout_free_list); - - the_low_level_timeout_blocktype = - Blocktype_new (struct low_level_timeout_blocktype); - - something_happened = 0; - last_point_position_buffer = Qnil; staticpro (&last_point_position_buffer); - recursive_sit_for = Qnil; - DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes /* *Nonzero means echo unfinished commands after this many seconds of pause. */ ); diff --git a/src/event-tty.c b/src/event-tty.c index 0e44cf4..0437604 100644 --- a/src/event-tty.c +++ b/src/event-tty.c @@ -245,7 +245,7 @@ emacs_tty_delete_stream_pair (Lisp_Object instream, Lisp_Object outstream) /************************************************************************/ void -vars_of_event_tty (void) +reinit_vars_of_event_tty (void) { tty_event_stream = xnew (struct event_stream); @@ -264,6 +264,12 @@ vars_of_event_tty (void) } void +vars_of_event_tty (void) +{ + reinit_vars_of_event_tty (); +} + +void init_event_tty_late (void) { event_stream = tty_event_stream; diff --git a/src/event-unixoid.c b/src/event-unixoid.c index d613f62..9033ebf 100644 --- a/src/event-unixoid.c +++ b/src/event-unixoid.c @@ -41,10 +41,6 @@ Boston, MA 02111-1307, USA. */ #include "sysproc.h" /* select stuff */ #include "systime.h" -#ifdef HAVE_GPM -#include "gpmevent.h" -#endif - /* Mask of bits indicating the descriptors that we wait for input on. These work as follows: @@ -84,12 +80,6 @@ read_event_from_tty_or_stream_desc (struct Lisp_Event *event, XSETCONSOLE (console, con); -#ifdef HAVE_GPM - if (fd == CONSOLE_TTY_MOUSE_FD (con)) { - return handle_gpm_read (event,con,fd); - } -#endif - nread = read (fd, &ch, 1); if (nread <= 0) { diff --git a/src/events.c b/src/events.c index 1a2db77..7bb19c4 100644 --- a/src/events.c +++ b/src/events.c @@ -103,29 +103,29 @@ zero_event (struct Lisp_Event *e) } static Lisp_Object -mark_event (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_event (Lisp_Object obj) { struct Lisp_Event *event = XEVENT (obj); switch (event->event_type) { case key_press_event: - markobj (event->event.key.keysym); + mark_object (event->event.key.keysym); break; case process_event: - markobj (event->event.process.process); + mark_object (event->event.process.process); break; case timeout_event: - markobj (event->event.timeout.function); - markobj (event->event.timeout.object); + mark_object (event->event.timeout.function); + mark_object (event->event.timeout.object); break; case eval_event: case misc_user_event: - markobj (event->event.eval.function); - markobj (event->event.eval.object); + mark_object (event->event.eval.function); + mark_object (event->event.eval.object); break; case magic_eval_event: - markobj (event->event.magic_eval.object); + mark_object (event->event.magic_eval.object); break; case button_press_event: case button_release_event: @@ -137,7 +137,7 @@ mark_event (Lisp_Object obj, void (*markobj) (Lisp_Object)) default: abort (); } - markobj (event->channel); + mark_object (event->channel); return event->next; } @@ -763,7 +763,7 @@ DEFUN ("copy-event", Fcopy_event, 1, 2, 0, /* Make a copy of the given event object. If a second argument is given, the first event is copied into the second and the second is returned. If the second argument is not supplied (or -is nil) then a new event will be made as with `allocate-event.' See also +is nil) then a new event will be made as with `make-event'. See also the function `deallocate-event'. */ (event1, event2)) @@ -771,19 +771,26 @@ the function `deallocate-event'. CHECK_LIVE_EVENT (event1); if (NILP (event2)) event2 = Fmake_event (Qnil, Qnil); - else CHECK_LIVE_EVENT (event2); - if (EQ (event1, event2)) - return signal_simple_continuable_error_2 - ("copy-event called with `eq' events", event1, event2); + else + { + CHECK_LIVE_EVENT (event2); + if (EQ (event1, event2)) + return signal_simple_continuable_error_2 + ("copy-event called with `eq' events", event1, event2); + } assert (XEVENT_TYPE (event1) <= last_event_type); assert (XEVENT_TYPE (event2) <= last_event_type); { - Lisp_Object save_next = XEVENT_NEXT (event2); + Lisp_Event *ev2 = XEVENT (event2); + Lisp_Event *ev1 = XEVENT (event1); + + ev2->event_type = ev1->event_type; + ev2->channel = ev1->channel; + ev2->timestamp = ev1->timestamp; + ev2->event = ev1->event; - *XEVENT (event2) = *XEVENT (event1); - XSET_EVENT_NEXT (event2, save_next); return event2; } } @@ -2229,11 +2236,28 @@ syms_of_events (void) defsymbol (&Qbutton_release, "button-release"); defsymbol (&Qmisc_user, "misc-user"); defsymbol (&Qascii_character, "ascii-character"); + + defsymbol (&QKbackspace, "backspace"); + defsymbol (&QKtab, "tab"); + defsymbol (&QKlinefeed, "linefeed"); + defsymbol (&QKreturn, "return"); + defsymbol (&QKescape, "escape"); + defsymbol (&QKspace, "space"); + defsymbol (&QKdelete, "delete"); +} + + +void +reinit_vars_of_events (void) +{ + Vevent_resource = Qnil; } void vars_of_events (void) { + reinit_vars_of_events (); + DEFVAR_LISP ("character-set-property", &Vcharacter_set_property /* A symbol used to look up the 8-bit character of a keysym. To convert a keysym symbol to an 8-bit code, as when that key is @@ -2243,22 +2267,4 @@ system-specific code will set up appropriate properties and set this variable. */ ); Vcharacter_set_property = Qnil; - - Vevent_resource = Qnil; - - QKbackspace = KEYSYM ("backspace"); - QKtab = KEYSYM ("tab"); - QKlinefeed = KEYSYM ("linefeed"); - QKreturn = KEYSYM ("return"); - QKescape = KEYSYM ("escape"); - QKspace = KEYSYM ("space"); - QKdelete = KEYSYM ("delete"); - - staticpro (&QKbackspace); - staticpro (&QKtab); - staticpro (&QKlinefeed); - staticpro (&QKreturn); - staticpro (&QKescape); - staticpro (&QKspace); - staticpro (&QKdelete); } diff --git a/src/events.h b/src/events.h index 04e7cd4..266505d 100644 --- a/src/events.h +++ b/src/events.h @@ -435,6 +435,29 @@ union magic_data #endif }; +struct Lisp_Timeout +{ + struct lcrecord_header header; + int id; /* Id we use to identify the timeout over its lifetime */ + int interval_id; /* Id for this particular interval; this may + be different each time the timeout is + signalled.*/ + Lisp_Object function, object; /* Function and object associated + with timeout. */ + EMACS_TIME next_signal_time; /* Absolute time when the timeout + is next going to be signalled. */ + unsigned int resignal_msecs; /* How far after the next timeout + should the one after that + occur? */ +}; + +DECLARE_LRECORD (timeout, struct Lisp_Timeout); +#define XTIMEOUT(x) XRECORD (x, timeout, struct Lisp_Timeout) +#define XSETTIMEOUT(x, p) XSETRECORD (x, p, timeout) +#define TIMEOUTP(x) RECORDP (x, timeout) +#define CHECK_TIMEOUT(x) CHECK_RECORD (x, timeout) +#define CONCHECK_TIMEOUT(x) CONCHECK_RECORD (x, timeout) + struct Lisp_Event { /* header->next (aka XEVENT_NEXT ()) is used as follows: @@ -466,7 +489,6 @@ DECLARE_LRECORD (event, struct Lisp_Event); #define XEVENT(x) XRECORD (x, event, struct Lisp_Event) #define XSETEVENT(x, p) XSETRECORD (x, p, event) #define EVENTP(x) RECORDP (x, event) -#define GC_EVENTP(x) GC_RECORDP (x, event) #define CHECK_EVENT(x) CHECK_RECORD (x, event) #define CONCHECK_EVENT(x) CONCHECK_RECORD (x, event) diff --git a/src/extents.c b/src/extents.c index e11eded..d0ef995 100644 --- a/src/extents.c +++ b/src/extents.c @@ -260,7 +260,7 @@ typedef struct gap_array Gap_Array_Marker *markers; } Gap_Array; -Gap_Array_Marker *gap_array_marker_freelist; +static Gap_Array_Marker *gap_array_marker_freelist; /* Convert a "memory position" (i.e. taking the gap into account) into the address of the element at (i.e. after) that position. "Memory @@ -301,7 +301,7 @@ typedef struct extent_list Extent_List_Marker *markers; } Extent_List; -Extent_List_Marker *extent_list_marker_freelist; +static Extent_List_Marker *extent_list_marker_freelist; #define EXTENT_LESS_VALS(e,st,nd) ((extent_start (e) < (st)) || \ ((extent_start (e) == (st)) && \ @@ -444,9 +444,6 @@ Lisp_Object Qinside_margin; Lisp_Object Qwhitespace; /* Qtext defined in general.c */ -/* partially used in redisplay */ -Lisp_Object Qglyph_invisible; - Lisp_Object Qcopy_function; Lisp_Object Qpaste_function; @@ -910,18 +907,18 @@ free_extent_list (Extent_List *el) /************************************************************************/ static Lisp_Object -mark_extent_auxiliary (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_extent_auxiliary (Lisp_Object obj) { struct extent_auxiliary *data = XEXTENT_AUXILIARY (obj); - markobj (data->begin_glyph); - markobj (data->end_glyph); - markobj (data->invisible); - markobj (data->children); - markobj (data->read_only); - markobj (data->mouse_face); - markobj (data->initial_redisplay_function); - markobj (data->before_change_functions); - markobj (data->after_change_functions); + mark_object (data->begin_glyph); + mark_object (data->end_glyph); + mark_object (data->invisible); + mark_object (data->children); + mark_object (data->read_only); + mark_object (data->mouse_face); + mark_object (data->initial_redisplay_function); + mark_object (data->before_change_functions); + mark_object (data->after_change_functions); return data->parent; } @@ -973,7 +970,7 @@ static void free_soe (struct stack_of_extents *soe); static void soe_invalidate (Lisp_Object obj); static Lisp_Object -mark_extent_info (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_extent_info (Lisp_Object obj) { struct extent_info *data = (struct extent_info *) XEXTENT_INFO (obj); int i; @@ -996,7 +993,7 @@ mark_extent_info (Lisp_Object obj, void (*markobj) (Lisp_Object)) Lisp_Object exobj; XSETEXTENT (exobj, extent); - markobj (exobj); + mark_object (exobj); } } @@ -2913,7 +2910,7 @@ extent_fragment_update (struct window *w, struct extent_fragment *ef, extent objects. They are similar to the functions for other lrecord objects. allocate_extent() is in alloc.c, not here. */ -static Lisp_Object mark_extent (Lisp_Object, void (*) (Lisp_Object)); +static Lisp_Object mark_extent (Lisp_Object); static int extent_equal (Lisp_Object, Lisp_Object, int depth); static unsigned long extent_hash (Lisp_Object obj, int depth); static void print_extent (Lisp_Object obj, Lisp_Object printcharfun, @@ -2945,12 +2942,12 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent, struct extent); static Lisp_Object -mark_extent (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_extent (Lisp_Object obj) { struct extent *extent = XEXTENT (obj); - markobj (extent_object (extent)); - markobj (extent_no_chase_normal_field (extent, face)); + mark_object (extent_object (extent)); + mark_object (extent_no_chase_normal_field (extent, face)); return extent->plist; } @@ -2969,11 +2966,9 @@ print_extent_1 (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) if (extent_detached_p (ext)) strcpy (bp, "detached"); else - { - Bufpos from = XINT (Fextent_start_position (obj)); - Bufpos to = XINT (Fextent_end_position (obj)); - sprintf (bp, "%d, %d", from, to); - } + sprintf (bp, "%ld, %ld", + (long) XINT (Fextent_start_position (obj)), + (long) XINT (Fextent_end_position (obj))); bp += strlen (bp); *bp++ = (extent_end_open_p (anc) ? ')': ']'); if (!NILP (extent_end_glyph (anc))) *bp++ = '*'; @@ -3184,7 +3179,7 @@ extent_remprop (Lisp_Object obj, Lisp_Object prop) return -1; } - return external_remprop (&ext->plist, prop, 0, ERROR_ME); + return external_remprop (extent_plist_addr (ext), prop, 0, ERROR_ME); } static Lisp_Object @@ -6722,8 +6717,6 @@ syms_of_extents (void) defsymbol (&Qwhitespace, "whitespace"); /* Qtext defined in general.c */ - defsymbol (&Qglyph_invisible, "glyph-invisible"); - defsymbol (&Qpaste_function, "paste-function"); defsymbol (&Qcopy_function, "copy-function"); @@ -6800,8 +6793,26 @@ syms_of_extents (void) } void +reinit_vars_of_extents (void) +{ + extent_auxiliary_defaults.begin_glyph = Qnil; + extent_auxiliary_defaults.end_glyph = Qnil; + extent_auxiliary_defaults.parent = Qnil; + extent_auxiliary_defaults.children = Qnil; + extent_auxiliary_defaults.priority = 0; + extent_auxiliary_defaults.invisible = Qnil; + extent_auxiliary_defaults.read_only = Qnil; + extent_auxiliary_defaults.mouse_face = Qnil; + extent_auxiliary_defaults.initial_redisplay_function = Qnil; + extent_auxiliary_defaults.before_change_functions = Qnil; + extent_auxiliary_defaults.after_change_functions = Qnil; +} + +void vars_of_extents (void) { + reinit_vars_of_extents (); + DEFVAR_INT ("mouse-highlight-priority", &mouse_highlight_priority /* The priority to use for the mouse-highlighting pseudo-extent that is used to highlight extents with the `mouse-face' attribute set. @@ -6828,18 +6839,6 @@ functions `get-text-property' or `get-char-property' are called. Vextent_face_reusable_list = Fcons (Qnil, Qnil); staticpro (&Vextent_face_reusable_list); - - extent_auxiliary_defaults.begin_glyph = Qnil; - extent_auxiliary_defaults.end_glyph = Qnil; - extent_auxiliary_defaults.parent = Qnil; - extent_auxiliary_defaults.children = Qnil; - extent_auxiliary_defaults.priority = 0; - extent_auxiliary_defaults.invisible = Qnil; - extent_auxiliary_defaults.read_only = Qnil; - extent_auxiliary_defaults.mouse_face = Qnil; - extent_auxiliary_defaults.initial_redisplay_function = Qnil; - extent_auxiliary_defaults.before_change_functions = Qnil; - extent_auxiliary_defaults.after_change_functions = Qnil; } void diff --git a/src/extents.h b/src/extents.h index 457031e..390c3e0 100644 --- a/src/extents.h +++ b/src/extents.h @@ -27,7 +27,6 @@ DECLARE_LRECORD (extent, struct extent); #define XEXTENT(x) XRECORD (x, extent, struct extent) #define XSETEXTENT(x, p) XSETRECORD (x, p, extent) #define EXTENTP(x) RECORDP (x, extent) -#define GC_EXTENTP(x) GC_RECORDP (x, extent) #define CHECK_EXTENT(x) CHECK_RECORD (x, extent) #define CONCHECK_EXTENT(x) CONCHECK_RECORD (x, extent) @@ -147,7 +146,6 @@ DECLARE_LRECORD (extent_auxiliary, struct extent_auxiliary); XRECORD (x, extent_auxiliary, struct extent_auxiliary) #define XSETEXTENT_AUXILIARY(x, p) XSETRECORD (x, p, extent_auxiliary) #define EXTENT_AUXILIARYP(x) RECORDP (x, extent_auxiliary) -#define GC_EXTENT_AUXILIARYP(x) GC_RECORDP (x, extent_auxiliary) #define CHECK_EXTENT_AUXILIARY(x) CHECK_RECORD (x, extent_auxiliary) #define CONCHECK_EXTENT_AUXILIARY(x) CONCHECK_RECORD (x, extent_auxiliary) @@ -163,7 +161,6 @@ DECLARE_LRECORD (extent_info, struct extent_info); #define XEXTENT_INFO(x) XRECORD (x, extent_info, struct extent_info) #define XSETEXTENT_INFO(x, p) XSETRECORD (x, p, extent_info) #define EXTENT_INFOP(x) RECORDP (x, extent_info) -#define GC_EXTENT_INFOP(x) GC_RECORDP (x, extent_info) #define CHECK_EXTENT_INFO(x) CHECK_RECORD (x, extent_info) #define CONCHECK_EXTENT_INFO(x) CONCHECK_RECORD (x, extent_info) diff --git a/src/faces.c b/src/faces.c index c7d8157..c1a50a5 100644 --- a/src/faces.c +++ b/src/faces.c @@ -73,26 +73,26 @@ Lisp_Object Vbuilt_in_face_specifiers; static Lisp_Object -mark_face (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_face (Lisp_Object obj) { struct Lisp_Face *face = XFACE (obj); - markobj (face->name); - markobj (face->doc_string); + mark_object (face->name); + mark_object (face->doc_string); - markobj (face->foreground); - markobj (face->background); - markobj (face->font); - markobj (face->display_table); - markobj (face->background_pixmap); - markobj (face->underline); - markobj (face->strikethru); - markobj (face->highlight); - markobj (face->dim); - markobj (face->blinking); - markobj (face->reverse); + mark_object (face->foreground); + mark_object (face->background); + mark_object (face->font); + mark_object (face->display_table); + mark_object (face->background_pixmap); + mark_object (face->underline); + mark_object (face->strikethru); + mark_object (face->highlight); + mark_object (face->dim); + mark_object (face->blinking); + mark_object (face->reverse); - markobj (face->charsets_warned_about); + mark_object (face->charsets_warned_about); return face->plist; } @@ -171,18 +171,18 @@ face_getprop (Lisp_Object obj, Lisp_Object prop) struct Lisp_Face *f = XFACE (obj); return - ((EQ (prop, Qforeground)) ? f->foreground : - (EQ (prop, Qbackground)) ? f->background : - (EQ (prop, Qfont)) ? f->font : - (EQ (prop, Qdisplay_table)) ? f->display_table : - (EQ (prop, Qbackground_pixmap)) ? f->background_pixmap : - (EQ (prop, Qunderline)) ? f->underline : - (EQ (prop, Qstrikethru)) ? f->strikethru : - (EQ (prop, Qhighlight)) ? f->highlight : - (EQ (prop, Qdim)) ? f->dim : - (EQ (prop, Qblinking)) ? f->blinking : - (EQ (prop, Qreverse)) ? f->reverse : - (EQ (prop, Qdoc_string)) ? f->doc_string : + (EQ (prop, Qforeground) ? f->foreground : + EQ (prop, Qbackground) ? f->background : + EQ (prop, Qfont) ? f->font : + EQ (prop, Qdisplay_table) ? f->display_table : + EQ (prop, Qbackground_pixmap) ? f->background_pixmap : + EQ (prop, Qunderline) ? f->underline : + EQ (prop, Qstrikethru) ? f->strikethru : + EQ (prop, Qhighlight) ? f->highlight : + EQ (prop, Qdim) ? f->dim : + EQ (prop, Qblinking) ? f->blinking : + EQ (prop, Qreverse) ? f->reverse : + EQ (prop, Qdoc_string) ? f->doc_string : external_plist_get (&f->plist, prop, 0, ERROR_ME)); } @@ -264,9 +264,15 @@ face_plist (Lisp_Object obj) return result; } +static const struct lrecord_description face_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Face, name), 2 }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Face, foreground), 13 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face, mark_face, print_face, 0, face_equal, - face_hash, 0, face_getprop, + face_hash, face_description, face_getprop, face_putprop, face_remprop, face_plist, struct Lisp_Face); @@ -981,8 +987,7 @@ Here's an approach that should keep things clean and unconfused: /* mark for GC a dynarr of face cachels. */ void -mark_face_cachels (face_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)) +mark_face_cachels (face_cachel_dynarr *elements) { int elt; @@ -998,13 +1003,13 @@ mark_face_cachels (face_cachel_dynarr *elements, for (i = 0; i < NUM_LEADING_BYTES; i++) if (!NILP (cachel->font[i]) && !UNBOUNDP (cachel->font[i])) - markobj (cachel->font[i]); + mark_object (cachel->font[i]); } - markobj (cachel->face); - markobj (cachel->foreground); - markobj (cachel->background); - markobj (cachel->display_table); - markobj (cachel->background_pixmap); + mark_object (cachel->face); + mark_object (cachel->foreground); + mark_object (cachel->background); + mark_object (cachel->display_table); + mark_object (cachel->background_pixmap); } } diff --git a/src/faces.h b/src/faces.h index e94c195..f96e0a6 100644 --- a/src/faces.h +++ b/src/faces.h @@ -226,7 +226,6 @@ DECLARE_LRECORD (face, struct Lisp_Face); #define XFACE(x) XRECORD (x, face, struct Lisp_Face) #define XSETFACE(x, p) XSETRECORD (x, p, face) #define FACEP(x) RECORDP (x, face) -#define GC_FACEP(x) GC_RECORDP (x, face) #define CHECK_FACE(x) CHECK_RECORD (x, face) Lisp_Object ensure_face_cachel_contains_charset (struct face_cachel *cachel, @@ -241,8 +240,7 @@ void update_face_cachel_data (struct face_cachel *cachel, void face_cachel_charset_font_metric_info (struct face_cachel *cachel, Charset_ID *charsets, struct font_metric_info *fm); -void mark_face_cachels (face_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)); +void mark_face_cachels (face_cachel_dynarr *elements); void mark_face_cachels_as_clean (struct window *w); void mark_face_cachels_as_not_updated (struct window *w); void reset_face_cachel (struct face_cachel *inst); @@ -260,7 +258,7 @@ EXFUN (Fget_face, 1); extern Lisp_Object Qstrikethru, Vbuilt_in_face_specifiers, Vdefault_face; extern Lisp_Object Vleft_margin_face, Vpointer_face, Vright_margin_face; -extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face; +extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face; extern Lisp_Object Vtoolbar_face, Vgui_element_face, Vwidget_face; void mark_all_faces_as_clean (void); diff --git a/src/file-coding.c b/src/file-coding.c index 3068c89..3f5dfdd 100644 --- a/src/file-coding.c +++ b/src/file-coding.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ #endif #include "file-coding.h" -Lisp_Object Qbuffer_file_coding_system, Qcoding_system_error; +Lisp_Object Qcoding_system_error; Lisp_Object Vkeyboard_coding_system; Lisp_Object Vterminal_coding_system; @@ -47,14 +47,37 @@ Lisp_Object Vfile_name_coding_system; /* Table of symbols identifying each coding category. */ Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST + 1]; -/* Coding system currently associated with each coding category. */ -Lisp_Object coding_category_system[CODING_CATEGORY_LAST + 1]; -/* Table of all coding categories in decreasing order of priority. - This describes a permutation of the possible coding categories. */ -int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; -Lisp_Object Qcoding_system_p; +struct file_coding_dump { + /* Coding system currently associated with each coding category. */ + Lisp_Object coding_category_system[CODING_CATEGORY_LAST + 1]; + + /* Table of all coding categories in decreasing order of priority. + This describes a permutation of the possible coding categories. */ + int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; + +#ifndef UTF2000 + Lisp_Object ucs_to_mule_table[65536]; +#endif +} *fcd; + +static const struct lrecord_description fcd_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST + 1 }, +#ifndef UTF2000 + { XD_LISP_OBJECT, offsetof(struct file_coding_dump, ucs_to_mule_table), 65536 }, +#endif + { XD_END } +}; + +static const struct struct_description fcd_description = { + sizeof(struct file_coding_dump), + fcd_description_1 +}; + +Lisp_Object mule_to_ucs_table; + +Lisp_Object Qcoding_systemp; Lisp_Object Qraw_text, Qno_conversion, Qccl, Qiso2022; /* Qinternal in general.c */ @@ -227,6 +250,26 @@ typedef struct Dynarr_declare (codesys_prop); } codesys_prop_dynarr; +static const struct lrecord_description codesys_prop_description_1[] = { + { XD_LISP_OBJECT, offsetof(codesys_prop, sym), 1 }, + { XD_END } +}; + +static const struct struct_description codesys_prop_description = { + sizeof(codesys_prop), + codesys_prop_description_1 +}; + +static const struct lrecord_description codesys_prop_dynarr_description_1[] = { + XD_DYNARR_DESC(codesys_prop_dynarr, &codesys_prop_description), + { XD_END } +}; + +static const struct struct_description codesys_prop_dynarr_description = { + sizeof(codesys_prop_dynarr), + codesys_prop_dynarr_description_1 +}; + codesys_prop_dynarr *the_codesys_prop_dynarr; enum codesys_prop_enum @@ -241,7 +284,7 @@ enum codesys_prop_enum /* Coding system functions */ /************************************************************************/ -static Lisp_Object mark_coding_system (Lisp_Object, void (*) (Lisp_Object)); +static Lisp_Object mark_coding_system (Lisp_Object); static void print_coding_system (Lisp_Object, Lisp_Object, int); static void finalize_coding_system (void *header, int for_disksave); @@ -255,7 +298,7 @@ static const struct struct_description ccs_description = { sizeof(charset_conversion_spec), ccs_description_1 }; - + static const struct lrecord_description ccsd_description_1[] = { XD_DYNARR_DESC(charset_conversion_spec_dynarr, &ccs_description), { XD_END } @@ -287,16 +330,16 @@ DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system, struct Lisp_Coding_System); static Lisp_Object -mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_coding_system (Lisp_Object obj) { Lisp_Coding_System *codesys = XCODING_SYSTEM (obj); - markobj (CODING_SYSTEM_NAME (codesys)); - markobj (CODING_SYSTEM_DOC_STRING (codesys)); - markobj (CODING_SYSTEM_MNEMONIC (codesys)); - markobj (CODING_SYSTEM_EOL_LF (codesys)); - markobj (CODING_SYSTEM_EOL_CRLF (codesys)); - markobj (CODING_SYSTEM_EOL_CR (codesys)); + mark_object (CODING_SYSTEM_NAME (codesys)); + mark_object (CODING_SYSTEM_DOC_STRING (codesys)); + mark_object (CODING_SYSTEM_MNEMONIC (codesys)); + mark_object (CODING_SYSTEM_EOL_LF (codesys)); + mark_object (CODING_SYSTEM_EOL_CRLF (codesys)); + mark_object (CODING_SYSTEM_EOL_CR (codesys)); switch (CODING_SYSTEM_TYPE (codesys)) { @@ -304,15 +347,15 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) int i; case CODESYS_ISO2022: for (i = 0; i < 4; i++) - markobj (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); + mark_object (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); if (codesys->iso2022.input_conv) { for (i = 0; i < Dynarr_length (codesys->iso2022.input_conv); i++) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.input_conv, i); - markobj (ccs->from_charset); - markobj (ccs->to_charset); + mark_object (ccs->from_charset); + mark_object (ccs->to_charset); } } if (codesys->iso2022.output_conv) @@ -321,22 +364,22 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.output_conv, i); - markobj (ccs->from_charset); - markobj (ccs->to_charset); + mark_object (ccs->from_charset); + mark_object (ccs->to_charset); } } break; case CODESYS_CCL: - markobj (CODING_SYSTEM_CCL_DECODE (codesys)); - markobj (CODING_SYSTEM_CCL_ENCODE (codesys)); + mark_object (CODING_SYSTEM_CCL_DECODE (codesys)); + mark_object (CODING_SYSTEM_CCL_ENCODE (codesys)); break; #endif /* MULE */ default: break; } - markobj (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); + mark_object (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); return CODING_SYSTEM_POST_READ_CONVERSION (codesys); } @@ -532,8 +575,7 @@ add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object value, (struct coding_system_list_closure *) coding_system_list_closure; Lisp_Object *coding_system_list = cscl->coding_system_list; - *coding_system_list = Fcons (XCODING_SYSTEM (value)->name, - *coding_system_list); + *coding_system_list = Fcons (key, *coding_system_list); return 0; } @@ -1014,7 +1056,7 @@ Define symbol ALIAS as an alias for coding system CODING-SYSTEM. FROB (CR, "-mac"); #undef FROB } - /* FSF return value is a vector of [ALIAS-unix ALIAS-doc ALIAS-mac], + /* FSF return value is a vector of [ALIAS-unix ALIAS-dos ALIAS-mac], but it doesn't look intentional, so I'd rather return something meaningful or nothing at all. */ return Qnil; @@ -1301,7 +1343,7 @@ previously. order. */ for (j = 0; j <= CODING_CATEGORY_LAST; j++) { - int cat = coding_category_by_priority[j]; + int cat = fcd->coding_category_by_priority[j]; if (category_to_priority[cat] < 0) category_to_priority[cat] = i++; } @@ -1310,7 +1352,7 @@ previously. constructed. */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) - coding_category_by_priority[category_to_priority[i]] = i; + fcd->coding_category_by_priority[category_to_priority[i]] = i; /* Phew! That was confusing. */ return Qnil; @@ -1325,7 +1367,7 @@ Return a list of coding categories in descending order of priority. Lisp_Object list = Qnil; for (i = CODING_CATEGORY_LAST; i >= 0; i--) - list = Fcons (coding_category_symbol[coding_category_by_priority[i]], + list = Fcons (coding_category_symbol[fcd->coding_category_by_priority[i]], list); return list; } @@ -1338,7 +1380,7 @@ Change the coding system associated with a coding category. int cat = decode_coding_category (coding_category); coding_system = Fget_coding_system (coding_system); - coding_category_system[cat] = coding_system; + fcd->coding_category_system[cat] = coding_system; return Qnil; } @@ -1348,7 +1390,7 @@ Return the coding system associated with a coding category. (coding_category)) { int cat = decode_coding_category (coding_category); - Lisp_Object sys = coding_category_system[cat]; + Lisp_Object sys = fcd->coding_category_system[cat]; if (!NILP (sys)) return XCODING_SYSTEM_NAME (sys); @@ -1452,21 +1494,19 @@ detect_eol_type (struct detection_state *st, CONST unsigned char *src, while (n--) { c = *src++; - if (c == '\r') - st->eol.just_saw_cr = 1; - else + if (c == '\n') { - if (c == '\n') - { - if (st->eol.just_saw_cr) - return EOL_CRLF; - else if (st->eol.seen_anything) - return EOL_LF; - } - else if (st->eol.just_saw_cr) - return EOL_CR; - st->eol.just_saw_cr = 0; + if (st->eol.just_saw_cr) + return EOL_CRLF; + else if (st->eol.seen_anything) + return EOL_LF; } + else if (st->eol.just_saw_cr) + return EOL_CR; + else if (c == '\r') + st->eol.just_saw_cr = 1; + else + st->eol.just_saw_cr = 0; st->eol.seen_anything = 1; } @@ -1491,7 +1531,7 @@ detect_eol_type (struct detection_state *st, CONST unsigned char *src, */ static int -detect_coding_type (struct detection_state *st, CONST unsigned char *src, +detect_coding_type (struct detection_state *st, CONST Extbyte *src, unsigned int n, int just_do_eol) { int c; @@ -1582,13 +1622,13 @@ coding_system_from_mask (int mask) the first one that is allowed. */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) { - cat = coding_category_by_priority[i]; + cat = fcd->coding_category_by_priority[i]; if ((mask & (1 << cat)) && - !NILP (coding_category_system[cat])) + !NILP (fcd->coding_category_system[cat])) break; } if (cat >= 0) - return coding_category_system[cat]; + return fcd->coding_category_system[cat]; else return Fget_coding_system (Qraw_text); } @@ -1596,13 +1636,15 @@ coding_system_from_mask (int mask) /* Given a seekable read stream and potential coding system and EOL type as specified, do any autodetection that is called for. If the - coding system and/or EOL type are not autodetect, they will be left + coding system and/or EOL type are not `autodetect', they will be left alone; but this function will never return an autodetect coding system or EOL type. This function does not automatically fetch subsidiary coding systems; that should be unnecessary with the explicit eol-type argument. */ +#define LENGTH(string_constant) (sizeof (string_constant) - 1) + void determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out, enum eol_type *eol_type_in_out) @@ -1617,68 +1659,110 @@ determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out, decst.mask = ~0; /* If autodetection is called for, do it now. */ - if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT || - *eol_type_in_out == EOL_AUTODETECT) + if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT + || *eol_type_in_out == EOL_AUTODETECT) { - unsigned char random_buffer[4096]; - int nread; + Extbyte buf[4096]; Lisp_Object coding_system = Qnil; - - nread = Lstream_read (stream, random_buffer, sizeof (random_buffer)); - if (nread) - { - unsigned char *cp = random_buffer; - - while (cp < random_buffer + nread) - { - if ((*cp++ == 'c') && (cp < random_buffer + nread) && - (*cp++ == 'o') && (cp < random_buffer + nread) && - (*cp++ == 'd') && (cp < random_buffer + nread) && - (*cp++ == 'i') && (cp < random_buffer + nread) && - (*cp++ == 'n') && (cp < random_buffer + nread) && - (*cp++ == 'g') && (cp < random_buffer + nread) && - (*cp++ == ':') && (cp < random_buffer + nread)) + Extbyte *p; + ssize_t nread = Lstream_read (stream, buf, sizeof (buf)); + Extbyte *scan_end; + + /* Look for initial "-*-"; mode line prefix */ + for (p = buf, + scan_end = buf + nread - LENGTH ("-*-coding:?-*-"); + p <= scan_end + && *p != '\n' + && *p != '\r'; + p++) + if (*p == '-' && *(p+1) == '*' && *(p+2) == '-') + { + Extbyte *local_vars_beg = p + 3; + /* Look for final "-*-"; mode line suffix */ + for (p = local_vars_beg, + scan_end = buf + nread - LENGTH ("-*-"); + p <= scan_end + && *p != '\n' + && *p != '\r'; + p++) + if (*p == '-' && *(p+1) == '*' && *(p+2) == '-') { - unsigned char coding_system_name[4096 - 6]; - unsigned char *np = coding_system_name; - - while ( (cp < random_buffer + nread) - && ((*cp == ' ') || (*cp == '\t')) ) - { - cp++; - } - while ( (cp < random_buffer + nread) && - (*cp != ' ') && (*cp != '\t') && (*cp != ';') ) - { - *np++ = *cp++; - } - *np = 0; - coding_system - = Ffind_coding_system (intern (coding_system_name)); + Extbyte *suffix = p; + /* Look for "coding:" */ + for (p = local_vars_beg, + scan_end = suffix - LENGTH ("coding:?"); + p <= scan_end; + p++) + if (memcmp ("coding:", p, LENGTH ("coding:")) == 0 + && (p == local_vars_beg + || (*(p-1) == ' ' || + *(p-1) == '\t' || + *(p-1) == ';'))) + { + Extbyte save; + int n; + p += LENGTH ("coding:"); + while (*p == ' ' || *p == '\t') p++; + + /* Get coding system name */ + save = *suffix; *suffix = '\0'; + /* Characters valid in a MIME charset name (rfc 1521), + and in a Lisp symbol name. */ + n = strspn ( (char *) p, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789" + "!$%&*+-.^_{|}~"); + *suffix = save; + if (n > 0) + { + save = p[n]; p[n] = '\0'; + coding_system = + Ffind_coding_system (intern ((char *) p)); + p[n] = save; + } + break; + } break; } - } - if (EQ(coding_system, Qnil)) - do{ - if (detect_coding_type (&decst, random_buffer, nread, - XCODING_SYSTEM_TYPE (*codesys_in_out) - != CODESYS_AUTODETECT)) - break; - nread = Lstream_read (stream, - random_buffer, sizeof (random_buffer)); - if (!nread) - break; - } while(1); - } + break; + } + + if (NILP (coding_system)) + do + { + if (detect_coding_type (&decst, buf, nread, + XCODING_SYSTEM_TYPE (*codesys_in_out) + != CODESYS_AUTODETECT)) + break; + nread = Lstream_read (stream, buf, sizeof (buf)); + if (nread == 0) + break; + } + while (1); + + else if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT + && XCODING_SYSTEM_EOL_TYPE (coding_system) == EOL_AUTODETECT) + do + { + if (detect_coding_type (&decst, buf, nread, 1)) + break; + nread = Lstream_read (stream, buf, sizeof (buf)); + if (!nread) + break; + } + while (1); + *eol_type_in_out = decst.eol_type; if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT) { - if (EQ(coding_system, Qnil)) + if (NILP (coding_system)) *codesys_in_out = coding_system_from_mask (decst.mask); else *codesys_in_out = coding_system; } } + /* If we absolutely can't determine the EOL type, just assume LF. */ if (*eol_type_in_out == EOL_AUTODETECT) *eol_type_in_out = EOL_LF; @@ -1715,7 +1799,7 @@ type. Optional arg BUFFER defaults to the current buffer. while (1) { unsigned char random_buffer[4096]; - int nread = Lstream_read (istr, random_buffer, sizeof (random_buffer)); + ssize_t nread = Lstream_read (istr, random_buffer, sizeof (random_buffer)); if (!nread) break; @@ -1736,10 +1820,10 @@ type. Optional arg BUFFER defaults to the current buffer. #endif for (i = CODING_CATEGORY_LAST; i >= 0; i--) { - int sys = coding_category_by_priority[i]; + int sys = fcd->coding_category_by_priority[i]; if (decst.mask & (1 << sys)) { - Lisp_Object codesys = coding_category_system[sys]; + Lisp_Object codesys = fcd->coding_category_system[sys]; if (!NILP (codesys)) codesys = subsidiary_coding_system (codesys, decst.eol_type); val = Fcons (codesys, val); @@ -1939,21 +2023,22 @@ struct decoding_stream struct detection_state decst; }; -static int decoding_reader (Lstream *stream, unsigned char *data, size_t size); -static int decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size); +static ssize_t decoding_reader (Lstream *stream, + unsigned char *data, size_t size); +static ssize_t decoding_writer (Lstream *stream, + CONST unsigned char *data, size_t size); static int decoding_rewinder (Lstream *stream); static int decoding_seekable_p (Lstream *stream); static int decoding_flusher (Lstream *stream); static int decoding_closer (Lstream *stream); -static Lisp_Object decoding_marker (Lisp_Object stream, - void (*markobj) (Lisp_Object)); +static Lisp_Object decoding_marker (Lisp_Object stream); DEFINE_LSTREAM_IMPLEMENTATION ("decoding", lstream_decoding, sizeof (struct decoding_stream)); static Lisp_Object -decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +decoding_marker (Lisp_Object stream) { Lstream *str = DECODING_STREAM_DATA (XLSTREAM (stream))->other_end; Lisp_Object str_obj; @@ -1963,9 +2048,9 @@ decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - markobj (str_obj); + mark_object (str_obj); if (str->imp->marker) - return (str->imp->marker) (str_obj, markobj); + return (str->imp->marker) (str_obj); else return Qnil; } @@ -1973,12 +2058,12 @@ decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) /* Read SIZE bytes of data and store it into DATA. We are a decoding stream so we read data from the other end, decode it, and store it into DATA. */ -static int +static ssize_t decoding_reader (Lstream *stream, unsigned char *data, size_t size) { struct decoding_stream *str = DECODING_STREAM_DATA (stream); unsigned char *orig_data = data; - int read_size; + ssize_t read_size; int error_occurred = 0; /* We need to interface to mule_decode(), which expects to take some @@ -2035,11 +2120,11 @@ decoding_reader (Lstream *stream, unsigned char *data, size_t size) return data - orig_data; } -static int +static ssize_t decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct decoding_stream *str = DECODING_STREAM_DATA (stream); - int retval; + ssize_t retval; /* Decode all our data into the runoff, and then attempt to write it all out to the other end. Remove whatever chunk we succeeded @@ -2309,7 +2394,7 @@ BUFFER defaults to the current buffer if unspecified. char tempbuf[1024]; /* some random amount */ Bufpos newpos, even_newer_pos; Bufpos oldpos = lisp_buffer_stream_startpos (istr); - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; @@ -2394,22 +2479,21 @@ struct encoding_stream #endif /* MULE */ }; -static int encoding_reader (Lstream *stream, unsigned char *data, size_t size); -static int encoding_writer (Lstream *stream, CONST unsigned char *data, - size_t size); +static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size); +static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data, + size_t size); static int encoding_rewinder (Lstream *stream); static int encoding_seekable_p (Lstream *stream); static int encoding_flusher (Lstream *stream); static int encoding_closer (Lstream *stream); -static Lisp_Object encoding_marker (Lisp_Object stream, - void (*markobj) (Lisp_Object)); +static Lisp_Object encoding_marker (Lisp_Object stream); DEFINE_LSTREAM_IMPLEMENTATION ("encoding", lstream_encoding, sizeof (struct encoding_stream)); static Lisp_Object -encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +encoding_marker (Lisp_Object stream) { Lstream *str = ENCODING_STREAM_DATA (XLSTREAM (stream))->other_end; Lisp_Object str_obj; @@ -2419,9 +2503,9 @@ encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - markobj (str_obj); + mark_object (str_obj); if (str->imp->marker) - return (str->imp->marker) (str_obj, markobj); + return (str->imp->marker) (str_obj); else return Qnil; } @@ -2429,12 +2513,12 @@ encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) /* Read SIZE bytes of data and store it into DATA. We are a encoding stream so we read data from the other end, encode it, and store it into DATA. */ -static int +static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size) { struct encoding_stream *str = ENCODING_STREAM_DATA (stream); unsigned char *orig_data = data; - int read_size; + ssize_t read_size; int error_occurred = 0; /* We need to interface to mule_encode(), which expects to take some @@ -2491,11 +2575,11 @@ encoding_reader (Lstream *stream, unsigned char *data, size_t size) return data - orig_data; } -static int +static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct encoding_stream *str = ENCODING_STREAM_DATA (stream); - int retval; + ssize_t retval; /* Encode all our data into the runoff, and then attempt to write it all out to the other end. Remove whatever chunk we succeeded @@ -2722,7 +2806,7 @@ text. BUFFER defaults to the current buffer if unspecified. char tempbuf[1024]; /* some random amount */ Bufpos newpos, even_newer_pos; Bufpos oldpos = lisp_buffer_stream_startpos (istr); - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; @@ -3353,9 +3437,7 @@ Return the corresponding character code in Big5. /* */ /************************************************************************/ -Lisp_Object ucs_to_mule_table[65536]; -Lisp_Object mule_to_ucs_table; - +#ifndef UTF2000 DEFUN ("set-ucs-char", Fset_ucs_char, 2, 2, 0, /* Map UCS-4 code CODE to Mule character CHARACTER. @@ -3369,9 +3451,9 @@ Return T on success, NIL on failure. CHECK_INT (code); c = XINT (code); - if (c < sizeof (ucs_to_mule_table)) + if (c < sizeof (fcd->ucs_to_mule_table)) { - ucs_to_mule_table[c] = character; + fcd->ucs_to_mule_table[c] = character; return Qt; } else @@ -3381,9 +3463,9 @@ Return T on success, NIL on failure. static Lisp_Object ucs_to_char (unsigned long code) { - if (code < sizeof (ucs_to_mule_table)) + if (code < sizeof (fcd->ucs_to_mule_table)) { - return ucs_to_mule_table[code]; + return fcd->ucs_to_mule_table[code]; } else if ((0xe00000 <= code) && (code <= 0xe00000 + 94 * 94 * 14)) { @@ -3430,6 +3512,7 @@ Return the UCS code (a positive integer) corresponding to CHARACTER. { return Fget_char_table (character, mule_to_ucs_table); } +#endif #ifdef UTF2000 #define decode_ucs4 DECODE_ADD_UCS_CHAR @@ -3464,6 +3547,7 @@ decode_ucs4 (unsigned long ch, unsigned_char_dynarr *dst) } #endif +#ifndef UTF2000 static unsigned long mule_char_to_ucs4 (Lisp_Object charset, unsigned char h, unsigned char l) @@ -3507,6 +3591,7 @@ encode_ucs4 (Lisp_Object charset, Dynarr_add (dst, (code >> 8) & 255); Dynarr_add (dst, code & 255); } +#endif static int detect_coding_ucs4 (struct detection_state *st, CONST unsigned char *src, @@ -3938,7 +4023,7 @@ encode_coding_utf8 (Lstream *encoding, CONST unsigned char *src, back_to_square_n: #endif /* ENABLE_COMPOSITE_CHARS */ - + while (n--) { unsigned char c = *src++; @@ -5930,7 +6015,7 @@ convert_to_external_format (CONST Bufbyte *ptr, GCPRO3 (instream, outstream, da_outstream); while (1) { - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; Lstream_write (ostr, tempbuf, size_in_bytes); @@ -5987,7 +6072,7 @@ convert_from_external_format (CONST Extbyte *ptr, GCPRO3 (instream, outstream, da_outstream); while (1) { - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; Lstream_write (ostr, tempbuf, size_in_bytes); @@ -6013,7 +6098,6 @@ convert_from_external_format (CONST Extbyte *ptr, void syms_of_file_coding (void) { - defsymbol (&Qbuffer_file_coding_system, "buffer-file-coding-system"); deferror (&Qcoding_system_error, "coding-system-error", "Coding-system error", Qio_error); @@ -6048,12 +6132,14 @@ syms_of_file_coding (void) DEFSUBR (Fencode_shift_jis_char); DEFSUBR (Fdecode_big5_char); DEFSUBR (Fencode_big5_char); +#ifndef UTF2000 DEFSUBR (Fset_ucs_char); DEFSUBR (Fucs_char); DEFSUBR (Fset_char_ucs); DEFSUBR (Fchar_ucs); +#endif /* not UTF2000 */ #endif /* MULE */ - defsymbol (&Qcoding_system_p, "coding-system-p"); + defsymbol (&Qcoding_systemp, "coding-system-p"); defsymbol (&Qno_conversion, "no-conversion"); defsymbol (&Qraw_text, "raw-text"); #ifdef MULE @@ -6148,11 +6234,14 @@ vars_of_file_coding (void) { int i; + fcd = xnew (struct file_coding_dump); + dumpstruct (&fcd, &fcd_description); + /* Initialize to something reasonable ... */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) { - coding_category_system[i] = Qnil; - coding_category_by_priority[i] = i; + fcd->coding_category_system[i] = Qnil; + fcd->coding_category_by_priority[i] = i; } Fprovide (intern ("file-coding")); @@ -6213,6 +6302,7 @@ complex_vars_of_file_coding (void) make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); the_codesys_prop_dynarr = Dynarr_new (codesys_prop); + dumpstruct (&the_codesys_prop_dynarr, &codesys_prop_dynarr_description); #define DEFINE_CODESYS_PROP(Prop_Type, Sym) do \ { \ @@ -6273,20 +6363,20 @@ complex_vars_of_file_coding (void) Fdefine_coding_system_alias (Qno_conversion, Qraw_text); /* Need this for bootstrapping */ - coding_category_system[CODING_CATEGORY_NO_CONVERSION] = + fcd->coding_category_system[CODING_CATEGORY_NO_CONVERSION] = Fget_coding_system (Qraw_text); #ifdef UTF2000 - coding_category_system[CODING_CATEGORY_UTF8] + fcd->coding_category_system[CODING_CATEGORY_UTF8] = Fget_coding_system (Qutf8); #endif -#ifdef MULE +#if defined(MULE) && !defined(UTF2000) { unsigned int i; for (i = 0; i < 65536; i++) - ucs_to_mule_table[i] = Qnil; + fcd->ucs_to_mule_table[i] = Qnil; } staticpro (&mule_to_ucs_table); mule_to_ucs_table = Fmake_char_table(Qgeneric); diff --git a/src/file-coding.h b/src/file-coding.h index 19fc60e..023bf57 100644 --- a/src/file-coding.h +++ b/src/file-coding.h @@ -140,7 +140,6 @@ DECLARE_LRECORD (coding_system, struct Lisp_Coding_System); #define XCODING_SYSTEM(x) XRECORD (x, coding_system, struct Lisp_Coding_System) #define XSETCODING_SYSTEM(x, p) XSETRECORD (x, p, coding_system) #define CODING_SYSTEMP(x) RECORDP (x, coding_system) -#define GC_CODING_SYSTEMP(x) GC_RECORDP (x, coding_system) #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system) #define CONCHECK_CODING_SYSTEM(x) CONCHECK_RECORD (x, coding_system) @@ -250,9 +249,9 @@ EXFUN (Fset_coding_priority_list, 1); EXFUN (Fsubsidiary_coding_system, 2); extern Lisp_Object Qucs4, Qutf8; -extern Lisp_Object Qbig5, Qbuffer_file_coding_system, Qccl, Qcharset_g0; +extern Lisp_Object Qbig5, Qccl, Qcharset_g0; extern Lisp_Object Qcharset_g1, Qcharset_g2, Qcharset_g3, Qcoding_system_error; -extern Lisp_Object Qcoding_system_p, Qcr, Qcrlf, Qctext, Qdecode, Qencode; +extern Lisp_Object Qcoding_systemp, Qcr, Qcrlf, Qctext, Qdecode, Qencode; extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qescape_quoted; extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output; extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output; diff --git a/src/fileio.c b/src/fileio.c index 6844d96..015cd00 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -71,7 +71,7 @@ Boston, MA 02111-1307, USA. */ /* Need to lower-case the drive letter, or else expanded filenames will sometimes compare inequal, because `expand-file-name' doesn't always down-case the drive letter. */ -#define DRIVE_LETTER(x) (tolower (x)) +#define DRIVE_LETTER(x) tolower (x) #endif /* WINDOWSNT */ int lisp_to_time (Lisp_Object, time_t *); @@ -109,8 +109,6 @@ Lisp_Object Vauto_save_list_file_name; int disable_auto_save_when_buffer_shrinks; -Lisp_Object Qfile_name_handler_alist; - Lisp_Object Vdirectory_sep_char; /* These variables describe handlers that have "already" had a chance @@ -282,18 +280,16 @@ restore_point_unwind (Lisp_Object point_marker) signal handler) because that's way too losing. (#### Actually, longjmp()ing out of the signal handler may not be - as losing as I thought. See sys_do_signal() in sysdep.c.) + as losing as I thought. See sys_do_signal() in sysdep.c.) */ - Solaris include files declare the return value as ssize_t. - Is that standard? */ -int +ssize_t read_allowing_quit (int fildes, void *buf, size_t size) { QUIT; return sys_read_1 (fildes, buf, size, 1); } -int +ssize_t write_allowing_quit (int fildes, CONST void *buf, size_t size) { QUIT; @@ -1022,9 +1018,9 @@ See also the function `substitute-in-file-name'. if ((user = user_login_name (NULL)) != NULL) { /* Does the user login name match the ~name? */ - if (strcmp(user,((char *) o + 1)) == 0) + if (strcmp (user, (char *) o + 1) == 0) { - newdir = (Bufbyte *) get_home_directory(); + newdir = (Bufbyte *) get_home_directory(); nm = p; } } @@ -1303,19 +1299,19 @@ No component of the resulting pathname will be a symbolic link, as { char resolved_path[MAXPATHLEN]; - char path[MAXPATHLEN]; - char *p = path; - int elen = XSTRING_LENGTH (expanded_name); + Extbyte *path; + Extbyte *p; + Extcount elen = XSTRING_LENGTH (expanded_name); - if (elen >= countof (path)) + GET_STRING_FILENAME_DATA_ALLOCA (expanded_name,path,elen); + p = path; + if (elen > MAXPATHLEN) goto toolong; - - memcpy (path, XSTRING_DATA (expanded_name), elen + 1); - /* memset (resolved_path, 0, sizeof (resolved_path)); */ - + /* Try doing it all at once. */ - /* !!#### Does realpath() Mule-encapsulate? */ - if (!xrealpath (path, resolved_path)) + /* !! Does realpath() Mule-encapsulate? + Answer: Nope! So we do it above */ + if (!xrealpath ((char *) path, resolved_path)) { /* Didn't resolve it -- have to do it one component at a time. */ /* "realpath" is a typically useless, stupid un*x piece of crap. @@ -1325,12 +1321,12 @@ No component of the resulting pathname will be a symbolic link, as partial result returned. What a piece of junk. */ for (;;) { - p = (char *) memchr (p + 1, '/', elen - (p + 1 - path)); + p = (Extbyte *) memchr (p + 1, '/', elen - (p + 1 - path)); if (p) *p = 0; /* memset (resolved_path, 0, sizeof (resolved_path)); */ - if (xrealpath (path, resolved_path)) + if (xrealpath ((char *) path, resolved_path)) { if (p) *p = '/'; @@ -1998,7 +1994,7 @@ This is what happens in interactive use with M-x. Fcopy_file (filename, newname, /* We have already prompted if it was an integer, so don't have copy-file prompt again. */ - ((NILP (ok_if_already_exists)) ? Qnil : Qt), + (NILP (ok_if_already_exists) ? Qnil : Qt), Qt); Fdelete_file (filename); } @@ -2984,7 +2980,7 @@ positions), even in Mule. (Fixing this is very difficult.) occurs inside of the filedesc stream. */ while (1) { - Bytecount this_len; + ssize_t this_len; Charcount cc_inserted; QUIT; @@ -3909,7 +3905,7 @@ Non-nil second argument means save only current buffer. run_hook (Qauto_save_hook); - if (GC_STRINGP (Vauto_save_list_file_name)) + if (STRINGP (Vauto_save_list_file_name)) listfile = condition_case_1 (Qt, auto_save_expand_name, Vauto_save_list_file_name, @@ -3928,13 +3924,13 @@ Non-nil second argument means save only current buffer. for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) { for (tail = Vbuffer_alist; - GC_CONSP (tail); + CONSP (tail); tail = XCDR (tail)) { buf = XCDR (XCAR (tail)); b = XBUFFER (buf); - if (!GC_NILP (current_only) + if (!NILP (current_only) && b != current_buffer) continue; @@ -3946,7 +3942,7 @@ Non-nil second argument means save only current buffer. /* Check for auto save enabled and file changed since last auto save and file changed since last real save. */ - if (GC_STRINGP (b->auto_save_file_name) + if (STRINGP (b->auto_save_file_name) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) && b->auto_save_modified < BUF_MODIFF (b) /* -1 means we've turned off autosaving for a while--see below. */ @@ -3991,7 +3987,7 @@ Non-nil second argument means save only current buffer. continue; } set_buffer_internal (b); - if (!auto_saved && GC_NILP (no_message)) + if (!auto_saved && NILP (no_message)) { static CONST unsigned char *msg = (CONST unsigned char *) "Auto-saving..."; @@ -4003,7 +3999,7 @@ Non-nil second argument means save only current buffer. /* Open the auto-save list file, if necessary. We only do this now so that the file only exists if we actually auto-saved any files. */ - if (!auto_saved && GC_STRINGP (listfile) && listdesc < 0) + if (!auto_saved && STRINGP (listfile) && listdesc < 0) { listdesc = open ((char *) XSTRING_DATA (listfile), O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY, @@ -4092,7 +4088,7 @@ Non-nil second argument means save only current buffer. one because nothing needed to be auto-saved. Do this afterwards rather than before in case we get a crash attempting to autosave (in that case we'd still want the old one around). */ - if (listdesc < 0 && !auto_saved && GC_STRINGP (listfile)) + if (listdesc < 0 && !auto_saved && STRINGP (listfile)) unlink ((char *) XSTRING_DATA (listfile)); /* Show "...done" only if the echo area would otherwise be empty. */ @@ -4180,7 +4176,6 @@ syms_of_fileio (void) defsymbol (&Qset_visited_file_modtime, "set-visited-file-modtime"); defsymbol (&Qcar_less_than_car, "car-less-than-car"); /* Vomitous! */ - defsymbol (&Qfile_name_handler_alist, "file-name-handler-alist"); defsymbol (&Qauto_save_hook, "auto-save-hook"); defsymbol (&Qauto_save_error, "auto-save-error"); defsymbol (&Qauto_saving, "auto-saving"); @@ -4338,5 +4333,9 @@ This variable affects the built-in functions only on Windows, on other platforms, it is initialized so that Lisp code can find out what the normal separator is. */ ); - Vdirectory_sep_char = make_char ('/'); +#ifdef WINDOWSNT + Vdirectory_sep_char = make_char ('\\'); +#else + Vdirectory_sep_char = make_char ('/'); +#endif } diff --git a/src/filelock.c b/src/filelock.c index 44a4f43..49bda9a 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -126,11 +126,11 @@ lock_file_1 (char *lfname,int force) char *lock_info_str; if (STRINGP (Fuser_login_name (Qnil))) - user_name = (char *)XSTRING_DATA((Fuser_login_name (Qnil))); + user_name = (char *) XSTRING_DATA (Fuser_login_name (Qnil)); else user_name = ""; if (STRINGP (Fsystem_name ())) - host_name = (char *)XSTRING_DATA((Fsystem_name ())); + host_name = (char *) XSTRING_DATA (Fsystem_name ()); else host_name = ""; lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) diff --git a/src/floatfns.c b/src/floatfns.c index a0fd427..5dd8496 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -55,9 +55,13 @@ Boston, MA 02111-1307, USA. */ #define THIS_FILENAME floatfns #include "sysfloat.h" -#ifndef HAVE_RINT +/* The code uses emacs_rint, so that it works to undefine HAVE_RINT + if `rint' exists but does not work right. */ +#ifdef HAVE_RINT +#define emacs_rint rint +#else static double -rint (double x) +emacs_rint (double x) { double r = floor (x + 0.5); double diff = fabs (r - x); @@ -108,15 +112,15 @@ static CONST char *float_error_fn_name; #define arith_error(op,arg) \ - Fsignal (Qarith_error, list2 (build_string ((op)), (arg))) + Fsignal (Qarith_error, list2 (build_string (op), arg)) #define range_error(op,arg) \ - Fsignal (Qrange_error, list2 (build_string ((op)), (arg))) + Fsignal (Qrange_error, list2 (build_string (op), arg)) #define range_error2(op,a1,a2) \ - Fsignal (Qrange_error, list3 (build_string ((op)), (a1), (a2))) + Fsignal (Qrange_error, list3 (build_string (op), a1, a2)) #define domain_error(op,arg) \ - Fsignal (Qdomain_error, list2 (build_string ((op)), (arg))) + Fsignal (Qdomain_error, list2 (build_string (op), arg)) #define domain_error2(op,a1,a2) \ - Fsignal (Qdomain_error, list3 (build_string ((op)), (a1), (a2))) + Fsignal (Qdomain_error, list3 (build_string (op), a1, a2)) /* Convert float to Lisp Integer if it fits, else signal a range @@ -160,7 +164,7 @@ in_float_error (void) static Lisp_Object -mark_float (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_float (Lisp_Object obj) { return Qnil; } @@ -831,7 +835,7 @@ Return the nearest integer to ARG. { double d; /* Screw the prevailing rounding mode. */ - IN_FLOAT ((d = rint (XFLOAT_DATA (arg))), "round", arg); + IN_FLOAT ((d = emacs_rint (XFLOAT_DATA (arg))), "round", arg); return (float_to_int (d, "round", arg, Qunbound)); } #endif /* LISP_FLOAT_TYPE */ @@ -891,7 +895,7 @@ Return the nearest integer to ARG, as a float. (arg)) { double d = extract_float (arg); - IN_FLOAT (d = rint (d), "fround", arg); + IN_FLOAT (d = emacs_rint (d), "fround", arg); return make_float (d); } diff --git a/src/fns.c b/src/fns.c index 55d5e2f..0b110e8 100644 --- a/src/fns.c +++ b/src/fns.c @@ -61,7 +61,7 @@ Lisp_Object Qidentity; static int internal_old_equal (Lisp_Object, Lisp_Object, int); static Lisp_Object -mark_bit_vector (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_bit_vector (Lisp_Object obj) { return Qnil; } @@ -69,10 +69,10 @@ mark_bit_vector (Lisp_Object obj, void (*markobj) (Lisp_Object)) static void print_bit_vector (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { - int i; + size_t i; struct Lisp_Bit_Vector *v = XBIT_VECTOR (obj); - int len = bit_vector_length (v); - int last = len; + size_t len = bit_vector_length (v); + size_t last = len; if (INTP (Vprint_length)) last = min (len, XINT (Vprint_length)); @@ -111,9 +111,16 @@ bit_vector_hash (Lisp_Object obj, int depth) sizeof (long))); } +static const struct lrecord_description bit_vector_description[] = { + { XD_LISP_OBJECT, offsetof(Lisp_Bit_Vector, next), 1 }, + { XD_END } +}; + + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bit-vector", bit_vector, mark_bit_vector, print_bit_vector, 0, - bit_vector_equal, bit_vector_hash, 0, + bit_vector_equal, bit_vector_hash, + bit_vector_description, struct Lisp_Bit_Vector); DEFUN ("identity", Fidentity, 1, 1, 0, /* @@ -208,7 +215,7 @@ Return the length of vector, bit vector, list or string SEQUENCE. return make_int (XSTRING_CHAR_LENGTH (sequence)); else if (CONSP (sequence)) { - int len; + size_t len; GET_EXTERNAL_LIST_LENGTH (sequence, len); return make_int (len); } @@ -235,7 +242,7 @@ which is at least the number of distinct elements. (list)) { Lisp_Object hare, tortoise; - int len; + size_t len; for (hare = tortoise = list, len = 0; CONSP (hare) && (! EQ (hare, tortoise) || len == 0); @@ -515,7 +522,7 @@ copy_list (Lisp_Object list) Lisp_Object list_copy = Fcons (XCAR (list), XCDR (list)); Lisp_Object last = list_copy; Lisp_Object hare, tortoise; - int len; + size_t len; for (tortoise = hare = XCDR (list), len = 1; CONSP (hare); @@ -916,7 +923,7 @@ If SEQ is a string, relevant parts of the string-extent-data are copied */ (seq, from, to)) { - int len, f, t; + EMACS_INT len, f, t; if (STRINGP (seq)) return Fsubstring (seq, from, to); @@ -950,7 +957,7 @@ If SEQ is a string, relevant parts of the string-extent-data are copied if (VECTORP (seq)) { Lisp_Object result = make_vector (t - f, Qnil); - int i; + EMACS_INT i; Lisp_Object *in_elts = XVECTOR_DATA (seq); Lisp_Object *out_elts = XVECTOR_DATA (result); @@ -962,7 +969,7 @@ If SEQ is a string, relevant parts of the string-extent-data are copied if (LISTP (seq)) { Lisp_Object result = Qnil; - int i; + EMACS_INT i; seq = Fnthcdr (make_int (f), seq); @@ -978,7 +985,7 @@ If SEQ is a string, relevant parts of the string-extent-data are copied /* bit vector */ { Lisp_Object result = make_bit_vector (t - f, Qzero); - int i; + EMACS_INT i; for (i = f; i < t; i++) set_bit_vector_bit (XBIT_VECTOR (result), i - f, @@ -993,7 +1000,7 @@ Take cdr N times on LIST, and return the result. */ (n, list)) { - REGISTER int i; + REGISTER size_t i; REGISTER Lisp_Object tail = list; CHECK_NATNUM (n); for (i = XINT (n); i; i--) @@ -1052,7 +1059,7 @@ Return element of SEQUENCE at index N. #ifdef LOSING_BYTECODE else if (COMPILED_FUNCTIONP (sequence)) { - int idx = XINT (n); + EMACS_INT idx = XINT (n); if (idx < 0) { lose: @@ -1104,7 +1111,7 @@ If N is greater than the length of LIST, then LIST itself is returned. */ (list, n)) { - int int_n, count; + EMACS_INT int_n, count; Lisp_Object retval, tortoise, hare; CHECK_LIST (list); @@ -1140,7 +1147,7 @@ If LIST has N or fewer elements, nil is returned and LIST is unmodified. */ (list, n)) { - int int_n; + EMACS_INT int_n; CHECK_LIST (list); @@ -2714,12 +2721,6 @@ See also `get', `remprop', and `object-plist'. return value; } -void -pure_put (Lisp_Object sym, Lisp_Object prop, Lisp_Object val) -{ - Fput (sym, prop, Fpurecopy (val)); -} - DEFUN ("remprop", Fremprop, 2, 2, 0, /* Remove from OBJECT's property list the property PROPNAME and its value. OBJECT can be a symbol, face, extent, or string. Returns @@ -3176,11 +3177,14 @@ SEQUENCE may be a list, a vector or a string. return result; } -DEFUN ("mapc", Fmapc, 2, 2, 0, /* +DEFUN ("mapc-internal", Fmapc_internal, 2, 2, 0, /* Apply FUNCTION to each element of SEQUENCE. SEQUENCE may be a list, a vector, a bit vector, or a string. This function is like `mapcar' but does not accumulate the results, which is more efficient if you do not use the results. + +The difference between this and `mapc' is that `mapc' supports all +the spiffy Common Lisp arguments. You should normally use `mapc'. */ (fn, seq)) { @@ -3871,7 +3875,7 @@ syms_of_fns (void) DEFSUBR (Fnconc); DEFSUBR (Fmapcar); DEFSUBR (Fmapvector); - DEFSUBR (Fmapc); + DEFSUBR (Fmapc_internal); DEFSUBR (Fmapconcat); DEFSUBR (Fload_average); DEFSUBR (Ffeaturep); diff --git a/src/font-lock.c b/src/font-lock.c index cefa0d5..0debfda 100644 --- a/src/font-lock.c +++ b/src/font-lock.c @@ -769,8 +769,14 @@ syms_of_font_lock (void) } void -vars_of_font_lock (void) +reinit_vars_of_font_lock (void) { xzero (context_cache); xzero (bol_context_cache); } + +void +vars_of_font_lock (void) +{ + reinit_vars_of_font_lock (); +} diff --git a/src/frame-msw.c b/src/frame-msw.c index f48b7af..6eaac63 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -248,13 +248,13 @@ mswindows_after_init_frame (struct frame *f, int first_on_device, } static void -mswindows_mark_frame (struct frame *f, void (*markobj) (Lisp_Object)) +mswindows_mark_frame (struct frame *f) { - markobj (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); + mark_object (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); #ifdef HAVE_TOOLBARS - markobj (FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); + mark_object (FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); #endif - markobj (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f)); + mark_object (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f)); } static void @@ -741,10 +741,16 @@ syms_of_frame_mswindows (void) } void -vars_of_frame_mswindows (void) +reinit_vars_of_frame_mswindows (void) { /* Needn't staticpro -- see comment above. */ Vmswindows_frame_being_created = Qnil; +} + +void +vars_of_frame_mswindows (void) +{ + reinit_vars_of_frame_mswindows (); DEFVAR_LISP ("mswindows-use-system-frame-size-defaults", &Vmswindows_use_system_frame_size_defaults /* Controls whether to use system or XEmacs defaults for frame size. diff --git a/src/frame-tty.c b/src/frame-tty.c index a079f8a..6815605 100644 --- a/src/frame-tty.c +++ b/src/frame-tty.c @@ -33,10 +33,6 @@ Boston, MA 02111-1307, USA. */ #include "events.h" -#ifdef HAVE_GPM -#include -#endif - /* Default properties to use when creating frames. */ Lisp_Object Vdefault_tty_frame_plist; @@ -86,33 +82,6 @@ tty_after_init_frame (struct frame *f, int first_on_device, call1 (Qinit_post_tty_win, FRAME_CONSOLE (f)); } -#ifdef HAVE_GPM -static int -tty_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y) -{ - Gpm_Event ev; - int num_buttons; - - num_buttons = Gpm_GetSnapshot(&ev); - *x = ev.x; - *y = ev.y; - *frame = DEVICE_SELECTED_FRAME (d); - return (1); -} - -static void -tty_set_mouse_position (struct window *w, int x, int y) -{ - /* XXX - I couldn't find any GPM functions that set the mouse position. - Mr. Perry had left this function empty; that must be why. - karlheg - */ -} - -#endif - - /* Change from withdrawn state to mapped state. */ static void tty_make_frame_visible (struct frame *f) @@ -223,10 +192,6 @@ console_type_create_frame_tty (void) CONSOLE_HAS_METHOD (tty, init_frame_1); CONSOLE_HAS_METHOD (tty, init_frame_3); CONSOLE_HAS_METHOD (tty, after_init_frame); -#ifdef HAVE_GPM - CONSOLE_HAS_METHOD (tty, get_mouse_position); - CONSOLE_HAS_METHOD (tty, set_mouse_position); -#endif CONSOLE_HAS_METHOD (tty, make_frame_visible); CONSOLE_HAS_METHOD (tty, make_frame_invisible); CONSOLE_HAS_METHOD (tty, frame_visible_p); diff --git a/src/frame-x.c b/src/frame-x.c index 2aa7d59..906a6b1 100644 --- a/src/frame-x.c +++ b/src/frame-x.c @@ -103,19 +103,34 @@ x_window_to_frame (struct device *d, Window wdesc) struct frame * x_any_window_to_frame (struct device *d, Window wdesc) { - Lisp_Object tail, frame; - struct frame *f; - + Widget w; assert (DEVICE_X_P (d)); + w = XtWindowToWidget (DEVICE_X_DISPLAY (d), wdesc); + + if (!w) + return 0; + + /* We used to map over all frames here and then map over all widgets + belonging to that frame. However it turns out that this was very fragile + as it requires our display stuctures to be in sync _and_ that the + loop is told about every new widget somebody adds. Therefore we + now let Xt find it for us (which does a bottom-up search which + could even be faster) */ + return x_any_widget_or_parent_to_frame (d, w); +} + +static struct frame * +x_find_frame_for_window (struct device *d, Window wdesc) +{ + Lisp_Object tail, frame; + struct frame *f; /* This function was previously written to accept only a window argument (and to loop over all devices looking for a matching window), but that is incorrect because window ID's are not unique across displays. */ for (tail = DEVICE_FRAME_LIST (d); CONSP (tail); tail = XCDR (tail)) { - int i; - frame = XCAR (tail); f = XFRAME (frame); /* This frame matches if the window is any of its widgets. */ @@ -138,18 +153,18 @@ x_any_window_to_frame (struct device *d, Window wdesc) would incorrectly get sucked away by Emacs if this function matched on psheet widgets. */ - for (i = 0; i < FRAME_X_NUM_TOP_WIDGETS (f); i++) - { - Widget wid = FRAME_X_TOP_WIDGETS (f)[i]; - if (wid && XtIsManaged (wid) && wdesc == XtWindow (wid)) - return f; - } - -#ifdef HAVE_SCROLLBARS - /* Match if the window is one of this frame's scrollbars. */ - if (x_window_is_scrollbar (f, wdesc)) - return f; -#endif + /* Note: that this called only from + x_any_widget_or_parent_to_frame it is unnecessary to iterate + over the top level widgets. */ + + /* Note: we use to special case scrollbars but this turns out to be a bad idea + because + 1. We sometimes get events for _unmapped_ scrollbars and our + callers don't want us to fail. + 2. Starting with the 21.2 widget stuff there are now loads of + widgets to check and it is easy to forget adding them in a loop here. + See x_any_window_to_frame + 3. We pick up all widgets now anyway. */ } return 0; @@ -160,7 +175,7 @@ x_any_widget_or_parent_to_frame (struct device *d, Widget widget) { while (widget) { - struct frame *f = x_any_window_to_frame (d, XtWindow (widget)); + struct frame *f = x_find_frame_for_window (d, XtWindow (widget)); if (f) return f; widget = XtParent (widget); @@ -421,9 +436,9 @@ static void init_x_prop_symbols (void) { #define def(sym, rsrc) \ - pure_put (sym, Qx_resource_name, build_string (rsrc)) + Fput (sym, Qx_resource_name, build_string (rsrc)) #define defi(sym,rsrc) \ - def (sym, rsrc); pure_put (sym, Qintegerp, Qt) + def (sym, rsrc); Fput (sym, Qintegerp, Qt) #if 0 /* this interferes with things. #### fix this right */ def (Qminibuffer, XtNminibuffer); @@ -1880,7 +1895,7 @@ x_create_widgets (struct frame *f, Lisp_Object lisp_window_id, char *string; CHECK_STRING (lisp_window_id); - string = (char *) (XSTRING_DATA (lisp_window_id)); + string = (char *) XSTRING_DATA (lisp_window_id); if (string[0] == '0' && (string[1] == 'x' || string[1] == 'X')) sscanf (string+2, "%lxu", &window_id); #if 0 @@ -2190,10 +2205,10 @@ x_init_frame_3 (struct frame *f) } static void -x_mark_frame (struct frame *f, void (*markobj) (Lisp_Object)) +x_mark_frame (struct frame *f) { - markobj (FRAME_X_ICON_PIXMAP (f)); - markobj (FRAME_X_ICON_PIXMAP_MASK (f)); + mark_object (FRAME_X_ICON_PIXMAP (f)); + mark_object (FRAME_X_ICON_PIXMAP_MASK (f)); } static void diff --git a/src/frame.c b/src/frame.c index 5caeece..0264e90 100644 --- a/src/frame.c +++ b/src/frame.c @@ -86,7 +86,6 @@ Lisp_Object Qborder_color; Lisp_Object Qborder_width; Lisp_Object Qframep, Qframe_live_p; -Lisp_Object Qframe_x_p, Qframe_tty_p; Lisp_Object Qdelete_frame; Lisp_Object Qframe_title_format, Vframe_title_format; @@ -122,17 +121,17 @@ EXFUN (Fset_frame_properties, 2); static Lisp_Object -mark_frame (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_frame (Lisp_Object obj) { struct frame *f = XFRAME (obj); -#define MARKED_SLOT(x) ((void) (markobj (f->x))); +#define MARKED_SLOT(x) mark_object (f->x) #include "frameslots.h" - mark_subwindow_cachels (f->subwindow_cachels, markobj); + mark_subwindow_cachels (f->subwindow_cachels); if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */ - MAYBE_FRAMEMETH (f, mark_frame, (f, markobj)); + MAYBE_FRAMEMETH (f, mark_frame, (f)); return Qnil; } @@ -162,7 +161,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("frame", frame, static void nuke_all_frame_slots (struct frame *f) { -#define MARKED_SLOT(x) f->x = Qnil; +#define MARKED_SLOT(x) f->x = Qnil #include "frameslots.h" } @@ -209,6 +208,10 @@ allocate_frame_core (Lisp_Object device) /* cache of subwindows visible on frame */ f->subwindow_cachels = Dynarr_new (subwindow_cachel); + /* associated exposure ignore list */ + f->subwindow_exposures = 0; + f->subwindow_exposures_tail = 0; + /* Choose a buffer for the frame's root window. */ XWINDOW (root_window)->buffer = Qt; { @@ -410,7 +413,7 @@ See `set-frame-properties', `default-x-frame-plist', and update_frame_window_mirror (f); - if (initialized) + if (initialized && !DEVICE_STREAM_P (d)) { if (!NILP (f->minibuffer_window)) reset_face_cachels (XWINDOW (f->minibuffer_window)); @@ -3074,8 +3077,6 @@ syms_of_frame (void) defsymbol (&Qframep, "framep"); defsymbol (&Qframe_live_p, "frame-live-p"); - defsymbol (&Qframe_x_p, "frame-x-p"); - defsymbol (&Qframe_tty_p, "frame-tty-p"); defsymbol (&Qdelete_frame, "delete-frame"); defsymbol (&Qsynchronize_minibuffers, "synchronize-minibuffers"); defsymbol (&Qbuffer_predicate, "buffer-predicate"); @@ -3291,13 +3292,13 @@ Controls the title of the X window corresponding to the selected frame. This is the same format as `modeline-format' with the exception that %- is ignored. */ ); - Vframe_title_format = Fpurecopy (build_string ("%S: %b")); + Vframe_title_format = build_string ("%S: %b"); DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /* Controls the title of the icon corresponding to the selected frame. See also the variable `frame-title-format'. */ ); - Vframe_icon_title_format = Fpurecopy (build_string ("%b")); + Vframe_icon_title_format = build_string ("%b"); DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* The default name to assign to newly-created frames. @@ -3305,9 +3306,9 @@ This can be overridden by arguments to `make-frame'. This must be a string. */ ); #ifndef INFODOCK - Vdefault_frame_name = Fpurecopy (build_string ("emacs")); + Vdefault_frame_name = build_string ("emacs"); #else - Vdefault_frame_name = Fpurecopy (build_string ("InfoDock")); + Vdefault_frame_name = build_string ("InfoDock"); #endif DEFVAR_LISP ("default-frame-plist", &Vdefault_frame_plist /* diff --git a/src/frame.h b/src/frame.h index be75ff9..bba3195 100644 --- a/src/frame.h +++ b/src/frame.h @@ -94,6 +94,9 @@ struct frame /* subwindow cache elements for this frame */ subwindow_cachel_dynarr *subwindow_cachels; + struct expose_ignore* subwindow_exposures; + struct expose_ignore* subwindow_exposures_tail; + #ifdef HAVE_SCROLLBARS /* frame-local scrollbar information. See scrollbar.c. */ int scrollbar_y_offset; @@ -178,6 +181,7 @@ Value : Emacs meaning :f-v-p : X meaning unsigned int faces_changed :1; unsigned int frame_changed :1; unsigned int subwindows_changed :1; + unsigned int subwindows_state_changed :1; unsigned int glyphs_changed :1; unsigned int icon_changed :1; unsigned int menubar_changed :1; @@ -233,7 +237,6 @@ DECLARE_LRECORD (frame, struct frame); #define XFRAME(x) XRECORD (x, frame, struct frame) #define XSETFRAME(x, p) XSETRECORD (x, p, frame) #define FRAMEP(x) RECORDP (x, frame) -#define GC_FRAMEP(x) GC_RECORDP (x, frame) #define CHECK_FRAME(x) CHECK_RECORD (x, frame) #define CONCHECK_FRAME(x) CONCHECK_RECORD (x, frame) @@ -260,7 +263,7 @@ error_check_frame_type (struct frame * f, Lisp_Object sym) return f; } # define FRAME_TYPE_DATA(f, type) \ - ((struct type##_frame *) (error_check_frame_type (f, Q##type))->frame_data) + ((struct type##_frame *) error_check_frame_type (f, Q##type)->frame_data) #else # define FRAME_TYPE_DATA(f, type) \ ((struct type##_frame *) (f)->frame_data) @@ -340,6 +343,19 @@ extern int frame_changed; subwindows_changed = 1; \ } while (0) +#define MARK_FRAME_SUBWINDOWS_STATE_CHANGED(f) do { \ + struct frame *mfgc_f = (f); \ + mfgc_f->subwindows_state_changed = 1; \ + mfgc_f->modiff++; \ + if (!NILP (mfgc_f->device)) \ + { \ + struct device *mfgc_d = XDEVICE (mfgc_f->device); \ + MARK_DEVICE_SUBWINDOWS_STATE_CHANGED (mfgc_d); \ + } \ + else \ + subwindows_state_changed = 1; \ +} while (0) + #define MARK_FRAME_TOOLBARS_CHANGED(f) do { \ struct frame *mftc_f = (f); \ mftc_f->toolbar_changed = 1; \ diff --git a/src/free-hook.c b/src/free-hook.c index cac4a86..d243aeb 100644 --- a/src/free-hook.c +++ b/src/free-hook.c @@ -85,14 +85,14 @@ void *malloc (size_t); /* System function prototypes don't belong in C source files */ /* extern void free (void *); */ -struct hash_table *pointer_table; +static struct hash_table *pointer_table; extern void (*__free_hook) (void *); extern void *(*__malloc_hook) (size_t); static void *check_malloc (size_t); -typedef void (*fun_ptr) (); +typedef void (*fun_ptr) (void); /* free_queue is not too useful without backtrace logging */ #define FREE_QUEUE_LIMIT 1 @@ -110,11 +110,11 @@ typedef struct { unsigned long length; } free_queue_entry; -free_queue_entry free_queue[FREE_QUEUE_LIMIT]; +static free_queue_entry free_queue[FREE_QUEUE_LIMIT]; -int current_free; +static int current_free; -int strict_free_check; +static int strict_free_check; static void check_free (void *ptr) diff --git a/src/gdbinit b/src/gdbinit index b7d238d..a50968a 100644 --- a/src/gdbinit +++ b/src/gdbinit @@ -327,8 +327,8 @@ define pobj if $imp == &lrecord_opaque pstruct Lisp_Opaque else - if $imp == &lrecord_opaque_list - pstruct Lisp_Opaque_List + if $imp == &lrecord_opaque_ptr + pstruct Lisp_Opaque_Ptr else if $imp == &lrecord_popup_data pstruct popup_data diff --git a/src/general.c b/src/general.c index 06c4db1..9676b6d 100644 --- a/src/general.c +++ b/src/general.c @@ -34,24 +34,19 @@ Boston, MA 02111-1307, USA. */ Lisp_Object Qactually_requested; Lisp_Object Qafter; Lisp_Object Qall; -Lisp_Object Qalways; Lisp_Object Qand; Lisp_Object Qassoc; Lisp_Object Qat; -Lisp_Object Qauth; Lisp_Object Qautodetect; Lisp_Object Qbad_variable; -Lisp_Object Qbase; Lisp_Object Qbefore; Lisp_Object Qbinary; -Lisp_Object Qbinddn; Lisp_Object Qbitmap; -Lisp_Object Qblack; Lisp_Object Qboolean; Lisp_Object Qbottom; Lisp_Object Qbuffer; Lisp_Object Qbutton; -Lisp_Object Qcase; +Lisp_Object Qcenter; Lisp_Object Qcategory; Lisp_Object Qchannel; Lisp_Object Qchar; @@ -68,7 +63,6 @@ Lisp_Object Qdead; Lisp_Object Qdefault; Lisp_Object Qdelete; Lisp_Object Qdelq; -Lisp_Object Qderef; Lisp_Object Qdevice; Lisp_Object Qdimension; Lisp_Object Qdisplay; @@ -81,7 +75,6 @@ Lisp_Object Qequal; Lisp_Object Qeval; Lisp_Object Qextents; Lisp_Object Qface; -Lisp_Object Qfind; Lisp_Object Qfont; Lisp_Object Qframe; Lisp_Object Qfunction; @@ -92,6 +85,7 @@ Lisp_Object Qglobal; Lisp_Object Qgutter; Lisp_Object Qheight; Lisp_Object Qhighlight; +Lisp_Object Qhorizontal; Lisp_Object Qicon; Lisp_Object Qid; Lisp_Object Qimage; @@ -101,10 +95,7 @@ Lisp_Object Qinteger; Lisp_Object Qinternal; Lisp_Object Qkey; Lisp_Object Qkey_assoc; -Lisp_Object Qkeyboard; Lisp_Object Qkeymap; -Lisp_Object Qkrbv41; -Lisp_Object Qkrbv42; Lisp_Object Qleft; Lisp_Object Qlist; Lisp_Object Qmagic; @@ -112,14 +103,12 @@ Lisp_Object Qmalloc_overhead; Lisp_Object Qmarkers; Lisp_Object Qmax; Lisp_Object Qmemory; -Lisp_Object Qmenubar; Lisp_Object Qmessage; Lisp_Object Qminus; Lisp_Object Qmodifiers; Lisp_Object Qmotion; Lisp_Object Qmswindows; Lisp_Object Qname; -Lisp_Object Qnever; Lisp_Object Qnone; Lisp_Object Qnot; Lisp_Object Qnothing; @@ -130,15 +119,11 @@ Lisp_Object Qold_delete; Lisp_Object Qold_delq; Lisp_Object Qold_rassoc; Lisp_Object Qold_rassq; -Lisp_Object Qonelevel; Lisp_Object Qonly; Lisp_Object Qor; Lisp_Object Qother; -Lisp_Object Qpasswd; -Lisp_Object Qpath; Lisp_Object Qpointer; Lisp_Object Qpopup; -Lisp_Object Qport; Lisp_Object Qprint; Lisp_Object Qprocess; Lisp_Object Qprovide; @@ -154,17 +139,14 @@ Lisp_Object Qselected; Lisp_Object Qsignal; Lisp_Object Qsimple; Lisp_Object Qsize; -Lisp_Object Qsizelimit; Lisp_Object Qspace; Lisp_Object Qspecifier; Lisp_Object Qstream; Lisp_Object Qstring; -Lisp_Object Qsubtree; Lisp_Object Qsymbol; Lisp_Object Qsyntax; Lisp_Object Qtest; Lisp_Object Qtext; -Lisp_Object Qtimelimit; Lisp_Object Qtimeout; Lisp_Object Qtimestamp; Lisp_Object Qtoolbar; @@ -175,9 +157,8 @@ Lisp_Object Qundecided; Lisp_Object Qundefined; Lisp_Object Qunimplemented; Lisp_Object Qvalue_assoc; -Lisp_Object Qvector; +Lisp_Object Qvertical; Lisp_Object Qwarning; -Lisp_Object Qwhite; Lisp_Object Qwidth; Lisp_Object Qwidget; Lisp_Object Qwindow; @@ -191,25 +172,20 @@ syms_of_general (void) defsymbol (&Qactually_requested, "actually-requested"); defsymbol (&Qafter, "after"); defsymbol (&Qall, "all"); - defsymbol (&Qalways, "always"); defsymbol (&Qand, "and"); defsymbol (&Qassoc, "assoc"); defsymbol (&Qat, "at"); - defsymbol (&Qauth, "auth"); defsymbol (&Qautodetect, "autodetect"); defsymbol (&Qbad_variable, "bad-variable"); - defsymbol (&Qbase, "base"); defsymbol (&Qbefore, "before"); defsymbol (&Qbinary, "binary"); - defsymbol (&Qbinddn, "binddn"); defsymbol (&Qbitmap, "bitmap"); - defsymbol (&Qblack, "black"); defsymbol (&Qboolean, "boolean"); defsymbol (&Qbottom, "bottom"); defsymbol (&Qbuffer, "buffer"); defsymbol (&Qbutton, "button"); - defsymbol (&Qcase, "case"); defsymbol (&Qcategory, "category"); + defsymbol (&Qcenter, "center"); defsymbol (&Qchannel, "channel"); defsymbol (&Qchar, "char"); defsymbol (&Qcharacter, "character"); @@ -225,7 +201,6 @@ syms_of_general (void) defsymbol (&Qdefault, "default"); defsymbol (&Qdelete, "delete"); defsymbol (&Qdelq, "delq"); - defsymbol (&Qderef, "deref"); defsymbol (&Qdevice, "device"); defsymbol (&Qdimension, "dimension"); defsymbol (&Qdisplay, "display"); @@ -238,7 +213,6 @@ syms_of_general (void) defsymbol (&Qeval, "eval"); defsymbol (&Qextents, "extents"); defsymbol (&Qface, "face"); - defsymbol (&Qfind, "find"); defsymbol (&Qfont, "font"); defsymbol (&Qframe, "frame"); defsymbol (&Qfunction, "function"); @@ -249,6 +223,7 @@ syms_of_general (void) defsymbol (&Qgutter, "gutter"); defsymbol (&Qheight, "height"); defsymbol (&Qhighlight, "highlight"); + defsymbol (&Qhorizontal, "horizontal"); defsymbol (&Qicon, "icon"); defsymbol (&Qid, "id"); defsymbol (&Qimage, "image"); @@ -258,10 +233,7 @@ syms_of_general (void) defsymbol (&Qinternal, "internal"); defsymbol (&Qkey, "key"); defsymbol (&Qkey_assoc, "key-assoc"); - defsymbol (&Qkeyboard, "keyboard"); defsymbol (&Qkeymap, "keymap"); - defsymbol (&Qkrbv41, "krbv41"); - defsymbol (&Qkrbv42, "krbv42"); defsymbol (&Qleft, "left"); defsymbol (&Qlist, "list"); defsymbol (&Qmagic, "magic"); @@ -269,14 +241,12 @@ syms_of_general (void) defsymbol (&Qmarkers, "markers"); defsymbol (&Qmax, "max"); defsymbol (&Qmemory, "memory"); - defsymbol (&Qmenubar, "menubar"); defsymbol (&Qmessage, "message"); defsymbol (&Qminus, "-"); defsymbol (&Qmodifiers, "modifiers"); defsymbol (&Qmotion, "motion"); defsymbol (&Qmswindows, "mswindows"); defsymbol (&Qname, "name"); - defsymbol (&Qnever, "never"); defsymbol (&Qnone, "none"); defsymbol (&Qnot, "not"); defsymbol (&Qnothing, "nothing"); @@ -287,15 +257,11 @@ syms_of_general (void) defsymbol (&Qold_delq, "old-delq"); defsymbol (&Qold_rassoc, "old-rassoc"); defsymbol (&Qold_rassq, "old-rassq"); - defsymbol (&Qonelevel, "onelevel"); defsymbol (&Qonly, "only"); defsymbol (&Qor, "or"); defsymbol (&Qother, "other"); - defsymbol (&Qpasswd, "passwd"); - defsymbol (&Qpath, "path"); defsymbol (&Qpointer, "pointer"); defsymbol (&Qpopup, "popup"); - defsymbol (&Qport, "port"); defsymbol (&Qprint, "print"); defsymbol (&Qprocess, "process"); defsymbol (&Qprovide, "provide"); @@ -311,17 +277,14 @@ syms_of_general (void) defsymbol (&Qsignal, "signal"); defsymbol (&Qsimple, "simple"); defsymbol (&Qsize, "size"); - defsymbol (&Qsizelimit, "sizelimit"); defsymbol (&Qspace, "space"); defsymbol (&Qspecifier, "specifier"); defsymbol (&Qstream, "stream"); defsymbol (&Qstring, "string"); - defsymbol (&Qsubtree, "subtree"); defsymbol (&Qsymbol, "symbol"); defsymbol (&Qsyntax, "syntax"); defsymbol (&Qtest, "test"); defsymbol (&Qtext, "text"); - defsymbol (&Qtimelimit, "timelimit"); defsymbol (&Qtimeout, "timeout"); defsymbol (&Qtimestamp, "timestamp"); defsymbol (&Qtoolbar, "toolbar"); @@ -332,9 +295,8 @@ syms_of_general (void) defsymbol (&Qundefined, "undefined"); defsymbol (&Qunimplemented, "unimplemented"); defsymbol (&Qvalue_assoc, "value-assoc"); - defsymbol (&Qvector, "vector"); + defsymbol (&Qvertical, "vertical"); defsymbol (&Qwarning, "warning"); - defsymbol (&Qwhite, "white"); defsymbol (&Qwidth, "width"); defsymbol (&Qwidget, "widget"); defsymbol (&Qwindow, "window"); diff --git a/src/getloadavg.c b/src/getloadavg.c index b8161e4..98de5bb 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c @@ -94,10 +94,6 @@ Boston, MA 02111-1307, USA. */ #include -#ifndef errno -extern int errno; -#endif - #ifndef HAVE_GETLOADAVG /* The existing Emacs configuration files define a macro called @@ -536,7 +532,7 @@ getloadavg (double loadavg[], int nelem) privileges to use it. Initial implementation courtesy Zlatko Calusic . - Integrated to XEmacs by Hrvoje Niksic . + Integrated to XEmacs by Hrvoje Niksic . Additional cleanup by Hrvoje Niksic, based on code published by Casper Dik . */ kstat_ctl_t *kc; diff --git a/src/gif_io.c b/src/gif_io.c index ddbfb16..0421b4b 100644 --- a/src/gif_io.c +++ b/src/gif_io.c @@ -3,6 +3,7 @@ #include #include #include "gifrlib.h" +#include "sysfile.h" /****************************************************************************** * Set up the GifFileType structure for use. This must be called first in any * diff --git a/src/glyphs-eimage.c b/src/glyphs-eimage.c index 6b80c82..4005413 100644 --- a/src/glyphs-eimage.c +++ b/src/glyphs-eimage.c @@ -482,7 +482,7 @@ jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* now instantiate */ MAYBE_DEVMETH (XDEVICE (ii->device), init_image_instance_from_eimage, - (ii, cinfo.output_width, cinfo.output_height, + (ii, cinfo.output_width, cinfo.output_height, 1, unwind.eimage, dest_mask, instantiator, domain)); @@ -651,10 +651,10 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, DGifSlurp (unwind.giffile); } - /* 3. Now create the EImage */ + /* 3. Now create the EImage(s) */ { ColorMapObject *cmo = unwind.giffile->SColorMap; - int i, j, row, pass, interlace; + int i, j, row, pass, interlace, slice; unsigned char *eip; /* interlaced gifs have rows in this order: 0, 8, 16, ..., 4, 12, 20, ..., 2, 6, 10, ..., 1, 3, 5, ... */ @@ -663,52 +663,81 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, height = unwind.giffile->SHeight; width = unwind.giffile->SWidth; - unwind.eimage = (unsigned char*) xmalloc (width * height * 3); + unwind.eimage = (unsigned char*) + xmalloc (width * height * 3 * unwind.giffile->ImageCount); if (!unwind.eimage) signal_image_error("Unable to allocate enough memory for image", instantiator); /* write the data in EImage format (8bit RGB triples) */ - /* Note: We just use the first image in the file and ignore the rest. - We check here that that image covers the full "screen" size. - I don't know whether that's always the case. - -dkindred@cs.cmu.edu */ - if (unwind.giffile->SavedImages[0].ImageDesc.Height != height - || unwind.giffile->SavedImages[0].ImageDesc.Width != width - || unwind.giffile->SavedImages[0].ImageDesc.Left != 0 - || unwind.giffile->SavedImages[0].ImageDesc.Top != 0) - signal_image_error ("First image in GIF file is not full size", - instantiator); - - interlace = unwind.giffile->SavedImages[0].ImageDesc.Interlace; - pass = 0; - row = interlace ? InterlacedOffset[pass] : 0; - eip = unwind.eimage; - for (i = 0; i < height; i++) + for (slice = 0; slice < unwind.giffile->ImageCount; slice++) { - if (interlace) - if (row >= height) { - row = InterlacedOffset[++pass]; - while (row >= height) - row = InterlacedOffset[++pass]; - } - eip = unwind.eimage + (row * width * 3); - for (j = 0; j < width; j++) + /* We check here that that the current image covers the full "screen" size. */ + if (unwind.giffile->SavedImages[slice].ImageDesc.Height != height + || unwind.giffile->SavedImages[slice].ImageDesc.Width != width + || unwind.giffile->SavedImages[slice].ImageDesc.Left != 0 + || unwind.giffile->SavedImages[slice].ImageDesc.Top != 0) + signal_image_error ("Image in GIF file is not full size", + instantiator); + + interlace = unwind.giffile->SavedImages[slice].ImageDesc.Interlace; + pass = 0; + row = interlace ? InterlacedOffset[pass] : 0; + eip = unwind.eimage + (width * height * 3 * slice); + for (i = 0; i < height; i++) { - unsigned char pixel = unwind.giffile->SavedImages[0].RasterBits[(i * width) + j]; - *eip++ = cmo->Colors[pixel].Red; - *eip++ = cmo->Colors[pixel].Green; - *eip++ = cmo->Colors[pixel].Blue; + if (interlace) + if (row >= height) { + row = InterlacedOffset[++pass]; + while (row >= height) + row = InterlacedOffset[++pass]; + } + eip = unwind.eimage + (width * height * 3 * slice) + (row * width * 3); + for (j = 0; j < width; j++) + { + unsigned char pixel = + unwind.giffile->SavedImages[slice].RasterBits[(i * width) + j]; + *eip++ = cmo->Colors[pixel].Red; + *eip++ = cmo->Colors[pixel].Green; + *eip++ = cmo->Colors[pixel].Blue; + } + row += interlace ? InterlacedJumps[pass] : 1; } - row += interlace ? InterlacedJumps[pass] : 1; } + + /* now instantiate */ + MAYBE_DEVMETH (XDEVICE (ii->device), + init_image_instance_from_eimage, + (ii, width, height, unwind.giffile->ImageCount, unwind.eimage, dest_mask, + instantiator, domain)); } - /* now instantiate */ - MAYBE_DEVMETH (XDEVICE (ii->device), - init_image_instance_from_eimage, - (ii, width, height, unwind.eimage, dest_mask, - instantiator, domain)); + /* We read the gif successfully. If we have more than one slice then + animate the gif. */ + if (unwind.giffile->ImageCount > 1) + { + /* See if there is a timeout value. In theory there could be one + for every image - but that makes the implementation way to + complicated for now so we just take the first. */ + unsigned short timeout = 0; + Lisp_Object tid; + + if (unwind.giffile->SavedImages[0].Function == GRAPHICS_EXT_FUNC_CODE + && + unwind.giffile->SavedImages[0].ExtensionBlockCount) + { + timeout = (unsigned short) + ((unwind.giffile->SavedImages[0].ExtensionBlocks[0].Bytes[2] << 8) + + unwind.giffile-> SavedImages[0].ExtensionBlocks[0].Bytes[1]) * 10; + } + + /* Too short a timeout will crucify us performance-wise. */ + tid = add_glyph_animated_timeout (timeout > 10 ? timeout : 10, image_instance); + + if (!NILP (tid)) + IMAGE_INSTANCE_PIXMAP_TIMEOUT (ii) = XINT (tid); + } + unbind_to (speccount, Qnil); } @@ -990,7 +1019,7 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* now instantiate */ MAYBE_DEVMETH (XDEVICE (ii->device), init_image_instance_from_eimage, - (ii, width, height, unwind.eimage, dest_mask, + (ii, width, height, 1, unwind.eimage, dest_mask, instantiator, domain)); /* This will clean up everything else. */ @@ -1270,7 +1299,7 @@ tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* now instantiate */ MAYBE_DEVMETH (XDEVICE (ii->device), init_image_instance_from_eimage, - (ii, width, height, unwind.eimage, dest_mask, + (ii, width, height, 1, unwind.eimage, dest_mask, instantiator, domain)); unbind_to (speccount, Qnil); diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 7a9f8d3..fd318b3 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -1,5 +1,5 @@ /* mswindows-specific glyph objects. - Copyright (C) 1998, 99 Andy Piper. + Copyright (C) 1998, 1999 Andy Piper. This file is part of XEmacs. @@ -57,6 +57,7 @@ DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); #ifdef HAVE_JPEG DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); #endif @@ -78,9 +79,6 @@ DEFINE_DEVICE_IIFORMAT (mswindows, xface); #endif DEFINE_DEVICE_IIFORMAT (mswindows, button); DEFINE_DEVICE_IIFORMAT (mswindows, edit_field); -#if 0 -DEFINE_DEVICE_IIFORMAT (mswindows, group); -#endif DEFINE_DEVICE_IIFORMAT (mswindows, subwindow); DEFINE_DEVICE_IIFORMAT (mswindows, widget); DEFINE_DEVICE_IIFORMAT (mswindows, label); @@ -101,13 +99,13 @@ Lisp_Object Qmswindows_resource; static void mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii, - enum image_instance_type type); + int slices, + enum image_instance_type type); static void mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image, struct frame* f); COLORREF mswindows_string_to_color (CONST char *name); -void check_valid_item_list_1 (Lisp_Object items); #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3))) @@ -293,6 +291,7 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii, int dest_mask, void *bmp_data, int bmp_bits, + int slices, Lisp_Object instantiator, int x_hot, int y_hot, int create_mask) @@ -334,12 +333,14 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii, /* copy in the actual bitmap */ memcpy (bmp_buf, bmp_data, bmp_bits); - mswindows_initialize_dibitmap_image_instance (ii, type); + mswindows_initialize_dibitmap_image_instance (ii, slices, type); IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = find_keyword_in_vector (instantiator, Q_file); + /* Fixup a set of bitmaps. */ IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = bitmap; + IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = NULL; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = bmp_info->bmiHeader.biWidth; IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = bmp_info->bmiHeader.biHeight; @@ -359,8 +360,36 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii, } static void +image_instance_add_dibitmap (struct Lisp_Image_Instance *ii, + BITMAPINFO *bmp_info, + void *bmp_data, + int bmp_bits, + int slice, + Lisp_Object instantiator) +{ + Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); + struct device *d = XDEVICE (device); + struct frame *f = XFRAME (DEVICE_SELECTED_FRAME (d)); + void* bmp_buf=0; + HDC hdc = FRAME_MSWINDOWS_CDC (f); + HBITMAP bitmap = CreateDIBSection (hdc, + bmp_info, + DIB_RGB_COLORS, + &bmp_buf, + 0,0); + + if (!bitmap || !bmp_buf) + signal_simple_error ("Unable to create bitmap", instantiator); + + /* copy in the actual bitmap */ + memcpy (bmp_buf, bmp_data, bmp_bits); + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (ii, slice) = bitmap; +} + +static void mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, int width, int height, + int slices, unsigned char *eimage, int dest_mask, Lisp_Object instantiator, @@ -371,6 +400,7 @@ mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, unsigned char* bmp_data; int bmp_bits; COLORREF bkcolor; + int slice; if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) signal_simple_error ("Not an mswindows device", device); @@ -380,21 +410,29 @@ mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, bkcolor = COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (FACE_BACKGROUND (Vdefault_face, domain))); - /* build a bitmap from the eimage */ - if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage, - &bmp_bits, &bmp_data))) + for (slice = 0; slice < slices; slice++) { - signal_simple_error ("EImage to DIBitmap conversion failed", - instantiator); - } - - /* Now create the pixmap and set up the image instance */ - init_image_instance_from_dibitmap (ii, bmp_info, dest_mask, - bmp_data, bmp_bits, instantiator, - 0, 0, 0); + /* build a bitmap from the eimage */ + if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, + eimage + (width * height * 3 * slice), + &bmp_bits, &bmp_data))) + { + signal_simple_error ("EImage to DIBitmap conversion failed", + instantiator); + } - xfree (bmp_info); - xfree (bmp_data); + /* Now create the pixmap and set up the image instance */ + if (slice == 0) + init_image_instance_from_dibitmap (ii, bmp_info, dest_mask, + bmp_data, bmp_bits, slices, instantiator, + 0, 0, 0); + else + image_instance_add_dibitmap (ii, bmp_info, bmp_data, bmp_bits, slice, + instantiator); + + xfree (bmp_info); + xfree (bmp_data); + } } static void set_mono_pixel ( unsigned char* bits, @@ -923,7 +961,7 @@ mswindows_xpm_instantiate (Lisp_Object image_instance, /* Now create the pixmap and set up the image instance */ init_image_instance_from_dibitmap (ii, bmp_info, dest_mask, - bmp_data, bmp_bits, instantiator, + bmp_data, bmp_bits, 1, instantiator, x_hot, y_hot, transp); xfree (bmp_info); @@ -986,7 +1024,7 @@ bmp_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* Now create the pixmap and set up the image instance */ init_image_instance_from_dibitmap (ii, bmp_info, dest_mask, - bmp_data, bmp_bits, instantiator, + bmp_data, bmp_bits, 1, instantiator, 0, 0, 0); } @@ -1062,8 +1100,10 @@ typedef struct #define OIC_BANG 32515 #define OIC_NOTE 32516 #define OIC_WINLOGO 32517 +#if defined (__CYGWIN32__) && CYGWIN_VERSION_DLL_MAJOR < 21 #define LR_SHARED 0x8000 #endif +#endif static CONST resource_t bitmap_table[] = { @@ -1241,7 +1281,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti if (hinst) FreeLibrary (hinst); - mswindows_initialize_dibitmap_image_instance (ii, iitype); + mswindows_initialize_dibitmap_image_instance (ii, 1, iitype); IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = file; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = @@ -1723,7 +1763,7 @@ init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii, IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK); - mswindows_initialize_dibitmap_image_instance (ii, type); + mswindows_initialize_dibitmap_image_instance (ii, 1, type); IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = find_keyword_in_vector (instantiator, Q_file); @@ -1984,6 +2024,10 @@ mswindows_print_image_instance (struct Lisp_Image_Instance *p, } } +#ifdef DEBUG_WIDGETS +extern int debug_widget_instances; +#endif + static void mswindows_finalize_image_instance (struct Lisp_Image_Instance *p) { @@ -1993,15 +2037,34 @@ mswindows_finalize_image_instance (struct Lisp_Image_Instance *p) || IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { +#ifdef DEBUG_WIDGETS + debug_widget_instances--; + stderr_out ("widget destroyed, %d left\n", debug_widget_instances); +#endif if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) - DestroyWindow (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p)); - IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0; + { + DestroyWindow (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p)); + DestroyWindow (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p)); + IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0; + } } else if (p->data) { - if (IMAGE_INSTANCE_MSWINDOWS_BITMAP (p)) - DeleteObject (IMAGE_INSTANCE_MSWINDOWS_BITMAP (p)); - IMAGE_INSTANCE_MSWINDOWS_BITMAP (p) = 0; + int i; + if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)) + disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)); + + if (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (p)) + { + for (i = 0; i < IMAGE_INSTANCE_PIXMAP_MAXSLICE (p); i++) + { + if (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (p, i)) + DeleteObject (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (p, i)); + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (p, i) = 0; + } + xfree (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (p)); + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (p) = 0; + } if (IMAGE_INSTANCE_MSWINDOWS_MASK (p)) DeleteObject (IMAGE_INSTANCE_MSWINDOWS_MASK (p)); IMAGE_INSTANCE_MSWINDOWS_MASK (p) = 0; @@ -2029,31 +2092,46 @@ mswindows_unmap_subwindow (struct Lisp_Image_Instance *p) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { - SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), + SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), NULL, 0, 0, 0, 0, - SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE - | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); + SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE + | SWP_NOSENDCHANGING); } } /* map the subwindow. This is used by redisplay via redisplay_output_subwindow */ static void -mswindows_map_subwindow (struct Lisp_Image_Instance *p, int x, int y) +mswindows_map_subwindow (struct Lisp_Image_Instance *p, int x, int y, + struct display_glyph_area* dga) { - /* ShowWindow (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), SW_SHOW);*/ - SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), + /* move the window before mapping it ... */ + SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, + x, y, dga->width, dga->height, + SWP_NOZORDER + | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); + /* ... adjust the child ... */ + SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), NULL, - x, y, 0, 0, - SWP_NOZORDER | SWP_SHOWWINDOW | SWP_NOSIZE + -dga->xoffset, -dga->yoffset, 0, 0, + SWP_NOZORDER | SWP_NOSIZE | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); + /* ... now map it - we are not allowed to move it at the same time. */ + SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, + 0, 0, 0, 0, + SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE + | SWP_SHOWWINDOW | SWP_NOCOPYBITS + | SWP_NOSENDCHANGING); } /* resize the subwindow instance */ static void mswindows_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h) { + /* Set the size of the control .... */ SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), NULL, 0, 0, w, h, @@ -2071,13 +2149,23 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p) /* buttons checked or otherwise */ if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton)) { - if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p))) + if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_ITEM (p))) SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), BM_SETCHECK, (WPARAM)BST_CHECKED, 0); else SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); } + + /* set the widget font from the widget face */ + SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), + WM_SETFONT, + (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT + (XFONT_INSTANCE (widget_face_font_info + (IMAGE_INSTANCE_SUBWINDOW_FRAME (p), + IMAGE_INSTANCE_WIDGET_FACE (p), + 0, 0))), + MAKELPARAM (TRUE, 0)); } } @@ -2101,7 +2189,7 @@ mswindows_register_gui_item (Lisp_Object gui, Lisp_Object domain) static int mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain) { - return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM (instance), + return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_ITEM (instance), domain); } @@ -2122,6 +2210,26 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant /* have to set the type this late in case there is no device instantiation for a widget */ IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW; + /* Allocate space for the clip window */ + ii->data = xnew_and_zero (struct mswindows_subwindow_data); + + if ((IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii) + = CreateWindowEx( + 0, /* EX flags */ + XEMACS_CONTROL_CLASS, + 0, /* text */ + WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD, + 0, /* starting x position */ + 0, /* starting y position */ + IMAGE_INSTANCE_WIDGET_WIDTH (ii), + IMAGE_INSTANCE_WIDGET_HEIGHT (ii), + /* parent window */ + FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), + NULL, /* No menu */ + NULL, /* must be null for this class */ + NULL)) == NULL) + signal_simple_error ("window creation failed with code", + make_int (GetLastError())); wnd = CreateWindow( "STATIC", "", @@ -2130,7 +2238,7 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant 0, /* starting y position */ IMAGE_INSTANCE_WIDGET_WIDTH (ii), IMAGE_INSTANCE_WIDGET_HEIGHT (ii), - FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), /* parent window */ + IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii), 0, (HINSTANCE) GetWindowLong (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), @@ -2185,6 +2293,7 @@ mswindows_image_instance_hash (struct Lisp_Image_Instance *p, int depth) static void mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii, + int slices, enum image_instance_type type) { ii->data = xnew_and_zero (struct mswindows_image_instance_data); @@ -2195,9 +2304,14 @@ mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii, IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = Qnil; IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil; IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil; + IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices; + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (ii) = + xnew_array_and_zero (HBITMAP, slices); } +#ifdef HAVE_WIDGETS + /************************************************************************/ /* widgets */ /************************************************************************/ @@ -2207,11 +2321,8 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat int dest_mask, Lisp_Object domain, CONST char* class, int flags, int exflags) { + /* this function can call lisp */ struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); -#if 0 - struct Lisp_Image_Instance *groupii = 0; - Lisp_Object group = find_keyword_in_vector (instantiator, Q_group); -#endif Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style; struct device* d = XDEVICE (device); Lisp_Object frame = FW_FRAME (domain); @@ -2223,17 +2334,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat if (!DEVICE_MSWINDOWS_P (d)) signal_simple_error ("Not an mswindows device", device); -#if 0 - /* if the user specified another glyph as a group pick up the - instance in our domain. */ - if (!NILP (group)) - { - if (SYMBOLP (group)) - group = XSYMBOL (group)->value; - group = glyph_image_instance (group, domain, ERROR_ME, 1); - groupii = XIMAGE_INSTANCE (group); - } -#endif + if (!gui_item_active_p (gui)) flags |= WS_DISABLED; @@ -2249,22 +2350,46 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) GET_C_STRING_OS_DATA_ALLOCA (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm); - wnd = CreateWindowEx( - exflags /* | WS_EX_NOPARENTNOTIFY*/, - class, - nm, - flags | WS_CHILD, - 0, /* starting x position */ - 0, /* starting y position */ - IMAGE_INSTANCE_WIDGET_WIDTH (ii), - IMAGE_INSTANCE_WIDGET_HEIGHT (ii), - /* parent window */ - FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), - (HMENU)id, /* No menu */ - (HINSTANCE) - GetWindowLong (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), - GWL_HINSTANCE), - NULL); + /* allocate space for the clip window and then allocate the clip window */ + ii->data = xnew_and_zero (struct mswindows_subwindow_data); + + if ((IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii) + = CreateWindowEx( + 0, /* EX flags */ + XEMACS_CONTROL_CLASS, + 0, /* text */ + WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD, + 0, /* starting x position */ + 0, /* starting y position */ + IMAGE_INSTANCE_WIDGET_WIDTH (ii), + IMAGE_INSTANCE_WIDGET_HEIGHT (ii), + /* parent window */ + FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), + (HMENU)id, /* No menu */ + NULL, /* must be null for this class */ + NULL)) == NULL) + signal_simple_error ("window creation failed with code", + make_int (GetLastError())); + + if ((wnd = CreateWindowEx( + exflags /* | WS_EX_NOPARENTNOTIFY*/, + class, + nm, + flags | WS_CHILD | WS_VISIBLE, + 0, /* starting x position */ + 0, /* starting y position */ + IMAGE_INSTANCE_WIDGET_WIDTH (ii), + IMAGE_INSTANCE_WIDGET_HEIGHT (ii), + /* parent window */ + IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii), + (HMENU)id, /* No menu */ + (HINSTANCE) + GetWindowLong + (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), + GWL_HINSTANCE), + NULL)) == NULL) + signal_simple_error ("window creation failed with code", + make_int (GetLastError())); IMAGE_INSTANCE_SUBWINDOW_ID (ii) = wnd; SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance)); @@ -2289,6 +2414,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { + /* this function can call lisp */ struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); HWND wnd; int flags = BS_NOTIFY; @@ -2392,7 +2518,7 @@ mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object in /* instantiate a tree view widget */ static HTREEITEM add_tree_item (Lisp_Object image_instance, - HWND wnd, HTREEITEM parent, Lisp_Object entry, + HWND wnd, HTREEITEM parent, Lisp_Object item, int children, Lisp_Object domain) { TV_INSERTSTRUCT tvitem; @@ -2403,39 +2529,21 @@ static HTREEITEM add_tree_item (Lisp_Object image_instance, tvitem.item.mask = TVIF_TEXT | TVIF_CHILDREN; tvitem.item.cChildren = children; - if (VECTORP (entry)) - { - /* we always maintain the real gui item at the head of the - list. We have to put them in the list in the first place - because the whole model assumes that the glyph instances have - references to all the associated data. If we didn't do this - GC would bite us badly. */ - Lisp_Object gui = gui_parse_item_keywords_no_errors (entry); - if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))) - { - Lisp_Object rest = - Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))); - Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest); - } - else - { - XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = - Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui); - } - - tvitem.item.lParam = mswindows_register_gui_item (gui, domain); + if (GUI_ITEMP (item)) + { + tvitem.item.lParam = mswindows_register_gui_item (item, domain); tvitem.item.mask |= TVIF_PARAM; - GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, tvitem.item.pszText); } else - GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.item.pszText); + GET_C_STRING_OS_DATA_ALLOCA (item, tvitem.item.pszText); tvitem.item.cchTextMax = strlen (tvitem.item.pszText); if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, 0, (LPARAM)&tvitem)) == 0) - signal_simple_error ("error adding tree view entry", entry); + signal_simple_error ("error adding tree view entry", item); return ret; } @@ -2476,12 +2584,13 @@ mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instant wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* define a root */ - parent = add_tree_item (image_instance, - wnd, NULL, IMAGE_INSTANCE_WIDGET_TEXT (ii), TRUE, - domain); + parent = add_tree_item (image_instance, wnd, NULL, + XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + TRUE, domain); /* recursively add items to the tree view */ - LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) + /* add items to the tab */ + LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { if (LISTP (XCAR (rest))) add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain); @@ -2492,46 +2601,31 @@ mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instant /* instantiate a tab control */ static TC_ITEM* add_tab_item (Lisp_Object image_instance, - HWND wnd, Lisp_Object entry, + HWND wnd, Lisp_Object item, Lisp_Object domain, int index) { TC_ITEM tvitem, *ret; tvitem.mask = TCIF_TEXT; - if (VECTORP (entry)) - { - /* we always maintain the real gui item at the head of the - list. We have to put them in the list in the first place - because the whole model assumes that the glyph instances have - references to all the associated data. If we didn't do this - GC would bite us badly. */ - Lisp_Object gui = gui_parse_item_keywords_no_errors (entry); - if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))) - { - Lisp_Object rest = - Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))); - Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest); - } - else - { - XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = - Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui); - } - - tvitem.lParam = mswindows_register_gui_item (gui, domain); + if (GUI_ITEMP (item)) + { + tvitem.lParam = mswindows_register_gui_item (item, domain); tvitem.mask |= TCIF_PARAM; - GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, tvitem.pszText); } else - GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.pszText); + { + CHECK_STRING (item); + GET_C_STRING_OS_DATA_ALLOCA (item, tvitem.pszText); + } tvitem.cchTextMax = strlen (tvitem.pszText); if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, index, (LPARAM)&tvitem)) < 0) - signal_simple_error ("error adding tab entry", entry); + signal_simple_error ("error adding tab entry", item); return ret; } @@ -2553,7 +2647,7 @@ mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object insta wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* add items to the tab */ - LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) + LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { add_tab_item (image_instance, wnd, XCAR (rest), domain, index); index++; @@ -2577,8 +2671,12 @@ mswindows_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop /* delete the pre-existing items */ SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0); + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = + Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + parse_gui_item_tree_children (val)); + /* add items to the tab */ - LIST_LOOP (rest, val) + LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { add_tab_item (image_instance, wnd, XCAR (rest), IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), index); @@ -2601,20 +2699,6 @@ mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiato 0, WS_EX_STATICEDGE); } -#if 0 -/* instantiate a static control possible for putting other things in */ -static void -mswindows_group_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, - Lisp_Object pointer_fg, Lisp_Object pointer_bg, - int dest_mask, Lisp_Object domain) -{ - mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "BUTTON", - WS_GROUP | BS_GROUPBOX | WS_BORDER, - WS_EX_CLIENTEDGE ); -} -#endif - /* instantiate a scrollbar control */ static void mswindows_scrollbar_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, @@ -2636,6 +2720,10 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); HANDLE wnd; Lisp_Object rest; + Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties), + Q_items, Qnil); + int len; + GET_LIST_LENGTH (data, len); /* Maybe ought to generalise this more but it may be very windows specific. In windows the window height of a combo box is the @@ -2643,6 +2731,9 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant before creating the window and then reset it to a single line after the window is created so that redisplay does the right thing. */ + widget_instantiate_1 (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, len + 1, 0, 0); + mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "COMBOBOX", WS_BORDER | WS_TABSTOP | CBS_DROPDOWN @@ -2754,6 +2845,28 @@ mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object p return Qunbound; } +LRESULT WINAPI +mswindows_control_wnd_proc (HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_NOTIFY: + case WM_COMMAND: + case WM_CTLCOLORBTN: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORSTATIC: + case WM_CTLCOLORSCROLLBAR: + + return mswindows_wnd_proc (GetParent (hwnd), message, wParam, lParam); + default: + return DefWindowProc (hwnd, message, wParam, lParam); + } +} + +#endif /* HAVE_WIDGETS */ + /************************************************************************/ /* initialization */ @@ -2788,6 +2901,7 @@ image_instantiator_format_create_glyphs_mswindows (void) { IIFORMAT_VALID_CONSOLE (mswindows, nothing); IIFORMAT_VALID_CONSOLE (mswindows, string); + IIFORMAT_VALID_CONSOLE (mswindows, layout); IIFORMAT_VALID_CONSOLE (mswindows, formatted_string); IIFORMAT_VALID_CONSOLE (mswindows, inherit); /* image-instantiator types */ @@ -2813,6 +2927,7 @@ image_instantiator_format_create_glyphs_mswindows (void) #ifdef HAVE_GIF IIFORMAT_VALID_CONSOLE (mswindows, gif); #endif +#ifdef HAVE_WIDGETS /* button widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, button); IIFORMAT_HAS_DEVMETHOD (mswindows, button, property); @@ -2827,10 +2942,7 @@ image_instantiator_format_create_glyphs_mswindows (void) INITIALIZE_DEVICE_IIFORMAT (mswindows, widget); IIFORMAT_HAS_DEVMETHOD (mswindows, widget, property); IIFORMAT_HAS_DEVMETHOD (mswindows, widget, set_property); -#if 0 - INITIALIZE_DEVICE_IIFORMAT (mswindows, group); - IIFORMAT_HAS_DEVMETHOD (mswindows, group, instantiate); -#endif + /* label */ INITIALIZE_DEVICE_IIFORMAT (mswindows, label); IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate); @@ -2858,7 +2970,7 @@ image_instantiator_format_create_glyphs_mswindows (void) INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control); IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate); IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, set_property); - +#endif /* windows bitmap format */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp"); IIFORMAT_HAS_METHOD (bmp, validate); diff --git a/src/glyphs-msw.h b/src/glyphs-msw.h index 8371d0a..3783c90 100644 --- a/src/glyphs-msw.h +++ b/src/glyphs-msw.h @@ -34,8 +34,7 @@ Boston, MA 02111-1307, USA. */ struct mswindows_image_instance_data { - HBITMAP bitmap; - HBITMAP mask; + HBITMAP* bitmaps; HICON icon; }; @@ -43,14 +42,22 @@ struct mswindows_image_instance_data ((struct mswindows_image_instance_data *) (i)->data) #define IMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \ - (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmap) + (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps[0]) +#define IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE(i,slice) \ + (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps[slice]) +#define IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES(i) \ + (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps) #define IMAGE_INSTANCE_MSWINDOWS_MASK(i) \ - (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->mask) + (HBITMAP)(IMAGE_INSTANCE_PIXMAP_MASK (i)) #define IMAGE_INSTANCE_MSWINDOWS_ICON(i) \ (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->icon) #define XIMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \ IMAGE_INSTANCE_MSWINDOWS_BITMAP (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE(i,slice) \ + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (XIMAGE_INSTANCE (i,slice)) +#define XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES(i) \ + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_MSWINDOWS_MASK(i) \ IMAGE_INSTANCE_MSWINDOWS_MASK (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_MSWINDOWS_ICON(i) \ @@ -78,5 +85,19 @@ mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image, #define XWIDGET_INSTANCE_MSWINDOWS_HANDLE(i) \ WIDGET_INSTANCE_MSWINDOWS_HANDLE (XIMAGE_INSTANCE (i)) +struct mswindows_subwindow_data +{ + HWND clip_window; +}; + +#define MSWINDOWS_SUBWINDOW_DATA(i) \ +((struct mswindows_subwindow_data *) (i)->data) + +#define IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \ + (MSWINDOWS_SUBWINDOW_DATA (i)->clip_window) + +#define XIMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \ + IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (XIMAGE_INSTANCE (i)) + #endif /* HAVE_MS_WINDOWS */ #endif /* _XEMACS_GLYPHS_MSW_H_ */ diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index 917739d..69c3efe 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -1,5 +1,5 @@ /* Widget-specific glyph objects. - Copyright (C) 1998 Andy Piper + Copyright (C) 1998, 1999 Andy Piper. This file is part of XEmacs. @@ -45,10 +45,6 @@ Lisp_Object Qedit_field; DEFINE_IMAGE_INSTANTIATOR_FORMAT (scrollbar); Lisp_Object Qscrollbar; DEFINE_IMAGE_INSTANTIATOR_FORMAT (widget); -#if 0 -DEFINE_IMAGE_INSTANTIATOR_FORMAT (group); -Lisp_Object Qgroup; -#endif DEFINE_IMAGE_INSTANTIATOR_FORMAT (label); Lisp_Object Qlabel; DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge); @@ -57,13 +53,20 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree_view); Lisp_Object Qtree_view; DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab_control); Lisp_Object Qtab_control; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (layout); +Lisp_Object Qlayout; Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items; -Lisp_Object Q_image, Q_text, Q_percent; +Lisp_Object Q_image, Q_text, Q_percent, Q_orientation, Q_justify, Q_border; +Lisp_Object Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; -#define WIDGET_BORDER_HEIGHT 2 +#define WIDGET_BORDER_HEIGHT 4 #define WIDGET_BORDER_WIDTH 4 +#ifdef DEBUG_WIDGETS +int debug_widget_instances; +#endif + /* TODO: - more complex controls. - tooltips for controls. @@ -96,7 +99,7 @@ widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face, int ch=0, cw=0; widget_face_font_info (domain, face, &ch, &cw); if (height) - *height = th * (ch + 2 * WIDGET_BORDER_HEIGHT); + *height = th * ch + 2 * WIDGET_BORDER_HEIGHT; if (width) *width = tw * cw + 2 * WIDGET_BORDER_WIDTH; } @@ -108,7 +111,7 @@ widget_possible_dest_types (void) } static void -check_valid_glyph_or_image (Lisp_Object data) +check_valid_glyph_or_instantiator (Lisp_Object data) { Lisp_Object glyph = data; if (SYMBOLP (data)) @@ -116,11 +119,36 @@ check_valid_glyph_or_image (Lisp_Object data) if (IMAGE_INSTANCEP (glyph)) CHECK_IMAGE_INSTANCE (glyph); - else if (!CONSP (glyph)) + else if (!CONSP (glyph) && !VECTORP (glyph)) CHECK_BUFFER_GLYPH (glyph); } static void +check_valid_orientation (Lisp_Object data) +{ + if (!EQ (data, Qhorizontal) + && + !EQ (data, Qvertical)) + signal_simple_error ("unknown orientation for layout", data); +} + +static void +check_valid_justification (Lisp_Object data) +{ + if (!EQ (data, Qleft) && !EQ (data, Qright) && !EQ (data, Qcenter)) + signal_simple_error ("unknown justification for layout", data); +} + +static void +check_valid_border (Lisp_Object data) +{ + if (!EQ (data, Qt) && !EQ (data, Qetched_in) && !EQ (data, Qetched_out) + && !EQ (data, Qbevel_in) && !EQ (data, Qbevel_out) + && !GLYPHP (data) && !VECTORP (data)) + signal_simple_error ("unknown border style for layout", data); +} + +static void check_valid_anything (Lisp_Object data) { } @@ -179,6 +207,58 @@ check_valid_item_list (Lisp_Object data) check_valid_item_list_1 (items); } +static void +check_valid_glyph_or_instantiator_list (Lisp_Object data) +{ + Lisp_Object rest; + + CHECK_LIST (data); + EXTERNAL_LIST_LOOP (rest, data) + { + check_valid_glyph_or_instantiator (XCAR (rest)); + } +} + +static Lisp_Object +glyph_instantiator_to_glyph (Lisp_Object sym) +{ + /* This function calls lisp. */ + Lisp_Object glyph = sym; + struct gcpro gcpro1; + + GCPRO1 (glyph); + /* if we have a symbol get at the actual data */ + if (SYMBOLP (glyph)) + glyph = XSYMBOL (glyph)->value; + + if (CONSP (glyph)) + glyph = Feval (glyph); + + /* Be really helpful to the user. */ + if (VECTORP (glyph)) + { + glyph = call1 (intern ("make-glyph"), glyph); + } + + /* substitute the new glyph */ + RETURN_UNGCPRO (glyph); +} + +static void +substitute_keyword_value (Lisp_Object inst, Lisp_Object key, Lisp_Object val) +{ + int i; + /* substitute the new glyph */ + for (i = 0; i < XVECTOR_LENGTH (inst); i++) + { + if (EQ (key, XVECTOR_DATA (inst)[i])) + { + XVECTOR_DATA (inst)[i+1] = val; + break; + } + } +} + /* wire widget property invocations to specific widgets ... The problem we are solving here is that when instantiators get converted to instances they lose some type information (they just become @@ -289,25 +369,9 @@ widget_normalize (Lisp_Object inst, Lisp_Object console_type) same reasons we normalize file to data. */ if (!NILP (glyph)) { - int i; - struct gcpro gcpro1; - if (SYMBOLP (glyph)) - glyph = XSYMBOL (glyph)->value; - GCPRO1 (glyph); - - if (CONSP (glyph)) - glyph = Feval (glyph); - /* substitute the new glyph */ - for (i = 0; i < XVECTOR_LENGTH (inst); i++) - { - if (EQ (Q_image, XVECTOR_DATA (inst)[i])) - { - XVECTOR_DATA (inst)[i+1] = glyph; - break; - } - } - UNGCPRO; + substitute_keyword_value (inst, Q_image, glyph_instantiator_to_glyph (glyph)); } + return inst; } @@ -318,7 +382,7 @@ initialize_widget_image_instance (struct Lisp_Image_Instance *ii, Lisp_Object ty IMAGE_INSTANCE_WIDGET_TYPE (ii) = type; IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil; IMAGE_INSTANCE_WIDGET_FACE (ii) = Vwidget_face; - IMAGE_INSTANCE_WIDGET_ITEM (ii) = allocate_gui_item (); + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = allocate_gui_item (); } /* Instantiate a button widget. Unfortunately instantiated widgets are @@ -327,7 +391,7 @@ initialize_widget_image_instance (struct Lisp_Image_Instance *ii, Lisp_Object ty want to display it in and BitBlt it. So image instances can have a many-to-one relationship with things you see, whereas widgets can only be one-to-one (i.e. per frame) */ -static void +void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain, int default_textheight, @@ -341,6 +405,7 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pixheight = find_keyword_in_vector (instantiator, Q_pixel_height); Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor); Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image); + Lisp_Object props = find_keyword_in_vector (instantiator, Q_properties); int pw=0, ph=0, tw=0, th=0; /* this just does pixel type sizing */ @@ -357,8 +422,7 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, IMAGE_INSTANCE_WIDGET_FACE (ii) = Fget_face (face); /* data items for some widgets */ - IMAGE_INSTANCE_WIDGET_PROPS (ii) = - find_keyword_in_vector (instantiator, Q_properties); + IMAGE_INSTANCE_WIDGET_PROPS (ii) = props; /* retrieve the gui item information. This is easy if we have been provided with a vector, more difficult if we have just been given @@ -366,14 +430,24 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, if (STRINGP (desc) || NILP (desc)) { /* big cheat - we rely on the fact that a gui item looks like an instantiator */ - IMAGE_INSTANCE_WIDGET_ITEM (ii) = + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = gui_parse_item_keywords_no_errors (instantiator); IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc; } else - IMAGE_INSTANCE_WIDGET_ITEM (ii) = + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = gui_parse_item_keywords_no_errors (desc); + /* parse more gui items out of the properties */ + if (!NILP (props)) + { + Lisp_Object items = Fplist_get (props, Q_items, Qnil); + if (!NILP (items)) + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = + Fcons (IMAGE_INSTANCE_WIDGET_ITEMS (ii), + parse_gui_item_tree_children (items)); + } + /* normalize size information */ if (!NILP (width)) tw = XINT (width); @@ -421,6 +495,12 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = pw; IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = ph; +#ifdef DEBUG_WIDGETS + debug_widget_instances++; + stderr_out ("instantiated "); + debug_print (instantiator); + stderr_out ("%d widgets instantiated\n", debug_widget_instances); +#endif } static void @@ -432,11 +512,11 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, pointer_bg, dest_mask, domain, 1, 0, 0); } -/* combo-box generic instantiation - get he heigh right */ +/* tree-view generic instantiation - get the height right */ static void -combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, - Lisp_Object pointer_fg, Lisp_Object pointer_bg, - int dest_mask, Lisp_Object domain) +tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) { Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties), Q_items, Qnil); @@ -483,6 +563,209 @@ static_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, } +/***************************************************************************** + * widget layout * + *****************************************************************************/ +static int +layout_possible_dest_types (void) +{ + return IMAGE_LAYOUT_MASK; +} + +/* we need to convert things like glyphs to images, eval expressions + etc.*/ +static Lisp_Object +layout_normalize (Lisp_Object inst, Lisp_Object console_type) +{ + /* This function can call lisp */ + Lisp_Object items = find_keyword_in_vector (inst, Q_items); + Lisp_Object border = find_keyword_in_vector (inst, Q_border); + /* we need to eval glyph if its an expression, we do this for the + same reasons we normalize file to data. */ + if (!NILP (items)) + { + Lisp_Object rest; + LIST_LOOP (rest, items) + { + /* substitute the new glyph */ + Fsetcar (rest, glyph_instantiator_to_glyph (XCAR (rest))); + } + } + /* normalize the border spec. */ + if (VECTORP (border) || CONSP (border)) + { + substitute_keyword_value (inst, Q_border, glyph_instantiator_to_glyph (border)); + } + return inst; +} + +/* Instantiate a layout widget. */ +static void +layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object rest, device = IMAGE_INSTANCE_DEVICE (ii); + Lisp_Object frame = FW_FRAME (domain); + Lisp_Object items = find_keyword_in_vector (instantiator, Q_items); + Lisp_Object width = find_keyword_in_vector (instantiator, Q_pixel_width); + Lisp_Object height = find_keyword_in_vector (instantiator, Q_pixel_height); + Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation); + Lisp_Object justify = find_keyword_in_vector (instantiator, Q_justify); + Lisp_Object border = find_keyword_in_vector (instantiator, Q_border); + Lisp_Object children = Qnil; + int pw = 0, ph = 0, x, y, maxph = 0, maxpw = 0, nitems = 0, + horiz_spacing, vert_spacing, ph_adjust = 0; + + if (NILP (frame)) + signal_simple_error ("No selected frame", device); + + if (!(dest_mask & IMAGE_LAYOUT_MASK)) + incompatible_image_types (instantiator, dest_mask, IMAGE_LAYOUT_MASK); + + if (NILP (orient)) + orient = Qvertical; + + if (EQ (border, Qt)) + border = Qetched_in; + + ii->data = 0; + IMAGE_INSTANCE_TYPE (ii) = IMAGE_LAYOUT; + IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0; + IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii) = frame; + IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border; + + /* normalize size information */ + if (!NILP (width)) + pw = XINT (width); + if (!NILP (height)) + ph = XINT (height); + + /* flip through the items to work out how much stuff we have to display */ + LIST_LOOP (rest, items) + { + Lisp_Object glyph = XCAR (rest); + int gheight = glyph_height (glyph, Qnil, DEFAULT_INDEX, domain); + int gwidth = glyph_width (glyph, Qnil, DEFAULT_INDEX, domain); + nitems ++; + if (EQ (orient, Qhorizontal)) + { + maxph = max (maxph, gheight); + maxpw += gwidth; + } + else if (EQ (orient, Qvertical)) + { + maxpw = max (maxpw, gwidth); + maxph += gheight; + } + } + + /* work out spacing between items and bounds of the layout */ + if (!pw) + { + /* No user provided width so we just do default spacing. */ + horiz_spacing = WIDGET_BORDER_WIDTH * 2; + if (EQ (orient, Qhorizontal)) + pw = maxpw + (nitems + 1) * horiz_spacing; + else + pw = maxpw + 2 * horiz_spacing; + } + else if (pw < maxpw) + /* The user wants a smaller space than the largest item, so we + just provide default spacing and will let the output routines + clip.. */ + horiz_spacing = WIDGET_BORDER_WIDTH * 2; + else if (EQ (orient, Qhorizontal)) + /* We have a larger area to display in so distribute the space + evenly. */ + horiz_spacing = (pw - maxpw) / (nitems + 1); + else + horiz_spacing = (pw - maxpw) / 2; + + /* Do the border now so that we can adjust the layout. */ + if (GLYPHP (border)) + { + /* We are going to be sneaky here and add the border text as + just another child, the layout and output routines don't know + this and will just display at the offsets we prescribe. */ + Lisp_Object bglyph = glyph_image_instance (border, domain, ERROR_ME, 1); + + children = Fcons (bglyph, children); + XIMAGE_INSTANCE_XOFFSET (bglyph) = 10; /* Really, what should this be? */ + XIMAGE_INSTANCE_YOFFSET (bglyph) = 0; + + ph_adjust = (glyph_height (border, Qnil, DEFAULT_INDEX, domain) / 2); + IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust); + } + + /* Work out vertical spacings. */ + if (!ph) + { + vert_spacing = WIDGET_BORDER_HEIGHT * 2; + if (EQ (orient, Qvertical)) + ph = maxph + (nitems + 1) * vert_spacing + ph_adjust; + else + ph = maxph + 2 * vert_spacing + ph_adjust; + } + else if (ph < maxph) + vert_spacing = WIDGET_BORDER_HEIGHT * 2; + else if (EQ (orient, Qvertical)) + vert_spacing = (ph - (maxph + ph_adjust)) / (nitems + 1); + else + vert_spacing = (ph - (maxph + ph_adjust)) / 2; + + y = vert_spacing + ph_adjust; + x = horiz_spacing; + + /* Now flip through putting items where we want them, paying + attention to justification. */ + LIST_LOOP (rest, items) + { + /* make sure the image is instantiated */ + Lisp_Object glyph = XCAR (rest); + Lisp_Object gii = glyph_image_instance (glyph, domain, ERROR_ME, 1); + int gwidth = glyph_width (glyph, Qnil, DEFAULT_INDEX, domain); + int gheight = glyph_height (glyph, Qnil, DEFAULT_INDEX, domain); + + children = Fcons (gii, children); + + if (EQ (orient, Qhorizontal)) + { + if (EQ (justify, Qright)) + y = ph - (gheight + vert_spacing); + else if (EQ (justify, Qcenter)) + y = (ph - gheight) / 2; + } + else if (EQ (orient, Qvertical)) + { + if (EQ (justify, Qright)) + x = pw - (gwidth + horiz_spacing); + else if (EQ (justify, Qcenter)) + x = (pw - gwidth) / 2; + } + + XIMAGE_INSTANCE_XOFFSET (gii) = x; + XIMAGE_INSTANCE_YOFFSET (gii) = y; + + if (EQ (orient, Qhorizontal)) + { + x += (gwidth + horiz_spacing); + } + else if (EQ (orient, Qvertical)) + { + y += (gheight + vert_spacing); + } + } + + IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children; + assert (pw && ph); + IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = pw; + IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = ph; +} + + /************************************************************************/ /* initialization */ /************************************************************************/ @@ -498,6 +781,14 @@ syms_of_glyphs_widget (void) defkeyword (&Q_image, ":image"); defkeyword (&Q_percent, ":percent"); defkeyword (&Q_text, ":text"); + defkeyword (&Q_orientation, ":orientation"); + defkeyword (&Q_justify, ":justify"); + defkeyword (&Q_border, ":border"); + + defsymbol (&Qetched_in, "etched-in"); + defsymbol (&Qetched_out, "etched-out"); + defsymbol (&Qbevel_in, "bevel-in"); + defsymbol (&Qbevel_out, "bevel-out"); } void @@ -536,7 +827,8 @@ image_instantiator_format_create_glyphs_widget (void) IIFORMAT_HAS_SHARED_METHOD (button, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (button, instantiate, widget); IIFORMAT_HAS_SHARED_METHOD (button, normalize, widget); - IIFORMAT_VALID_KEYWORD (button, Q_image, check_valid_glyph_or_image); + IIFORMAT_VALID_KEYWORD (button, + Q_image, check_valid_glyph_or_instantiator); VALID_WIDGET_KEYWORDS (button); VALID_GUI_KEYWORDS (button); @@ -552,7 +844,6 @@ image_instantiator_format_create_glyphs_widget (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box"); IIFORMAT_HAS_METHOD (combo_box, validate); IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget); - IIFORMAT_HAS_METHOD (combo_box, instantiate); VALID_GUI_KEYWORDS (combo_box); IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int); @@ -576,7 +867,7 @@ image_instantiator_format_create_glyphs_widget (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge"); IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget); IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget); - IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, combo_box); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget); VALID_WIDGET_KEYWORDS (progress_gauge); VALID_GUI_KEYWORDS (progress_gauge); @@ -584,7 +875,7 @@ image_instantiator_format_create_glyphs_widget (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree_view, "tree-view"); IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box); IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget); - IIFORMAT_HAS_SHARED_METHOD (tree_view, instantiate, combo_box); + IIFORMAT_HAS_METHOD (tree_view, instantiate); VALID_WIDGET_KEYWORDS (tree_view); VALID_GUI_KEYWORDS (tree_view); IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list); @@ -605,23 +896,30 @@ image_instantiator_format_create_glyphs_widget (void) VALID_WIDGET_KEYWORDS (label); IIFORMAT_VALID_KEYWORD (label, Q_descriptor, check_valid_string); -#if 0 - /* group */ - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (group, "group"); - IIFORMAT_HAS_SHARED_METHOD (group, possible_dest_types, widget); - IIFORMAT_HAS_METHOD (group, instantiate); - - IIFORMAT_VALID_KEYWORD (group, Q_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (group, Q_height, check_valid_int); - IIFORMAT_VALID_KEYWORD (group, Q_pixel_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (group, Q_pixel_height, check_valid_int); - IIFORMAT_VALID_KEYWORD (group, Q_face, check_valid_face); - IIFORMAT_VALID_KEYWORD (group, Q_background, check_valid_string); - IIFORMAT_VALID_KEYWORD (group, Q_descriptor, check_valid_string); + /* layout */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (layout, "layout"); + IIFORMAT_HAS_METHOD (layout, possible_dest_types); + IIFORMAT_HAS_METHOD (layout, instantiate); + IIFORMAT_HAS_METHOD (layout, normalize); + IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int); + IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int); + IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation); + IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification); + IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border); + IIFORMAT_VALID_KEYWORD (layout, Q_items, + check_valid_glyph_or_instantiator_list); +} + +void +reinit_vars_of_glyphs_widget (void) +{ +#ifdef DEBUG_WIDGETS + debug_widget_instances = 0; #endif } void vars_of_glyphs_widget (void) { + reinit_vars_of_glyphs_widget (); } diff --git a/src/glyphs-x.c b/src/glyphs-x.c index a1f0051..d229d67 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -40,9 +40,11 @@ Boston, MA 02111-1307, USA. */ Many changes for color work and optimizations by Jareth Hein for 21.0 Switch of GIF/JPEG/PNG to new EImage intermediate code by Jareth Hein for 21.0 TIFF code by Jareth Hein for 21.0 - GIF/JPEG/PNG/TIFF code moved to new glyph-eimage.c for 21.0 + GIF/JPEG/PNG/TIFF code moved to new glyph-eimage.c by Andy Piper for 21.0 + Subwindow and Widget support by Andy Piper for 21.2 TODO: + Support the GrayScale, StaticColor and StaticGray visual classes. Convert images.el to C and stick it in here? */ @@ -52,7 +54,9 @@ Boston, MA 02111-1307, USA. */ #include "console-x.h" #include "glyphs-x.h" #include "objects-x.h" +#ifdef HAVE_WIDGETS #include "gui-x.h" +#endif #include "xmu.h" #include "buffer.h" @@ -73,7 +77,7 @@ Boston, MA 02111-1307, USA. */ #include "file-coding.h" #endif -#ifdef LWLIB_USES_MOTIF +#ifdef LWLIB_WIDGETS_MOTIF #include #endif #include @@ -94,6 +98,7 @@ DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); #ifdef HAVE_JPEG DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); #endif @@ -122,11 +127,17 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (font); DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect); +#ifdef HAVE_WIDGETS DEFINE_DEVICE_IIFORMAT (x, widget); DEFINE_DEVICE_IIFORMAT (x, button); DEFINE_DEVICE_IIFORMAT (x, progress_gauge); DEFINE_DEVICE_IIFORMAT (x, edit_field); +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 DEFINE_DEVICE_IIFORMAT (x, combo_box); +#endif +DEFINE_DEVICE_IIFORMAT (x, tab_control); +DEFINE_DEVICE_IIFORMAT (x, label); +#endif static void cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, @@ -135,6 +146,11 @@ static void cursor_font_instantiate (Lisp_Object image_instance, int dest_mask, Lisp_Object domain); +#ifdef HAVE_WIDGETS +static void +update_widget_face (struct Lisp_Image_Instance* ii, Lisp_Object domain); +#endif + #include "bitmaps.h" @@ -169,6 +185,13 @@ convert_EImage_to_XImage (Lisp_Object device, int width, int height, vis = DEVICE_X_VISUAL (XDEVICE(device)); depth = DEVICE_X_DEPTH(XDEVICE(device)); + if (vis->class == GrayScale || vis->class == StaticColor || + vis->class == StaticGray) + { + /* #### Implement me!!! */ + return NULL; + } + if (vis->class == PseudoColor) { /* Quantize the image and get a histogram while we're at it. @@ -357,6 +380,10 @@ x_print_image_instance (struct Lisp_Image_Instance *p, } } +#ifdef DEBUG_WIDGETS +extern int debug_widget_instances; +#endif + static void x_finalize_image_instance (struct Lisp_Image_Instance *p) { @@ -371,8 +398,12 @@ x_finalize_image_instance (struct Lisp_Image_Instance *p) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { - XtUnmanageChild (IMAGE_INSTANCE_X_WIDGET_ID (p)); - XtDestroyWidget (IMAGE_INSTANCE_X_WIDGET_ID (p)); +#ifdef DEBUG_WIDGETS + debug_widget_instances--; + stderr_out ("widget destroyed, %d left\n", debug_widget_instances); +#endif + lw_destroy_widget (IMAGE_INSTANCE_X_WIDGET_ID (p)); + lw_destroy_widget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0; } } @@ -384,14 +415,27 @@ x_finalize_image_instance (struct Lisp_Image_Instance *p) } else { - if (IMAGE_INSTANCE_X_PIXMAP (p)) - XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP (p)); + int i; + if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)) + disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p)); + if (IMAGE_INSTANCE_X_MASK (p) && IMAGE_INSTANCE_X_MASK (p) != IMAGE_INSTANCE_X_PIXMAP (p)) XFreePixmap (dpy, IMAGE_INSTANCE_X_MASK (p)); - IMAGE_INSTANCE_X_PIXMAP (p) = 0; - IMAGE_INSTANCE_X_MASK (p) = 0; + IMAGE_INSTANCE_PIXMAP_MASK (p) = 0; + if (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)) + { + for (i = 0; i < IMAGE_INSTANCE_PIXMAP_MAXSLICE (p); i++) + if (IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)) + { + XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)); + IMAGE_INSTANCE_X_PIXMAP_SLICE (p, i) = 0; + } + xfree (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)); + IMAGE_INSTANCE_X_PIXMAP_SLICES (p) = 0; + } + if (IMAGE_INSTANCE_X_CURSOR (p)) { XFreeCursor (dpy, IMAGE_INSTANCE_X_CURSOR (p)); @@ -408,7 +452,13 @@ x_finalize_image_instance (struct Lisp_Image_Instance *p) } } } - if (IMAGE_INSTANCE_X_PIXELS (p)) + /* You can sometimes have pixels without a live device. I forget + why, but that's why we free them here if we have a pixmap type + image instance. It probably means that we might also get a memory + leak with widgets. */ + if (IMAGE_INSTANCE_TYPE (p) != IMAGE_WIDGET + && IMAGE_INSTANCE_TYPE (p) != IMAGE_SUBWINDOW + && IMAGE_INSTANCE_X_PIXELS (p)) { xfree (IMAGE_INSTANCE_X_PIXELS (p)); IMAGE_INSTANCE_X_PIXELS (p) = 0; @@ -460,9 +510,13 @@ x_image_instance_hash (struct Lisp_Image_Instance *p, int depth) static void x_initialize_pixmap_image_instance (struct Lisp_Image_Instance *ii, + int slices, enum image_instance_type type) { ii->data = xnew_and_zero (struct x_image_instance_data); + IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices; + IMAGE_INSTANCE_X_PIXMAP_SLICES (ii) = + xnew_array_and_zero (Pixmap, slices); IMAGE_INSTANCE_TYPE (ii) = type; IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = Qnil; IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (ii) = Qnil; @@ -632,7 +686,7 @@ write_lisp_string_to_temp_file (Lisp_Object string, char *filename_out) /* Get the data while doing the conversion */ while (1) { - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; /* It does seem the flushes are necessary... */ @@ -781,6 +835,7 @@ init_image_instance_from_x_image (struct Lisp_Image_Instance *ii, Colormap cmap, unsigned long *pixels, int npixels, + int slices, Lisp_Object instantiator) { Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); @@ -816,13 +871,15 @@ init_image_instance_from_x_image (struct Lisp_Image_Instance *ii, XFreeGC (dpy, gc); - x_initialize_pixmap_image_instance (ii, IMAGE_COLOR_PIXMAP); + x_initialize_pixmap_image_instance (ii, slices, IMAGE_COLOR_PIXMAP); IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = find_keyword_in_vector (instantiator, Q_file); + /* Fixup a set of pixmaps. */ IMAGE_INSTANCE_X_PIXMAP (ii) = pixmap; - IMAGE_INSTANCE_X_MASK (ii) = 0; + + IMAGE_INSTANCE_PIXMAP_MASK (ii) = 0; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = ximage->width; IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = ximage->height; IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = ximage->depth; @@ -832,8 +889,44 @@ init_image_instance_from_x_image (struct Lisp_Image_Instance *ii, } static void +image_instance_add_x_image (struct Lisp_Image_Instance *ii, + XImage *ximage, + int slice, + Lisp_Object instantiator) +{ + Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); + Display *dpy; + GC gc; + Drawable d; + Pixmap pixmap; + + dpy = DEVICE_X_DISPLAY (XDEVICE (device)); + d = XtWindow(DEVICE_XT_APP_SHELL (XDEVICE (device))); + + pixmap = XCreatePixmap (dpy, d, ximage->width, + ximage->height, ximage->depth); + if (!pixmap) + signal_simple_error ("Unable to create pixmap", instantiator); + + gc = XCreateGC (dpy, pixmap, 0, NULL); + if (!gc) + { + XFreePixmap (dpy, pixmap); + signal_simple_error ("Unable to create GC", instantiator); + } + + XPutImage (dpy, pixmap, gc, ximage, 0, 0, 0, 0, + ximage->width, ximage->height); + + XFreeGC (dpy, gc); + + IMAGE_INSTANCE_X_PIXMAP_SLICE (ii, slice) = pixmap; +} + +static void x_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, int width, int height, + int slices, unsigned char *eimage, int dest_mask, Lisp_Object instantiator, @@ -843,29 +936,38 @@ x_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, Colormap cmap = DEVICE_X_COLORMAP (XDEVICE(device)); unsigned long *pixtbl = NULL; int npixels = 0; + int slice; XImage* ximage; - ximage = convert_EImage_to_XImage (device, width, height, eimage, - &pixtbl, &npixels); - if (!ximage) + for (slice = 0; slice < slices; slice++) { - if (pixtbl) xfree (pixtbl); - signal_image_error("EImage to XImage conversion failed", instantiator); - } + ximage = convert_EImage_to_XImage (device, width, height, + eimage + (width * height * 3 * slice), + &pixtbl, &npixels); + if (!ximage) + { + if (pixtbl) xfree (pixtbl); + signal_image_error("EImage to XImage conversion failed", instantiator); + } - /* Now create the pixmap and set up the image instance */ - init_image_instance_from_x_image (ii, ximage, dest_mask, - cmap, pixtbl, npixels, - instantiator); + /* Now create the pixmap and set up the image instance */ + if (slice == 0) + init_image_instance_from_x_image (ii, ximage, dest_mask, + cmap, pixtbl, npixels, slices, + instantiator); + else + image_instance_add_x_image (ii, ximage, slice, instantiator); - if (ximage) - { - if (ximage->data) - { - xfree (ximage->data); - ximage->data = 0; - } - XDestroyImage (ximage); + if (ximage) + { + if (ximage->data) + { + xfree (ximage->data); + ximage->data = 0; + } + XDestroyImage (ximage); + ximage = 0; + } } } @@ -940,7 +1042,7 @@ init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii, IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK); - x_initialize_pixmap_image_instance (ii, type); + x_initialize_pixmap_image_instance (ii, 1, type); IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = width; IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = height; IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = @@ -1244,7 +1346,7 @@ x_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, visual = DEVICE_X_VISUAL (XDEVICE(device)); #endif - x_initialize_pixmap_image_instance (ii, type); + x_initialize_pixmap_image_instance (ii, 1, type); assert (!NILP (data)); @@ -1354,7 +1456,7 @@ x_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, pixels = NULL; IMAGE_INSTANCE_X_PIXMAP (ii) = pixmap; - IMAGE_INSTANCE_X_MASK (ii) = mask; + IMAGE_INSTANCE_PIXMAP_MASK (ii) = (void*)mask; IMAGE_INSTANCE_X_COLORMAP (ii) = cmap; IMAGE_INSTANCE_X_PIXELS (ii) = pixels; IMAGE_INSTANCE_X_NPIXELS (ii) = npixels; @@ -1882,7 +1984,7 @@ font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* #### call XQueryTextExtents() and check_pointer_sizes() here. */ - x_initialize_pixmap_image_instance (ii, IMAGE_POINTER); + x_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER); IMAGE_INSTANCE_X_CURSOR (ii) = XCreateGlyphCursor (dpy, source, mask, source_char, mask_char, &fg, &bg); @@ -1935,7 +2037,7 @@ cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, if ((i = XmuCursorNameToIndex (name_ext)) == -1) signal_simple_error ("Unrecognized cursor-font name", data); - x_initialize_pixmap_image_instance (ii, IMAGE_POINTER); + x_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER); IMAGE_INSTANCE_X_CURSOR (ii) = XCreateFontCursor (dpy, i); foreground = find_keyword_in_vector (instantiator, Q_foreground); if (NILP (foreground)) @@ -1960,7 +2062,7 @@ x_colorize_image_instance (Lisp_Object image_instance, IMAGE_INSTANCE_TYPE (p) = IMAGE_COLOR_PIXMAP; /* Make sure there aren't two pointers to the same mask, causing it to get freed twice. */ - IMAGE_INSTANCE_X_MASK (p) = 0; + IMAGE_INSTANCE_PIXMAP_MASK (p) = 0; break; default: @@ -2008,33 +2110,41 @@ x_unmap_subwindow (struct Lisp_Image_Instance *p) if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { XUnmapWindow - (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)), - IMAGE_INSTANCE_X_SUBWINDOW_ID (p)); + (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p), + IMAGE_INSTANCE_X_CLIPWINDOW (p)); } else /* must be a widget */ { - XtUnmapWidget (IMAGE_INSTANCE_X_WIDGET_ID (p)); + XtUnmapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); } } /* map the subwindow. This is used by redisplay via redisplay_output_subwindow */ static void -x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y) +x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y, + struct display_glyph_area* dga) { if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { Window subwindow = IMAGE_INSTANCE_X_SUBWINDOW_ID (p); - Screen* screen = IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p); - XMapWindow (DisplayOfScreen (screen), subwindow); - XMoveWindow (DisplayOfScreen (screen), subwindow, x, y); + XMoveResizeWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p), + IMAGE_INSTANCE_X_CLIPWINDOW (p), + x, y, dga->width, dga->height); + XMoveWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p), + subwindow, -dga->xoffset, -dga->yoffset); + XMapWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p), + IMAGE_INSTANCE_X_CLIPWINDOW (p)); } else /* must be a widget */ { - XtMoveWidget (IMAGE_INSTANCE_X_WIDGET_ID (p), - x + IMAGE_INSTANCE_X_WIDGET_XOFFSET (p), - y + IMAGE_INSTANCE_X_WIDGET_YOFFSET (p)); - XtMapWidget (IMAGE_INSTANCE_X_WIDGET_ID (p)); + XtConfigureWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p), + x + IMAGE_INSTANCE_X_WIDGET_XOFFSET (p), + y + IMAGE_INSTANCE_X_WIDGET_YOFFSET (p), + dga->width, dga->height, 0); + XtMoveWidget (IMAGE_INSTANCE_X_WIDGET_ID (p), + -dga->xoffset, -dga->yoffset); + XtMapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); } } @@ -2043,14 +2153,47 @@ x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y) static void x_update_subwindow (struct Lisp_Image_Instance *p) { +#ifdef HAVE_WIDGETS if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET) { - widget_value* wv = xmalloc_widget_value (); - button_item_to_widget_value (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p), - wv, 1, 1); + Arg al[5]; + widget_value* wv = gui_items_to_widget_values + (IMAGE_INSTANCE_WIDGET_ITEMS (p)); + + /* This seems ugly, but I'm not sure what else to do. */ + if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qtab_control)) + { + widget_value* cur = 0; + /* Give each child label the correct foreground color. */ + Lisp_Object pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (p), + IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); + XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + XtSetArg (al [0], XtNtabForeground, fcolor.pixel); + + for (cur = wv->contents; cur; cur = cur->next) + { + if (cur->value) + { + cur->nargs = 1; + cur->args = al; + } + } + } + + /* now modify the widget */ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p), - wv, 1); + wv, True); + free_widget_value_tree (wv); + /* update the colors and font */ + update_widget_face (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); + /* We have to do this otherwise Motif will unceremoniously + resize us when the label gets set. */ + XtSetArg (al [0], XtNwidth, IMAGE_INSTANCE_WIDGET_WIDTH (p)); + XtSetArg (al [1], XtNheight, IMAGE_INSTANCE_WIDGET_HEIGHT (p)); + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (p), al, 2); } +#endif } /* instantiate and x type subwindow */ @@ -2085,14 +2228,22 @@ x_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, ii->data = xnew_and_zero (struct x_subwindow_data); IMAGE_INSTANCE_X_SUBWINDOW_PARENT (ii) = pw; - IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii) = xs; + IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (ii) = DisplayOfScreen (xs); xswa.backing_store = Always; valueMask |= CWBackingStore; xswa.colormap = DefaultColormapOfScreen (xs); valueMask |= CWColormap; - win = XCreateWindow (dpy, pw, 0, 0, w, h, 0, CopyFromParent, + /* Create a window for clipping */ + IMAGE_INSTANCE_X_CLIPWINDOW (ii) = + XCreateWindow (dpy, pw, 0, 0, w, h, 0, CopyFromParent, + InputOutput, CopyFromParent, valueMask, + &xswa); + + /* Now put the subwindow inside the clip window. */ + win = XCreateWindow (dpy, IMAGE_INSTANCE_X_CLIPWINDOW (ii), + 0, 0, w, h, 0, CopyFromParent, InputOutput, CopyFromParent, valueMask, &xswa); @@ -2134,24 +2285,77 @@ x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h) { if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW) { - XResizeWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii)), + XResizeWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (ii), IMAGE_INSTANCE_X_SUBWINDOW_ID (ii), w, h); } else /* must be a widget */ { Arg al[2]; + + if (!XtIsRealized (IMAGE_INSTANCE_X_WIDGET_ID (ii))) + { + Lisp_Object sw; + XSETIMAGE_INSTANCE (sw, ii); + signal_simple_error ("XEmacs bug: subwindow is not realized", sw); + } + XtSetArg (al [0], XtNwidth, (Dimension)w); XtSetArg (al [1], XtNheight, (Dimension)h); XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 2); } } + +#ifdef HAVE_WIDGETS + /************************************************************************/ /* widgets */ /************************************************************************/ static void +update_widget_face (struct Lisp_Image_Instance* ii, Lisp_Object domain) +{ + Arg al[3]; +#ifdef LWLIB_WIDGETS_MOTIF + XmFontList fontList; +#endif + + Lisp_Object pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + XColor bcolor; + + pixel = FACE_BACKGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + + XtSetArg (al [0], XtNbackground, bcolor.pixel); + XtSetArg (al [1], XtNforeground, fcolor.pixel); + +#ifdef LWLIB_WIDGETS_MOTIF + fontList = XmFontListCreate + (FONT_INSTANCE_X_FONT + (XFONT_INSTANCE (widget_face_font_info + (domain, IMAGE_INSTANCE_WIDGET_FACE (ii), + 0, 0))), XmSTRING_DEFAULT_CHARSET); + XtSetArg (al [2], XmNfontList, fontList ); +#else + XtSetArg (al [2], XtNfont, (void*)FONT_INSTANCE_X_FONT + (XFONT_INSTANCE (widget_face_font_info + (domain, + IMAGE_INSTANCE_WIDGET_FACE (ii), + 0, 0)))); +#endif + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 3); +#ifdef LWLIB_WIDGETS_MOTIF + XmFontListFree (fontList); +#endif +} + +static void x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain, @@ -2162,18 +2366,16 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, struct device* d = XDEVICE (device); Lisp_Object frame = FW_FRAME (domain); struct frame* f = XFRAME (frame); - XColor fcolor, bcolor; - Extbyte* nm=0; + char* nm=0; Widget wid; Arg al [32]; int ac = 0; int id = new_lwlib_id (); -#ifdef LWLIB_USES_MOTIF - XmFontList fontList; -#endif + widget_value* clip_wv; + XColor fcolor, bcolor; if (!DEVICE_X_P (d)) - signal_simple_error ("Not an mswindows device", device); + signal_simple_error ("Not an X device", device); /* have to set the type this late in case there is no device instantiation for a widget. But we can go ahead and do it without @@ -2185,15 +2387,46 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, ii->data = xnew_and_zero (struct x_subwindow_data); + /* Create a clip window to contain the subwidget. Incredibly the + XEmacs manager seems to be the most appropriate widget for + this. Nothing else is simple enough and yet does what is + required. */ + clip_wv = xmalloc_widget_value (); + + XtSetArg (al [ac], XtNresize, False); ac++; + XtSetArg (al [ac], XtNwidth, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; + XtSetArg (al [ac], XtNheight, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; + + clip_wv->enabled = True; + clip_wv->nargs = ac; + clip_wv->args = al; + clip_wv->name = xstrdup ("clip-window"); + clip_wv->value = xstrdup ("clip-window"); + + IMAGE_INSTANCE_X_CLIPWIDGET (ii) + = lw_create_widget ("clip-window", "clip-window", new_lwlib_id (), + clip_wv, FRAME_X_CONTAINER_WIDGET (f), + False, 0, 0, 0); + + free_widget_value_tree (clip_wv); + /* copy any args we were given */ + ac = 0; + if (wv->nargs) lw_add_value_args_to_args (wv, al, &ac); - /* add our own arguments */ + /* Fixup the colors. We have to do this *before* the widget gets + created so that Motif will fix up the shadow colors + correctly. Once the widget is created Motif won't do this + anymore...*/ pixel = FACE_FOREGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii), IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + pixel = FACE_BACKGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii), IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); @@ -2201,49 +2434,44 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, XtSetArg (al [ac], XtNbackground, bcolor.pixel); ac++; XtSetArg (al [ac], XtNforeground, fcolor.pixel); ac++; -#ifdef LWLIB_USES_MOTIF - fontList = XmFontListCreate - ((void*)FONT_INSTANCE_X_FONT - (XFONT_INSTANCE (widget_face_font_info - (domain, IMAGE_INSTANCE_WIDGET_FACE (ii), - 0, 0))), XmSTRING_DEFAULT_CHARSET); - XtSetArg (al [ac], XmNfontList, fontList ); ac++; -#else - XtSetArg (al [ac], XtNfont, (void*)FONT_INSTANCE_X_FONT - (XFONT_INSTANCE (widget_face_font_info - (domain, - IMAGE_INSTANCE_WIDGET_FACE (ii), - 0, 0)))); ac++; -#endif + /* we cannot allow widgets to resize themselves */ + XtSetArg (al [ac], XtNresize, False); ac++; + XtSetArg (al [ac], XtNwidth, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; + XtSetArg (al [ac], XtNheight, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; wv->nargs = ac; wv->args = al; - - wid = lw_create_widget (type, wv->name, id, wv, FRAME_X_CONTAINER_WIDGET (f), + + wid = lw_create_widget (type, wv->name, id, wv, IMAGE_INSTANCE_X_CLIPWIDGET (ii), False, 0, popup_selection_callback, 0); + IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)wid; IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id; -#ifdef LWLIB_USES_MOTIF - XmFontListFree (fontList); -#endif - /* because the EmacsManager is the widgets parent we have to - offset the redisplay of the widget by the amount the text - widget is inside the manager. */ + + /* update the font. */ + update_widget_face (ii, domain); + + /* Resize the widget here so that the values do not get copied by + lwlib. */ ac = 0; XtSetArg (al [ac], XtNwidth, (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; XtSetArg (al [ac], XtNheight, (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; - XtSetValues (wid, al, ac); - /* finally get offsets in the frame */ + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, ac); + /* because the EmacsManager is the widgets parent we have to + offset the redisplay of the widget by the amount the text + widget is inside the manager. */ ac = 0; XtSetArg (al [ac], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (ii)); ac++; XtSetArg (al [ac], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (ii)); ac++; XtGetValues (FRAME_X_TEXT_WIDGET (f), al, ac); - IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)wid; + XtMapWidget (wid); - free_widget_value (wv); + free_widget_value_tree (wv); } static Lisp_Object @@ -2254,7 +2482,7 @@ x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop, if (EQ (prop, Q_text)) { - Extbyte* str=0; + char* str; widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); CHECK_STRING (val); GET_C_STRING_OS_DATA_ALLOCA (val, str); @@ -2262,6 +2490,12 @@ x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop, lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False); return Qt; } + /* Modify the face properties of the widget */ + if (EQ (prop, Q_face)) + { + update_widget_face (ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + return Qt; + } return Qunbound; } @@ -2311,7 +2545,7 @@ x_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, { Arg al [2]; int ac =0; -#ifdef LWLIB_USES_MOTIF +#ifdef LWLIB_WIDGETS_MOTIF XtSetArg (al [ac], XmNlabelType, XmPIXMAP); ac++; XtSetArg (al [ac], XmNlabelPixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph));ac++; #else @@ -2389,6 +2623,7 @@ x_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, pointer_bg, dest_mask, domain, "text-field", wv); } +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 /* instantiate a combo control */ static void x_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, @@ -2396,27 +2631,116 @@ x_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int dest_mask, Lisp_Object domain) { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - Lisp_Object rest; - Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); - widget_value* wv = xmalloc_widget_value (); + widget_value * wv = 0; + /* This is not done generically because of sizing problems under + mswindows. */ + widget_instantiate_1 (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, 1, 0, 0); - button_item_to_widget_value (gui, wv, 1, 1); + wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "combo-box", wv); - /* add items to the combo box */ - LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) - { -#if 0 - Extbyte* str; - XmString xmstr; - GET_C_STRING_OS_DATA_ALLOCA (XCAR (rest), str); - xmstr = XmStringCreate (str, XmSTRING_DEFAULT_CHARSET); - XmListAddItem (IMAGE_INSTANCE_X_WIDGET_ID (ii), xmstr, 0); - XmStringFree (xmstr); +} #endif + +static void +x_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Arg al [1]; + XColor fcolor; + Lisp_Object pixel; + widget_value* cur; + + widget_value * wv = + gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); + + /* Give each child label the correct foreground color. */ + pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + XtSetArg (al [0], XtNtabForeground, fcolor.pixel); + + for (cur = wv->contents; cur; cur = cur->next) + { + if (cur->value) + { + cur->nargs = 1; + cur->args = al; + } + } + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "tab-control", wv); +} + +/* set the properties of a tab control */ +static Lisp_Object +x_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop, + Lisp_Object val) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + if (EQ (prop, Q_items)) + { + widget_value * wv = 0, *cur; + Arg al [1]; + XColor fcolor; + Lisp_Object pixel; + + check_valid_item_list_1 (val); + + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = + Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + parse_gui_item_tree_children (val)); + + wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); + + /* Give each child label the correct foreground color. */ + pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + XtSetArg (al [0], XtNtabForeground, fcolor.pixel); + + for (cur = wv->contents; cur; cur = cur->next) + { + if (cur->value) + { + cur->nargs = 1; + cur->args = al; + } + } + + lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, True); + + free_widget_value_tree (wv); + return Qt; } + + return Qunbound; +} + +/* instantiate a static control possible for putting other things in */ +static void +x_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + widget_value* wv = xmalloc_widget_value (); + + button_item_to_widget_value (gui, wv, 1, 1); + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "button", wv); } +#endif /* HAVE_WIDGETS */ /************************************************************************/ @@ -2454,6 +2778,7 @@ image_instantiator_format_create_glyphs_x (void) { IIFORMAT_VALID_CONSOLE (x, nothing); IIFORMAT_VALID_CONSOLE (x, string); + IIFORMAT_VALID_CONSOLE (x, layout); IIFORMAT_VALID_CONSOLE (x, formatted_string); IIFORMAT_VALID_CONSOLE (x, inherit); #ifdef HAVE_XPM @@ -2477,7 +2802,7 @@ image_instantiator_format_create_glyphs_x (void) INITIALIZE_DEVICE_IIFORMAT (x, subwindow); IIFORMAT_HAS_DEVMETHOD (x, subwindow, instantiate); -#ifdef LWLIB_USES_MOTIF +#ifdef HAVE_WIDGETS /* button widget */ INITIALIZE_DEVICE_IIFORMAT (x, button); IIFORMAT_HAS_DEVMETHOD (x, button, property); @@ -2493,11 +2818,19 @@ image_instantiator_format_create_glyphs_x (void) /* text field */ INITIALIZE_DEVICE_IIFORMAT (x, edit_field); IIFORMAT_HAS_DEVMETHOD (x, edit_field, instantiate); -#if 0 /* XmVERSION > 1*/ +#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 /* combo box */ INITIALIZE_DEVICE_IIFORMAT (x, combo_box); IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate); + IIFORMAT_HAS_SHARED_DEVMETHOD (x, combo_box, set_property, tab_control); #endif + /* tab control widget */ + INITIALIZE_DEVICE_IIFORMAT (x, tab_control); + IIFORMAT_HAS_DEVMETHOD (x, tab_control, instantiate); + IIFORMAT_HAS_DEVMETHOD (x, tab_control, set_property); + /* label */ + INITIALIZE_DEVICE_IIFORMAT (x, label); + IIFORMAT_HAS_DEVMETHOD (x, label, instantiate); #endif INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font"); IIFORMAT_VALID_CONSOLE (x, cursor_font); diff --git a/src/glyphs-x.h b/src/glyphs-x.h index a2bc03f..d49ba53 100644 --- a/src/glyphs-x.h +++ b/src/glyphs-x.h @@ -39,8 +39,7 @@ Boston, MA 02111-1307, USA. */ struct x_image_instance_data { - Pixmap pixmap; - Pixmap mask; + Pixmap* pixmaps; Cursor cursor; /* If depth>0, then that means that other colors were allocated when @@ -56,8 +55,13 @@ struct x_image_instance_data #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data) -#define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap) -#define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask) +#define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmaps[0]) +#define IMAGE_INSTANCE_X_PIXMAP_SLICE(i,slice) \ + (X_IMAGE_INSTANCE_DATA (i)->pixmaps[slice]) +#define IMAGE_INSTANCE_X_PIXMAP_SLICES(i) \ + (X_IMAGE_INSTANCE_DATA (i)->pixmaps) +#define IMAGE_INSTANCE_X_MASK(i) \ + (Pixmap)(IMAGE_INSTANCE_PIXMAP_MASK (i)) #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor) #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap) #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels) @@ -65,6 +69,10 @@ struct x_image_instance_data #define XIMAGE_INSTANCE_X_PIXMAP(i) \ IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_PIXMAP_SLICES(i) \ + IMAGE_INSTANCE_X_PIXMAP_SLICES (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_PIXMAP_SLICE(i) \ + IMAGE_INSTANCE_X_PIXMAP_SLICE (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_MASK(i) \ IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_CURSOR(i) \ @@ -84,11 +92,13 @@ struct x_subwindow_data { struct { - Screen *xscreen; + Display *display; Window parent_window; + Window clip_window; } sub; struct { + Widget clip_window; Position x_offset; Position y_offset; LWLIB_ID id; @@ -98,26 +108,34 @@ struct x_subwindow_data #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) -#define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ - (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.xscreen) +#define IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.display) #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window) +#define IMAGE_INSTANCE_X_CLIPWINDOW(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.clip_window) #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset) #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset) #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) +#define IMAGE_INSTANCE_X_CLIPWIDGET(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.clip_window) #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ - IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ + IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_CLIPWIDGET(i) \ + IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \ + IMAGE_INSTANCE_X_CLIPWINDOW (XIMAGE_INSTANCE (i)) #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) #define IMAGE_INSTANCE_X_WIDGET_ID(i) \ diff --git a/src/glyphs.c b/src/glyphs.c index b03fe24..4a47fd2 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -3,7 +3,7 @@ Copyright (C) 1995 Tinker Systems Copyright (C) 1995, 1996 Ben Wing Copyright (C) 1995 Sun Microsystems - Copyright (C) 1998 Andy Piper + Copyright (C) 1998, 1999 Andy Piper This file is part of XEmacs. @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* Written by Ben Wing and Chuck Thompson */ +/* Written by Ben Wing and Chuck Thompson. */ #include #include "lisp.h" @@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA. */ #include "frame.h" #include "chartab.h" #include "rangetab.h" +#include "blocktype.h" #ifdef HAVE_XPM #include @@ -56,6 +57,7 @@ Lisp_Object Qmono_pixmap_image_instance_p; Lisp_Object Qcolor_pixmap_image_instance_p; Lisp_Object Qpointer_image_instance_p; Lisp_Object Qsubwindow_image_instance_p; +Lisp_Object Qlayout_image_instance_p; Lisp_Object Qwidget_image_instance_p; Lisp_Object Qconst_glyph_variable; Lisp_Object Qmono_pixmap, Qcolor_pixmap, Qsubwindow; @@ -70,11 +72,14 @@ Lisp_Object Vimage_instantiator_format_list; Lisp_Object Vimage_instance_type_list; Lisp_Object Vglyph_type_list; +int disable_animated_pixmaps; + DEFINE_IMAGE_INSTANTIATOR_FORMAT (nothing); DEFINE_IMAGE_INSTANTIATOR_FORMAT (inherit); DEFINE_IMAGE_INSTANTIATOR_FORMAT (string); DEFINE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DEFINE_IMAGE_INSTANTIATOR_FORMAT (subwindow); +DEFINE_IMAGE_INSTANTIATOR_FORMAT (text); #ifdef HAVE_WINDOW_SYSTEM DEFINE_IMAGE_INSTANTIATOR_FORMAT (xbm); @@ -122,6 +127,13 @@ static void image_validate (Lisp_Object instantiator); static void glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property, Lisp_Object locale); +static void register_ignored_expose (struct frame* f, int x, int y, int width, int height); +/* Unfortunately windows and X are different. In windows BeginPaint() + will prevent WM_PAINT messages being generated so it is unnecessary + to register exposures as they will not occur. Under X they will + always occur. */ +int hold_ignored_expose_registration; + EXFUN (Fimage_instance_type, 1); EXFUN (Fglyph_type, 1); @@ -179,13 +191,20 @@ valid_image_instantiator_format_p (Lisp_Object format, Lisp_Object locale) int i; struct image_instantiator_methods* meths = decode_image_instantiator_format (format, ERROR_ME_NOT); - struct console* console = decode_console (locale); - Lisp_Object contype = console ? CONSOLE_TYPE (console) : locale; + Lisp_Object contype = Qnil; + /* mess with the locale */ + if (!NILP (locale) && SYMBOLP (locale)) + contype = locale; + else + { + struct console* console = decode_console (locale); + contype = console ? CONSOLE_TYPE (console) : locale; + } /* nothing is valid in all locales */ if (EQ (format, Qnothing)) return 1; /* reject unknown formats */ - else if (!console || !meths) + else if (NILP (contype) || !meths) return 0; for (i = 0; i < Dynarr_length (meths->consoles); i++) @@ -598,40 +617,46 @@ instantiate_image_instantiator (Lisp_Object device, Lisp_Object domain, Lisp_Object Qimage_instancep; static Lisp_Object -mark_image_instance (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_image_instance (Lisp_Object obj) { struct Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj); - markobj (i->name); + mark_object (i->name); switch (IMAGE_INSTANCE_TYPE (i)) { case IMAGE_TEXT: - markobj (IMAGE_INSTANCE_TEXT_STRING (i)); + mark_object (IMAGE_INSTANCE_TEXT_STRING (i)); break; case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - markobj (IMAGE_INSTANCE_PIXMAP_FILENAME (i)); - markobj (IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (i)); - markobj (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (i)); - markobj (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (i)); - markobj (IMAGE_INSTANCE_PIXMAP_FG (i)); - markobj (IMAGE_INSTANCE_PIXMAP_BG (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_FILENAME (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_FG (i)); + mark_object (IMAGE_INSTANCE_PIXMAP_BG (i)); break; case IMAGE_WIDGET: - markobj (IMAGE_INSTANCE_WIDGET_TYPE (i)); - markobj (IMAGE_INSTANCE_WIDGET_PROPS (i)); - markobj (IMAGE_INSTANCE_WIDGET_FACE (i)); - markobj (IMAGE_INSTANCE_WIDGET_ITEM (i)); + mark_object (IMAGE_INSTANCE_WIDGET_TYPE (i)); + mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i)); + mark_object (IMAGE_INSTANCE_WIDGET_FACE (i)); + mark_object (IMAGE_INSTANCE_WIDGET_ITEMS (i)); case IMAGE_SUBWINDOW: - markobj (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); + mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); + break; + + case IMAGE_LAYOUT: + mark_object (IMAGE_INSTANCE_LAYOUT_CHILDREN (i)); + mark_object (IMAGE_INSTANCE_LAYOUT_BORDER (i)); + mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); break; default: break; } - MAYBE_DEVMETH (XDEVICE (i->device), mark_image_instance, (i, markobj)); + MAYBE_DEVMETH (XDEVICE (i->device), mark_image_instance, (i)); return i->device; } @@ -748,6 +773,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, print_internal (IMAGE_INSTANCE_WIDGET_TEXT (ii), printcharfun, 0); case IMAGE_SUBWINDOW: + case IMAGE_LAYOUT: sprintf (buf, " %dx%d", IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii), IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); write_c_string (buf, printcharfun); @@ -799,7 +825,7 @@ finalize_image_instance (void *header, int for_disksave) || IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW) { - MARK_FRAME_GLYPHS_CHANGED + MARK_FRAME_SUBWINDOWS_CHANGED (XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (i))); } @@ -843,6 +869,8 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) IMAGE_INSTANCE_PIXMAP_HEIGHT (i2) && IMAGE_INSTANCE_PIXMAP_DEPTH (i1) == IMAGE_INSTANCE_PIXMAP_DEPTH (i2) && + IMAGE_INSTANCE_PIXMAP_SLICE (i1) == + IMAGE_INSTANCE_PIXMAP_SLICE (i2) && EQ (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (i1), IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (i2)) && EQ (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (i1), @@ -859,14 +887,24 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) case IMAGE_WIDGET: if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1), IMAGE_INSTANCE_WIDGET_TYPE (i2)) - && internal_equal (IMAGE_INSTANCE_WIDGET_ITEM (i1), - IMAGE_INSTANCE_WIDGET_ITEM (i2), + && internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (i1), + IMAGE_INSTANCE_WIDGET_ITEMS (i2), depth + 1) && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1), IMAGE_INSTANCE_WIDGET_PROPS (i2), depth + 1) )) return 0; + case IMAGE_LAYOUT: + if (IMAGE_INSTANCE_TYPE (i1) == IMAGE_LAYOUT + && + !(EQ (IMAGE_INSTANCE_LAYOUT_BORDER (i1), + IMAGE_INSTANCE_LAYOUT_BORDER (i2)) + && + internal_equal (IMAGE_INSTANCE_LAYOUT_CHILDREN (i1), + IMAGE_INSTANCE_LAYOUT_CHILDREN (i2), + depth + 1))) + return 0; case IMAGE_SUBWINDOW: if (!(IMAGE_INSTANCE_SUBWINDOW_WIDTH (i1) == IMAGE_INSTANCE_SUBWINDOW_WIDTH (i2) && @@ -904,9 +942,10 @@ image_instance_hash (Lisp_Object obj, int depth) case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: case IMAGE_POINTER: - hash = HASH5 (hash, IMAGE_INSTANCE_PIXMAP_WIDTH (i), + hash = HASH6 (hash, IMAGE_INSTANCE_PIXMAP_WIDTH (i), IMAGE_INSTANCE_PIXMAP_HEIGHT (i), IMAGE_INSTANCE_PIXMAP_DEPTH (i), + IMAGE_INSTANCE_PIXMAP_SLICE (i), internal_hash (IMAGE_INSTANCE_PIXMAP_FILENAME (i), depth + 1)); break; @@ -915,7 +954,13 @@ image_instance_hash (Lisp_Object obj, int depth) hash = HASH4 (hash, internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1), internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), - internal_hash (IMAGE_INSTANCE_WIDGET_ITEM (i), depth + 1)); + internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1)); + case IMAGE_LAYOUT: + if (IMAGE_INSTANCE_TYPE (i) == IMAGE_LAYOUT) + hash = HASH3 (hash, + internal_hash (IMAGE_INSTANCE_LAYOUT_BORDER (i), depth + 1), + internal_hash (IMAGE_INSTANCE_LAYOUT_CHILDREN (i), + depth + 1)); case IMAGE_SUBWINDOW: hash = HASH4 (hash, IMAGE_INSTANCE_SUBWINDOW_WIDTH (i), IMAGE_INSTANCE_SUBWINDOW_HEIGHT (i), @@ -947,6 +992,8 @@ allocate_image_instance (Lisp_Object device) lp->device = device; lp->type = IMAGE_NOTHING; lp->name = Qnil; + lp->x_offset = 0; + lp->y_offset = 0; XSETIMAGE_INSTANCE (val, lp); return val; } @@ -964,6 +1011,7 @@ decode_image_instance_type (Lisp_Object type, Error_behavior errb) if (EQ (type, Qpointer)) return IMAGE_POINTER; if (EQ (type, Qsubwindow)) return IMAGE_SUBWINDOW; if (EQ (type, Qwidget)) return IMAGE_WIDGET; + if (EQ (type, Qlayout)) return IMAGE_LAYOUT; maybe_signal_simple_error ("Invalid image-instance type", type, Qimage, errb); @@ -983,6 +1031,7 @@ encode_image_instance_type (enum image_instance_type type) case IMAGE_POINTER: return Qpointer; case IMAGE_SUBWINDOW: return Qsubwindow; case IMAGE_WIDGET: return Qwidget; + case IMAGE_LAYOUT: return Qlayout; default: abort (); } @@ -995,7 +1044,7 @@ image_instance_type_to_mask (enum image_instance_type type) { /* This depends on the fact that enums are assigned consecutive integers starting at 0. (Remember that IMAGE_UNKNOWN is the - first enum.) I'm fairly sure this behavior in ANSI-mandated, + first enum.) I'm fairly sure this behavior is ANSI-mandated, so there should be no portability problems here. */ return (1 << ((int) (type) - 1)); } @@ -1166,7 +1215,9 @@ be generated. The recognized image instance types are '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. +'widget + A child window that contains a window-system widget, e.g. a push + button. The DEST-TYPES list is unordered. If multiple destination types are possible for a given instantiator, the "most natural" type @@ -1188,7 +1239,7 @@ If DEST-TYPES is omitted, all possible types are allowed. NO-ERROR controls what happens when the image cannot be generated. If nil, an error message is generated. If t, no messages are generated and this function returns nil. If anything else, a warning -message is generated and this function returns nil. +message is generated and this function returns nil. */ (data, device, dest_types, no_error)) { @@ -1302,18 +1353,30 @@ the image instance in the domain. !UNBOUNDP (ret = IIFORMAT_METH (meths, set_property, (image_instance, prop, val)))) { - return ret; + val = ret; } - /* ... then format specific methods ... */ - meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT); - if (meths && HAS_IIFORMAT_METH_P (meths, set_property) - && - !UNBOUNDP (ret = - IIFORMAT_METH (meths, set_property, (image_instance, prop, val)))) + else { - return ret; + /* ... then format specific methods ... */ + meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT); + if (meths && HAS_IIFORMAT_METH_P (meths, set_property) + && + !UNBOUNDP (ret = + IIFORMAT_METH (meths, set_property, (image_instance, prop, val)))) + { + val = ret; + } + else + { + val = Qnil; + } } + /* Make sure the image instance gets redisplayed. */ + MARK_IMAGE_INSTANCE_CHANGED (ii); + MARK_SUBWINDOWS_STATE_CHANGED; + MARK_GLYPHS_CHANGED; + return val; } @@ -1391,6 +1454,7 @@ Return the height of the image instance, in pixels. case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + case IMAGE_LAYOUT: return make_int (XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (image_instance)); default: @@ -1414,6 +1478,7 @@ Return the width of the image instance, in pixels. case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + case IMAGE_LAYOUT: return make_int (XIMAGE_INSTANCE_SUBWINDOW_WIDTH (image_instance)); default: @@ -1544,6 +1609,8 @@ instance is a mono pixmap; otherwise, the same image instance is returned. if (!HAS_DEVMETH_P (XDEVICE (device), colorize_image_instance)) return image_instance; + /* #### There should be a copy_image_instance(), which calls a + device-specific method to copy the window-system subobject. */ new = allocate_image_instance (device); copy_lcrecord (XIMAGE_INSTANCE (new), XIMAGE_INSTANCE (image_instance)); /* note that if this method returns non-zero, this method MUST @@ -1670,6 +1737,23 @@ string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, incompatible_image_types (instantiator, dest_mask, IMAGE_TEXT_MASK); } +/* set the properties of a string */ +static Lisp_Object +text_set_property (Lisp_Object image_instance, Lisp_Object prop, + Lisp_Object val) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + if (EQ (prop, Q_data)) + { + CHECK_STRING (val); + IMAGE_INSTANCE_TEXT_STRING (ii) = val; + + return Qt; + } + return Qunbound; +} + /**************************************************************************** * formatted-string * @@ -2334,12 +2418,12 @@ image_create (Lisp_Object obj) } static void -image_mark (Lisp_Object obj, void (*markobj) (Lisp_Object)) +image_mark (Lisp_Object obj) { struct Lisp_Specifier *image = XIMAGE_SPECIFIER (obj); - markobj (IMAGE_SPECIFIER_ATTACHEE (image)); - markobj (IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image)); + mark_object (IMAGE_SPECIFIER_ATTACHEE (image)); + mark_object (IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image)); } static Lisp_Object @@ -2733,9 +2817,21 @@ pairs. FORMAT should be one of Currently can only be instanced as `pointer', although this should probably be fixed.) 'subwindow - (An embedded X window; not currently implemented.) -'widget - (A widget control, for instance text field or radio button.) + (An embedded windowing system window.) +'edit-field + (A text editing widget glyph.) +'button + (A button widget glyph; either a push button, radio button or toggle button.) +'tab-control + (A tab widget glyph; a series of user selectable tabs.) +'progress-gauge + (A sliding widget glyph, for showing progress.) +'combo-box + (A drop list of selectable items in a widget glyph, for editing text.) +'label + (A static, text-only, widget glyph; for displaying text.) +'tree-view + (A folding widget glyph.) 'autodetect (XEmacs tries to guess what format the data is in. If X support exists, the data string will be checked to see if it names a filename. @@ -2797,7 +2893,14 @@ The valid keywords are: object). If this is not specified, the contents of `xpm-color-symbols' are used to generate the alist.) :face - (Only for `inherit'. This specifies the face to inherit from.) + (Only for `inherit'. This specifies the face to inherit from. + For widget glyphs this also specifies the face to use for + display. It defaults to gui-element-face.) + +Keywords accepted as menu item specs are also accepted by widget +glyphs. These are `:selected', `:active', `:suffix', `:keys', +`:style', `:filter', `:config', `:included', `:key-sequence', +`:accelerator', `:label' and `:callback'. If instead of a vector, the instantiator is a string, it will be converted into a vector by looking it up according to the specs in the @@ -2825,14 +2928,14 @@ file). ****************************************************************************/ static Lisp_Object -mark_glyph (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_glyph (Lisp_Object obj) { struct Lisp_Glyph *glyph = XGLYPH (obj); - markobj (glyph->image); - markobj (glyph->contrib_p); - markobj (glyph->baseline); - markobj (glyph->face); + mark_object (glyph->image); + mark_object (glyph->contrib_p); + mark_object (glyph->baseline); + mark_object (glyph->face); return glyph->plist; } @@ -2902,9 +3005,9 @@ glyph_getprop (Lisp_Object obj, Lisp_Object prop) static int glyph_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) { - if ((EQ (prop, Qimage)) || - (EQ (prop, Qcontrib_p)) || - (EQ (prop, Qbaseline))) + if (EQ (prop, Qimage) || + EQ (prop, Qcontrib_p) || + EQ (prop, Qbaseline)) return 0; if (EQ (prop, Qface)) @@ -2920,9 +3023,9 @@ glyph_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) static int glyph_remprop (Lisp_Object obj, Lisp_Object prop) { - if ((EQ (prop, Qimage)) || - (EQ (prop, Qcontrib_p)) || - (EQ (prop, Qbaseline))) + if (EQ (prop, Qimage) || + EQ (prop, Qcontrib_p) || + EQ (prop, Qbaseline)) return -1; if (EQ (prop, Qface)) @@ -2972,13 +3075,15 @@ allocate_glyph (enum glyph_type type, g->type = type; g->image = Fmake_specifier (Qimage); /* This function can GC */ + g->dirty = 0; switch (g->type) { case GLYPH_BUFFER: XIMAGE_SPECIFIER_ALLOWED (g->image) = IMAGE_NOTHING_MASK | IMAGE_TEXT_MASK | IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK - | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK; + | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK + | IMAGE_LAYOUT_MASK; break; case GLYPH_POINTER: XIMAGE_SPECIFIER_ALLOWED (g->image) = @@ -3127,18 +3232,16 @@ The return value will be one of 'buffer, 'pointer, or 'icon. the given FACE, unless a face is defined by the glyph itself. ****************************************************************************/ unsigned short -glyph_width (Lisp_Object glyph, Lisp_Object frame_face, +glyph_width (Lisp_Object glyph_or_image, Lisp_Object frame_face, face_index window_findex, Lisp_Object window) { - Lisp_Object instance; + Lisp_Object instance = glyph_or_image; Lisp_Object frame = XWINDOW (window)->frame; /* #### We somehow need to distinguish between the user causing this error condition and a bug causing it. */ - if (!GLYPHP (glyph)) - return 0; - else - instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); + if (GLYPHP (glyph_or_image)) + instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1); if (!IMAGE_INSTANCEP (instance)) return 0; @@ -3148,7 +3251,10 @@ glyph_width (Lisp_Object glyph, Lisp_Object frame_face, case IMAGE_TEXT: { Lisp_Object str = XIMAGE_INSTANCE_TEXT_STRING (instance); - Lisp_Object private_face = XGLYPH_FACE(glyph); + Lisp_Object private_face = Qnil; + + if (GLYPHP (glyph_or_image)) + private_face = XGLYPH_FACE(glyph_or_image); if (!NILP (private_face)) return redisplay_frame_text_width_string (XFRAME (frame), @@ -3175,6 +3281,7 @@ glyph_width (Lisp_Object glyph, Lisp_Object frame_face, case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + case IMAGE_LAYOUT: return XIMAGE_INSTANCE_SUBWINDOW_WIDTH (instance); default: @@ -3213,17 +3320,15 @@ glyph_image_instance (Lisp_Object glyph, Lisp_Object domain, } static unsigned short -glyph_height_internal (Lisp_Object glyph, Lisp_Object frame_face, +glyph_height_internal (Lisp_Object glyph_or_image, Lisp_Object frame_face, face_index window_findex, Lisp_Object window, int function) { - Lisp_Object instance; + Lisp_Object instance = glyph_or_image; Lisp_Object frame = XWINDOW (window)->frame; - if (!GLYPHP (glyph)) - return 0; - else - instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); + if (GLYPHP (glyph_or_image)) + instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1); if (!IMAGE_INSTANCEP (instance)) return 0; @@ -3279,6 +3384,7 @@ glyph_height_internal (Lisp_Object glyph, Lisp_Object frame_face, case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + case IMAGE_LAYOUT: /* #### Ugh ugh ugh -- temporary crap */ if (function == RETURN_ASCENT || function == RETURN_HEIGHT) return XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (instance); @@ -3360,6 +3466,35 @@ that redisplay will. #undef RETURN_DESCENT #undef RETURN_HEIGHT +static unsigned int +glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window) +{ + Lisp_Object instance = glyph_or_image; + + if (GLYPHP (glyph_or_image)) + instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1); + + return XIMAGE_INSTANCE_DIRTYP (instance); +} + +static void +set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty) +{ + Lisp_Object instance = glyph_or_image; + + if (!NILP (glyph_or_image)) + { + if (GLYPHP (glyph_or_image)) + { + instance = glyph_image_instance (glyph_or_image, window, + ERROR_ME_NOT, 1); + XGLYPH_DIRTYP (glyph_or_image) = dirty; + } + + XIMAGE_INSTANCE_DIRTYP (instance) = dirty; + } +} + /* #### do we need to cache this info to speed things up? */ Lisp_Object @@ -3422,12 +3557,10 @@ glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property, /* #### All of this is 95% copied from face cachels. Consider consolidating. - #### We need to add a dirty flag to the glyphs. */ void -mark_glyph_cachels (glyph_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)) +mark_glyph_cachels (glyph_cachel_dynarr *elements) { int elt; @@ -3437,7 +3570,7 @@ mark_glyph_cachels (glyph_cachel_dynarr *elements, for (elt = 0; elt < Dynarr_length (elements); elt++) { struct glyph_cachel *cachel = Dynarr_atp (elements, elt); - markobj (cachel->glyph); + mark_object (cachel->glyph); } } @@ -3445,19 +3578,21 @@ static void update_glyph_cachel_data (struct window *w, Lisp_Object glyph, struct glyph_cachel *cachel) { - /* #### This should be || !cachel->updated */ - if (NILP (cachel->glyph) || !EQ (cachel->glyph, glyph)) + if (!cachel->updated || NILP (cachel->glyph) || !EQ (cachel->glyph, glyph) + || XGLYPH_DIRTYP (cachel->glyph)) { - Lisp_Object window; + Lisp_Object window, instance; XSETWINDOW (window, w); - /* #### This could be sped up if we redid things to grab the glyph - instantiation and passed it to the size functions. */ cachel->glyph = glyph; - cachel->width = glyph_width (glyph, Qnil, DEFAULT_INDEX, window); - cachel->ascent = glyph_ascent (glyph, Qnil, DEFAULT_INDEX, window); - cachel->descent = glyph_descent (glyph, Qnil, DEFAULT_INDEX, window); + /* Speed things up slightly by grabbing the glyph instantiation + and passing it to the size functions. */ + instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); + cachel->dirty = XGLYPH_DIRTYP (glyph) = glyph_dirty_p (glyph, window); + cachel->width = glyph_width (instance, Qnil, DEFAULT_INDEX, window); + cachel->ascent = glyph_ascent (instance, Qnil, DEFAULT_INDEX, window); + cachel->descent = glyph_descent (instance, Qnil, DEFAULT_INDEX, window); } cachel->updated = 1; @@ -3475,7 +3610,7 @@ add_glyph_cachel (struct window *w, Lisp_Object glyph) Dynarr_add (w->glyph_cachels, new_cachel); } -static glyph_index +glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph) { int elt; @@ -3490,8 +3625,7 @@ get_glyph_cachel_index (struct window *w, Lisp_Object glyph) if (EQ (cachel->glyph, glyph) && !NILP (glyph)) { - if (!cachel->updated) - update_glyph_cachel_data (w, glyph, cachel); + update_glyph_cachel_data (w, glyph, cachel); return elt; } } @@ -3534,7 +3668,24 @@ mark_glyph_cachels_as_not_updated (struct window *w) #undef FROB for (elt = 0; elt < Dynarr_length (w->glyph_cachels); elt++) - Dynarr_atp (w->glyph_cachels, elt)->updated = 0; + { + Dynarr_atp (w->glyph_cachels, elt)->updated = 0; + } +} + +/* Unset the dirty bit on all the glyph cachels that have it. */ +void +mark_glyph_cachels_as_clean (struct window* w) +{ + int elt; + Lisp_Object window; + XSETWINDOW (window, w); + for (elt = 0; elt < Dynarr_length (w->glyph_cachels); elt++) + { + struct glyph_cachel *cachel = Dynarr_atp (w->glyph_cachels, elt); + cachel->dirty = 0; + set_glyph_dirty_p (cachel->glyph, window, 0); + } } #ifdef MEMORY_USAGE_STATS @@ -3568,7 +3719,7 @@ compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, obscuring an area that we want to clear. We need to be able to flip through this quickly so a hashtable is not suitable hence the subwindow_cachels. The question is should we just not mark - instances in the subwindow_cachelsnor should we try and invalidate + instances in the subwindow_cachels or should we try and invalidate the cache at suitable points in redisplay? If we don't invalidate the cache it will fill up with crud that will only get removed when the frame is deleted. So invalidation is good, the question is when @@ -3576,8 +3727,7 @@ compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, MARK_SUBWINDOWS_CHANGED when a subwindow gets deleted. */ void -mark_subwindow_cachels (subwindow_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)) +mark_subwindow_cachels (subwindow_cachel_dynarr *elements) { int elt; @@ -3587,7 +3737,7 @@ mark_subwindow_cachels (subwindow_cachel_dynarr *elements, for (elt = 0; elt < Dynarr_length (elements); elt++) { struct subwindow_cachel *cachel = Dynarr_atp (elements, elt); - markobj (cachel->subwindow); + mark_object (cachel->subwindow); } } @@ -3595,13 +3745,9 @@ static void update_subwindow_cachel_data (struct frame *f, Lisp_Object subwindow, struct subwindow_cachel *cachel) { - if (NILP (cachel->subwindow) || !EQ (cachel->subwindow, subwindow)) - { - cachel->subwindow = subwindow; - cachel->width = XIMAGE_INSTANCE_SUBWINDOW_WIDTH (subwindow); - cachel->height = XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (subwindow); - } - + cachel->subwindow = subwindow; + cachel->width = XIMAGE_INSTANCE_SUBWINDOW_WIDTH (subwindow); + cachel->height = XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (subwindow); cachel->updated = 1; } @@ -3646,6 +3792,29 @@ get_subwindow_cachel_index (struct frame *f, Lisp_Object subwindow) return elt; } +static void +update_subwindow_cachel (Lisp_Object subwindow) +{ + struct frame* f; + int elt; + + if (NILP (subwindow)) + return; + + f = XFRAME ( XIMAGE_INSTANCE_SUBWINDOW_FRAME (subwindow)); + + for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + { + struct subwindow_cachel *cachel = + Dynarr_atp (f->subwindow_cachels, elt); + + if (EQ (cachel->subwindow, subwindow) && !NILP (subwindow)) + { + update_subwindow_cachel_data (f, subwindow, cachel); + } + } +} + /* redisplay in general assumes that drawing something will erase what was there before. unfortunately this does not apply to subwindows that need to be specifically unmapped in order to @@ -3662,8 +3831,10 @@ reset_subwindow_cachels (struct frame *f) if (!NILP (cachel->subwindow) && cachel->being_displayed) { - struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (cachel->subwindow); - MAYBE_DEVMETH (XDEVICE (f->device), unmap_subwindow, (ii)); + cachel->updated = 1; + /* #### This is not optimal as update_subwindow will search + the cachels for ourselves as well. We could easily optimize. */ + unmap_subwindow (cachel->subwindow); } } Dynarr_reset (f->subwindow_cachels); @@ -3678,6 +3849,119 @@ mark_subwindow_cachels_as_not_updated (struct frame *f) Dynarr_atp (f->subwindow_cachels, elt)->updated = 0; } + + +/***************************************************************************** + * subwindow exposure ignorance * + *****************************************************************************/ +/* when we unmap subwindows the associated window system will generate + expose events. This we do not want as redisplay already copes with + the repainting necessary. Worse, we can get in an endless cycle of + redisplay if we are not careful. Thus we keep a per-frame list of + expose events that are going to come and ignore them as + required. */ + +struct expose_ignore_blocktype +{ + Blocktype_declare (struct expose_ignore); +} *the_expose_ignore_blocktype; + +int +check_for_ignored_expose (struct frame* f, int x, int y, int width, int height) +{ + struct expose_ignore *ei, *prev; + /* the ignore list is FIFO so we should generally get a match with + the first element in the list */ + for (ei = f->subwindow_exposures, prev = 0; ei; ei = ei->next) + { + /* Checking for exact matches just isn't good enough as we + mighte get exposures for partially obscure subwindows, thus + we have to check for overlaps. Being conservative we will + check for exposures wholly contained by the subwindow, this + might give us what we want.*/ + if (ei->x <= x && ei->y <= y + && ei->x + ei->width >= x + width + && ei->y + ei->height >= y + height) + { +#ifdef DEBUG_WIDGETS + stderr_out ("ignored %d+%d, %dx%d for exposure %d+%d, %dx%d\n", + x, y, width, height, ei->x, ei->y, ei->width, ei->height); +#endif + if (!prev) + f->subwindow_exposures = ei->next; + else + prev->next = ei->next; + + if (ei == f->subwindow_exposures_tail) + f->subwindow_exposures_tail = prev; + + Blocktype_free (the_expose_ignore_blocktype, ei); + return 1; + } + prev = ei; + } + return 0; +} + +static void +register_ignored_expose (struct frame* f, int x, int y, int width, int height) +{ + if (!hold_ignored_expose_registration) + { + struct expose_ignore *ei; + + ei = Blocktype_alloc (the_expose_ignore_blocktype); + + ei->next = NULL; + ei->x = x; + ei->y = y; + ei->width = width; + ei->height = height; + + /* we have to add the exposure to the end of the list, since we + want to check the oldest events first. for speed we keep a record + of the end so that we can add right to it. */ + if (f->subwindow_exposures_tail) + { + f->subwindow_exposures_tail->next = ei; + } + if (!f->subwindow_exposures) + { + f->subwindow_exposures = ei; + } + f->subwindow_exposures_tail = ei; + } +} + +/**************************************************************************** + find_matching_subwindow + + See if there is a subwindow that completely encloses the requested + area. + ****************************************************************************/ +int find_matching_subwindow (struct frame* f, int x, int y, int width, int height) +{ + int elt; + + for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + { + struct subwindow_cachel *cachel = + Dynarr_atp (f->subwindow_cachels, elt); + + if (cachel->being_displayed + && + cachel->x <= x && cachel->y <= y + && + cachel->x + cachel->width >= x + width + && + cachel->y + cachel->height >= y + height) + { + return 1; + } + } + return 0; +} + /***************************************************************************** * subwindow functions * @@ -3702,7 +3986,7 @@ update_frame_subwindows (struct frame *f) { int elt; - if (f->subwindows_changed || f->glyphs_changed) + if (f->subwindows_changed || f->subwindows_state_changed || f->faces_changed) for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) { struct subwindow_cachel *cachel = @@ -3729,11 +4013,15 @@ void unmap_subwindow (Lisp_Object subwindow) || NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))) return; - +#ifdef DEBUG_WIDGETS + stderr_out ("unmapping subwindow %d\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii)); +#endif f = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); elt = get_subwindow_cachel_index (f, subwindow); cachel = Dynarr_atp (f->subwindow_cachels, elt); + /* make sure we don't get expose events */ + register_ignored_expose (f, cachel->x, cachel->y, cachel->width, cachel->height); cachel->x = -1; cachel->y = -1; cachel->being_displayed = 0; @@ -3743,7 +4031,8 @@ void unmap_subwindow (Lisp_Object subwindow) } /* show a subwindow in its frame */ -void map_subwindow (Lisp_Object subwindow, int x, int y) +void map_subwindow (Lisp_Object subwindow, int x, int y, + struct display_glyph_area *dga) { struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); int elt; @@ -3757,15 +4046,22 @@ void map_subwindow (Lisp_Object subwindow, int x, int y) NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))) return; +#ifdef DEBUG_WIDGETS + stderr_out ("mapping subwindow %d, %dx%d@%d+%d\n", + IMAGE_INSTANCE_SUBWINDOW_ID (ii), + dga->width, dga->height, x, y); +#endif f = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 1; elt = get_subwindow_cachel_index (f, subwindow); cachel = Dynarr_atp (f->subwindow_cachels, elt); cachel->x = x; cachel->y = y; + cachel->width = dga->width; + cachel->height = dga->height; cachel->being_displayed = 1; - MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y)); + MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y, dga)); } static int @@ -3794,7 +4090,6 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, ii->data = 0; IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0; - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii) = Qnil; IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; IMAGE_INSTANCE_SUBWINDOW_FRAME (ii) = frame; @@ -3836,7 +4131,7 @@ Return the window id of SUBWINDOW as a number. (subwindow)) { CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow); - return make_int ((int) (XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow))); + return make_int ((int) XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow)); } DEFUN ("resize-subwindow", Fresize_subwindow, 1, 3, 0, /* @@ -3866,6 +4161,9 @@ If a value is nil that parameter is not changed. XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (subwindow) = newh; XIMAGE_INSTANCE_SUBWINDOW_WIDTH (subwindow) = neww; + /* need to update the cachels as redisplay will not do this */ + update_subwindow_cachel (subwindow); + return subwindow; } @@ -3875,9 +4173,9 @@ Generate a Map event for SUBWINDOW. (subwindow)) { CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow); - +#if 0 map_subwindow (subwindow, 0, 0); - +#endif return subwindow; } @@ -3963,6 +4261,80 @@ display_table_entry (Emchar ch, Lisp_Object face_table, abort (); } } + +/***************************************************************************** + * timeouts for animated glyphs * + *****************************************************************************/ +static Lisp_Object Qglyph_animated_timeout_handler; + +DEFUN ("glyph-animated-timeout-handler", Fglyph_animated_timeout_handler, 1, 1, 0, /* +Callback function for updating animated images. +Don't use this. +*/ + (arg)) +{ + CHECK_WEAK_LIST (arg); + + if (!NILP (XWEAK_LIST_LIST (arg)) && !NILP (XCAR (XWEAK_LIST_LIST (arg)))) + { + Lisp_Object value = XCAR (XWEAK_LIST_LIST (arg)); + + if (IMAGE_INSTANCEP (value)) + { + struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (value); + + if (COLOR_PIXMAP_IMAGE_INSTANCEP (value) + && + IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) > 1 + && + !disable_animated_pixmaps) + { + /* Increment the index of the image slice we are currently + viewing. */ + IMAGE_INSTANCE_PIXMAP_SLICE (ii) = + (IMAGE_INSTANCE_PIXMAP_SLICE (ii) + 1) + % IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii); + /* We might need to kick redisplay at this point - but we + also might not. */ + MARK_DEVICE_FRAMES_GLYPHS_CHANGED + (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))); + IMAGE_INSTANCE_DIRTYP (ii) = 1; + } + } + } + return Qnil; +} + +Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object image) +{ + Lisp_Object ret = Qnil; + + if (tickms > 0 && IMAGE_INSTANCEP (image)) + { + double ms = ((double)tickms) / 1000.0; + struct gcpro gcpro1; + Lisp_Object holder = make_weak_list (WEAK_LIST_SIMPLE); + + GCPRO1 (holder); + XWEAK_LIST_LIST (holder) = Fcons (image, Qnil); + + ret = Fadd_timeout (make_float (ms), + Qglyph_animated_timeout_handler, + holder, make_float (ms)); + + UNGCPRO; + } + return ret; +} + +void disable_glyph_animated_timeout (int i) +{ + Lisp_Object id; + XSETINT (id, i); + + Fdisable_timeout (id); +} + /***************************************************************************** * initialization * @@ -4011,6 +4383,7 @@ syms_of_glyphs (void) defsymbol (&Qpointer_image_instance_p, "pointer-image-instance-p"); defsymbol (&Qwidget_image_instance_p, "widget-image-instance-p"); defsymbol (&Qsubwindow_image_instance_p, "subwindow-image-instance-p"); + defsymbol (&Qlayout_image_instance_p, "layout-image-instance-p"); DEFSUBR (Fmake_image_instance); DEFSUBR (Fimage_instance_p); @@ -4069,6 +4442,12 @@ syms_of_glyphs (void) /* Qbuffer defined in general.c. */ /* Qpointer defined above */ + /* Unfortunately, timeout handlers must be lisp functions. This is + for animated glyphs. */ + defsymbol (&Qglyph_animated_timeout_handler, + "glyph-animated-timeout-handler"); + DEFSUBR (Fglyph_animated_timeout_handler); + /* Errors */ deferror (&Qimage_conversion_error, "image-conversion-error", @@ -4076,6 +4455,11 @@ syms_of_glyphs (void) } +static const struct lrecord_description image_specifier_description[] = { + { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct image_specifier, attachee), 2 }, + { XD_END } +}; + void specifier_type_create_image (void) { @@ -4092,6 +4476,66 @@ specifier_type_create_image (void) } void +reinit_specifier_type_create_image (void) +{ + REINITIALIZE_SPECIFIER_TYPE (image); +} + + +static const struct lrecord_description iike_description_1[] = { + { XD_LISP_OBJECT, offsetof(ii_keyword_entry, keyword), 1 }, + { XD_END } +}; + +static const struct struct_description iike_description = { + sizeof(ii_keyword_entry), + iike_description_1 +}; + +static const struct lrecord_description iiked_description_1[] = { + XD_DYNARR_DESC(ii_keyword_entry_dynarr, &iike_description), + { XD_END } +}; + +static const struct struct_description iiked_description = { + sizeof(ii_keyword_entry_dynarr), + iiked_description_1 +}; + +static const struct lrecord_description iife_description_1[] = { + { XD_LISP_OBJECT, offsetof(image_instantiator_format_entry, symbol), 2 }, + { XD_STRUCT_PTR, offsetof(image_instantiator_format_entry, meths), 1, &iim_description }, + { XD_END } +}; + +static const struct struct_description iife_description = { + sizeof(image_instantiator_format_entry), + iife_description_1 +}; + +static const struct lrecord_description iifed_description_1[] = { + XD_DYNARR_DESC(image_instantiator_format_entry_dynarr, &iife_description), + { XD_END } +}; + +static const struct struct_description iifed_description = { + sizeof(image_instantiator_format_entry_dynarr), + iifed_description_1 +}; + +static const struct lrecord_description iim_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct image_instantiator_methods, symbol), 2 }, + { XD_STRUCT_PTR, offsetof(struct image_instantiator_methods, keywords), 1, &iiked_description }, + { XD_STRUCT_PTR, offsetof(struct image_instantiator_methods, consoles), 1, &cted_description }, + { XD_END } +}; + +const struct struct_description iim_description = { + sizeof(struct image_instantiator_methods), + iim_description_1 +}; + +void image_instantiator_format_create (void) { /* image instantiators */ @@ -4102,6 +4546,8 @@ image_instantiator_format_create (void) Vimage_instantiator_format_list = Qnil; staticpro (&Vimage_instantiator_format_list); + dumpstruct (&the_image_instantiator_format_entry_dynarr, &iifed_description); + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (nothing, "nothing"); IIFORMAT_HAS_METHOD (nothing, possible_dest_types); @@ -4123,6 +4569,9 @@ image_instantiator_format_create (void) IIFORMAT_HAS_METHOD (string, instantiate); IIFORMAT_VALID_KEYWORD (string, Q_data, check_valid_string); + /* Do this so we can set strings. */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (text, "text"); + IIFORMAT_HAS_METHOD (text, set_property); INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (formatted_string, "formatted-string"); @@ -4184,8 +4633,20 @@ image_instantiator_format_create (void) } void +reinit_vars_of_glyphs (void) +{ + the_expose_ignore_blocktype = + Blocktype_new (struct expose_ignore_blocktype); + + hold_ignored_expose_registration = 0; +} + + +void vars_of_glyphs (void) { + reinit_vars_of_glyphs (); + Vthe_nothing_vector = vector1 (Qnothing); staticpro (&Vthe_nothing_vector); @@ -4251,6 +4712,12 @@ The default value of this variable defines the logical color names #ifdef HAVE_XFACE Fprovide (Qxface); #endif + + DEFVAR_BOOL ("disable-animated-pixmaps", &disable_animated_pixmaps /* +Whether animated pixmaps should be animated. +Default is t. +*/); + disable_animated_pixmaps = 0; } void diff --git a/src/glyphs.h b/src/glyphs.h index 2780192..b0e65f1 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -56,8 +56,11 @@ struct image_instantiator_methods; inherit mono-pixmap autodetect mono-pixmap, color-pixmap, pointer, text button widget - edit widget - combo widget + edit-field widget + combo -box widget + progress-gauge widget + tab-control widget + tree-view widget scrollbar widget static widget */ @@ -78,6 +81,8 @@ typedef struct Dynarr_declare (ii_keyword_entry); } ii_keyword_entry_dynarr; +extern const struct struct_description iim_description; + struct image_instantiator_methods { Lisp_Object symbol; @@ -176,12 +181,14 @@ do { \ Dynarr_new (console_type_entry); \ add_entry_to_image_instantiator_format_list \ (Q##format, format##_image_instantiator_methods); \ + dumpstruct (&format##_image_instantiator_methods, \ + &iim_description); \ } while (0) #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \ do { \ defsymbol (&Q##format, obj_name); \ - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name); \ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name);\ } while (0) /* Declare that image-instantiator format FORMAT has method M; used in @@ -235,23 +242,27 @@ do { \ DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ struct image_instantiator_methods *type##_##format##_image_instantiator_methods -#define INITIALIZE_DEVICE_IIFORMAT(type, format) \ -do { \ - type##_##format##_image_instantiator_methods = \ - xnew_and_zero (struct image_instantiator_methods); \ +#define INITIALIZE_DEVICE_IIFORMAT(type, format) \ +do { \ + type##_##format##_image_instantiator_methods = \ + xnew_and_zero (struct image_instantiator_methods); \ type##_##format##_image_instantiator_methods->symbol = Q##format; \ type##_##format##_image_instantiator_methods->device = Q##type; \ type##_##format##_image_instantiator_methods->keywords = \ - Dynarr_new (ii_keyword_entry); \ - add_entry_to_device_ii_format_list \ + Dynarr_new (ii_keyword_entry); \ + add_entry_to_device_ii_format_list \ (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ - IIFORMAT_VALID_CONSOLE(type,format); \ + IIFORMAT_VALID_CONSOLE(type,format); \ + dumpstruct (&type##_##format##_image_instantiator_methods, \ + &iim_description); \ } while (0) /* Declare that image-instantiator format FORMAT has method M; used in initialization routines */ #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \ (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m) +#define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \ + (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m) struct image_instantiator_methods * decode_device_ii_format (Lisp_Object device, Lisp_Object format, @@ -279,11 +290,16 @@ void check_valid_string (Lisp_Object data); void check_valid_int (Lisp_Object data); void check_valid_face (Lisp_Object data); void check_valid_vector (Lisp_Object data); +void check_valid_item_list_1 (Lisp_Object items); void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain); +void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain, int default_textheight, + int default_pixheight, int default_textwidth); DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, int given_dest_mask, @@ -330,7 +346,6 @@ DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance); XRECORD (x, image_instance, struct Lisp_Image_Instance) #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance) #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) -#define GC_IMAGE_INSTANCEP(x) GC_RECORDP (x, image_instance) #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) @@ -343,7 +358,8 @@ enum image_instance_type IMAGE_COLOR_PIXMAP, IMAGE_POINTER, IMAGE_SUBWINDOW, - IMAGE_WIDGET + IMAGE_WIDGET, + IMAGE_LAYOUT }; #define IMAGE_NOTHING_MASK (1 << 0) @@ -353,6 +369,7 @@ enum image_instance_type #define IMAGE_POINTER_MASK (1 << 4) #define IMAGE_SUBWINDOW_MASK (1 << 5) #define IMAGE_WIDGET_MASK (1 << 6) +#define IMAGE_LAYOUT_MASK (1 << 7) #define IMAGE_INSTANCE_TYPE_P(ii, type) \ (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type) @@ -371,15 +388,17 @@ enum image_instance_type IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW) #define WIDGET_IMAGE_INSTANCEP(ii) \ IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) +#define LAYOUT_IMAGE_INSTANCEP(ii) \ + IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT) -#define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ +#define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ if (!NOTHING_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qnothing_image_instance_p, (x)); \ } while (0) -#define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ +#define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ if (!TEXT_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qtext_image_instance_p, (x)); \ } while (0) @@ -390,37 +409,45 @@ enum image_instance_type x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \ } while (0) -#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ +#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \ } while (0) -#define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ +#define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ if (!POINTER_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qpointer_image_instance_p, (x)); \ } while (0) -#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ +#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ CHECK_IMAGE_INSTANCE (x); \ if (!SUBWINDOW_IMAGE_INSTANCEP (x) \ && !WIDGET_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \ } while (0) -#define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ +#define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ if (!WIDGET_IMAGE_INSTANCEP (x)) \ x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ } while (0) +#define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \ + CHECK_IMAGE_INSTANCE (x); \ + if (!LAYOUT_IMAGE_INSTANCEP (x)) \ + x = wrong_type_argument (Qlayout_image_instance_p, (x)); \ +} while (0) + struct Lisp_Image_Instance { struct lcrecord_header header; Lisp_Object device; Lisp_Object name; enum image_instance_type type; + int x_offset, y_offset; /* for layout purposes */ + unsigned int dirty : 1; union { struct @@ -430,6 +457,7 @@ struct Lisp_Image_Instance struct { int width, height, depth; + int slice, maxslice, timeout; Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */ Lisp_Object filename; /* string or Qnil */ Lisp_Object mask_filename; /* string or Qnil */ @@ -438,20 +466,29 @@ struct Lisp_Image_Instance or a pointer */ Lisp_Object auxdata; /* list or Qnil: any additional data to be seen from lisp */ + void* mask; /* mask that can be seen from all windowing systems */ } pixmap; /* used for pointers as well */ struct { Lisp_Object frame; unsigned int width, height; void* subwindow; /* specific devices can use this as necessary */ - int being_displayed; /* used to detect when needs to be unmapped */ - struct + unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ + union { - Lisp_Object face; /* foreground and background colors */ - Lisp_Object type; - Lisp_Object props; /* properties */ - Lisp_Object gui_item; /* a list of gui_items */ - } widget; /* widgets are subwindows */ + struct + { + Lisp_Object face; /* foreground and background colors */ + Lisp_Object type; + Lisp_Object props; /* properties */ + Lisp_Object gui_item; /* a list of gui_items */ + } widget; /* widgets are subwindows */ + struct + { + Lisp_Object children; /* managed children */ + Lisp_Object border; /* Style of enclosing border or text. */ + } layout; + } s; } subwindow; } u; @@ -462,9 +499,12 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) #define IMAGE_INSTANCE_NAME(i) ((i)->name) #define IMAGE_INSTANCE_TYPE(i) ((i)->type) +#define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) +#define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) +#define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) @@ -478,6 +518,10 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg) #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg) #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata) +#define IMAGE_INSTANCE_PIXMAP_MASK(i) ((i)->u.pixmap.mask) +#define IMAGE_INSTANCE_PIXMAP_SLICE(i) ((i)->u.pixmap.slice) +#define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice) +#define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout) #define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) ((i)->u.subwindow.width) #define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) ((i)->u.subwindow.height) @@ -490,22 +534,31 @@ struct Lisp_Image_Instance IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) -#define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type) -#define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props) -#define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face) -#define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item) -#define IMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ -(CONSP (IMAGE_INSTANCE_WIDGET_ITEM (i)) ? \ -XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ - IMAGE_INSTANCE_WIDGET_ITEM (i)) +#define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) +#define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) +#define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.s.widget.face) +#define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item) +#define IMAGE_INSTANCE_WIDGET_ITEM(i) \ +(CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ +XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ + IMAGE_INSTANCE_WIDGET_ITEMS (i)) #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name +#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.s.layout.children) +#define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.s.layout.border) + #define XIMAGE_INSTANCE_DEVICE(i) \ IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_NAME(i) \ IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_TYPE(i) \ IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_XOFFSET(i) \ + IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_YOFFSET(i) \ + IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DIRTYP(i) \ + IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_TEXT_STRING(i) \ IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i)) @@ -528,6 +581,14 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_PIXMAP_BG(i) \ IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_PIXMAP_MASK(i) \ + IMAGE_INSTANCE_PIXMAP_MASK (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_PIXMAP_SLICE(i) \ + IMAGE_INSTANCE_PIXMAP_SLICE (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_PIXMAP_MAXSLICE(i) \ + IMAGE_INSTANCE_PIXMAP_MAXSLICE (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_PIXMAP_TIMEOUT(i) \ + IMAGE_INSTANCE_PIXMAP_TIMEOUT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \ IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i)) @@ -541,11 +602,16 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ - IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \ + IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \ + IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \ + IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i)) + #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ @@ -557,6 +623,9 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) +#define MARK_IMAGE_INSTANCE_CHANGED(i) \ + (IMAGE_INSTANCE_DIRTYP (i) = 1); + #ifdef HAVE_XPM Lisp_Object evaluate_xpm_color_symbols (void); Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid); @@ -596,17 +665,19 @@ struct Lisp_Glyph Lisp_Object baseline; /* percent above baseline */ Lisp_Object face; /* if non-nil, face to use when displaying */ - + Lisp_Object plist; void (*after_change) (Lisp_Object glyph, Lisp_Object property, Lisp_Object locale); + + unsigned int dirty : 1; /* So that we can selectively + redisplay changed glyphs. */ }; DECLARE_LRECORD (glyph, struct Lisp_Glyph); #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph) #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph) #define GLYPHP(x) RECORDP (x, glyph) -#define GC_GLYPHP(x) GC_RECORDP (x, glyph) #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) @@ -633,21 +704,26 @@ DECLARE_LRECORD (glyph, struct Lisp_Glyph); #define GLYPH_CONTRIB_P(g) ((g)->contrib_p) #define GLYPH_BASELINE(g) ((g)->baseline) #define GLYPH_FACE(g) ((g)->face) +#define GLYPH_DIRTYP(g) ((g)->dirty) #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g)) #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g)) #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g)) #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g)) #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g)) +#define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g)) + +#define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1); -extern Lisp_Object Qxpm, Qxface; +extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; -extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge; +extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge, Q_border; extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error; +extern Lisp_Object Q_orientation; extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; extern Lisp_Object Vxemacs_logo; @@ -688,6 +764,8 @@ Lisp_Object widget_face_font_info (Lisp_Object domain, Lisp_Object face, void widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face, int th, int tw, int* height, int* width); +Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); +void disable_glyph_animated_timeout (int i); /************************************************************************/ /* Glyph Cachels */ @@ -698,7 +776,14 @@ struct glyph_cachel { Lisp_Object glyph; + unsigned int dirty :1; /* I'm copying faces here. I'm not + sure why we need two dirty + flags. Maybe because an image + instance can be dirty and so we + need to frob this in the same way + as other image instance properties. */ unsigned int updated :1; + unsigned short width; unsigned short ascent; unsigned short descent; @@ -721,11 +806,14 @@ struct glyph_cachel Dynarr_atp (window->glyph_cachels, index)->ascent #define GLYPH_CACHEL_DESCENT(window, index) \ Dynarr_atp (window->glyph_cachels, index)->descent +#define GLYPH_CACHEL_DIRTYP(window, index) \ + Dynarr_atp (window->glyph_cachels, index)->dirty -void mark_glyph_cachels (glyph_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)); +void mark_glyph_cachels (glyph_cachel_dynarr *elements); void mark_glyph_cachels_as_not_updated (struct window *w); +void mark_glyph_cachels_as_clean (struct window *w); void reset_glyph_cachels (struct window *w); +glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph); #ifdef MEMORY_USAGE_STATS int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, @@ -752,8 +840,8 @@ struct subwindow_cachel Lisp_Object subwindow; int x, y; int width, height; - int being_displayed; - int updated; + unsigned int being_displayed : 1; + unsigned int updated : 1; }; typedef struct @@ -761,12 +849,25 @@ typedef struct Dynarr_declare (subwindow_cachel); } subwindow_cachel_dynarr; -void mark_subwindow_cachels (subwindow_cachel_dynarr *elements, - void (*markobj) (Lisp_Object)); +void mark_subwindow_cachels (subwindow_cachel_dynarr *elements); void mark_subwindow_cachels_as_not_updated (struct frame *f); void reset_subwindow_cachels (struct frame *f); void unmap_subwindow (Lisp_Object subwindow); -void map_subwindow (Lisp_Object subwindow, int x, int y); +void map_subwindow (Lisp_Object subwindow, int x, int y, + struct display_glyph_area *dga); void update_frame_subwindows (struct frame *f); +int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); + +struct expose_ignore +{ + int x; + int y; + int width; + int height; + struct expose_ignore *next; +}; + +int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); +extern int hold_ignored_expose_registration; #endif /* _XEMACS_GLYPHS_H_ */ diff --git a/src/gpmevent.c b/src/gpmevent.c index 77f3738..2d37ea1 100644 --- a/src/gpmevent.c +++ b/src/gpmevent.c @@ -1,4 +1,27 @@ -/* William Perry 1997 */ +/* GPM functions + Copyright (C) 1997 William M. Perry + Copyright (C) 1999 Free Software Foundation, Inc. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +/* Authors: William Perry */ #include #include "lisp.h" @@ -8,6 +31,10 @@ #include "events.h" #include "events-mod.h" #include "sysdep.h" +#include "commands.h" +#include "lstream.h" +#include "sysproc.h" /* for MAXDESC */ +#include "process.h" #ifdef HAVE_GPM #include "gpmevent.h" @@ -21,94 +48,601 @@ #include #endif -int -handle_gpm_read (struct Lisp_Event *event, struct console *con, int fd) -{ - Gpm_Event ev; - int modifiers = 0; - int type = -1; - int button = 1; - - if (!Gpm_GetEvent(&ev)) - return 0; - - event->timestamp = 0; - event->channel = CONSOLE_SELECTED_FRAME (con); - - /* Whow, wouldn't named defines be NICE!?!?! */ - modifiers = 0; - - if (ev.modifiers & 1) modifiers |= MOD_SHIFT; - if (ev.modifiers & 2) modifiers |= MOD_META; - if (ev.modifiers & 4) modifiers |= MOD_CONTROL; - if (ev.modifiers & 8) modifiers |= MOD_META; - - if (ev.type & GPM_DOWN) - type = GPM_DOWN; - else if (ev.type & GPM_UP) - type = GPM_UP; - else if (ev.type & GPM_MOVE) { - type = GPM_MOVE; - GPM_DRAWPOINTER(&ev); - } - - if (ev.buttons & GPM_B_LEFT) - button = 1; - else if (ev.buttons & GPM_B_MIDDLE) - button = 2; - else if (ev.buttons & GPM_B_RIGHT) - button = 3; - - switch (type) { - case GPM_DOWN: - case GPM_UP: - event->event_type = - type == GPM_DOWN ? button_press_event : button_release_event; - event->event.button.x = ev.x; - event->event.button.y = ev.y; - event->event.button.button = button; - event->event.button.modifiers = modifiers; - break; - case GPM_MOVE: - event->event_type = pointer_motion_event; - event->event.motion.x = ev.x; - event->event.motion.y = ev.y; - event->event.motion.modifiers = modifiers; - default: - return 0; - } - return 1; -} - -void -connect_to_gpm (struct console *con) -{ - /* Only do this if we are running after dumping and really interactive */ - if (!noninteractive && initialized) { - /* We really only want to do this on a TTY */ - CONSOLE_TTY_MOUSE_FD (con) = -1; - if (EQ (CONSOLE_TYPE (con), Qtty)) { - Gpm_Connect conn; - int rval; - - conn.eventMask = GPM_DOWN|GPM_UP|GPM_MOVE; - conn.defaultMask = GPM_MOVE; - conn.minMod = 0; - conn.maxMod = ((1<= 0) + { + memset(&gpm_state_information[fd], '\0', sizeof(struct __gpm_state)); + } + gpm_tried = gpm_flag = 1; + gpm_fd = gpm_consolefd = -1; + gpm_stack = NULL; +} + +static int +get_process_infd (struct Lisp_Process *p) +{ + Lisp_Object instr, outstr; + get_process_streams (p, &instr, &outstr); + assert (!NILP (instr)); + return filedesc_stream_fd (XLSTREAM (instr)); +} + +DEFUN ("receive-gpm-event", Freceive_gpm_event, 0, 2, 0, /* +Run GPM_GetEvent(). +This function is the process handler for the GPM connection. +*/ + (process, string)) +{ + Gpm_Event ev; + int modifiers = 0; + int button = 1; + Lisp_Object fake_event; + struct Lisp_Event *event = NULL; + struct gcpro gcpro1; + static int num_events; + + CHECK_PROCESS (process); + + restore_gpm_state (get_process_infd (XPROCESS (process))); + + if (!Gpm_GetEvent(&ev)) + { + warn_when_safe (Qnil, Qcritical, "Gpm_GetEvent failed - %d", gpm_fd); + return(Qzero); + } + + GCPRO1(fake_event); + + num_events++; + + fake_event = Fmake_event (Qnil, Qnil); + event = XEVENT(fake_event); + + event->timestamp = 0; + event->channel = Fselected_frame (Qnil); /* CONSOLE_SELECTED_FRAME (con); */ + + /* Whow, wouldn't named defines be NICE!?!?! */ + modifiers = 0; + + if (ev.modifiers & 1) modifiers |= MOD_SHIFT; + if (ev.modifiers & 2) modifiers |= MOD_META; + if (ev.modifiers & 4) modifiers |= MOD_CONTROL; + if (ev.modifiers & 8) modifiers |= MOD_META; + + if (ev.buttons & GPM_B_LEFT) + { + button = 1; + } + else if (ev.buttons & GPM_B_MIDDLE) + { + button = 2; + } + else if (ev.buttons & GPM_B_RIGHT) + { + button = 3; + } + + switch (GPM_BARE_EVENTS(ev.type)) { + case GPM_DOWN: + case GPM_UP: + event->event_type = + (ev.type & GPM_DOWN) ? button_press_event : button_release_event; + event->event.button.x = ev.x; + event->event.button.y = ev.y; + event->event.button.button = button; + event->event.button.modifiers = modifiers; + break; + case GPM_MOVE: + case GPM_DRAG: + event->event_type = pointer_motion_event; + event->event.motion.x = ev.x; + event->event.motion.y = ev.y; + event->event.motion.modifiers = modifiers; + default: + /* This will never happen */ + break; + } + + /* Handle the event */ + enqueue_event (fake_event, &gpm_event_queue, &gpm_event_queue_tail); + + UNGCPRO; + + return (Qzero); +} + +static void turn_off_gpm (char *process_name) +{ + Lisp_Object process = Fget_process (build_string (process_name)); + int fd = -1; + + if (NILP (process)) + { + /* Something happened to our GPM process - fail silently */ + return; + } + + fd = get_process_infd (XPROCESS (process)); + + restore_gpm_state (fd); + Gpm_Close(); - break; - default: - set_descriptor_non_blocking (gpm_fd); - CONSOLE_TTY_MOUSE_FD (con) = gpm_fd; - } - } - } + + clear_gpm_state (fd); + + Fdelete_process (build_string (process_name)); +} + +#ifdef TIOCLINUX +static Lisp_Object +tty_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) +{ + /* This function can GC */ + struct device *d = decode_device (Qnil); + int fd = DEVICE_INFD (d); + char c = 3; + Lisp_Object output_stream; + Lisp_Object terminal_stream; + Lisp_Object output_string; + struct gcpro gcpro1,gcpro2,gcpro3; + + GCPRO3(output_stream,terminal_stream,output_string); + + /* The ioctl() to paste actually puts things in the input queue of + ** the virtual console, so we need to trap that data, since we are + ** supposed to return the actual string selection from this + ** function. + */ + + /* I really hate doing this, but it doesn't seem to cause any + ** problems, and it makes the Lstream_read stuff further down + ** error out correctly instead of trying to indefinitely read from + ** the console. + ** + ** There is no set_descriptor_blocking() function call, but in my + ** testing under linux, it has not proved fatal to leave the + ** descriptor in non-blocking mode. + ** + ** William Perry Nov 5, 1999 + */ + set_descriptor_non_blocking (fd); + + /* We need two streams, one for reading from the selected device, + ** and one to write the data into. There is no writable version + ** of the lisp-string lstream, so we make do with a resizing + ** buffer stream, and make a string out of it after we are + ** done. + */ + output_stream = make_resizing_buffer_output_stream (); + terminal_stream = make_filedesc_input_stream (fd, 0, -1, LSTR_BLOCKED_OK); + output_string = Qnil; + + /* #### We should arguably use a specbind() and an unwind routine here, + ** #### but I don't care that much right now. + */ + if (NILP (output_stream) || NILP (terminal_stream)) + { + /* Should we signal an error here? */ + goto out; + } + + if (ioctl (fd, TIOCLINUX, &c) < 0) + { + /* Could not get the selection - eek */ + UNGCPRO; + return (Qnil); + } + + while (1) + { + Bufbyte tempbuf[1024]; /* some random amount */ + ssize_t i; + ssize_t size_in_bytes = + Lstream_read (XLSTREAM (terminal_stream), + tempbuf, sizeof (tempbuf)); + + if (size_in_bytes <= 0) + { + /* end of the stream */ + break; + } + + /* convert CR->LF */ + for (i = 0; i < size_in_bytes; i++) + { + if (tempbuf[i] == '\r') + { + tempbuf[i] = '\n'; + } + } + + Lstream_write (XLSTREAM (output_stream), tempbuf, size_in_bytes); + } + + Lstream_flush (XLSTREAM (output_stream)); + + output_string = make_string (resizing_buffer_stream_ptr (XLSTREAM (output_stream)), + Lstream_byte_count (XLSTREAM (output_stream))); + + Lstream_delete (XLSTREAM (output_stream)); + Lstream_delete (XLSTREAM (terminal_stream)); + + out: + UNGCPRO; + return (output_string); +} + +static Lisp_Object +tty_selection_exists_p (Lisp_Object selection) +{ + return (Qt); } +#endif /* TIOCLINUX */ + +#if 0 +static Lisp_Object +tty_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) +{ + /* There is no way to do this cleanly - the GPM selection + ** 'protocol' (actually the TIOCLINUX ioctl) requires a start and + ** end position on the _screen_, not a string to stick in there. + ** Lame. + ** + ** William Perry Nov 4, 1999 + */ +} +#endif + +/* This function appears to work once in a blue moon. I'm not sure +** exactly why either. *sigh* +** +** William Perry Nov 4, 1999 +** +** Apparently, this is the way (mouse-position) is supposed to work, +** and I was just expecting something else. (mouse-pixel-position) +** works just fine. +** +** William Perry Nov 7, 1999 +*/ +static int +tty_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y) +{ + Gpm_Event ev; + int num_buttons; + + memset(&ev,'\0',sizeof(ev)); + + num_buttons = Gpm_GetSnapshot(&ev); + + if (!num_buttons) + { + /* This means there are events pending... */ + + /* #### In theory, we should drain the events pending, stick + ** #### them in the queue, and return the mouse position + ** #### anyway. + */ + return(-1); + } + *x = ev.x; + *y = ev.y; + *frame = DEVICE_SELECTED_FRAME (d); + return (1); +} + +static void +tty_set_mouse_position (struct window *w, int x, int y) +{ + /* + #### I couldn't find any GPM functions that set the mouse position. + #### Mr. Perry had left this function empty; that must be why. + #### karlheg + */ +} + +static int gpm_event_pending_p (int user_p) +{ + Lisp_Object event; + + EVENT_CHAIN_LOOP (event, gpm_event_queue) + { + if (!user_p || command_event_p (event)) + { + return (1); + } + } + return (orig_event_pending_p (user_p)); +} + +static void gpm_next_event_cb (struct Lisp_Event *event) +{ + /* #### It would be nice to preserve some sort of ordering of the + ** #### different types of events, but that would be quite a bit + ** #### of work, and would more than likely break the abstraction + ** #### between the other event loops and this one. + */ + + if (!NILP (gpm_event_queue)) + { + Lisp_Object queued_event = dequeue_event (&gpm_event_queue, &gpm_event_queue_tail); + *event = *(XEVENT (queued_event)); + + if (event->event_type == pointer_motion_event) + { + struct device *d = decode_device (event->channel); + int fd = DEVICE_INFD (d); + + /* Ok, now this is just freaky. Bear with me though. + ** + ** If you run gnuclient and attach to a XEmacs running in + ** X or on another TTY, the mouse cursor does not get + ** drawn correctly. This is because the ioctl() fails + ** with EPERM because the TTY specified is not our + ** controlling terminal. If you are the superuser, it + ** will work just spiffy. The appropriate source file (at + ** least in linux 2.2.x) is + ** .../linux/drivers/char/console.c in the function + ** tioclinux(). The following bit of code is brutal to + ** us: + ** + ** if (current->tty != tty && !suser()) + ** return -EPERM; + ** + ** I even tried setting us as a process leader, removing + ** our controlling terminal, and then using the TIOCSCTTY + ** to set up a new controlling terminal, all with no luck. + ** + ** What is even weirder is if you run XEmacs in a VC, and + ** attach to it from another VC with gnuclient, go back to + ** the original VC and hit a key, the mouse pointer + ** displays (in BOTH VCs), until you hit a key in the + ** second VC, after which it does not display in EITHER + ** VC. Bizarre, no? + ** + ** All I can say is thank god Linux comes with source code + ** or I would have been completely confused. Well, ok, + ** I'm still completely confused. I don't see why they + ** don't just check the permissions on the device + ** (actually, if you have enough access to it to get the + ** console's file descriptor, you should be able to do + ** with it as you wish, but maybe that is just me). + ** + ** William M. Perry - Nov 9, 1999 + */ + + Gpm_DrawPointer (event->event.motion.x,event->event.motion.y, fd); + } + + return; + } + + return (orig_next_event_cb (event)); +} + +static void hook_event_callbacks_once (void) +{ + static int hooker; + + if (!hooker) + { + orig_event_pending_p = event_stream->event_pending_p; + orig_next_event_cb = event_stream->next_event_cb; + event_stream->event_pending_p = gpm_event_pending_p; + event_stream->next_event_cb = gpm_next_event_cb; + hooker = 1; + } +} + +static void hook_console_methods_once (void) +{ + static int hooker; + if (!hooker) + { + /* Install the mouse position methods for the TTY console type */ + CONSOLE_HAS_METHOD (tty, get_mouse_position); + CONSOLE_HAS_METHOD (tty, set_mouse_position); + CONSOLE_HAS_METHOD (tty, get_foreign_selection); + CONSOLE_HAS_METHOD (tty, selection_exists_p); +#if 0 + CONSOLE_HAS_METHOD (tty, own_selection); #endif + } +} + +DEFUN ("gpm-enabled-p", Fgpm_enabled_p, 0, 1, 0, /* +Return non-nil if GPM mouse support is currently enabled on DEVICE. +*/ + (device)) +{ + char *console_name = ttyname (DEVICE_INFD (decode_device (device))); + char process_name[1024]; + Lisp_Object proc; + + if (!console_name) + { + return (Qnil); + } + + memset (process_name, '\0', sizeof(process_name)); + snprintf (process_name, sizeof(process_name) - 1, "gpm for %s", console_name); + + proc = Fget_process (build_string (process_name)); + + if (NILP (proc)) + { + return (Qnil); + } + + if (1) /* (PROCESS_LIVE_P (proc)) */ + { + return (Qt); + } + return (Qnil); +} + +DEFUN ("gpm-enable", Fgpm_enable, 0, 2, 0, /* +Toggle accepting of GPM mouse events. +*/ + (device, arg)) +{ + Gpm_Connect conn; + int rval; + Lisp_Object gpm_process; + Lisp_Object gpm_filter; + struct device *d = decode_device (device); + int fd = DEVICE_INFD (d); + char *console_name = ttyname (fd); + char process_name[1024]; + + hook_event_callbacks_once (); + hook_console_methods_once (); + + if (noninteractive) + { + error ("Can't connect to GPM in batch mode."); + } + + if (!console_name) + { + /* Something seriously wrong here... */ + return (Qnil); + } + + memset (process_name, '\0', sizeof(process_name)); + snprintf (process_name, sizeof(process_name) - 1, "gpm for %s", console_name); + + if (NILP (arg)) + { + turn_off_gpm (process_name); + return (Qnil); + } + + /* DANGER DANGER. + ** Though shalt not call (gpm-enable t) after we have already + ** started, or stuff blows up. + */ + if (!NILP (Fgpm_enabled_p (device))) + { + error ("GPM already enabled for this console."); + } + + conn.eventMask = GPM_DOWN|GPM_UP|GPM_MOVE|GPM_DRAG; + conn.defaultMask = GPM_MOVE; + conn.minMod = 0; + conn.maxMod = ((1<call_data) { VOID_TO_LISP (markee, val->call_data); - (cl->markobj) (markee); + mark_object (markee); } if (val->accel) { VOID_TO_LISP (markee, val->accel); - (cl->markobj) (markee); + mark_object (markee); } return 0; } static Lisp_Object -mark_popup_data (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_popup_data (Lisp_Object obj) { struct popup_data *data = (struct popup_data *) XPOPUP_DATA (obj); @@ -93,12 +85,7 @@ mark_popup_data (Lisp_Object obj, void (*markobj) (Lisp_Object)) call-data */ if (data->id) - { - struct mark_widget_value_closure closure; - - closure.markobj = markobj; - lw_map_widget_values (data->id, mark_widget_value_mapper, &closure); - } + lw_map_widget_values (data->id, mark_widget_value_mapper, 0); return data->last_menubar_buffer; } @@ -257,7 +244,7 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, } else { - MARK_SUBWINDOWS_CHANGED; + MARK_SUBWINDOWS_STATE_CHANGED; get_gui_callback (data, &fn, &arg); } @@ -325,7 +312,20 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, /* !!#### This function has not been Mule-ized */ /* This function cannot GC because gc_currently_forbidden is set when it's called */ - struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item); + struct Lisp_Gui_Item* pgui = 0; + + /* degenerate case */ + if (STRINGP (gui_item)) + { + wv->type = TEXT_TYPE; + wv->name = (char *) XSTRING_DATA (gui_item); + wv->name = xstrdup (wv->name); + return 1; + } + else if (!GUI_ITEMP (gui_item)) + signal_simple_error("need a string or a gui_item here", gui_item); + + pgui = XGUI_ITEM (gui_item); if (!NILP (pgui->filter)) signal_simple_error(":filter keyword not permitted on leaf nodes", gui_item); @@ -340,6 +340,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, CHECK_STRING (pgui->name); wv->name = (char *) XSTRING_DATA (pgui->name); + wv->name = xstrdup (wv->name); wv->accel = LISP_TO_VOID (gui_item_accelerator (gui_item)); if (!NILP (pgui->suffix)) @@ -448,6 +449,111 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, return 1; } +/* parse tree's of gui items into widget_value hierarchies */ +static void gui_item_children_to_widget_values (Lisp_Object items, widget_value* parent); + +static widget_value * +gui_items_to_widget_values_1 (Lisp_Object items, widget_value* parent, + widget_value* prev) +{ + widget_value* wv = 0; + + assert ((parent || prev) && !(parent && prev)); + /* now walk the tree creating widget_values as appropriate */ + if (!CONSP (items)) + { + wv = xmalloc_widget_value(); + if (parent) + parent->contents = wv; + else + prev->next = wv; + if (!button_item_to_widget_value (items, wv, 0, 1)) + { + free_widget_value (wv); + if (parent) + parent->contents = 0; + else + prev->next = 0; + } + else + { + wv->value = xstrdup (wv->name); /* what a mess... */ + } + } + else + { + /* first one is the parent */ + if (CONSP (XCAR (items))) + signal_simple_error ("parent item must not be a list", XCAR (items)); + + if (parent) + wv = gui_items_to_widget_values_1 (XCAR (items), parent, 0); + else + wv = gui_items_to_widget_values_1 (XCAR (items), 0, prev); + /* the rest are the children */ + gui_item_children_to_widget_values (XCDR (items), wv); + } + return wv; +} + +static void +gui_item_children_to_widget_values (Lisp_Object items, widget_value* parent) +{ + widget_value* wv = 0, *prev = 0; + Lisp_Object rest; + CHECK_CONS (items); + + /* first one is master */ + prev = gui_items_to_widget_values_1 (XCAR (items), parent, 0); + /* the rest are the children */ + LIST_LOOP (rest, XCDR (items)) + { + Lisp_Object tab = XCAR (rest); + wv = gui_items_to_widget_values_1 (tab, 0, prev); + prev = wv; + } +} + +widget_value * +gui_items_to_widget_values (Lisp_Object items) +{ + /* !!#### This function has not been Mule-ized */ + /* This function can GC */ + widget_value *control = 0, *tmp = 0; + int count = specpdl_depth (); + Lisp_Object wv_closure; + + if (NILP (items)) + signal_simple_error ("must have some items", items); + + /* Inhibit GC during this conversion. The reasons for this are + the same as in menu_item_descriptor_to_widget_value(); see + the large comment above that function. */ + record_unwind_protect (restore_gc_inhibit, + make_int (gc_currently_forbidden)); + gc_currently_forbidden = 1; + + /* Also make sure that we free the partially-created widget_value + tree on Lisp error. */ + control = xmalloc_widget_value(); + wv_closure = make_opaque_ptr (control); + record_unwind_protect (widget_value_unwind, wv_closure); + + gui_items_to_widget_values_1 (items, control, 0); + + /* mess about getting the data we really want */ + tmp = control; + control = control->contents; + tmp->next = 0; + tmp->contents = 0; + free_widget_value (tmp); + + /* No more need to free the half-filled-in structures. */ + set_opaque_ptr (wv_closure, 0); + unbind_to (count, Qnil); + + return control; +} /* This is a kludge to make sure emacs can only link against a version of lwlib that was compiled in the right way. Emacs references symbols which @@ -498,6 +604,11 @@ sanity_check_lwlib (void) #elif defined (HAVE_DIALOGS) MACROLET (lwlib_dialogs_athena); #endif +#ifdef LWLIB_WIDGETS_MOTIF + MACROLET (lwlib_widgets_motif); +#elif defined (HAVE_WIDGETS) + MACROLET (lwlib_widgets_athena); +#endif #undef MACROLET } @@ -509,11 +620,21 @@ syms_of_gui_x (void) } void -vars_of_gui_x (void) +reinit_vars_of_gui_x (void) { lwlib_id_tick = (1<<16); /* start big, to not conflict with Energize */ - +#ifdef HAVE_POPUPS popup_up_p = 0; +#endif + + /* this makes only safe calls as in emacs.c */ + sanity_check_lwlib (); +} + +void +vars_of_gui_x (void) +{ + reinit_vars_of_gui_x (); Vpopup_callbacks = Qnil; staticpro (&Vpopup_callbacks); @@ -527,7 +648,4 @@ without a selection having been made. */ ); #endif Fset (Qmenu_no_selection_hook, Qnil); - - /* this makes only safe calls as in emacs.c */ - sanity_check_lwlib (); } diff --git a/src/gui-x.h b/src/gui-x.h index ed7e4d5..bb6fa10 100644 --- a/src/gui-x.h +++ b/src/gui-x.h @@ -30,8 +30,6 @@ widget_value *xmalloc_widget_value (void); LWLIB_ID new_lwlib_id (void); -#ifdef HAVE_POPUPS - /* Each frame has one of these, and they are also contained in Vpopup_callbacks. It doesn't really need to be an lrecord (it's not lisp-accessible) @@ -62,7 +60,6 @@ DECLARE_LRECORD (popup_data, struct popup_data); #define XPOPUP_DATA(x) XRECORD (x, popup_data, struct popup_data) #define XSETPOPUP_DATA(x, p) XSETRECORD (x, p, popup_data) #define POPUP_DATAP(x) RECORDP (x, popup_data) -#define GC_POPUP_DATAP(x) GC_RECORDP (x, popup_data) #define CHECK_POPUP_DATA(x) CHECK_RECORD (x, popup_data) void gcpro_popup_callbacks (LWLIB_ID id); @@ -73,10 +70,9 @@ void popup_selection_callback (Widget widget, LWLIB_ID ignored_id, XtPointer client_data); int button_item_to_widget_value (Lisp_Object desc, widget_value *wv, int allow_text_field_p, int no_keys_p); +widget_value * gui_items_to_widget_values (Lisp_Object items); Lisp_Object menu_name_to_accelerator (char *name); char *menu_separator_style (CONST char *s); Lisp_Object widget_value_unwind (Lisp_Object closure); -#endif /* HAVE_POPUPS */ - #endif /* _XEMACS_XLWLIB_H_ */ diff --git a/src/gui.c b/src/gui.c index 4824420..e43a204 100644 --- a/src/gui.c +++ b/src/gui.c @@ -34,6 +34,8 @@ Lisp_Object Q_filter, Q_config, Q_included, Q_key_sequence; Lisp_Object Q_accelerator, Q_label, Q_callback; Lisp_Object Qtoggle, Qradio; +static Lisp_Object parse_gui_item_tree_list (Lisp_Object list); + #ifdef HAVE_POPUPS /* count of menus/dboxes currently up */ @@ -152,7 +154,7 @@ gui_item_init (Lisp_Object gui_item) } Lisp_Object -allocate_gui_item () +allocate_gui_item (void) { struct Lisp_Gui_Item *lp = alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item); @@ -381,6 +383,7 @@ unsigned int gui_item_display_flush_left (Lisp_Object gui_item, char* buf, Bytecount buf_len) { + /* This function can call lisp */ char *p = buf; Bytecount len; struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); @@ -468,22 +471,22 @@ gui_item_display_flush_right (Lisp_Object gui_item, #endif /* HAVE_WINDOW_SYSTEM */ static Lisp_Object -mark_gui_item (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_gui_item (Lisp_Object obj) { struct Lisp_Gui_Item *p = XGUI_ITEM (obj); - markobj (p->name); - markobj (p->callback); - markobj (p->config); - markobj (p->suffix); - markobj (p->active); - markobj (p->included); - markobj (p->config); - markobj (p->filter); - markobj (p->style); - markobj (p->selected); - markobj (p->keys); - markobj (p->accelerator); + mark_object (p->name); + mark_object (p->callback); + mark_object (p->config); + mark_object (p->suffix); + mark_object (p->active); + mark_object (p->included); + mark_object (p->config); + mark_object (p->filter); + mark_object (p->style); + mark_object (p->selected); + mark_object (p->keys); + mark_object (p->accelerator); return Qnil; } @@ -563,6 +566,56 @@ print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } +/* parse a glyph descriptor into a tree of gui items. + + The gui_item slot of an image instance can be a single item or an + arbitrarily nested hierarchy of item lists. */ + +static Lisp_Object parse_gui_item_tree_item (Lisp_Object entry) +{ + Lisp_Object ret = entry; + if (VECTORP (entry)) + { + ret = gui_parse_item_keywords_no_errors (entry); + } + else if (STRINGP (entry)) + { + CHECK_STRING (entry); + } + else + signal_simple_error ("item must be a vector or a string", entry); + + return ret; +} + +Lisp_Object parse_gui_item_tree_children (Lisp_Object list) +{ + Lisp_Object rest, ret = Qnil; + CHECK_CONS (list); + /* recursively add items to the tree view */ + LIST_LOOP (rest, list) + { + Lisp_Object sub; + if (CONSP (XCAR (rest))) + sub = parse_gui_item_tree_list (XCAR (rest)); + else + sub = parse_gui_item_tree_item (XCAR (rest)); + + ret = Fcons (sub, ret); + } + /* make the order the same as the items we have parsed */ + return Fnreverse (ret); +} + +static Lisp_Object parse_gui_item_tree_list (Lisp_Object list) +{ + Lisp_Object ret; + CHECK_CONS (list); + /* first one can never be a list */ + ret = parse_gui_item_tree_item (XCAR (list)); + return Fcons (ret, parse_gui_item_tree_children (XCDR (list))); +} + DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item, mark_gui_item, print_gui_item, 0, gui_item_equal, diff --git a/src/gui.h b/src/gui.h index 904bd96..4723252 100644 --- a/src/gui.h +++ b/src/gui.h @@ -41,7 +41,6 @@ DECLARE_LRECORD (gui_item, struct Lisp_Gui_Item); XRECORD (x, gui_item, struct Lisp_Gui_Item) #define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item) #define GUI_ITEMP(x) RECORDP (x, gui_item) -#define GC_GUI_ITEMP(x) GC_RECORDP (x, gui_item) #define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item) #define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item) @@ -72,6 +71,7 @@ void gui_item_add_keyval_pair (Lisp_Object, Error_behavior errb); Lisp_Object gui_parse_item_keywords (Lisp_Object item); Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item); +void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item); int gui_item_active_p (Lisp_Object); int gui_item_selected_p (Lisp_Object); int gui_item_included_p (Lisp_Object, Lisp_Object into); @@ -83,8 +83,9 @@ unsigned int gui_item_display_flush_left (Lisp_Object pgui_item, unsigned int gui_item_display_flush_right (Lisp_Object gui_item, char* buf, Bytecount buf_len); -Lisp_Object allocate_gui_item (); +Lisp_Object allocate_gui_item (void); void gui_item_init (Lisp_Object gui_item); +Lisp_Object parse_gui_item_tree_children (Lisp_Object list); /* this is mswindows biased but reasonably safe I think */ #define GUI_ITEM_ID_SLOTS 8 diff --git a/src/gutter.c b/src/gutter.c index 64d0df3..d9534d0 100644 --- a/src/gutter.c +++ b/src/gutter.c @@ -20,7 +20,8 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* Specifers ripped-off from toolbar.c */ +/* written by Andy Piper with specifiers partially + ripped-off from toolbar.c */ #include #include "lisp.h" @@ -45,25 +46,27 @@ Lisp_Object Vdefault_gutter_border_width; Lisp_Object Vdefault_gutter_position; -#define SET_GUTTER_WAS_VISIBLE_FLAG(frame, pos, flag) \ - do { \ - switch (pos) \ - { \ - case TOP_GUTTER: \ - (frame)->top_gutter_was_visible = flag; \ - break; \ - case BOTTOM_GUTTER: \ - (frame)->bottom_gutter_was_visible = flag; \ - break; \ - case LEFT_GUTTER: \ - (frame)->left_gutter_was_visible = flag; \ - break; \ - case RIGHT_GUTTER: \ - (frame)->right_gutter_was_visible = flag; \ - break; \ - default: \ - abort (); \ - } \ +Lisp_Object Qgutter_size; + +#define SET_GUTTER_WAS_VISIBLE_FLAG(frame, pos, flag) \ + do { \ + switch (pos) \ + { \ + case TOP_GUTTER: \ + (frame)->top_gutter_was_visible = flag; \ + break; \ + case BOTTOM_GUTTER: \ + (frame)->bottom_gutter_was_visible = flag; \ + break; \ + case LEFT_GUTTER: \ + (frame)->left_gutter_was_visible = flag; \ + break; \ + case RIGHT_GUTTER: \ + (frame)->right_gutter_was_visible = flag; \ + break; \ + default: \ + abort (); \ + } \ } while (0) static int gutter_was_visible (struct frame* frame, enum gutter_pos pos) @@ -71,13 +74,13 @@ static int gutter_was_visible (struct frame* frame, enum gutter_pos pos) switch (pos) { case TOP_GUTTER: - return (frame)->top_gutter_was_visible; + return frame->top_gutter_was_visible; case BOTTOM_GUTTER: - return (frame)->bottom_gutter_was_visible; + return frame->bottom_gutter_was_visible; case LEFT_GUTTER: - return (frame)->left_gutter_was_visible; + return frame->left_gutter_was_visible; case RIGHT_GUTTER: - return (frame)->right_gutter_was_visible; + return frame->right_gutter_was_visible; default: abort (); } @@ -159,7 +162,7 @@ frame_rightmost_window (struct frame *f) use this for calculating the gutter positions we run into trouble if it is not the window nearest the gutter. Instead we predetermine the nearest window and then use that.*/ -void +static void get_gutter_coords (struct frame *f, enum gutter_pos pos, int *x, int *y, int *width, int *height) { @@ -224,19 +227,20 @@ output_gutter (struct frame *f, enum gutter_pos pos) face_index findex = get_builtin_face_cache_index (w, Vgui_element_face); display_line_dynarr* ddla, *cdla; struct display_line *dl; + int cdla_len; if (!f->current_display_lines) f->current_display_lines = Dynarr_new (display_line); if (!f->desired_display_lines) f->desired_display_lines = Dynarr_new (display_line); - + ddla = f->desired_display_lines; cdla = f->current_display_lines; + cdla_len = Dynarr_length (cdla); XSETFRAME (frame, f); get_gutter_coords (f, pos, &x, &y, &width, &height); - /* clear out what we want to cover */ /* generate some display lines */ generate_displayable_area (w, WINDOW_GUTTER (w, pos), x + border_width, y + border_width, @@ -248,22 +252,28 @@ output_gutter (struct frame *f, enum gutter_pos pos) output_display_line (w, cdla, ddla, line, -1, -1); } + /* If the number of display lines has shrunk, adjust. */ + if (cdla_len > Dynarr_length (ddla)) + { + Dynarr_length (cdla) = Dynarr_length (ddla); + } + /* grab coordinates of last line and blank after it. */ dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1); ypos = dl->ypos + dl->descent - dl->clip; redisplay_clear_region (window, findex, x + border_width , ypos, - width - 2 * border_width, height - (ypos - y)); - + width - 2 * border_width, height - (ypos - y) - border_width); /* bevel the gutter area if so desired */ if (border_width != 0) { MAYBE_DEVMETH (d, bevel_area, - (w, findex, x, y, width, height, border_width)); + (w, findex, x, y, width, height, border_width, + EDGE_ALL, EDGE_BEVEL_OUT)); } } /* sizing gutters is a pain so we try and help the user by detemining - what height will accomodate all lines. This is useless on left and + what height will accommodate all lines. This is useless on left and right gutters as we always have a maximal number of lines. */ static Lisp_Object calculate_gutter_size (struct window *w, enum gutter_pos pos) @@ -279,7 +289,9 @@ calculate_gutter_size (struct window *w, enum gutter_pos pos) /* degenerate case */ if (NILP (WINDOW_GUTTER (w, pos)) || - !FRAME_VISIBLE_P (f)) + !FRAME_VISIBLE_P (f) + || + NILP (w->buffer)) return Qnil; ddla = Dynarr_new (display_line); @@ -296,12 +308,12 @@ calculate_gutter_size (struct window *w, enum gutter_pos pos) { dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1); ypos = dl->ypos + dl->descent - dl->clip; - Dynarr_free (ddla); + free_display_lines (ddla); return make_int (ypos); } else { - Dynarr_free (ddla); + free_display_lines (ddla); return Qnil; } } @@ -323,21 +335,39 @@ clear_gutter (struct frame *f, enum gutter_pos pos) void update_frame_gutters (struct frame *f) { - if (f->gutter_changed || f->frame_changed || f->clear) + if (f->gutter_changed || f->clear || + f->glyphs_changed || f->subwindows_changed || + f->windows_changed || f->windows_structure_changed || + f->extents_changed || f->faces_changed) { - int pos; - /* and output */ + enum gutter_pos pos; + + /* We don't actually care about these when outputting the gutter + so locally disable them. */ + int local_clip_changed = f->clip_changed; + int local_buffers_changed = f->buffers_changed; + f->clip_changed = 0; + f->buffers_changed = 0; - for (pos = 0; pos < 4; pos++) + /* and output */ + GUTTER_POS_LOOP (pos) { if (FRAME_GUTTER_VISIBLE (f, pos)) - output_gutter (f, pos); + output_gutter (f, pos); else if (gutter_was_visible (f, pos)) clear_gutter (f, pos); } - + f->clip_changed = local_clip_changed; + f->buffers_changed = local_buffers_changed; + f->gutter_changed = 0; } - f->gutter_changed = 0; +} + +void +reset_gutter_display_lines (struct frame* f) +{ + if (f->current_display_lines) + Dynarr_reset (f->current_display_lines); } static void @@ -345,11 +375,10 @@ redraw_exposed_gutter (struct frame *f, enum gutter_pos pos, int x, int y, int width, int height) { int g_x, g_y, g_width, g_height; - int newx, newy; get_gutter_coords (f, pos, &g_x, &g_y, &g_width, &g_height); - if (((y + height) < g_y) || (y > (g_y + g_height))) + if (((y + height) < g_y) || (y > (g_y + g_height)) || !height || !width || !g_height || !g_width) return; if (((x + width) < g_x) || (x > (g_x + g_width))) return; @@ -357,16 +386,7 @@ redraw_exposed_gutter (struct frame *f, enum gutter_pos pos, int x, int y, /* #### optimize this - redrawing the whole gutter for every expose is very expensive. We reset the current display lines because if they're being exposed they are no longer current. */ - if (f->current_display_lines) - Dynarr_reset (f->current_display_lines); - /* we have to do this in-case there were subwindows where we are - redrawing, unfortunately sometimes this also generates expose - events resulting in an endless cycle of redsplay. */ - newx = max (x, g_x); - newy = max (y, g_y); - width = min (x + width - newx, g_x + g_width - newx); - height = min (y + height - newy, g_y + g_height - newy); - redisplay_unmap_subwindows_maybe (f, newx, newy, width, height); + reset_gutter_display_lines (f); /* Even if none of the gutter is in the area, the blank region at the very least must be because the first thing we did is verify @@ -378,21 +398,27 @@ void redraw_exposed_gutters (struct frame *f, int x, int y, int width, int height) { - int pos; - for (pos = 0; pos < 4; pos++) - { - if (FRAME_GUTTER_VISIBLE (f, pos)) - redraw_exposed_gutter (f, pos, x, y, width, height); - } + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) + { + if (FRAME_GUTTER_VISIBLE (f, pos)) + redraw_exposed_gutter (f, pos, x, y, width, height); + } } void free_frame_gutters (struct frame *f) { if (f->current_display_lines) - Dynarr_free (f->current_display_lines); + { + free_display_lines (f->current_display_lines); + f->current_display_lines = 0; + } if (f->desired_display_lines) - Dynarr_free (f->desired_display_lines); + { + free_display_lines (f->desired_display_lines); + f->desired_display_lines = 0; + } } static enum gutter_pos @@ -548,8 +574,8 @@ static void gutter_specs_changed (Lisp_Object specifier, struct window *w, Lisp_Object oldval) { - int pos; - for (pos = 0; pos< 4; pos++) + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) { w->real_gutter_size[pos] = w->gutter_size[pos]; if (EQ (w->real_gutter_size[pos], Qautodetect) @@ -573,8 +599,8 @@ static void gutter_geometry_changed_in_window (Lisp_Object specifier, struct window *w, Lisp_Object oldval) { - int pos; - for (pos = 0; pos< 4; pos++) + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) { w->real_gutter_size[pos] = w->gutter_size[pos]; if (EQ (w->real_gutter_size[pos], Qautodetect) @@ -611,15 +637,70 @@ default_gutter_visible_p_changed_in_window (Lisp_Object specifier, recompute_overlaying_specifier (Vgutter_visible_p); } + +DECLARE_SPECIFIER_TYPE (gutter_size); +#define GUTTER_SIZE_SPECIFIERP(x) SPECIFIER_TYPEP (x, gutter_size) +DEFINE_SPECIFIER_TYPE (gutter_size); + +static void +gutter_size_validate (Lisp_Object instantiator) +{ + if (NILP (instantiator)) + return; + + if (!INTP (instantiator) && !EQ (instantiator, Qautodetect)) + signal_simple_error ("Gutter size must be an integer or 'autodetect", instantiator); +} + +DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /* +Return non-nil if OBJECT is a gutter-size specifier. +*/ + (object)) +{ + return GUTTER_SIZE_SPECIFIERP (object) ? Qt : Qnil; +} + +DEFUN ("redisplay-gutter-area", Fredisplay_gutter_area, 0, 0, 0, /* +Ensure that all gutters are correctly showing their gutter specifier. +*/ + ()) +{ + Lisp_Object devcons, concons; + + DEVICE_LOOP_NO_BREAK (devcons, concons) + { + struct device *d = XDEVICE (XCAR (devcons)); + Lisp_Object frmcons; + + DEVICE_FRAME_LOOP (frmcons, d) + { + struct frame *f = XFRAME (XCAR (frmcons)); + + if (FRAME_REPAINT_P (f)) + { + update_frame_gutters (f); + } + } + + /* We now call the output_end routine for tty frames. We delay + doing so in order to avoid cursor flicker. So much for 100% + encapsulation. */ + if (DEVICE_TTY_P (d)) + DEVMETH (d, output_end, (d)); + } + + return Qnil; +} + void init_frame_gutters (struct frame *f) { - int pos; + enum gutter_pos pos; struct window* w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)); /* We are here as far in frame creation so cached specifiers are already recomputed, and possibly modified by resource initialization. We need to recalculate autodetected gutters. */ - for (pos = 0; pos< 4; pos++) + GUTTER_POS_LOOP (pos) { w->real_gutter_size[pos] = w->gutter_size[pos]; if (EQ (w->gutter_size[pos], Qautodetect) @@ -636,10 +717,14 @@ void syms_of_gutter (void) { DEFSUBR (Fgutter_specifier_p); + DEFSUBR (Fgutter_size_specifier_p); DEFSUBR (Fset_default_gutter_position); DEFSUBR (Fdefault_gutter_position); DEFSUBR (Fgutter_pixel_height); DEFSUBR (Fgutter_pixel_width); + DEFSUBR (Fredisplay_gutter_area); + + defsymbol (&Qgutter_size, "gutter-size"); } void @@ -658,6 +743,17 @@ specifier_type_create_gutter (void) SPECIFIER_HAS_METHOD (gutter, validate); SPECIFIER_HAS_METHOD (gutter, after_change); + + INITIALIZE_SPECIFIER_TYPE (gutter_size, "gutter-size", "gutter-size-specifier-p"); + + SPECIFIER_HAS_METHOD (gutter_size, validate); +} + +void +reinit_specifier_type_create_gutter (void) +{ + REINITIALIZE_SPECIFIER_TYPE (gutter); + REINITIALIZE_SPECIFIER_TYPE (gutter_size); } void @@ -815,7 +911,7 @@ If you set the height to 'autodetect the size of the gutter will be calculated to be large enough to hold the contents of the gutter. This is the default. */ ); - Vdefault_gutter_height = Fmake_specifier (Qgeneric); + Vdefault_gutter_height = Fmake_specifier (Qgutter_size); set_specifier_caching (Vdefault_gutter_height, slot_offset (struct window, default_gutter_height), @@ -842,7 +938,7 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-height' for more information. */ ); - Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgeneric); + Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgutter_size); set_specifier_caching (Vgutter_size[TOP_GUTTER], slot_offset (struct window, gutter_size[TOP_GUTTER]), @@ -856,7 +952,7 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-height' for more information. */ ); - Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgeneric); + Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_size); set_specifier_caching (Vgutter_size[BOTTOM_GUTTER], slot_offset (struct window, gutter_size[BOTTOM_GUTTER]), diff --git a/src/gutter.h b/src/gutter.h index d025865..8e31dd5 100644 --- a/src/gutter.h +++ b/src/gutter.h @@ -40,12 +40,16 @@ DECLARE_SPECIFIER_TYPE (gutter); enum gutter_pos { - TOP_GUTTER, - BOTTOM_GUTTER, - LEFT_GUTTER, - RIGHT_GUTTER + TOP_GUTTER = 0, + BOTTOM_GUTTER = 1, + LEFT_GUTTER = 2, + RIGHT_GUTTER = 3 }; +/* Iterate over all possible gutter positions */ +#define GUTTER_POS_LOOP(var) \ +for (var = (enum gutter_pos) 0; var < 4; var = (enum gutter_pos) (var + 1)) + extern Lisp_Object Qgutter; extern Lisp_Object Vgutter_size[4]; @@ -57,6 +61,7 @@ void init_global_gutters (struct device *d); void free_frame_gutters (struct frame *f); void redraw_exposed_gutters (struct frame *f, int x, int y, int width, int height); +void reset_gutter_display_lines (struct frame* f); #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \ (NILP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos])) diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index 08e0135..bdd751d 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -27,6 +27,47 @@ Boston, MA 02111-1307, USA. */ and X11 R6 release guide chapters on internationalized input, for further details */ +/* + Policy: + + The XIM is of the device, by the device, for the device. + The XIC is of each frame, by each frame, for each frame. + The exceptions are: + 1. Activate XICs on poor frames when the XIM is back. + 2. Deactivate all the XICs when the XIM go down. + + Methods: + + - Register a callback for an XIM when the X device is being initialized. + XIM_init_device (d) { XRegisterIMInstantiateCallback (); } + The "XRegisterIMInstantiateCallback" is called when an XIM become + available on the X display. + + - Catch the XIC when the frame is being initialized if XIM was available. + XIM_init_frame (f) { ... XCreateIC (); ... } + + - Release the XIC when the frame is being closed. + XIM_delete_frame (f) { ... FRAME_X_XIC (f) = NULL; ... } + "XIM_delete_frame" is a "DestroyCallback" function declared in + XIM_init_frame (); + + - Release all the XICs when the XIM was down accidentally. + In IMDestroyCallback: + DEVICE_FRAME_LOOP (...) { FRAME_X_XIC (f) = NULL; } + + - Re-enable XIC for all the frames which doesn't have XIC when the XIM + is back. + In IMInstantiateCallback: + DEVICE_FRAME_LOOP (...) { XIM_init_frame (f); } + + + Note: + + - Currently, we don't use XDestroyIC because of _XimProtoCloseIM + (internally registered as im->methods->close) does "Xfree (ic)". + + */ + #include #include "lisp.h" #include /* More portable than ? */ @@ -38,13 +79,19 @@ Boston, MA 02111-1307, USA. */ #include "EmacsFrame.h" #include "events.h" +#ifdef THIS_IS_X11R6 #include -#include +#endif #ifndef XIM_XLIB #error XIM_XLIB is not defined?? #endif +Lisp_Object Qxim_xlib; +#define xim_warn(str) warn_when_safe (Qxim_xlib, Qwarning, str); +#define xim_warn1(fmt, str) warn_when_safe (Qxim_xlib, Qwarning, fmt, str); +#define xim_info(str) warn_when_safe (Qxim_xlib, Qinfo, str); + /* Get/Set IC values for just one attribute */ #ifdef DEBUG_XEMACS #define XIC_Value(Get_Set, xic, name, attr, value) \ @@ -92,31 +139,31 @@ Initialize_Locale (void) /*XtSetLanguageProc (NULL, (XtLanguageProc) NULL, NULL);*/ if ((locale = setlocale (LC_ALL, "")) == NULL) { - stderr_out ("Can't set locale.\n"); - stderr_out ("Using C locale instead.\n"); + xim_warn ("Can't set locale.\n" + "Using C locale instead.\n"); putenv ("LANG=C"); putenv ("LC_ALL=C"); if ((locale = setlocale (LC_ALL, "C")) == NULL) { - stderr_out ("Can't even set locale to `C'!\n"); + xim_warn ("Can't even set locale to `C'!\n"); return; } } if (!XSupportsLocale ()) { - stderr_out ("X Windows does not support locale `%s'\n", locale); - stderr_out ("Using C Locale instead\n"); + xim_warn1 ("X Windows does not support locale `%s'\n" + "Using C Locale instead\n", locale); putenv ("LANG=C"); putenv ("LC_ALL=C"); if ((locale = setlocale (LC_ALL, "C")) == NULL) { - stderr_out ("Can't even set locale to `C'!\n"); + xim_warn ("Can't even set locale to `C'!\n"); return; } if (!XSupportsLocale ()) { - stderr_out ("X Windows does not even support locale `C'!\n"); + xim_warn ("X Windows does not even support locale `C'!\n"); return; } } @@ -125,67 +172,138 @@ Initialize_Locale (void) if (XSetLocaleModifiers ("") == NULL) { - stderr_out ("XSetLocaleModifiers(\"\") failed\n"); - stderr_out ("Check the value of the XMODIFIERS environment variable.\n"); + xim_warn ("XSetLocaleModifiers(\"\") failed\n" + "Check the value of the XMODIFIERS environment variable.\n"); } } -/******************************************************************/ -/* Input method using xlib */ -/******************************************************************/ - -/* - * called from when XIM is destroying - */ +#ifdef THIS_IS_X11R6 /* Callbacks for IM are supported from X11R6 or later. */ +/* Called from when XIM is destroying. + Clear all the XIC when the XIM was destroying... */ static void IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data) { - struct frame *f = (struct frame *)client_data; - struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); - Lisp_Object frame_list = DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f))); + struct device *d = (struct device *)client_data; Lisp_Object tail; - struct frame *target_frame = NULL; - LIST_LOOP (tail, frame_list) + DEVICE_FRAME_LOOP (tail, d) { - if (target_frame = XFRAME (XCAR (tail))) + struct frame *target_frame = XFRAME (XCAR (tail)); + if (FRAME_X_P (target_frame) && FRAME_X_XIC (target_frame)) { - if ( FRAME_X_XIC(target_frame) ) - { - XDestroyIC (FRAME_X_XIC(target_frame)); - FRAME_X_XIC (target_frame) = NULL; - } + /* XDestroyIC (FRAME_X_XIC (target_frame)); */ + FRAME_X_XIC (target_frame) = NULL; } } -#if 0 - if ( DEVICE_X_XIM (d) ) + DEVICE_X_XIM (d) = NULL; + xim_initted = False; + return; +} + +/* This is registered in XIM_init_device (when DEVICE is initializing). + This activates XIM when XIM becomes available. */ +static void +IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) +{ + struct device *d = (struct device *)client_data; + XIM xim; + char *name, *class; + XIMCallback ximcallback; + Lisp_Object tail; + + /* if no xim is presented, initialize xim ... */ + if ( xim_initted == False ) + { + xim_initted = True; + XtGetApplicationNameAndClass (dpy, &name, &class); + DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); + + /* destroy callback for im */ + ximcallback.callback = IMDestroyCallback; + ximcallback.client_data = (XPointer) d; + XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL); + } + + /* activate XIC on all the X frames... */ + DEVICE_FRAME_LOOP (tail, d) { - stderr_out ("NULLing d->xim...\n"); - /* DEVICE_X_XIM (d) = NULL; */ + struct frame *target_frame = XFRAME (XCAR (tail)); + if (FRAME_X_P (target_frame) && !FRAME_X_XIC (target_frame)) + { + XIM_init_frame (target_frame); + } } -#endif + return; +} +#endif /* if THIS_IS_X11R6 */ - xim_initted = False; +/* Initialize XIM for X device. + Register the use of XIM using XRegisterIMInstantiateCallback. */ +void +XIM_init_device (struct device *d) +{ +#ifdef THIS_IS_X11R6 + DEVICE_X_XIM (d) = NULL; + XRegisterIMInstantiateCallback (DEVICE_X_DISPLAY (d), NULL, NULL, NULL, + IMInstantiateCallback, (XPointer) d); return; +#else + Display *dpy = DEVICE_X_DISPLAY (d); + char *name, *class; + XIM xim; + + XtGetApplicationNameAndClass (dpy, &name, &class); + DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); + if (xim == NULL) + { + xim_warn ("XOpenIM() failed...no input server available\n"); + return; + } + else + { + XGetIMValues (xim, XNQueryInputStyle, &DEVICE_X_XIM_STYLES (d), NULL); + return; + } +#endif } + /* - * called from when FRAME is initializing + * For the frames */ + +/* Callback for the deleting frame. */ static void -IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) +XIM_delete_frame (Widget w, XtPointer client_data, XtPointer call_data) +{ + struct frame *f = (struct frame *) client_data; + struct device *d = XDEVICE (FRAME_DEVICE (f)); + + if (DEVICE_X_XIM (d)) + { + if (FRAME_X_XIC (f)) + { + XDestroyIC (FRAME_X_XIC (f)); + FRAME_X_XIC (f) = NULL; + } + } + return; +} + +/* Initialize XIC for new frame. + Create an X input context (XIC) for this frame. */ +void +XIM_init_frame (struct frame *f) { - struct frame *f = (struct frame *)client_data; - struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + struct device *d = XDEVICE (FRAME_DEVICE (f)); XIM xim; - Widget w = FRAME_X_TEXT_WIDGET ((struct frame *)client_data); + Widget w = FRAME_X_TEXT_WIDGET (f); Window win = XtWindow (w); XRectangle p_area = {0,0,1,1}, s_area = {0,0,1,1}; XPoint spot = {0,0}; XIMStyle style; XVaNestedList p_list, s_list; - char *name, *class; typedef struct { XIMStyles styles; @@ -195,7 +313,6 @@ IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) char *inputmethod; } xic_vars_t; xic_vars_t xic_vars; - XIMCallback ximcallback; XIC xic; #define res(name, class, representation, field, default_value) \ @@ -208,29 +325,16 @@ IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles), res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet), res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground), - res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground), - res(XtNinputMethod, XtCInputMethod, XtRString, inputmethod, (XtPointer) NULL) + res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground) }; - /* ---------- beginning of the action ---------- */ - /* - * if no xim is presented, initialize xim ... - */ - if ( xim_initted == False ) - { - xim_initted = True; - XtGetApplicationNameAndClass (dpy, &name, &class); - DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); + xim = DEVICE_X_XIM (d); - /* destroy callback for im */ - ximcallback.callback = IMDestroyCallback; - ximcallback.client_data = (XPointer)f; - XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL); - } - else + if (!xim) { - xim = DEVICE_X_XIM (d); + xim_info ("X Input Method open failed. Waiting for an XIM to be enabled.\n"); + return; } w = FRAME_X_TEXT_WIDGET (f); @@ -238,13 +342,13 @@ IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) /* * initialize XIC */ - if ( FRAME_X_XIC (f) ) return; + if (FRAME_X_XIC (f)) return; XtGetApplicationResources (w, &xic_vars, resources, XtNumber (resources), NULL, 0); if (!xic_vars.fontset) { - stderr_out ("Can't get fontset resource for Input Method\n"); + xim_warn ("Can't get fontset resource for Input Method\n"); FRAME_X_XIC (f) = NULL; return; } @@ -282,7 +386,7 @@ IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) if (!xic) { - stderr_out ("Warning: XCreateIC failed.\n"); + xim_warn ("Warning: XCreateIC failed.\n"); return; } @@ -296,60 +400,11 @@ IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) XSetICFocus (xic); - return; -} - -/* Create X input method for device */ -void -XIM_init_device (struct device *d) -{ - /* do nothing here */ - return; -} - -/* Callback for when the frame was deleted (closed) */ -static void -XIM_delete_frame (Widget w, XtPointer client_data, XtPointer call_data) -{ - struct frame *f = (struct frame *)client_data; - struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); - Display *dpy = DEVICE_X_DISPLAY (d); - - XUnregisterIMInstantiateCallback (dpy, NULL, NULL, NULL, - IMInstantiateCallback, (XtPointer)f); - - if ( FRAME_X_XIC (f) ) - { - XDestroyIC (FRAME_X_XIC(f)); - FRAME_X_XIC (f) = NULL; - } - return; -} - -/* Create an X input context for this frame. - - Register the IM to be initiated later using XRegisterIMInstantiateCallback - */ -void -XIM_init_frame (struct frame *f) -{ - struct device *d = XDEVICE (FRAME_DEVICE (f)); - - XRegisterIMInstantiateCallback (DEVICE_X_DISPLAY (d), NULL, NULL, NULL, - IMInstantiateCallback, (XtPointer)f); - -#if 0 - if ( FRAME_X_XIC (f) ) - return; -#endif - if ( ! DEVICE_X_XIM (d) ) - { - stderr_out ("X Input Method open failed. Waiting IM to be enabled.\n"); - } - +#ifdef THIS_IS_X11R6 /* when frame is going to be destroyed (closed) */ XtAddCallback (FRAME_X_TEXT_WIDGET(f), XNDestroyCallback, XIM_delete_frame, (XtPointer)f); - return; +#endif } @@ -727,6 +782,65 @@ best_style (XIMStyles *user, XIMStyles *xim) return DEFAULTStyle; /* Default Style */ } +/* These lisp-callable functions will be sealed until xim-leim is needed. + Oct 22 1999 - kazz */ +#if 0 +/* + * External callable function for XIM + */ +DEFUN ("x-open-xim", Fx_open_xim, 1, 1, 0, /* +Open the XIC on the frame if XIM is available. +Commonly, use this as \(x-open-xim \(selected-frame)). +If the frame is not on X device, return signal. +If XIC is created successfully return t. If not return nil. +*/ + (frame)) +{ + struct frame *f; + + CHECK_LIVE_FRAME (frame); + f = XFRAME (frame); + if (!FRAME_X_P (f)) + return signal_simple_error ("This frame is not on X device", frame); + + XIM_init_frame (f); + return FRAME_X_XIC (f) ? Qt : Qnil; +} + +DEFUN ("x-close-xim", Fx_close_xim, 1, 1, 0, /* +Close the XIC on the frame if it exists. +Commonly, use this as \(x-close-xim \(selected-frame)). +If the frame is not on X device, return signal. +Otherwise, it destroys the XIC if it exists, then returns t anyway. +*/ + (frame)) +{ + struct frame *f; + struct device *d; + + CHECK_LIVE_FRAME (frame); + f = XFRAME (frame); + if (!FRAME_X_P (f)) + return signal_simple_error ("This frame is not on X device", frame); + + d = XDEVICE (FRAME_DEVICE (f)); + if (DEVICE_X_XIM (d)) { + /* XDestroyIC (FRAME_X_XIC (XFRAME (f))); */ + FRAME_X_XIC (XFRAME (f)) = NULL; + } + return Qt; +} +#endif /* if 0 */ + +void +syms_of_input_method_xlib (void) +{ + defsymbol (&Qxim_xlib, "xim-xlib"); +#if 0 /* see above */ + DEFSUBR (Fx_open_xim); + DEFSUBR (Fx_close_xim); +#endif +} void vars_of_input_method_xlib (void) diff --git a/src/insdel.c b/src/insdel.c index b54678a..bec55be 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -3274,7 +3274,7 @@ convert_emchar_string_into_malloced_string (Emchar *arr, int nels, /************************************************************************/ void -vars_of_insdel (void) +reinit_vars_of_insdel (void) { #ifndef UTF2000 int i; @@ -3290,6 +3290,12 @@ vars_of_insdel (void) } void +vars_of_insdel (void) +{ + reinit_vars_of_insdel (); +} + +void init_buffer_text (struct buffer *b) { if (!b->base_buffer) diff --git a/src/insdel.h b/src/insdel.h index 944fed3..81d477f 100644 --- a/src/insdel.h +++ b/src/insdel.h @@ -140,11 +140,11 @@ void buffer_reset_changes (struct buffer *buf); /************************************************************************/ Memind do_marker_adjustment (Memind mpos, Memind from, - Memind to, int amount); + Memind to, Bytecount amount); void fixup_internal_substring (CONST Bufbyte *nonreloc, Lisp_Object reloc, - int offset, int *len); + Bytecount offset, Bytecount *len); /* In font-lock.c */ void font_lock_maybe_update_syntactic_caches (struct buffer *buf, diff --git a/src/intl.c b/src/intl.c index 95249d4..7c06c74 100644 --- a/src/intl.c +++ b/src/intl.c @@ -165,7 +165,6 @@ x_get_composed_input (XKeyPressedEvent *x_key_event, XIC context, #endif /* I18N4 */ -Lisp_Object Qdomain; Lisp_Object Qdefer_gettext; DEFUN ("ignore-defer-gettext", Fignore_defer_gettext, 1, 1, 0, /* @@ -274,14 +273,7 @@ Bug: it has no effect on source (.el) files, only compiled (.elc) files. { CHECK_STRING (domain_name); if (load_in_progress) - { -#ifdef I18N3 - Vfile_domain = Fpurecopy (domain_name); - return Vfile_domain; -#else - return (domain_name); -#endif - } + return (domain_name); else return Qnil; } @@ -307,8 +299,6 @@ init_intl_very_early (void) void syms_of_intl (void) { - defsymbol (&Qdomain, "domain"); - /* defer-gettext is defined as a symbol because when it is used in menu specification strings, it is not evaluated as a function by menu_item_descriptor_to_widget_value(). */ diff --git a/src/keymap.c b/src/keymap.c index 430acdc..04b6b46 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -252,15 +252,15 @@ Lisp_Object QLFD, QTAB, QRET, QESC, QDEL, QSPC, QBS; /************************************************************************/ static Lisp_Object -mark_keymap (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_keymap (Lisp_Object obj) { Lisp_Keymap *keymap = XKEYMAP (obj); - markobj (keymap->parents); - markobj (keymap->prompt); - markobj (keymap->inverse_table); - markobj (keymap->sub_maps_cache); - markobj (keymap->default_binding); - markobj (keymap->name); + mark_object (keymap->parents); + mark_object (keymap->prompt); + mark_object (keymap->inverse_table); + mark_object (keymap->sub_maps_cache); + mark_object (keymap->default_binding); + mark_object (keymap->name); return keymap->table; } @@ -278,7 +278,7 @@ print_keymap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) print_internal (keymap->name, printcharfun, 1); /* #### Yuck! This is no way to form plural! --hniksic */ sprintf (buf, "%s%d entr%s 0x%x>", - ((NILP (keymap->name)) ? "" : " "), + (NILP (keymap->name) ? "" : " "), size, ((size == 1) ? "y" : "ies"), keymap->header.uid); @@ -1351,6 +1351,8 @@ define_key_check_and_coerce_keysym (Lisp_Object spec, *keysym = QKescape; else if (EQ (*keysym, QDEL)) *keysym = QKdelete; + else if (EQ (*keysym, QSPC)) + *keysym = QKspace; else if (EQ (*keysym, QBS)) *keysym = QKbackspace; /* Emacs compatibility */ @@ -3175,9 +3177,9 @@ spaces are put between sequence elements, etc... for (i = 0; i < size; i++) { Lisp_Object s2 = Fsingle_key_description - (((STRINGP (keys)) - ? make_char (string_char (XSTRING (keys), i)) - : XVECTOR_DATA (keys)[i])); + (STRINGP (keys) + ? make_char (string_char (XSTRING (keys), i)) + : XVECTOR_DATA (keys)[i]); if (i == 0) string = s2; @@ -3534,7 +3536,7 @@ where_is_recursive_mapper (Lisp_Object map, void *arg) for (;;) /* loop over all keys that match */ { - Lisp_Object k = ((CONSP (keys)) ? XCAR (keys) : keys); + Lisp_Object k = CONSP (keys) ? XCAR (keys) : keys; int i; so_far [keys_count].keysym = k; @@ -4274,6 +4276,7 @@ syms_of_keymap (void) defsymbol (&QRET, "RET"); defsymbol (&QESC, "ESC"); defsymbol (&QDEL, "DEL"); + defsymbol (&QSPC, "SPC"); defsymbol (&QBS, "BS"); } @@ -4327,7 +4330,7 @@ Incremented for each change to any keymap. staticpro (&Vcurrent_global_map); - Vsingle_space_string = make_string_nocopy ((CONST Bufbyte *) " ", 1); + Vsingle_space_string = make_string ((CONST Bufbyte *) " ", 1); staticpro (&Vsingle_space_string); } diff --git a/src/keymap.h b/src/keymap.h index bb0c8a0..26edb82 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -28,7 +28,6 @@ DECLARE_LRECORD (keymap, struct Lisp_Keymap); #define XKEYMAP(x) XRECORD (x, keymap, struct Lisp_Keymap) #define XSETKEYMAP(x, p) XSETRECORD (x, p, keymap) #define KEYMAPP(x) RECORDP (x, keymap) -#define GC_KEYMAPP(x) GC_RECORDP (x, keymap) #define CHECK_KEYMAP(x) CHECK_RECORD (x, keymap) #define CONCHECK_KEYMAP(x) CONCHECK_RECORD (x, keymap) diff --git a/src/linuxplay.c b/src/linuxplay.c index f5fe236..ab594f3 100644 --- a/src/linuxplay.c +++ b/src/linuxplay.c @@ -1,7 +1,8 @@ /* linuxplay.c - play a sound file on the speaker ** ** Copyright (C) 1995,96 by Markus Gutschke (gutschk@math.uni-muenster.de) - ** This is version 1.3 of linuxplay.c + ** This is version 1.3 of linuxplay.c, with platform-independent functions + ** moved to a different file by Robert Bihlmeyer . ** ** Parts of this code were inspired by sunplay.c, which is copyright 1989 by ** Jef Poskanzer and 1991,92 by Jamie Zawinski; c.f. sunplay.c for further @@ -45,9 +46,6 @@ /* Synched up with: Not in FSF. */ -#define HEADERSZ 256 /* has to be at least as big as the biggest header */ -#define SNDBUFSZ 2048 /* has to be at least as big as HEADERSZ */ - /* XEmacs beta testers say: undef this by default. */ #undef NOVOLUMECTRLFORMULAW /* Changing the volume for uLaw-encoded samples sounds very poor; possibly, @@ -59,6 +57,8 @@ #include #endif +#include "miscplay.h" + #include #include #include SOUNDCARD_H_PATH /* Path computed by configure */ @@ -82,58 +82,14 @@ #define warn(str) message("audio: %s ",GETTEXT(str)) #endif -#ifdef __GNUC__ -#define UNUSED(x) ((void)(x)) -#else -#define UNUSED(x) -#define __inline__ -#endif - static void (*sighup_handler)(int); static void (*sigint_handler)(int); -/* Maintain global variable for keeping parser state information; this struct - is set to zero before the first invocation of the parser. The use of a - global variable prevents multiple concurrent executions of this code, but - this does not happen anyways... */ -enum wvState -{ wvMain, - wvSubchunk, - wvOutOfBlock, - wvSkipChunk, - wvSoundChunk, - wvFatal, - wvFatalNotify -}; - -static union { - struct { - int align; - enum wvState state; - size_t left; - unsigned char leftover[HEADERSZ]; - signed long chunklength; - } wave; - struct { - int align; - int isdata; - int skipping; - size_t left; - unsigned char leftover[HEADERSZ]; - } audio; -} parsestate; - -/* Use a global buffer as scratch-pad for possible conversions of the - sampling format */ -unsigned char linuxplay_sndbuf[SNDBUFSZ]; - static int mix_fd; static int audio_vol; static int audio_fd; static char *audio_dev = "/dev/dsp"; -typedef enum {fmtIllegal,fmtRaw,fmtVoc,fmtWave,fmtSunAudio} fmtType; - /* Intercept SIGINT and SIGHUP in order to close the audio and mixer devices before terminating sound output; this requires reliable signals as provided by "syssignal.h" */ @@ -156,649 +112,6 @@ static void sighandler(int sig) else exit(1); } -/* There is no special treatment required for parsing raw data files; we - assume that these files contain data in 8bit unsigned format that - has been sampled at 8kHz; there is no extra header */ -static size_t parseraw(void **data,size_t *sz,void **outbuf) -{ - int rc = *sz; - - *outbuf = *data; - *sz = 0; - return(rc); -} - -/* Currently we cannot cope with files in VOC format; if you really need - to play these files, they should be converted by using SOX */ -static size_t parsevoc(void **data,size_t *sz,void **outbuf) -{ - UNUSED(data); - UNUSED(sz); - UNUSED(outbuf); - return(0); -} - -/* We need to perform some look-ahead in order to parse files in WAVE format; - this might require re-partioning of the data segments if headers cross the - boundaries between two read operations. This is done in a two-step way: - first we request a certain amount of bytes... */ -static __inline__ int waverequire(void **data,size_t *sz,size_t rq) -{ - int rc = 1; - - if (rq > HEADERSZ) { - warn("Header size exceeded while parsing WAVE file"); - parsestate.wave.state = wvFatal; - *sz = 0; - return(0); } - if ((rq -= parsestate.wave.left) <= 0) - return(rc); - if (rq > *sz) {rq = *sz; rc = 0;} - memcpy(parsestate.wave.leftover+parsestate.wave.left, - *data,rq); - parsestate.wave.left += rq; - (*(unsigned char **)data) += rq; - *sz -= rq; - return(rc); -} - -/* ...and next we remove this many bytes from the buffer */ -static __inline__ void waveremove(size_t rq) -{ - if (parsestate.wave.left <= rq) - parsestate.wave.left = 0; - else { - parsestate.wave.left -= rq; - memmove(parsestate.wave.leftover, - parsestate.wave.leftover+rq, - parsestate.wave.left); } - return; -} - -/* Sound files in WAVE format can contain an arbitrary amount of tagged - chunks; this requires quite some effort for parsing the data */ -static size_t parsewave(void **data,size_t *sz,void **outbuf) -{ - for (;;) - switch (parsestate.wave.state) { - case wvMain: - if (!waverequire(data,sz,20)) - return(0); - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - parsestate.wave.chunklength = parsestate.wave.leftover[16] + - 256*(parsestate.wave.leftover[17] + - 256*(parsestate.wave.leftover[18] + - 256*parsestate.wave.leftover[19])); - waveremove(20); - parsestate.wave.state = wvSubchunk; - break; - case wvSubchunk: - if (!waverequire(data,sz,parsestate.wave.chunklength)) - return(0); - parsestate.wave.align = parsestate.wave.chunklength < 14 ? 1 - : parsestate.wave.leftover[12]; - if (parsestate.wave.align != 1 && - parsestate.wave.align != 2 && - parsestate.wave.align != 4) { - warn("Illegal datawidth detected while parsing WAVE file"); - parsestate.wave.state = wvFatal; } - else - parsestate.wave.state = wvOutOfBlock; - waveremove(parsestate.wave.chunklength); - break; - case wvOutOfBlock: - if (!waverequire(data,sz,8)) - return(0); - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - parsestate.wave.chunklength = parsestate.wave.leftover[4] + - 256*(parsestate.wave.leftover[5] + - 256*(parsestate.wave.leftover[6] + - 256*(parsestate.wave.leftover[7] & 0x7F))); - if (memcmp(parsestate.wave.leftover,"data",4)) - parsestate.wave.state = wvSkipChunk; - else - parsestate.wave.state = wvSoundChunk; - waveremove(8); - break; - case wvSkipChunk: - if (parsestate.wave.chunklength > 0 && *sz > 0 && - (signed long)*sz < (signed long)parsestate.wave.chunklength) { - parsestate.wave.chunklength -= *sz; - *sz = 0; } - else { - if (parsestate.wave.chunklength > 0 && *sz > 0) { - *sz -= parsestate.wave.chunklength; - (*(unsigned char **)data) += parsestate.wave.chunklength; } - parsestate.wave.state = wvOutOfBlock; } - break; - case wvSoundChunk: { - size_t count,rq; - if (parsestate.wave.left) { /* handle leftover bytes from last - alignment operation */ - count = parsestate.wave.left; - rq = HEADERSZ-count; - if (rq > (size_t) parsestate.wave.chunklength) - rq = parsestate.wave.chunklength; - if (!waverequire(data,sz,rq)) { - parsestate.wave.chunklength -= parsestate.wave.left - count; - return(0); } - parsestate.wave.chunklength -= rq; - *outbuf = parsestate.wave.leftover; - parsestate.wave.left = 0; - return(rq); } - if (*sz >= (size_t) parsestate.wave.chunklength) { - count = parsestate.wave.chunklength; - rq = 0; } - else { - count = *sz; - count -= rq = count % parsestate.wave.align; } - *outbuf = *data; - (*(unsigned char **)data) += count; - *sz -= count; - if ((parsestate.wave.chunklength -= count) < parsestate.wave.align) { - parsestate.wave.state = wvOutOfBlock; - /* Some broken software (e.g. SOX) attaches junk to the end of a sound - chunk; so, let's ignore this... */ - if (parsestate.wave.chunklength) - parsestate.wave.state = wvSkipChunk; } - else if (rq) - /* align data length to a multiple of datasize; keep additional data - in "leftover" buffer --- this is necessary to ensure proper - functioning of the sndcnv... routines */ - waverequire(data,sz,rq); - return(count); } - case wvFatalNotify: - warn("Irrecoverable error while parsing WAVE file"); - parsestate.wave.state = wvFatal; - break; - case wvFatal: - default: - *sz = 0; - return(0); } -} - -/* Strip the header from files in Sun/DEC audio format; this requires some - extra processing as the header can be an arbitrary size and it might - result in alignment errors for subsequent conversions --- thus we do - some buffering, where needed */ -static size_t parsesundecaudio(void **data,size_t *sz,void **outbuf) -{ - /* There is data left over from the last invocation of this function; join - it with the new data and return a sound chunk that is as big as a - single entry */ - if (parsestate.audio.left) { - if (parsestate.audio.left + *sz > (size_t) parsestate.audio.align) { - int count; - memmove(parsestate.audio.leftover + parsestate.audio.left, - *data, - count = parsestate.audio.align - parsestate.audio.left); - *outbuf = parsestate.audio.leftover; - *sz -= count; - *data = (*(char **)data) + count; - parsestate.audio.left = 0; - return(parsestate.audio.align); } - else { - /* We need even more data in order to get one complete single entry! */ - memmove(parsestate.audio.leftover + parsestate.audio.left, - *data, - *sz); - *data = (*(char **)data) + *sz; - parsestate.audio.left += *sz; - *sz = 0; - return(0); } } - - /* This is the main sound chunk, strip of any extra data that does not fit - the alignment requirements and move these bytes into the leftover buffer*/ - if (parsestate.audio.isdata) { - int rc = *sz; - *outbuf = *data; - if ((parsestate.audio.left = rc % parsestate.audio.align) != 0) { - memmove(parsestate.audio.leftover, - (char *)*outbuf + rc - parsestate.audio.left, - parsestate.audio.left); - rc -= parsestate.audio.left; } - *sz = 0; - return(rc); } - - /* This is the first invocation of this function; we need to parse the - header information and determine how many bytes we need to skip until - the start of the sound chunk */ - if (!parsestate.audio.skipping) { - unsigned char *header = (unsigned char *) *data; - if (*sz < 8) { - warn("Irrecoverable error while parsing Sun/DEC audio file"); - return(0); } - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - if (header[3]) { /* Sun audio (big endian) */ - parsestate.audio.align = ((header[15] > 2)+1)*header[23]; - parsestate.audio.skipping = header[7]+256*(header[6]+256* - (header[5]+256*header[4])); } - else { /* DEC audio (little endian) */ - parsestate.audio.align = ((header[12] > 2)+1)*header[20]; - parsestate.audio.skipping = header[4]+256*(header[5]+256* - (header[6]+256*header[7])); }} - - /* We are skipping extra data that has been attached to header; most usually - this will be just a comment, such as the original filename and/or the - creation date. Make sure that we do not return less than one single sound - sample entry to the caller; if this happens, rather decide to move those - few bytes into the leftover buffer and deal with it later */ - if (*sz >= (size_t) parsestate.audio.skipping) { - /* Skip just the header information and return the sound chunk */ - int rc = *sz - parsestate.audio.skipping; - *outbuf = (char *)*data + parsestate.audio.skipping; - if ((parsestate.audio.left = rc % parsestate.audio.align) != 0) { - memmove(parsestate.audio.leftover, - (char *)*outbuf + rc - parsestate.audio.left, - parsestate.audio.left); - rc -= parsestate.audio.left; } - *sz = 0; - parsestate.audio.skipping = 0; - parsestate.audio.isdata++; - return(rc); } - else { - /* Skip everything */ - parsestate.audio.skipping -= *sz; - return(0); } -} - -/* If the soundcard could not be set to natively support the data format, we - try to do some limited on-the-fly conversion to a different format; if - no conversion is needed, though, we can output directly */ -static size_t sndcnvnop(void **data,size_t *sz,void **outbuf) -{ - int rc = *sz; - - *outbuf = *data; - *sz = 0; - return(rc); -} - -/* Convert 8 bit unsigned stereo data to 8 bit unsigned mono data */ -static size_t sndcnv8U_2mono(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) - *dest++ = (unsigned char)(((int)*(src)++ + - (int)*(src)++) / 2); - *data = src; - return(rc); -} - -/* Convert 8 bit signed stereo data to 8 bit signed mono data */ -static size_t sndcnv8S_2mono(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc, count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) - *dest++ = (unsigned char)(((int)*((signed char *)(src++)) + - (int)*((signed char *)(src++))) / 2); - *data = src; - return(rc); -} - -/* Convert 8 bit signed stereo data to 8 bit unsigned mono data */ -static size_t sndcnv2monounsigned(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) - *dest++ = (unsigned char)(((int)*((signed char *)(src++)) + - (int)*((signed char *)(src++))) / 2) ^ 0x80; - *data = src; - return(rc); -} - -/* Convert 8 bit signed mono data to 8 bit unsigned mono data */ -static size_t sndcnv2unsigned(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz; - if (count > SNDBUFSZ) { *sz -= SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) - *dest++ = *(src)++ ^ 0x80; - *data = src; - return(rc); -} - -/* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded - number --- I hope, I got this conversion right :-) */ -static __inline__ signed char int2ulaw(int i) -{ - /* Lookup table for fast calculation of number of bits that need shifting*/ - static short int t_bits[128] = { - 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}; - REGISTER int bits,logi; - - /* unrolling this condition (hopefully) improves execution speed */ - if (i < 0) { - if ((i = (132-i)) > 0x7FFF) i = 0x7FFF; - logi = (i >> ((bits = t_bits[i/256])+4)); - return((bits << 4 | logi) ^ 0x7F); } - else { - if ((i = 132+i) > 0x7FFF) i = 0x7FFF; - logi = (i >> ((bits = t_bits[i/256])+4)); - return(~(bits << 4 | logi)); } -} - -/* Convert 8 bit ulaw stereo data to 8 bit ulaw mono data */ -static size_t sndcnvULaw_2mono(void **data,size_t *sz,void **outbuf) -{ - - static short int ulaw2int[256] = { - /* Precomputed lookup table for conversion from ulaw to 15 bit signed */ - -16062,-15550,-15038,-14526,-14014,-13502,-12990,-12478, - -11966,-11454,-10942,-10430, -9918, -9406, -8894, -8382, - -7998, -7742, -7486, -7230, -6974, -6718, -6462, -6206, - -5950, -5694, -5438, -5182, -4926, -4670, -4414, -4158, - -3966, -3838, -3710, -3582, -3454, -3326, -3198, -3070, - -2942, -2814, -2686, -2558, -2430, -2302, -2174, -2046, - -1950, -1886, -1822, -1758, -1694, -1630, -1566, -1502, - -1438, -1374, -1310, -1246, -1182, -1118, -1054, -990, - -942, -910, -878, -846, -814, -782, -750, -718, - -686, -654, -622, -590, -558, -526, -494, -462, - -438, -422, -406, -390, -374, -358, -342, -326, - -310, -294, -278, -262, -246, -230, -214, -198, - -186, -178, -170, -162, -154, -146, -138, -130, - -122, -114, -106, -98, -90, -82, -74, -66, - -60, -56, -52, -48, -44, -40, -36, -32, - -28, -24, -20, -16, -12, -8, -4, +0, - +16062,+15550,+15038,+14526,+14014,+13502,+12990,+12478, - +11966,+11454,+10942,+10430, +9918, +9406, +8894, +8382, - +7998, +7742, +7486, +7230, +6974, +6718, +6462, +6206, - +5950, +5694, +5438, +5182, +4926, +4670, +4414, +4158, - +3966, +3838, +3710, +3582, +3454, +3326, +3198, +3070, - +2942, +2814, +2686, +2558, +2430, +2302, +2174, +2046, - +1950, +1886, +1822, +1758, +1694, +1630, +1566, +1502, - +1438, +1374, +1310, +1246, +1182, +1118, +1054, +990, - +942, +910, +878, +846, +814, +782, +750, +718, - +686, +654, +622, +590, +558, +526, +494, +462, - +438, +422, +406, +390, +374, +358, +342, +326, - +310, +294, +278, +262, +246, +230, +214, +198, - +186, +178, +170, +162, +154, +146, +138, +130, - +122, +114, +106, +98, +90, +82, +74, +66, - +60, +56, +52, +48, +44, +40, +36, +32, - +28, +24, +20, +16, +12, +8, +4, +0}; - - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) - /* it is not possible to directly interpolate between two ulaw encoded - data bytes, thus we need to convert to linear format first and later - we convert back to ulaw format */ - *dest++ = int2ulaw(ulaw2int[*(src)++] + - ulaw2int[*(src)++]); - *data = src; - return(rc); -} - -/* Convert 16 bit little endian signed stereo data to 16 bit little endian - signed mono data */ -static size_t sndcnv16_2monoLE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - signed short i; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - for (count /= 2; count--; ) { - i = ((int)(src[0]) + - 256*(int)(src[1]) + - (int)(src[2]) + - 256*(int)(src[3])) / 2; - src += 4; - *dest++ = (unsigned char)(i & 0xFF); - *dest++ = (unsigned char)((i / 256) & 0xFF); } - *data = src; - return(rc); -} - -/* Convert 16 bit big endian signed stereo data to 16 bit big endian - signed mono data */ -static size_t sndcnv16_2monoBE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - signed short i; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - for (count /= 2; count--; ) { - i = ((int)(src[1]) + - 256*(int)(src[0]) + - (int)(src[3]) + - 256*(int)(src[2])) / 2; - src += 4; - *dest++ = (unsigned char)((i / 256) & 0xFF); - *dest++ = (unsigned char)(i & 0xFF); } - *data = src; - return(rc); -} - -/* Convert 16 bit little endian signed data to 8 bit unsigned data */ -static size_t sndcnv2byteLE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) { - *dest++ = (unsigned char)(((signed char *)src)[1] ^ (signed char)0x80); - src += 2; - } - *data = src; - return(rc); -} - -/* Convert 16 bit big endian signed data to 8 bit unsigned data */ -static size_t sndcnv2byteBE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 2; - if (count > SNDBUFSZ) { *sz -= 2*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) { - *dest++ = (unsigned char)(((signed char *)src)[0] ^ (signed char)0x80); - src += 2; - } - *data = src; - return(rc); -} - -/* Convert 16 bit little endian signed stereo data to 8 bit unsigned - mono data */ -static size_t sndcnv2monobyteLE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 4; - if (count > SNDBUFSZ) { *sz -= 4*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) { - *dest++ = (unsigned char)(((int)((signed char *)src)[1] + - (int)((signed char *)src)[3]) / 2 ^ 0x80); - src += 4; - } - *data = src; - return(rc); -} - -/* Convert 16 bit big endian signed stereo data to 8 bit unsigned - mono data */ -static size_t sndcnv2monobyteBE(void **data,size_t *sz,void **outbuf) -{ - REGISTER unsigned char *src; - REGISTER unsigned char *dest; - int rc,count; - - count = *sz / 4; - if (count > SNDBUFSZ) { *sz -= 4*SNDBUFSZ; count = SNDBUFSZ; } - else *sz = 0; - rc = count; - src = (unsigned char *) *data; - *outbuf = - dest = linuxplay_sndbuf; - while (count--) { - *dest++ = (unsigned char)(((int)((signed char *)src)[0] + - (int)((signed char *)src)[2]) / 2 ^ 0x80); - src += 4; - } - *data = src; - return(rc); -} - -/* Look at the header of the sound file and try to determine the format; - we can recognize files in VOC, WAVE, and, Sun/DEC-audio format--- everything - else is assumed to be raw 8 bit unsigned data sampled at 8kHz */ -static fmtType analyze_format(unsigned char *format,int *fmt,int *speed, - int *tracks, - size_t (**parsesndfile)(void **,size_t *sz, - void **)) -{ - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - if (!memcmp(format,"Creative Voice File\x1A\x1A\x00",22) && - (format[22]+256*format[23]) == - ((0x1233-format[24]-256*format[25])&0xFFFF)) { /* VOC */ - *fmt = AFMT_U8; - *speed = 8000; - *tracks = 2; - *parsesndfile = parsevoc; - return(fmtVoc); } - else if (!memcmp(format,"RIFF",4) && - !memcmp(format+8,"WAVEfmt ",8)) { /* WAVE */ - if (memcmp(format+20,"\001\000\001"/* PCM mono */,4) && - memcmp(format+20,"\001\000\002"/* PCM stereo */,4)) - return(fmtIllegal); - *fmt = (format[32]/(*tracks = format[22])) == 1 ? - AFMT_U8 : AFMT_S16_LE; - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - *speed = format[24]+256*(format[25]+256* - (format[26]+256*format[27])); - *parsesndfile = parsewave; - return(fmtWave); } - else if (!memcmp(format,".snd",4)) { /* Sun Audio (big endian) */ - if (format[7]+256*(format[6]+256*(format[5]+256*format[4])) < 24) { - *fmt = AFMT_MU_LAW; - *speed = 8000; - *tracks = 1; - *parsesndfile = parsesundecaudio; - return(fmtSunAudio); } - if (!memcmp(format+12,"\000\000\000\001",4)) *fmt = AFMT_MU_LAW; - else if (!memcmp(format+12,"\000\000\000\002",4)) *fmt = AFMT_S8; - else if (!memcmp(format+12,"\000\000\000\003",4)) *fmt = AFMT_S16_BE; - else return(fmtIllegal); - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - *speed = format[19]+256*(format[18]+256* - (format[17]+256*format[16])); - *tracks = format[23]; - *parsesndfile = parsesundecaudio; - return(fmtSunAudio); } - else if (!memcmp(format,".sd",4)) { /* DEC Audio (little endian) */ - if (format[4]+256*(format[5]+256*(format[6]+256*format[7])) < 24) { - *fmt = AFMT_MU_LAW; - *speed = 8000; - *tracks = 1; - *parsesndfile = parsesundecaudio; - return(fmtSunAudio); } - if (!memcmp(format+12,"\001\000\000",4)) *fmt = AFMT_MU_LAW; - else if (!memcmp(format+12,"\002\000\000",4)) *fmt = AFMT_S8; - else if (!memcmp(format+12,"\003\000\000",4)) *fmt = AFMT_S16_LE; - else return(fmtIllegal); - /* Keep compatibility with Linux 68k, etc. by not relying on byte-sex */ - *speed = format[16]+256*(format[17]+256* - (format[18]+256*format[19])); - *tracks = format[20]; - *parsesndfile = parsesundecaudio; - return(fmtSunAudio); } - else { - *fmt = AFMT_U8; - *speed = 8000; - *tracks = 1; - *parsesndfile = parseraw; - return(fmtRaw); } -} - /* Initialize the soundcard and mixer device with the parameters that we found in the header of the sound file. If the soundcard is not capable of natively supporting the required parameters, then try to set up conversion @@ -973,16 +286,17 @@ static void linux_play_data_or_file(int fd,unsigned char *data, int fmt,speed,tracks; unsigned char *pptr,*optr,*cptr,*sptr; int wrtn,rrtn,crtn,prtn; + unsigned char sndbuf[SNDBUFSZ]; /* We need to read at least the header information before we can start doing anything */ if (!data || length < HEADERSZ) { if (fd < 0) return; else { - length = read(fd,linuxplay_sndbuf,SNDBUFSZ); + length = read(fd,sndbuf,SNDBUFSZ); if (length < HEADERSZ) return; - data = linuxplay_sndbuf; + data = sndbuf; length = SNDBUFSZ; } } @@ -1010,8 +324,7 @@ static void linux_play_data_or_file(int fd,unsigned char *data, goto END_OF_PLAY; audio_vol = volume; - /* Initialize global parser state information to zero */ - memset(&parsestate,0,sizeof(parsestate)); + reset_parsestate(); /* Mainloop: read a block of data, parse its contents, perform all the necessary conversions and output it to the sound @@ -1034,17 +347,15 @@ static void linux_play_data_or_file(int fd,unsigned char *data, warn(buf); goto END_OF_PLAY; } } if (fd >= 0) { - if ((rrtn = read(fd,linuxplay_sndbuf,SNDBUFSZ)) < 0) { + if ((rrtn = read(fd,sndbuf,SNDBUFSZ)) < 0) { perror("read"); goto END_OF_PLAY; } } else break; } while (rrtn > 0); - /* Verify that we could fully parse the entire soundfile; this is needed - only for files in WAVE format */ - if (ffmt == fmtWave && parsestate.wave.state != wvOutOfBlock && - parsestate.wave.state != wvFatal) - warn("Unexpected end of WAVE file"); + if (ffmt == fmtWave) + parse_wave_complete(); + END_OF_PLAY: /* Now cleanup all used resources */ diff --git a/src/lisp-disunion.h b/src/lisp-disunion.h index f2c321b..8ed19df 100644 --- a/src/lisp-disunion.h +++ b/src/lisp-disunion.h @@ -70,8 +70,8 @@ Boston, MA 02111-1307, USA. */ XUINT The value bits of a Lisp_Object storing an integer, unsigned INTP Non-zero if this Lisp_Object an integer? Qzero Lisp Integer 0 - EQ Non-zero if two Lisp_Objects are identical - GC_EQ Version of EQ used during garbage collection */ + EQ Non-zero if two Lisp_Objects are identical */ + typedef EMACS_INT Lisp_Object; @@ -83,14 +83,16 @@ typedef EMACS_INT Lisp_Object; #define XTYPE(x) ((enum Lisp_Type) (((EMACS_UINT)(x)) & ~VALMASK)) #define XPNTRVAL(x) (x) /* This depends on Lisp_Type_Record == 0 */ #define XCHARVAL(x) ((x) >> GCBITS) -#define GC_EQ(x,y) EQ (x,y) #define XREALINT(x) ((x) >> INT_GCBITS) #define XUINT(x) ((EMACS_UINT)(x) >> INT_GCBITS) #define INTP(x) ((EMACS_UINT)(x) & Lisp_Type_Int_Bit) +#define INT_PLUS(x,y) ((x)+(y)-Lisp_Type_Int_Bit) +#define INT_MINUS(x,y) ((x)-(y)+Lisp_Type_Int_Bit) +#define INT_PLUS1(x) INT_PLUS (x, make_int (1)) +#define INT_MINUS1(x) INT_MINUS (x, make_int (1)) #define Qzero make_int (0) #define Qnull_pointer ((Lisp_Object) 0) -#define XGCTYPE(x) XTYPE(x) #define EQ(x,y) ((x) == (y)) #define XSETINT(var, value) ((void) ((var) = make_int (value))) #define XSETCHAR(var, value) ((void) ((var) = make_char (value))) diff --git a/src/lisp-union.h b/src/lisp-union.h index a04c689..54088cf 100644 --- a/src/lisp-union.h +++ b/src/lisp-union.h @@ -123,11 +123,13 @@ extern Lisp_Object Qnull_pointer, Qzero; #define XREALINT(x) ((x).s.val) #define XUINT(x) ((x).u.val) #define XTYPE(x) ((x).gu.type) -#define XGCTYPE(x) XTYPE (x) #define EQ(x,y) ((x).v == (y).v) #define INTP(x) ((x).s.bits) -#define GC_EQ(x,y) EQ (x, y) +#define INT_PLUS(x,y) make_int (XINT (x) + XINT (y)) +#define INT_MINUS(x,y) make_int (XINT (x) - XINT (y)) +#define INT_PLUS1(x) make_int (XINT (x) + 1) +#define INT_MINUS1(x) make_int (XINT (x) - 1) /* Convert between a (void *) and a Lisp_Object, as when the Lisp_Object is passed to a toolkit callback function */ diff --git a/src/lisp.h b/src/lisp.h index d7951b1..8580240 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -40,10 +40,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include /* offsetof */ - -#ifdef __lucid -# include -#endif +#include /* ---- Dynamic arrays ---- */ @@ -137,21 +134,16 @@ char *xstrdup (CONST char *); macro will realloc BASEVAR as necessary so that it can hold at least NEEDED_SIZE objects. The reallocing is done by doubling, which ensures constant amortized time per element. */ -#define DO_REALLOC(basevar, sizevar, needed_size, type) do \ -{ \ - /* Avoid side-effectualness. */ \ - /* Dammit! Macros suffer from dynamic scope! */ \ - /* We demand inline functions! */ \ +#define DO_REALLOC(basevar, sizevar, needed_size, type) do { \ size_t do_realloc_needed_size = (needed_size); \ - size_t do_realloc_newsize = 0; \ - while ((sizevar) < (do_realloc_needed_size)) { \ - do_realloc_newsize = 2*(sizevar); \ - if (do_realloc_newsize < 32) \ - do_realloc_newsize = 32; \ - (sizevar) = do_realloc_newsize; \ - } \ - if (do_realloc_newsize) \ - XREALLOC_ARRAY (basevar, type, do_realloc_newsize); \ + if ((sizevar) < do_realloc_needed_size) \ + { \ + if ((sizevar) < 32) \ + (sizevar) = 32; \ + while ((sizevar) < do_realloc_needed_size) \ + (sizevar) *= 2; \ + XREALLOC_ARRAY (basevar, type, (sizevar)); \ + } \ } while (0) #ifdef ERROR_CHECK_MALLOC @@ -250,6 +242,33 @@ DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *)); /*#define REGISTER register*/ /*#endif*/ + +/* EMACS_INT is the underlying integral type into which a Lisp_Object must fit. + In particular, it must be large enough to contain a pointer. + config.h can override this, e.g. to use `long long' for bigger lisp ints. */ + +#ifndef SIZEOF_EMACS_INT +# define SIZEOF_EMACS_INT SIZEOF_VOID_P +#endif + +#ifndef EMACS_INT +# if SIZEOF_EMACS_INT == SIZEOF_LONG +# define EMACS_INT long +# elif SIZEOF_EMACS_INT == SIZEOF_INT +# define EMACS_INT int +# elif SIZEOF_EMACS_INT == SIZEOF_LONG_LONG +# define EMACS_INT long long +# else +# error Unable to determine suitable type for EMACS_INT +# endif +#endif + +#ifndef EMACS_UINT +# define EMACS_UINT unsigned EMACS_INT +#endif + +#define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR) + /************************************************************************/ /* typedefs */ @@ -284,17 +303,17 @@ typedef int Emchar; buffer.h (where they rightfully belong) to avoid syntax errors in function prototypes. */ -typedef int Bufpos; -typedef int Bytind; -typedef int Memind; +typedef EMACS_INT Bufpos; +typedef EMACS_INT Bytind; +typedef EMACS_INT Memind; /* Counts of bytes or chars */ -typedef int Bytecount; -typedef int Charcount; +typedef EMACS_INT Bytecount; +typedef EMACS_INT Charcount; /* Length in bytes of a string in external format */ -typedef int Extcount; +typedef EMACS_INT Extcount; typedef struct lstream Lstream; @@ -340,6 +359,8 @@ typedef struct Lisp_Image_Instance Lisp_Image_Instance; struct Lisp_Gui_Item; typedef struct Lisp_Gui_Item Lisp_Gui_Item; struct display_line; +struct display_glyph_area; +struct display_box; struct redisplay_info; struct window_mirror; struct scrollbar_instance; @@ -467,6 +488,14 @@ enum toolbar_pos }; #endif +enum edge_style +{ + EDGE_ETCHED_IN, + EDGE_ETCHED_OUT, + EDGE_BEVEL_IN, + EDGE_BEVEL_OUT +}; + #ifndef ERROR_CHECK_TYPECHECK typedef enum error_behavior @@ -523,32 +552,6 @@ enum Lisp_Type #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record) -/* EMACS_INT is the underlying integral type into which a Lisp_Object must fit. - In particular, it must be large enough to contain a pointer. - config.h can override this, e.g. to use `long long' for bigger lisp ints. */ - -#ifndef SIZEOF_EMACS_INT -# define SIZEOF_EMACS_INT SIZEOF_VOID_P -#endif - -#ifndef EMACS_INT -# if SIZEOF_EMACS_INT == SIZEOF_LONG -# define EMACS_INT long -# elif SIZEOF_EMACS_INT == SIZEOF_INT -# define EMACS_INT int -# elif SIZEOF_EMACS_INT == SIZEOF_LONG_LONG -# define EMACS_INT long long -# else -# error Unable to determine suitable type for EMACS_INT -# endif -#endif - -#ifndef EMACS_UINT -# define EMACS_UINT unsigned EMACS_INT -#endif - -#define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR) - /* Overridden by m/next.h */ #ifndef ASSERT_VALID_POINTER # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0)) @@ -569,7 +572,7 @@ enum Lisp_Type # include "lisp-disunion.h" #endif /* !USE_UNION_TYPE */ -#define XPNTR(x) ((void *) (XPNTRVAL(x))) +#define XPNTR(x) ((void *) XPNTRVAL(x)) /* WARNING WARNING WARNING. You must ensure on your own that proper GC protection is provided for the elements in this array. */ @@ -581,8 +584,8 @@ typedef struct /* Close your eyes now lest you vomit or spontaneously combust ... */ #define HACKEQ_UNSAFE(obj1, obj2) \ - (EQ (obj1, obj2) || (!POINTER_TYPE_P (XGCTYPE (obj1)) \ - && !POINTER_TYPE_P (XGCTYPE (obj2)) \ + (EQ (obj1, obj2) || (!POINTER_TYPE_P (XTYPE (obj1)) \ + && !POINTER_TYPE_P (XTYPE (obj2)) \ && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))) #ifdef DEBUG_XEMACS @@ -612,7 +615,6 @@ int eq_with_ebola_notice (Lisp_Object, Lisp_Object); to mean "no such value". */ #define UNBOUNDP(val) EQ (val, Qunbound) -#define GC_UNBOUNDP(val) GC_EQ (val, Qunbound) /*********** cons ***********/ @@ -641,7 +643,6 @@ DECLARE_LRECORD (cons, Lisp_Cons); #define XCONS(x) XRECORD (x, cons, Lisp_Cons) #define XSETCONS(x, p) XSETRECORD (x, p, cons) #define CONSP(x) RECORDP (x, cons) -#define GC_CONSP(x) GC_RECORDP (x, cons) #define CHECK_CONS(x) CHECK_RECORD (x, cons) #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons) @@ -651,7 +652,6 @@ DECLARE_LRECORD (cons, Lisp_Cons); extern Lisp_Object Qnil; #define NILP(x) EQ (x, Qnil) -#define GC_NILP(x) GC_EQ (x, Qnil) #define XCAR(a) (XCONS (a)->car) #define XCDR(a) (XCONS (a)->cdr) #define LISTP(x) (CONSP(x) || NILP(x)) @@ -711,7 +711,7 @@ do { \ #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \ Lisp_Object prev_tail_##list = Qnil; \ Lisp_Object tail_##list; \ - int len_##list; \ + EMACS_INT len_##list; \ EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \ { \ if (condition) \ @@ -768,26 +768,26 @@ do { \ #define EXTERNAL_LIST_LOOP_1(list) \ Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \ -int ELL1_len; \ -EXTERNAL_LIST_LOOP_6(ELL1_elt, list, ELL1_len, ELL1_hare, \ - ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) +EMACS_INT ELL1_len; \ +EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \ + ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_LIST_LOOP_2(elt, list) \ Lisp_Object hare_##elt, tortoise_##elt; \ -int len_##elt; \ -EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, hare_##elt, \ - tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) +EMACS_INT len_##elt; \ +EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \ + tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \ Lisp_Object tortoise_##elt; \ -int len_##elt; \ -EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, tail, \ - tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) +EMACS_INT len_##elt; \ +EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \ + tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \ Lisp_Object tortoise_##elt; \ -EXTERNAL_LIST_LOOP_6(elt, list, len, tail, \ - tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) +EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \ + tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \ @@ -812,30 +812,30 @@ EXTERNAL_LIST_LOOP_6(elt, list, len, tail, \ /* Optimized and safe macros for looping over external alists. */ -#define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ -Lisp_Object hare_##elt, tortoise_##elt; \ -int len_##elt; \ -EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ - len_##elt, hare_##elt, tortoise_##elt, \ +#define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ +Lisp_Object hare_##elt, tortoise_##elt; \ +EMACS_INT len_##elt; \ +EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ + len_##elt, hare_##elt, tortoise_##elt, \ CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \ Lisp_Object tortoise_##elt; \ -int len_##elt; \ -EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \ - len_##elt, tail, tortoise_##elt, \ - CIRCULAR_LIST_SUSPICION_LENGTH) +EMACS_INT len_##elt; \ +EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ + len_##elt, tail, tortoise_##elt, \ + CIRCULAR_LIST_SUSPICION_LENGTH) \ #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \ Lisp_Object tortoise_##elt; \ -EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \ - len, tail, tortoise_##elt, \ - CIRCULAR_LIST_SUSPICION_LENGTH) +EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ + len, tail, tortoise_##elt, \ + CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \ tortoise, suspicion_length) \ -EXTERNAL_LIST_LOOP_6(elt, list, len, hare, tortoise, suspicion_length) \ +EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, suspicion_length) \ if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \ continue; \ else @@ -844,20 +844,20 @@ EXTERNAL_LIST_LOOP_6(elt, list, len, hare, tortoise, suspicion_length) \ /* Optimized and safe macros for looping over external property lists. */ #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \ Lisp_Object key, value, hare_##key, tortoise_##key; \ -int len_##key; \ -EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, hare_##key,\ +EMACS_INT len_##key; \ +EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, hare_##key, \ tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \ Lisp_Object key, value, tail, tortoise_##key; \ -int len_##key; \ -EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, tail, \ +EMACS_INT len_##key; \ +EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \ tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \ Lisp_Object key, value, tail, tortoise_##key; \ -int len; \ -EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, tail, \ +EMACS_INT len; \ +EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) @@ -914,7 +914,7 @@ INLINE int TRUE_LIST_P (Lisp_Object object) { Lisp_Object hare, tortoise; - int len; + EMACS_INT len; for (hare = tortoise = object, len = 0; CONSP (hare); @@ -936,7 +936,7 @@ TRUE_LIST_P (Lisp_Object object) #define CHECK_TRUE_LIST(list) do { \ Lisp_Object CTL_list = (list); \ Lisp_Object CTL_hare, CTL_tortoise; \ - int CTL_len; \ + EMACS_INT CTL_len; \ \ for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \ CONSP (CTL_hare); \ @@ -970,7 +970,6 @@ DECLARE_LRECORD (string, Lisp_String); #define XSTRING(x) XRECORD (x, string, Lisp_String) #define XSETSTRING(x, p) XSETRECORD (x, p, string) #define STRINGP(x) RECORDP (x, string) -#define GC_STRINGP(x) GC_RECORDP (x, string) #define CHECK_STRING(x) CHECK_RECORD (x, string) #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) @@ -1039,7 +1038,6 @@ DECLARE_LRECORD (vector, Lisp_Vector); #define XVECTOR(x) XRECORD (x, vector, Lisp_Vector) #define XSETVECTOR(x, p) XSETRECORD (x, p, vector) #define VECTORP(x) RECORDP (x, vector) -#define GC_VECTORP(x) GC_RECORDP (x, vector) #define CHECK_VECTOR(x) CHECK_RECORD (x, vector) #define CONCHECK_VECTOR(x) CONCHECK_RECORD (x, vector) @@ -1078,12 +1076,10 @@ DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector); #define XBIT_VECTOR(x) XRECORD (x, bit_vector, Lisp_Bit_Vector) #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector) #define BIT_VECTORP(x) RECORDP (x, bit_vector) -#define GC_BIT_VECTORP(x) GC_RECORDP (x, bit_vector) #define CHECK_BIT_VECTOR(x) CHECK_RECORD (x, bit_vector) #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector) #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) -#define GC_BITP(x) (GC_INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) #define CHECK_BIT(x) do { \ if (!BITP (x)) \ @@ -1098,30 +1094,27 @@ DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector); #define bit_vector_length(v) ((v)->size) #define bit_vector_next(v) ((v)->next) -INLINE int bit_vector_bit (Lisp_Bit_Vector *v, int i); +INLINE int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); INLINE int -bit_vector_bit (Lisp_Bit_Vector *v, int i) +bit_vector_bit (Lisp_Bit_Vector *v, size_t n) { - unsigned int ui = (unsigned int) i; - - return (((v)->bits[ui >> LONGBITS_LOG2] >> (ui & (LONGBITS_POWER_OF_2 - 1))) + return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1))) & 1); } -INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value); +INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); INLINE void -set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value) +set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value) { - unsigned int ui = (unsigned int) i; if (value) - (v)->bits[ui >> LONGBITS_LOG2] |= (1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); + v->bits[n >> LONGBITS_LOG2] |= (1UL << (n & (LONGBITS_POWER_OF_2 - 1))); else - (v)->bits[ui >> LONGBITS_LOG2] &= ~(1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); + v->bits[n >> LONGBITS_LOG2] &= ~(1UL << (n & (LONGBITS_POWER_OF_2 - 1))); } /* Number of longs required to hold LEN bits */ #define BIT_VECTOR_LONG_STORAGE(len) \ - ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) + (((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) /*********** symbol ***********/ @@ -1149,7 +1142,6 @@ DECLARE_LRECORD (symbol, Lisp_Symbol); #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol) #define XSETSYMBOL(x, p) XSETRECORD (x, p, symbol) #define SYMBOLP(x) RECORDP (x, symbol) -#define GC_SYMBOLP(x) GC_RECORDP (x, symbol) #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol) #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol) @@ -1178,7 +1170,6 @@ DECLARE_LRECORD (subr, Lisp_Subr); #define XSUBR(x) XRECORD (x, subr, Lisp_Subr) #define XSETSUBR(x, p) XSETRECORD (x, p, subr) #define SUBRP(x) RECORDP (x, subr) -#define GC_SUBRP(x) GC_RECORDP (x, subr) #define CHECK_SUBR(x) CHECK_RECORD (x, subr) #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr) @@ -1201,7 +1192,6 @@ DECLARE_LRECORD (marker, Lisp_Marker); #define XMARKER(x) XRECORD (x, marker, Lisp_Marker) #define XSETMARKER(x, p) XSETRECORD (x, p, marker) #define MARKERP(x) RECORDP (x, marker) -#define GC_MARKERP(x) GC_RECORDP (x, marker) #define CHECK_MARKER(x) CHECK_RECORD (x, marker) #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) @@ -1214,7 +1204,6 @@ DECLARE_LRECORD (marker, Lisp_Marker); /*********** char ***********/ #define CHARP(x) (XTYPE (x) == Lisp_Type_Char) -#define GC_CHARP(x) (XGCTYPE (x) == Lisp_Type_Char) #ifdef ERROR_CHECK_TYPECHECK @@ -1256,7 +1245,6 @@ DECLARE_LRECORD (float, Lisp_Float); #define XFLOAT(x) XRECORD (x, float, Lisp_Float) #define XSETFLOAT(x, p) XSETRECORD (x, p, float) #define FLOATP(x) RECORDP (x, float) -#define GC_FLOATP(x) GC_RECORDP (x, float) #define CHECK_FLOAT(x) CHECK_RECORD (x, float) #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float) @@ -1276,31 +1264,25 @@ DECLARE_LRECORD (float, Lisp_Float); } while (0) # define INT_OR_FLOATP(x) (INTP (x) || FLOATP (x)) -# define GC_INT_OR_FLOATP(x) (GC_INTP (x) || GC_FLOATP (x)) #else /* not LISP_FLOAT_TYPE */ #define XFLOAT(x) --- error! No float support. --- #define XSETFLOAT(x, p) --- error! No float support. --- #define FLOATP(x) 0 -#define GC_FLOATP(x) 0 #define CHECK_FLOAT(x) --- error! No float support. --- #define CONCHECK_FLOAT(x) --- error! No float support. --- #define XFLOATINT(n) XINT(n) #define CHECK_INT_OR_FLOAT CHECK_INT #define CONCHECK_INT_OR_FLOAT CONCHECK_INT -#define INT_OR_FLOATP(x) (INTP (x)) -# define GC_INT_OR_FLOATP(x) (GC_INTP (x)) +#define INT_OR_FLOATP(x) INTP (x) #endif /* not LISP_FLOAT_TYPE */ /*********** int ***********/ -#define GC_INTP(x) INTP (x) - #define ZEROP(x) EQ (x, Qzero) -#define GC_ZEROP(x) GC_EQ (x, Qzero) #ifdef ERROR_CHECK_TYPECHECK @@ -1338,7 +1320,6 @@ XCHAR_OR_INT (Lisp_Object obj) } while (0) #define NATNUMP(x) (INTP (x) && XINT (x) >= 0) -#define GC_NATNUMP(x) (GC_INTP (x) && XINT (x) >= 0) #define CHECK_NATNUM(x) do { \ if (!NATNUMP (x)) \ @@ -1460,7 +1441,6 @@ DECLARE_LRECORD (weak_list, struct weak_list); #define XWEAK_LIST(x) XRECORD (x, weak_list, struct weak_list) #define XSETWEAK_LIST(x, p) XSETRECORD (x, p, weak_list) #define WEAK_LISTP(x) RECORDP (x, weak_list) -#define GC_WEAK_LISTP(x) GC_RECORDP (x, weak_list) #define CHECK_WEAK_LIST(x) CHECK_RECORD (x, weak_list) #define CONCHECK_WEAK_LIST(x) CONCHECK_RECORD (x, weak_list) @@ -1469,9 +1449,8 @@ DECLARE_LRECORD (weak_list, struct weak_list); Lisp_Object make_weak_list (enum weak_list_type type); /* The following two are only called by the garbage collector */ -int finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), - void (*markobj) (Lisp_Object)); -void prune_weak_lists (int (*obj_marked_p) (Lisp_Object)); +int finish_marking_weak_lists (void); +void prune_weak_lists (void); /*********** lcrecord lists ***********/ @@ -1487,7 +1466,6 @@ DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list) #define LCRECORD_LISTP(x) RECORDP (x, lcrecord_list) -#define GC_LCRECORD_LISTP(x) GC_RECORDP (x, lcrecord_list) /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) Lcrecord lists should never escape to the Lisp level, so functions should not be doing this. */ @@ -1814,8 +1792,7 @@ void debug_ungcpro(char *, int, struct gcpro *); gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \ gcprolist = &gcpro4 )) -#define GCPRO5(var1, var2, var3, var4, var5) \ - ((void) ( \ +#define GCPRO5(var1, var2, var3, var4, var5) ((void) ( \ gcpro1.next = gcprolist, gcpro1.var = &var1, gcpro1.nvars = 1, \ gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \ gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \ @@ -1847,8 +1824,7 @@ void debug_ungcpro(char *, int, struct gcpro *); ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \ gcprolist = &ngcpro4 )) -#define NGCPRO5(var1, var2, var3, var4, var5) \ - ((void) ( \ +#define NGCPRO5(var1, var2, var3, var4, var5) ((void) ( \ ngcpro1.next = gcprolist, ngcpro1.var = &var1, ngcpro1.nvars = 1, \ ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \ ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \ @@ -1880,8 +1856,7 @@ void debug_ungcpro(char *, int, struct gcpro *); nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \ gcprolist = &nngcpro4 )) -#define NNGCPRO5(var1, var2, var3, var4, var5) \ - ((void) ( \ +#define NNGCPRO5(var1, var2, var3, var4, var5) ((void) ( \ nngcpro1.next = gcprolist, nngcpro1.var = &var1, nngcpro1.nvars = 1, \ nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \ nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \ @@ -1943,6 +1918,21 @@ void debug_ungcpro(char *, int, struct gcpro *); /* Call staticpro (&var) to protect static variable `var'. */ void staticpro (Lisp_Object *); +/* Call staticpro_nodump (&var) to protect static variable `var'. */ +/* var will not be saved at dump time */ +void staticpro_nodump (Lisp_Object *); + +/* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */ +void dumpstruct (void *, const struct struct_description *); + +/* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */ +void pdump_wire (Lisp_Object *); + +/* Call pdump_wire(&var) to ensure that var is properly updated after + pdump. var must point to a linked list of objects out of which + some may not be dumped */ +void pdump_wire_list (Lisp_Object *); + /* Nonzero means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ extern int initialized; @@ -1992,7 +1982,7 @@ struct overhead_stats #endif #endif #ifndef IS_ANY_SEP -#define IS_ANY_SEP(c) (IS_DIRECTORY_SEP (c)) +#define IS_ANY_SEP(c) IS_DIRECTORY_SEP (c) #endif #ifdef HAVE_INTTYPES_H @@ -2056,11 +2046,22 @@ void free_alist (Lisp_Object); void mark_conses_in_list (Lisp_Object); void free_marker (Lisp_Marker *); int object_dead_p (Lisp_Object); +void mark_object (Lisp_Object obj); +int marked_p (Lisp_Object obj); #ifdef MEMORY_USAGE_STATS size_t malloced_storage_size (void *, size_t, struct overhead_stats *); size_t fixed_type_block_overhead (size_t); #endif +#ifdef PDUMP +void pdump (void); +int pdump_load (void); + +extern char *pdump_start, *pdump_end; +#define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start)) +#else +#define DUMPEDP(adr) 0 +#endif /* Defined in buffer.c */ Lisp_Object make_buffer (struct buffer *); @@ -2083,7 +2084,7 @@ DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object, Lisp_Object)); Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object)); -void check_int_range (int, int, int); +void check_int_range (EMACS_INT, EMACS_INT, EMACS_INT); enum arith_comparison { arith_equal, @@ -2126,12 +2127,12 @@ Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object, /* Defined in editfns.c */ void uncache_home_directory (void); char *get_home_directory (void); -char *user_login_name (int *); +char *user_login_name (uid_t *); Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos); Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind); void buffer_insert1 (struct buffer *, Lisp_Object); -Lisp_Object make_string_from_buffer (struct buffer *, int, int); -Lisp_Object make_string_from_buffer_no_extents (struct buffer *, int, int); +Lisp_Object make_string_from_buffer (struct buffer *, Bufpos, Charcount); +Lisp_Object make_string_from_buffer_no_extents (struct buffer *, Bufpos, Charcount); Lisp_Object save_excursion_save (void); Lisp_Object save_restriction_save (void); Lisp_Object save_excursion_restore (Lisp_Object); @@ -2304,8 +2305,8 @@ void maybe_signal_double_file_error_2 (CONST char *, CONST char *, Error_behavior); Lisp_Object lisp_strerror (int); Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); -int read_allowing_quit (int, void *, size_t); -int write_allowing_quit (int, CONST void *, size_t); +ssize_t read_allowing_quit (int, void *, size_t); +ssize_t write_allowing_quit (int, CONST void *, size_t); int internal_delete_file (Lisp_Object); /* Defined in filelock.c */ @@ -2336,7 +2337,6 @@ Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object); Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object); Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object); -void pure_put (Lisp_Object, Lisp_Object, Lisp_Object); int plists_differ (Lisp_Object, Lisp_Object, int, int, int); Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object); void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object); @@ -2365,6 +2365,7 @@ Lisp_Object encode_error_behavior_flag (Error_behavior); /* Defined in indent.c */ int bi_spaces_at_point (struct buffer *, Bytind); int column_at_point (struct buffer *, Bufpos, int); +int string_column_at_point (struct Lisp_String *, Bufpos, int); int current_column (struct buffer *); void invalidate_current_column (void); Bufpos vmotion (struct window *, Bufpos, int, int *); @@ -2467,7 +2468,7 @@ void float_to_string (char *, double); void internal_object_printer (Lisp_Object, Lisp_Object, int); /* Defined in profile.c */ -void mark_profiling_info (void (*) (Lisp_Object)); +void mark_profiling_info (void); void profile_increase_call_count (Lisp_Object); extern int profiling_active; extern int profiling_redisplay_flag; @@ -2489,6 +2490,7 @@ Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_IN Bufpos find_next_newline (struct buffer *, Bufpos, int); Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int); Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int); +Bytind bi_find_next_emchar_in_string (struct Lisp_String*, Emchar, Bytind, EMACS_INT); Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int); struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, char *, int, Error_behavior); @@ -2530,7 +2532,7 @@ void reject_constant_symbols (Lisp_Object sym, Lisp_Object newval, Lisp_Object follow_past_lisp_magic); /* Defined in syntax.c */ -int scan_words (struct buffer *, int, int); +Bufpos scan_words (struct buffer *, Bufpos, int); /* Defined in undo.c */ Lisp_Object truncate_undo_list (Lisp_Object, int, int); @@ -2612,6 +2614,7 @@ EXFUN (Fdefault_boundp, 1); EXFUN (Fdefault_value, 1); EXFUN (Fdefine_key, 3); EXFUN (Fdelete_region, 3); +EXFUN (Fdelete_process, 1); EXFUN (Fdelq, 2); EXFUN (Fdestructive_alist_to_plist, 1); EXFUN (Fdetect_coding_region, 3); @@ -2740,7 +2743,6 @@ EXFUN (Fprint, 2); EXFUN (Fprocess_status, 1); EXFUN (Fprogn, UNEVALLED); EXFUN (Fprovide, 1); -EXFUN (Fpurecopy, 1); EXFUN (Fput, 3); EXFUN (Fput_range_table, 4); EXFUN (Fput_text_property, 5); @@ -2805,14 +2807,14 @@ extern Lisp_Object Qafter, Qall, Qand; extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary, Qbitmap, Qbitp, Qblinking; -extern Lisp_Object Qboolean, Qbottom, Qbuffer, Qbuffer_file_coding_system; +extern Lisp_Object Qboolean, Qbottom, Qbuffer; extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton; extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory; extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp; extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; -extern Lisp_Object Qcircular_list, Qcircular_property_list; -extern Lisp_Object Qcoding_system_error, Qcoding_system_p; +extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list; +extern Lisp_Object Qcoding_system_error; extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p; extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case; extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical; @@ -2829,14 +2831,14 @@ extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep, Qfile_error; extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead; -extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight, Qicon; +extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight, Qhorizontal, Qicon; extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit; extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; extern Lisp_Object Qinput_charset_conversion, Qinteger; extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal; extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error; -extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qleft, Qlf; +extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qlayout, Qleft, Qlf; extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic; extern Lisp_Object Qmalformed_list, Qmalformed_property_list; extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers; @@ -2846,10 +2848,10 @@ extern Lisp_Object Qmouse_leave_buffer_hook, Qmswindows, Qname, Qnas, Qnatnump; extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing; extern Lisp_Object Qnothing_image_instance_p, Qnotice; -extern Lisp_Object Qnumber_char_or_marker_p, Qnumber_or_marker_p, Qnumberp; +extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp; extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc; extern Lisp_Object Qold_rassq, Qonly, Qor, Qother, Qoutput_charset_conversion; -extern Lisp_Object Qoverflow_error, Qpath, Qpoint, Qpointer, Qpointer_glyph_p; +extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p; extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion; extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length; extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit; @@ -2857,7 +2859,8 @@ extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char; extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource; extern Lisp_Object Qreturn, Qreverse, Qright, Qrun_hooks, Qsans_modifiers; -extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected, Qself_insert_command; +extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected; +extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo; extern Lisp_Object Qsequencep, Qsetting_constant, Qseven, Qshift_jis, Qshort; extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace; extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open; @@ -2868,7 +2871,7 @@ extern Lisp_Object Qtoolbar, Qtop, Qtop_level, Qtrue_list_p, Qtty, Qtype; extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error; extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories; extern Lisp_Object Qvalue_assoc, Qvalues; -extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvector; +extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical; extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning, Qwidth, Qwidget, Qwindow; extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments; extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p; diff --git a/src/lread.c b/src/lread.c index 4bb1bcd..da3a48e 100644 --- a/src/lread.c +++ b/src/lread.c @@ -443,12 +443,6 @@ load_force_doc_string_unwind (Lisp_Object oldlist) Lisp_Object list = Vload_force_doc_string_list; Lisp_Object tail; int fd = XINT (XCAR (Vload_descriptor_list)); - /* NOTE: If purify_flag is true, we're in-place modifying objects that - may be in purespace (and if not, they will be). Therefore, we have - to be VERY careful to make sure that all objects that we create - are purecopied -- objects in purespace are not marked for GC, and - if we leave any impure objects inside of pure ones, we're really - screwed. */ GCPRO1 (list); /* restore the old value first just in case an error occurs. */ @@ -479,13 +473,12 @@ load_force_doc_string_unwind (Lisp_Object oldlist) ivan = Fread (juan); if (!CONSP (ivan)) signal_simple_error ("invalid lazy-loaded byte code", ivan); - /* Remember to purecopy; see above. */ - XCOMPILED_FUNCTION (john)->instructions = Fpurecopy (XCAR (ivan)); + XCOMPILED_FUNCTION (john)->instructions = XCAR (ivan); /* v18 or v19 bytecode file. Need to Ebolify. */ if (XCOMPILED_FUNCTION (john)->flags.ebolified && VECTORP (XCDR (ivan))) ebolify_bytecode_constants (XCDR (ivan)); - XCOMPILED_FUNCTION (john)->constants = Fpurecopy (XCDR (ivan)); + XCOMPILED_FUNCTION (john)->constants = XCDR (ivan); NUNGCPRO; } doc = compiled_function_documentation (XCOMPILED_FUNCTION (john)); @@ -910,22 +903,23 @@ locate_file_find_directory_hash_table (Lisp_Object directory) nil, a list, or a string (for backward compatibility), with the following semantics: - a) nil - no suffix, just search for file name intact (semantically - different from "empty suffix list") + a) nil - no suffix, just search for file name intact + (semantically different from "empty suffix list", which + would be meaningless.) b) list - list of suffixes to append to file name. Each of these must be a string. c) string - colon-separated suffixes to append to file name (backward compatibility). - All of this got hairy, so I decided to use write a mapper. Calling - a function for each suffix shouldn't slow things down, since - locate_file is rarely call with enough suffixes for it to make a - difference. */ + All of this got hairy, so I decided to use a mapper. Calling a + function for each suffix shouldn't slow things down, since + locate_file is rarely called with enough suffixes for funcalls to + make any difference. */ /* Map FUN over SUFFIXES, as described above. FUN will be called with a char * containing the current file name, and ARG. Mapping stops when FUN returns non-zero. */ -void +static void locate_file_map_suffixes (Lisp_Object filename, Lisp_Object suffixes, int (*fun) (char *, void *), void *arg) @@ -984,7 +978,7 @@ locate_file_map_suffixes (Lisp_Object filename, Lisp_Object suffixes, else { /* Case c) */ - CONST char *nsuffix = XSTRING_DATA (suffixes); + CONST char *nsuffix = (CONST char *) XSTRING_DATA (suffixes); while (1) { @@ -1966,7 +1960,6 @@ read_atom (Lisp_Object readcharfun, sym = Fmake_symbol ( make_string ((Bufbyte *) read_ptr, len)); else { - /* intern will purecopy pname if necessary */ Lisp_Object name = make_string ((Bufbyte *) read_ptr, len); sym = Fintern (name, Qnil); } @@ -3024,12 +3017,7 @@ read_vector (Lisp_Object readcharfun, i++, p++) { struct Lisp_Cons *otem = XCONS (tem); -#if 0 /* FSFmacs defun hack */ - if (read_pure) - tem = Fpurecopy (Fcar (tem)); - else -#endif - tem = Fcar (tem); + tem = Fcar (tem); *p = tem; tem = otem->cdr; free_cons (otem); @@ -3168,8 +3156,17 @@ structure_type_create (void) } void +reinit_vars_of_lread (void) +{ + Vread_buffer_stream = Qnil; + staticpro_nodump (&Vread_buffer_stream); +} + +void vars_of_lread (void) { + reinit_vars_of_lread (); + DEFVAR_LISP ("values", &Vvalues /* List of values of all expressions which were read, evaluated and printed. Order is reverse chronological. @@ -3287,9 +3284,6 @@ character escape syntaxes or just read them incorrectly. with values saved when the image is dumped. */ staticpro (&Vload_descriptor_list); - Vread_buffer_stream = Qnil; - staticpro (&Vread_buffer_stream); - /* Initialized in init_lread. */ staticpro (&Vload_force_doc_string_list); diff --git a/src/lrecord.h b/src/lrecord.h index 1858552..0dc5e05 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -72,12 +72,12 @@ struct lrecord_header struct lrecord_implementation; int lrecord_type_index (CONST struct lrecord_implementation *implementation); -# define set_lheader_implementation(header,imp) do { \ +#define set_lheader_implementation(header,imp) do { \ struct lrecord_header* SLI_header = (header); \ - (SLI_header)->type = lrecord_type_index (imp); \ - (SLI_header)->mark = 0; \ - (SLI_header)->c_readonly = 0; \ - (SLI_header)->lisp_readonly = 0; \ + SLI_header->type = lrecord_type_index (imp); \ + SLI_header->mark = 0; \ + SLI_header->c_readonly = 0; \ + SLI_header->lisp_readonly = 0; \ } while (0) struct lcrecord_header @@ -119,8 +119,7 @@ struct free_lcrecord_header }; /* see alloc.c for an explanation */ -Lisp_Object this_one_is_unmarkable (Lisp_Object obj, - void (*markobj) (Lisp_Object)); +Lisp_Object this_one_is_unmarkable (Lisp_Object obj); struct lrecord_implementation { @@ -134,7 +133,7 @@ struct lrecord_implementation recursion, so the object returned should preferably be the one with the deepest level of Lisp_Object pointers. This function can be NULL, meaning no GC marking is necessary. */ - Lisp_Object (*marker) (Lisp_Object, void (*mark_object) (Lisp_Object)); + Lisp_Object (*marker) (Lisp_Object); /* This can be NULL if the object is an lcrecord; the default_object_printer() in print.c will be used. */ void (*printer) (Lisp_Object, Lisp_Object printcharfun, int escapeflag); @@ -208,7 +207,7 @@ extern int gc_in_progress; structure. Following values are parameters, their presence, type and number is type-dependant. - The description ends with a "XD_END" record. + The description ends with a "XD_END" or "XD_SPECIFIER_END" record. Some example descriptions : static const struct lrecord_description cons_description[] = { @@ -219,19 +218,25 @@ extern int gc_in_progress; Which means "two lisp objects starting at the 'car' element" static const struct lrecord_description string_description[] = { - { XD_STRING_DATA, offsetof(Lisp_String, data) }, - { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, + { XD_BYTECOUNT, offsetof(Lisp_String, size) }, + { XD_OPAQUE_DATA_PTR, offsetof(Lisp_String, data), XD_INDIRECT(0, 1) }, + { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, { XD_END } }; - "A string data pointer at 'data', one lisp object at 'plist'" + "A pointer to string data at 'data', the size of the pointed array being the value + of the size variable plus 1, and one lisp object at 'plist'" The existing types : XD_LISP_OBJECT Lisp objects. The third element is the count. This is also the type to use for pointers to other lrecords. - XD_STRING_DATA - Pointer to string data. + XD_LO_RESET_NIL + Lisp objects which will be reset to Qnil when dumping. Useful for cleaning + up caches. + + XD_LO_LINK + Link in a linked list of objects of the same type. XD_OPAQUE_PTR Pointer to undumpable data. Must be NULL when dumping. @@ -244,6 +249,16 @@ extern int gc_in_progress; Pointer to dumpable opaque data. Parameter is the size of the data. Pointed data must be relocatable without changes. + XD_C_STRING + Pointer to a C string. + + XD_DOC_STRING + Pointer to a doc string (C string if positive, opaque value if negative) + + XD_INT_RESET + An integer which will be reset to a given value in the dump file. + + XD_SIZE_T size_t value. Used for counts. @@ -253,30 +268,40 @@ extern int gc_in_progress; XD_LONG long value. Used for counts. + XD_BYTECOUNT + bytecount value. Used for counts. + XD_END Special type indicating the end of the array. + XD_SPECIFIER_END + Special type indicating the end of the array for a specifier. Extra + description is going to be fetched from the specifier methods. - Special macros: - XD_INDIRECT(line) - Usable where a "count" or "size" is requested. Gives the value of the element - which is at line number 'line' in the description (count starts at zero). - XD_PARENT_INDIRECT(line) - Same as XD_INDIRECT but the element number refers to the parent structure. - Usable only in struct descriptions. + Special macros: + XD_INDIRECT(line, delta) + Usable where a "count" or "size" is requested. Gives the value of + the element which is at line number 'line' in the description (count + starts at zero) and adds delta to it. */ enum lrecord_description_type { XD_LISP_OBJECT, - XD_STRING_DATA, + XD_LO_RESET_NIL, + XD_LO_LINK, XD_OPAQUE_PTR, XD_STRUCT_PTR, XD_OPAQUE_DATA_PTR, + XD_C_STRING, + XD_DOC_STRING, + XD_INT_RESET, XD_SIZE_T, XD_INT, XD_LONG, - XD_END + XD_BYTECOUNT, + XD_END, + XD_SPECIFIER_END }; struct lrecord_description { @@ -291,12 +316,16 @@ struct struct_description { const struct lrecord_description *description; }; -#define XD_INDIRECT(count) (-1-(count)) -#define XD_PARENT_INDIRECT(count) (-1000-(count)) +#define XD_INDIRECT(val, delta) (-1-((val)|(delta<<8))) + +#define XD_IS_INDIRECT(code) (code<0) +#define XD_INDIRECT_VAL(code) ((-1-code) & 255) +#define XD_INDIRECT_DELTA(code) (((-1-code)>>8) & 255) #define XD_DYNARR_DESC(base_type, sub_desc) \ - { XD_STRUCT_PTR, offsetof(base_type, base), XD_INDIRECT(1), sub_desc }, \ - { XD_INT, offsetof(base_type, max) } + { XD_STRUCT_PTR, offsetof(base_type, base), XD_INDIRECT(1, 0), sub_desc }, \ + { XD_INT, offsetof(base_type, cur) }, \ + { XD_INT_RESET, offsetof(base_type, max), XD_INDIRECT(1, 0) } /* Declaring the following structures as const puts them in the text (read-only) segment, which makes debugging inconvenient @@ -345,7 +374,7 @@ CONST_IF_NOT_DEBUG struct lrecord_implementation lrecord_##c_name = \ getprop, putprop, remprop, props, size, sizer, \ &(lrecord_##c_name##_lrecord_type_index), basic_p } \ -#define LRECORDP(a) (XTYPE ((a)) == Lisp_Type_Record) +#define LRECORDP(a) (XTYPE (a) == Lisp_Type_Record) #define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a)) #define RECORD_TYPEP(x, ty) \ @@ -370,8 +399,7 @@ INLINE structtype *error_check_##c_name (Lisp_Object obj); \ INLINE structtype * \ error_check_##c_name (Lisp_Object obj) \ { \ - assert (RECORD_TYPEP (obj, &lrecord_##c_name) || \ - MARKED_RECORD_P (obj)); \ + assert (RECORD_TYPEP (obj, &lrecord_##c_name)); \ return (structtype *) XPNTR (obj); \ } \ extern Lisp_Object Q##c_name##p @@ -381,7 +409,7 @@ INLINE structtype *error_check_##c_name (Lisp_Object obj); \ INLINE structtype * \ error_check_##c_name (Lisp_Object obj) \ { \ - assert (XGCTYPE (obj) == type_enum); \ + assert (XTYPE (obj) == type_enum); \ return (structtype *) XPNTR (obj); \ } \ extern Lisp_Object Q##c_name##p @@ -392,8 +420,7 @@ extern Lisp_Object Q##c_name##p # define XSETRECORD(var, p, c_name) do \ { \ XSETOBJ (var, Lisp_Type_Record, p); \ - assert (RECORD_TYPEP (var, &lrecord_##c_name) || \ - MARKED_RECORD_P (var)); \ + assert (RECORD_TYPEP (var, &lrecord_##c_name)); \ } while (0) #else /* not ERROR_CHECK_TYPECHECK */ @@ -412,7 +439,6 @@ extern Lisp_Object Q##c_name##p #endif /* not ERROR_CHECK_TYPECHECK */ #define RECORDP(x, c_name) RECORD_TYPEP (x, &lrecord_##c_name) -#define GC_RECORDP(x, c_name) gc_record_type_p (x, &lrecord_##c_name) /* Note: we now have two different kinds of type-checking macros. The "old" kind has now been renamed CONCHECK_foo. The reason for @@ -459,19 +485,16 @@ void *alloc_lcrecord (size_t size, CONST struct lrecord_implementation *); #define alloc_lcrecord_type(type, lrecord_implementation) \ ((type *) alloc_lcrecord (sizeof (type), lrecord_implementation)) -int gc_record_type_p (Lisp_Object frob, - CONST struct lrecord_implementation *type); - /* Copy the data from one lcrecord structure into another, but don't overwrite the header information. */ #define copy_lcrecord(dst, src) \ - memcpy ((char *) dst + sizeof (struct lcrecord_header), \ - (char *) src + sizeof (struct lcrecord_header), \ - sizeof (*dst) - sizeof (struct lcrecord_header)) + memcpy ((char *) (dst) + sizeof (struct lcrecord_header), \ + (char *) (src) + sizeof (struct lcrecord_header), \ + sizeof (*(dst)) - sizeof (struct lcrecord_header)) #define zero_lcrecord(lcr) \ - memset ((char *) lcr + sizeof (struct lcrecord_header), 0, \ - sizeof (*lcr) - sizeof (struct lcrecord_header)) + memset ((char *) (lcr) + sizeof (struct lcrecord_header), 0, \ + sizeof (*(lcr)) - sizeof (struct lcrecord_header)) #endif /* _XEMACS_LRECORD_H_ */ diff --git a/src/lstream.c b/src/lstream.c index 42eb940..3e6d1ac 100644 --- a/src/lstream.c +++ b/src/lstream.c @@ -95,12 +95,12 @@ int Lstream_fgetc (Lstream *stream) void Lstream_fungetc (Lstream *stream, int c) Function equivalents of the above macros. -int Lstream_read (Lstream *stream, void *data, size_t size) +ssize_t Lstream_read (Lstream *stream, void *data, size_t size) Read SIZE bytes of DATA from the stream. Return the number of bytes read. 0 means EOF. -1 means an error occurred and no bytes were read. -int Lstream_write (Lstream *stream, void *data, size_t size) +ssize_t Lstream_write (Lstream *stream, void *data, size_t size) Write SIZE bytes of DATA to the stream. Return the number of bytes written. -1 means an error occurred and no bytes were written. @@ -134,10 +134,10 @@ void Lstream_rewind (Lstream *stream) #define MAX_READ_SIZE 512 static Lisp_Object -mark_lstream (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_lstream (Lisp_Object obj) { Lstream *lstr = XLSTREAM (obj); - return lstr->imp->marker ? (lstr->imp->marker) (obj, markobj) : Qnil; + return lstr->imp->marker ? (lstr->imp->marker) (obj) : Qnil; } static void @@ -302,11 +302,11 @@ Lstream_reopen (Lstream *lstr) int Lstream_flush_out (Lstream *lstr) { - int num_written; + ssize_t num_written; while (lstr->out_buffer_ind > 0) { - int size = lstr->out_buffer_ind; + size_t size = lstr->out_buffer_ind; if (! (lstr->flags & LSTREAM_FL_IS_OPEN)) Lstream_internal_error ("lstream not open", lstr); if (! (lstr->flags & LSTREAM_FL_WRITE)) @@ -347,7 +347,7 @@ Lstream_flush_out (Lstream *lstr) the attempt to write the data might have resulted in an EWOULDBLOCK error. */ return 0; - else if (num_written >= (int) lstr->out_buffer_ind) + else if (num_written >= lstr->out_buffer_ind) lstr->out_buffer_ind = 0; else if (num_written > 0) { @@ -389,31 +389,36 @@ Lstream_flush (Lstream *lstr) if it's getting EWOULDBLOCK errors. We have to keep stocking them up until they can be written, so as to avoid losing data. */ -static int +static size_t Lstream_adding (Lstream *lstr, size_t num, int force) { - /* Compute the size that the outbuffer needs to be after the - chars are added. */ - size_t size_needed = max (lstr->out_buffer_size, - num + lstr->out_buffer_ind); + size_t size = num + lstr->out_buffer_ind; + + if (size <= lstr->out_buffer_size) + return num; + /* Maybe chop it down so that we don't buffer more characters than our advertised buffering size. */ - if (!force) - size_needed = min (lstr->buffering_size, size_needed); - DO_REALLOC (lstr->out_buffer, lstr->out_buffer_size, - size_needed, unsigned char); - /* There might be more data buffered than the buffering size, - so make sure we don't return a negative number here. */ - return max (0, min (num, size_needed - lstr->out_buffer_ind)); + if ((size > lstr->buffering_size) && !force) + { + size = lstr->buffering_size; + /* There might be more data buffered than the buffering size. */ + if (size <= lstr->out_buffer_ind) + return 0; + } + + DO_REALLOC (lstr->out_buffer, lstr->out_buffer_size, size, unsigned char); + + return size - lstr->out_buffer_ind; } /* Like Lstream_write(), but does not handle line-buffering correctly. */ -static int +static ssize_t Lstream_write_1 (Lstream *lstr, CONST void *data, size_t size) { CONST unsigned char *p = (CONST unsigned char *) data; - int off = 0; + ssize_t off = 0; if (! (lstr->flags & LSTREAM_FL_IS_OPEN)) Lstream_internal_error ("lstream not open", lstr); if (! (lstr->flags & LSTREAM_FL_WRITE)) @@ -424,7 +429,7 @@ Lstream_write_1 (Lstream *lstr, CONST void *data, size_t size) while (1) { /* Figure out how much we can add to the buffer */ - int chunk = Lstream_adding (lstr, size, 0); + size_t chunk = Lstream_adding (lstr, size, 0); if (chunk == 0) { if (couldnt_write_last_time) @@ -469,17 +474,17 @@ Lstream_write_1 (Lstream *lstr, CONST void *data, size_t size) repeatedly call Lstream_putc(), which knows how to handle line buffering. */ -int +ssize_t Lstream_write (Lstream *lstr, CONST void *data, size_t size) { - int i; + size_t i; CONST unsigned char *p = (CONST unsigned char *) data; if (size == 0) return size; if (lstr->buffering != LSTREAM_LINE_BUFFERED) return Lstream_write_1 (lstr, data, size); - for (i = 0; i < (int) size; i++) + for (i = 0; i < size; i++) { if (Lstream_putc (lstr, p[i]) < 0) break; @@ -490,10 +495,7 @@ Lstream_write (Lstream *lstr, CONST void *data, size_t size) int Lstream_was_blocked_p (Lstream *lstr) { - if (lstr->imp->was_blocked_p) - return (lstr->imp->was_blocked_p) (lstr); - else - return 0; + return lstr->imp->was_blocked_p ? lstr->imp->was_blocked_p (lstr) : 0; } static int @@ -511,16 +513,16 @@ Lstream_raw_read (Lstream *lstr, unsigned char *buffer, size_t size) /* Assuming the buffer is empty, fill it up again. */ -static int +static ssize_t Lstream_read_more (Lstream *lstr) { #if 0 - int size_needed = max (1, min (MAX_READ_SIZE, lstr->buffering_size)); + ssize_t size_needed = max (1, min (MAX_READ_SIZE, lstr->buffering_size)); #else /* If someone requested a larger buffer size, so be it! */ - int size_needed = max (1, lstr->buffering_size); + ssize_t size_needed = max (1, lstr->buffering_size); #endif - int size_gotten; + ssize_t size_gotten; DO_REALLOC (lstr->in_buffer, lstr->in_buffer_size, size_needed, unsigned char); @@ -530,11 +532,11 @@ Lstream_read_more (Lstream *lstr) return size_gotten < 0 ? -1 : size_gotten; } -int +ssize_t Lstream_read (Lstream *lstr, void *data, size_t size) { unsigned char *p = (unsigned char *) data; - int off = 0; + size_t off = 0; size_t chunk; int error_occurred = 0; @@ -546,7 +548,7 @@ Lstream_read (Lstream *lstr, void *data, size_t size) if (chunk > 0) { /* The bytes come back in reverse order. */ - for (; off < (int) chunk; off++) + for (; off < chunk; off++) p[off] = lstr->unget_buffer[--lstr->unget_buffer_ind]; lstr->byte_count += chunk; size -= chunk; @@ -568,7 +570,7 @@ Lstream_read (Lstream *lstr, void *data, size_t size) /* If we need some more, try to get some more from the stream's end */ if (size > 0) { - int retval = Lstream_read_more (lstr); + ssize_t retval = Lstream_read_more (lstr); if (retval < 0) error_occurred = 1; if (retval <= 0) @@ -592,7 +594,7 @@ Lstream_read (Lstream *lstr, void *data, size_t size) VALIDATE_CHARPTR_BACKWARD (dataend); if (dataend + REP_BYTES_BY_FIRST_BYTE (*dataend) != p + off) { - int newoff = dataend - p; + size_t newoff = dataend - p; /* If not, chop the size down to ignore the last char and stash it away for next time. */ Lstream_unread (lstr, dataend, off - newoff); @@ -601,25 +603,24 @@ Lstream_read (Lstream *lstr, void *data, size_t size) } } - return ((off == 0 && error_occurred) ? -1 : off); + return off == 0 && error_occurred ? -1 : (ssize_t) off; } void Lstream_unread (Lstream *lstr, CONST void *data, size_t size) { - int i; - unsigned char *p = (unsigned char *) data; + CONST unsigned char *p = (CONST unsigned char *) data; /* Make sure buffer is big enough */ - DO_REALLOC (lstr->unget_buffer, lstr->unget_buffer_size, lstr->unget_buffer_ind + size, unsigned char); + lstr->byte_count -= size; + /* Bytes have to go on in reverse order -- they are reversed again when read back. */ - for (i = size - 1; i >= 0; i--) - lstr->unget_buffer[lstr->unget_buffer_ind++] = p[i]; - lstr->byte_count -= size; + while (size--) + lstr->unget_buffer[lstr->unget_buffer_ind++] = p[size]; } int @@ -646,15 +647,11 @@ Lstream_seekable_p (Lstream *lstr) static int Lstream_pseudo_close (Lstream *lstr) { - int rc; - if (!lstr->flags & LSTREAM_FL_IS_OPEN) Lstream_internal_error ("lstream is not open", lstr); /* don't check errors here -- best not to risk file descriptor loss */ - rc = Lstream_flush (lstr); - - return rc; + return Lstream_flush (lstr); } int @@ -729,7 +726,7 @@ int Lstream_fputc (Lstream *lstr, int c) { unsigned char ch = (unsigned char) c; - int retval = Lstream_write_1 (lstr, &ch, 1); + ssize_t retval = Lstream_write_1 (lstr, &ch, 1); if (retval >= 0 && lstr->buffering == LSTREAM_LINE_BUFFERED && ch == '\n') return Lstream_flush_out (lstr); return retval < 0 ? -1 : 0; @@ -792,24 +789,42 @@ make_stdio_output_stream (FILE *stream, int flags) return make_stdio_stream_1 (stream, flags, "w"); } -static int +/* #### From reading the Unix 98 specification, it appears that if we + want stdio_reader() to be completely correct, we should check for + 0 < val < size and if so, check to see if an error has occurred. + If an error has occurred, but val is non-zero, we should go ahead + and act as if the read was successful, but remember in some fashion + or other, that an error has occurred, and report that on the next + call to stdio_reader instead of calling fread() again. + + Currently, in such a case, we end up calling fread() twice and we + assume that + + 1) this is not harmful, and + 2) the error will still be reported on the second read. + + This is probably reasonable, so I don't think we should change this + code (it could even be argued that the error might have fixed + itself, so we should do the fread() again. */ + +static ssize_t stdio_reader (Lstream *stream, unsigned char *data, size_t size) { struct stdio_stream *str = STDIO_STREAM_DATA (stream); - size_t val = fread (data, 1, (size_t) size, str->file); + size_t val = fread (data, 1, size, str->file); if (!val && ferror (str->file)) return -1; - return (int) val; + return val; } -static int +static ssize_t stdio_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct stdio_stream *str = STDIO_STREAM_DATA (stream); size_t val = fwrite (data, 1, size, str->file); if (!val && ferror (str->file)) return -1; - return (int) val; + return val; } static int @@ -837,9 +852,6 @@ stdio_flusher (Lstream *stream) if (stream->flags & LSTREAM_FL_WRITE) return fflush (str->file); else - /* call fpurge? Only exists on some systems. #### Why not add a - configure check for HAVE_FPURGE and utilize it on systems that - support it? --hniksic */ return 0; } @@ -853,7 +865,6 @@ stdio_closer (Lstream *stream) if (stream->flags & LSTREAM_FL_WRITE) return fflush (str->file); else - /* call fpurge? Only exists on some systems. */ return 0; } @@ -921,14 +932,16 @@ make_filedesc_output_stream (int filedesc, int offset, int count, int flags) return make_filedesc_stream_1 (filedesc, offset, count, flags, "w"); } -static int +static ssize_t filedesc_reader (Lstream *stream, unsigned char *data, size_t size) { - int nread; + ssize_t nread; struct filedesc_stream *str = FILEDESC_STREAM_DATA (stream); if (str->end_pos >= 0) size = min (size, (size_t) (str->end_pos - str->current_pos)); - nread = (str->allow_quit ? read_allowing_quit : read) (str->fd, data, size); + nread = str->allow_quit ? + read_allowing_quit (str->fd, data, size) : + read (str->fd, data, size); if (nread > 0) str->current_pos += nread; return nread; @@ -948,11 +961,11 @@ errno_would_block_p (int val) return 0; } -static int +static ssize_t filedesc_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct filedesc_stream *str = FILEDESC_STREAM_DATA (stream); - int retval; + ssize_t retval; int need_newline = 0; /* This function would be simple if it were not for the blasted @@ -981,8 +994,9 @@ filedesc_writer (Lstream *stream, CONST unsigned char *data, size_t size) /**** start of non-PTY-crap ****/ if (size > 0) - retval = ((str->allow_quit ? write_allowing_quit : write) - (str->fd, data, size)); + retval = str->allow_quit ? + write_allowing_quit (str->fd, data, size) : + write (str->fd, data, size); else retval = 0; if (retval < 0 && errno_would_block_p (errno) && str->blocked_ok) @@ -1005,8 +1019,10 @@ filedesc_writer (Lstream *stream, CONST unsigned char *data, size_t size) out for EWOULDBLOCK. */ if (str->chars_sans_newline >= str->pty_max_bytes) { - int retval2 = ((str->allow_quit ? write_allowing_quit : write) - (str->fd, &str->eof_char, 1)); + ssize_t retval2 = str->allow_quit ? + write_allowing_quit (str->fd, &str->eof_char, 1) : + write (str->fd, &str->eof_char, 1); + if (retval2 > 0) str->chars_sans_newline = 0; else if (retval2 < 0) @@ -1036,8 +1052,10 @@ filedesc_writer (Lstream *stream, CONST unsigned char *data, size_t size) if (need_newline) { Bufbyte nl = '\n'; - int retval2 = ((str->allow_quit ? write_allowing_quit : write) - (str->fd, &nl, 1)); + ssize_t retval2 = str->allow_quit ? + write_allowing_quit (str->fd, &nl, 1) : + write (str->fd, &nl, 1); + if (retval2 > 0) { str->chars_sans_newline = 0; @@ -1170,7 +1188,7 @@ make_lisp_string_input_stream (Lisp_Object string, Bytecount offset, return obj; } -static int +static ssize_t lisp_string_reader (Lstream *stream, unsigned char *data, size_t size) { struct lisp_string_stream *str = LISP_STRING_STREAM_DATA (stream); @@ -1214,7 +1232,7 @@ lisp_string_rewinder (Lstream *stream) } static Lisp_Object -lisp_string_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +lisp_string_marker (Lisp_Object stream) { struct lisp_string_stream *str = LISP_STRING_STREAM_DATA (XLSTREAM (stream)); return str->obj; @@ -1260,7 +1278,7 @@ make_fixed_buffer_output_stream (unsigned char *buf, size_t size) return obj; } -static int +static ssize_t fixed_buffer_reader (Lstream *stream, unsigned char *data, size_t size) { struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (stream); @@ -1270,7 +1288,7 @@ fixed_buffer_reader (Lstream *stream, unsigned char *data, size_t size) return size; } -static int +static ssize_t fixed_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (stream); @@ -1332,7 +1350,7 @@ make_resizing_buffer_output_stream (void) return obj; } -static int +static ssize_t resizing_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct resizing_buffer_stream *str = RESIZING_BUFFER_STREAM_DATA (stream); @@ -1394,7 +1412,7 @@ make_dynarr_output_stream (unsigned_char_dynarr *dyn) return obj; } -static int +static ssize_t dynarr_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct dynarr_stream *str = DYNARR_STREAM_DATA (stream); @@ -1518,7 +1536,7 @@ make_lisp_buffer_output_stream (struct buffer *buf, Bufpos pos, int flags) return lstr; } -static int +static ssize_t lisp_buffer_reader (Lstream *stream, unsigned char *data, size_t size) { struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (stream); @@ -1576,7 +1594,7 @@ lisp_buffer_reader (Lstream *stream, unsigned char *data, size_t size) return data - orig_data; } -static int +static ssize_t lisp_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (stream); @@ -1612,13 +1630,13 @@ lisp_buffer_rewinder (Lstream *stream) } static Lisp_Object -lisp_buffer_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +lisp_buffer_marker (Lisp_Object stream) { struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (XLSTREAM (stream)); - markobj (str->start); - markobj (str->end); + mark_object (str->start); + mark_object (str->end); return str->buffer; } @@ -1673,13 +1691,19 @@ lstream_type_create (void) } void -vars_of_lstream (void) +reinit_vars_of_lstream (void) { int i; for (i = 0; i < countof (Vlstream_free_list); i++) { Vlstream_free_list[i] = Qnil; - staticpro (&Vlstream_free_list[i]); + staticpro_nodump (&Vlstream_free_list[i]); } } + +void +vars_of_lstream (void) +{ + reinit_vars_of_lstream (); +} diff --git a/src/lstream.h b/src/lstream.h index b56fede..623a24e 100644 --- a/src/lstream.h +++ b/src/lstream.h @@ -95,7 +95,7 @@ typedef struct lstream_implementation /* The omniscient mly, blinded by the irresistable thrall of Common Lisp, thinks that it is bogus that the types and implementations of input and output streams are the same. */ - int (*reader) (Lstream *stream, unsigned char *data, size_t size); + ssize_t (*reader) (Lstream *stream, unsigned char *data, size_t size); /* Send some data to the stream's end. Data to be sent is in DATA and is SIZE bytes. Return the number of bytes sent. This function can send and return fewer bytes than is passed in; in @@ -106,7 +106,7 @@ typedef struct lstream_implementation data. (This is useful, e.g., of you're dealing with a non-blocking file descriptor and are getting EWOULDBLOCK errors.) This function can be NULL if the stream is input-only. */ - int (*writer) (Lstream *stream, CONST unsigned char *data, size_t size); + ssize_t (*writer) (Lstream *stream, CONST unsigned char *data, size_t size); /* Return non-zero if the last write operation on the stream resulted in an attempt to block (EWOULDBLOCK). If this method does not exists, the implementation returns 0 */ @@ -129,7 +129,7 @@ typedef struct lstream_implementation int (*closer) (Lstream *stream); /* Mark this object for garbage collection. Same semantics as a standard Lisp_Object marker. This function can be NULL. */ - Lisp_Object (*marker) (Lisp_Object lstream, void (*markfun) (Lisp_Object)); + Lisp_Object (*marker) (Lisp_Object lstream); } Lstream_implementation; #define DEFINE_LSTREAM_IMPLEMENTATION(name,c_name,size) \ @@ -209,8 +209,8 @@ int Lstream_flush_out (Lstream *lstr); int Lstream_fputc (Lstream *lstr, int c); int Lstream_fgetc (Lstream *lstr); void Lstream_fungetc (Lstream *lstr, int c); -int Lstream_read (Lstream *lstr, void *data, size_t size); -int Lstream_write (Lstream *lstr, CONST void *data, size_t size); +ssize_t Lstream_read (Lstream *lstr, void *data, size_t size); +ssize_t Lstream_write (Lstream *lstr, CONST void *data, size_t size); int Lstream_was_blocked_p (Lstream *lstr); void Lstream_unread (Lstream *lstr, CONST void *data, size_t size); int Lstream_rewind (Lstream *lstr); diff --git a/src/m/iris4d.h b/src/m/iris4d.h index 639dfe4..62b56b0 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h @@ -99,8 +99,7 @@ Boston, MA 02111-1307, USA. */ #ifdef USG5_4 #undef UNEXEC -/* FSF renames this file to unexsgi.o */ -#define UNEXEC "unexelfsgi.o" +#define UNEXEC "unexelf.o" #else #define UNEXEC "unexmips.o" #endif diff --git a/src/m/iris5d.h b/src/m/iris5d.h index 0b67c42..05a03c0 100644 --- a/src/m/iris5d.h +++ b/src/m/iris5d.h @@ -101,8 +101,7 @@ Boston, MA 02111-1307, USA. */ #ifdef UNEXEC #undef UNEXEC #endif -/* FSF renames this file to unexsgi.o */ -#define UNEXEC "unexelfsgi.o" +#define UNEXEC "unexelf.o" #define TEXT_START 0x400000 diff --git a/src/m/mips.h b/src/m/mips.h index 03b769e..a0751cb 100644 --- a/src/m/mips.h +++ b/src/m/mips.h @@ -63,10 +63,12 @@ NOTE-END */ #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / 256.0) +#ifndef linux /* CDC EP/IX 1.4.3 uses /unix */ #undef KERNEL_FILE #define KERNEL_FILE "/unix" +#endif /* ! linux */ /* Define CANNOT_DUMP on machines where unexec does not work. Then the function dump-emacs will not be defined @@ -106,16 +108,23 @@ NOTE-END */ /* This machine requires completely different unexec code which lives in a separate file. Specify the file name. */ +#ifndef linux #define UNEXEC "unexmips.o" - +#endif /* !linux */ /* Describe layout of the address space in an executing process. */ +#ifdef linux +#define TEXT_START 0x00400000 +#define DATA_START 0x10000000 +#define DATA_SEG_BITS 0x10000000 +#else /* !linux */ #define TEXT_START 0x400000 #define DATA_START 0x800000 +#endif /* linux */ /* Alter some of the options used when linking. */ -#ifndef NEWSOS5 +#if !defined(NEWSOS5) && !defined(linux) #ifdef BSD /* DECstations don't have this library. */ @@ -138,9 +147,9 @@ NOTE-END */ #define C_DEBUG_SWITCH "-O -g3" #endif /* not BSD */ -#endif /* not NEWSOS5 */ +#endif /* !NEWSOS5 && !linux */ -#ifndef NEWSOS5 +#if !defined(NEWSOS5) && !defined(linux) #ifdef USG /* Don't try to use SIGIO even though it is defined. */ @@ -167,4 +176,4 @@ NOTE-END */ #define TERMINFO #undef MAIL_USE_FLOCK /* Someone should check this. */ #endif /* BSD */ -#endif /* not NEWSOS5 */ +#endif /* !NEWSOS5 && !linux */ diff --git a/src/make-src-depend b/src/make-src-depend index 4f604f4..a112b6a 100644 --- a/src/make-src-depend +++ b/src/make-src-depend @@ -29,8 +29,7 @@ my ($myName, $srcdir, %exists, %uses, %generated_header); Usage: $myName Generates Makefile dependencies for the XEmacs src directory. -The dependencies are written to stdout. -"; +The dependencies are written to stdout.\n"; die $usage if @ARGV; diff --git a/src/marker.c b/src/marker.c index 5ed6c4d..5f9db4a 100644 --- a/src/marker.c +++ b/src/marker.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" static Lisp_Object -mark_marker (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_marker (Lisp_Object obj) { struct Lisp_Marker *marker = XMARKER (obj); Lisp_Object buf; @@ -66,7 +66,7 @@ print_marker (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (GETTEXT ("in no buffer"), printcharfun); else { - sprintf (buf, "at %d in ", marker_position (obj)); + sprintf (buf, "at %ld in ", (long) marker_position (obj)); write_c_string (buf, printcharfun); print_internal (marker->buffer->name, printcharfun, 0); } diff --git a/src/md5.c b/src/md5.c index acb9f0d..775942a 100644 --- a/src/md5.c +++ b/src/md5.c @@ -582,8 +582,8 @@ file-coding or Mule support. Otherwise, they are ignored. while (1) { Bufbyte tempbuf[1024]; /* some random amount */ - int size_in_bytes = Lstream_read (XLSTREAM (instream), - tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = + Lstream_read (XLSTREAM (instream), tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; diff --git a/src/menubar-x.c b/src/menubar-x.c index 6212281..fecb4a7 100644 --- a/src/menubar-x.c +++ b/src/menubar-x.c @@ -675,7 +675,6 @@ make_dummy_xbutton_event (XEvent *dummy, if (eev) { Position shellx, shelly, framex, framey; - Widget shell = XtParent (daddy); Arg al [2]; btn->time = eev->timestamp; btn->button = eev->event.button.button; @@ -683,9 +682,16 @@ make_dummy_xbutton_event (XEvent *dummy, btn->subwindow = (Window) NULL; btn->x = eev->event.button.x; btn->y = eev->event.button.y; - XtSetArg (al [0], XtNx, &shellx); - XtSetArg (al [1], XtNy, &shelly); - XtGetValues (shell, al, 2); + shellx = shelly = 0; +#ifndef HAVE_WMCOMMAND + { + Widget shell = XtParent (daddy); + + XtSetArg (al [0], XtNx, &shellx); + XtSetArg (al [1], XtNy, &shelly); + XtGetValues (shell, al, 2); + } +#endif XtSetArg (al [0], XtNx, &framex); XtSetArg (al [1], XtNy, &framey); XtGetValues (daddy, al, 2); @@ -855,9 +861,15 @@ console_type_create_menubar_x (void) } void -vars_of_menubar_x (void) +reinit_vars_of_menubar_x (void) { last_popup_menu_selection_callback_id = (LWLIB_ID) -1; +} + +void +vars_of_menubar_x (void) +{ + reinit_vars_of_menubar_x (); #if defined (LWLIB_MENUBARS_LUCID) Fprovide (intern ("lucid-menubars")); diff --git a/src/menubar.c b/src/menubar.c index 8eab6af..7a6e2dc 100644 --- a/src/menubar.c +++ b/src/menubar.c @@ -378,7 +378,6 @@ vars_of_menubar (void) Fcons (Fvector (3, &menu_item[0]), Qnil)), Qnil); - Vblank_menubar = Fpurecopy (Vblank_menubar); staticpro (&Vblank_menubar); } diff --git a/src/minibuf.c b/src/minibuf.c index c87858d..16174c5 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -936,9 +936,15 @@ syms_of_minibuf (void) } void -vars_of_minibuf (void) +reinit_vars_of_minibuf (void) { minibuf_level = 0; +} + +void +vars_of_minibuf (void) +{ + reinit_vars_of_minibuf (); staticpro (&Vminibuf_prompt); Vminibuf_prompt = Qnil; @@ -965,7 +971,7 @@ Each completion has to match all regexps in this list. } void -complex_vars_of_minibuf (void) +reinit_complex_vars_of_minibuf (void) { /* This function can GC */ #ifdef I18N3 @@ -974,8 +980,14 @@ complex_vars_of_minibuf (void) #endif Vminibuffer_zero = Fget_buffer_create - (Fpurecopy (build_string (DEFER_GETTEXT (" *Minibuf-0*")))); + (build_string (DEFER_GETTEXT (" *Minibuf-0*"))); Vecho_area_buffer = Fget_buffer_create - (Fpurecopy (build_string (DEFER_GETTEXT (" *Echo Area*")))); + (build_string (DEFER_GETTEXT (" *Echo Area*"))); +} + +void +complex_vars_of_minibuf (void) +{ + reinit_complex_vars_of_minibuf (); } diff --git a/src/miscplay.c b/src/miscplay.c index 37eeb17..3acfca5 100644 --- a/src/miscplay.c +++ b/src/miscplay.c @@ -562,7 +562,6 @@ size_t sndcnvULaw_2mono(void **data,size_t *sz,void **outbuf) size_t sndcnv16swap(void **data,size_t *sz,void **outbuf) { - /* #### Not aliasing-safe!! Must convert to use unions instead! */ size_t cnt = *sz / 2; unsigned short *p; diff --git a/src/mule-ccl.c b/src/mule-ccl.c index dd6e12d..5fb3c52 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -682,17 +682,27 @@ static tr_stack *mapping_stack_pointer; /* Write a string at ccl_prog[IC] of length LEN to the current output buffer. */ -#define CCL_WRITE_STRING(len) do { \ - if (!destination) \ - { \ - ccl->status = CCL_STAT_INVALID_CMD; \ - goto ccl_error_handler; \ - } \ - else \ - for (i = 0; i < len; i++) \ - Dynarr_add(destination, \ - (XINT (ccl_prog[ic + (i / 3)]) \ - >> ((2 - (i % 3)) * 8)) & 0xFF); \ +#define CCL_WRITE_STRING(len) do { \ + if (!destination) \ + { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + goto ccl_error_handler; \ + } \ + else \ + { \ + Bufbyte work[MAX_EMCHAR_LEN]; \ + for (i = 0; i < len; i++) \ + { \ + int ch = (XINT (ccl_prog[ic + (i / 3)]) \ + >> ((2 - (i % 3)) * 8)) & 0xFF; \ + int bytes = \ + ( ch < ( conversion_mode == CCL_MODE_ENCODING ? \ + 256 : 128 ) ) ? \ + simple_set_charptr_emchar (work, ch) : \ + non_ascii_set_charptr_emchar (work, ch); \ + Dynarr_add_many (destination, work, bytes); \ + } \ + } \ } while (0) /* Read one byte from the current input buffer into Rth register. */ @@ -760,7 +770,7 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, int i, j, op; int stack_idx = ccl->stack_idx; /* Instruction counter of the current CCL code. */ - int this_ic; + int this_ic = 0; if (ic >= ccl->eof_ic) ic = CCL_HEADER_MAIN; @@ -1671,7 +1681,7 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object vec) function converts symbols of code conversion maps and character translation tables embeded in the CCL code into their ID numbers. */ -Lisp_Object +static Lisp_Object resolve_symbol_ccl_program (Lisp_Object ccl) { int i, veclen; @@ -1738,8 +1748,8 @@ As side effect, each element of REGISTER holds the value of int i; Lisp_Object ccl_id; - if ((SYMBOLP (ccl_prog)) && - (!NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil)))) + if (SYMBOLP (ccl_prog) && + !NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil))) { ccl_prog = XVECTOR_DATA (Vccl_program_table)[XUINT (ccl_id)]; CHECK_LIST (ccl_prog); @@ -1805,8 +1815,8 @@ It returns the contents of write buffer as a string, struct gcpro gcpro1, gcpro2, gcpro3; Lisp_Object ccl_id; - if ((SYMBOLP (ccl_prog)) && - (!NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil)))) + if (SYMBOLP (ccl_prog) && + !NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil))) { ccl_prog = XVECTOR (Vccl_program_table)->contents[XUINT (ccl_id)]; CHECK_LIST (ccl_prog); @@ -1842,7 +1852,7 @@ It returns the contents of write buffer as a string, outbuf = Dynarr_new (unsigned_char); ccl.last_block = NILP (contin); produced = ccl_driver (&ccl, XSTRING_DATA (str), outbuf, - XSTRING_LENGTH (str), (int *)0, CCL_MODE_ENCODING); + XSTRING_LENGTH (str), (int *)0, CCL_MODE_DECODING); for (i = 0; i < 8; i++) XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]); XSETINT (XVECTOR_DATA (status)[8], ccl.ic); diff --git a/src/mule-charset.c b/src/mule-charset.c index d56d067..c7769c7 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -104,15 +104,22 @@ static int composite_char_col_next; #endif /* ENABLE_COMPOSITE_CHARS */ -/* Table of charsets indexed by leading byte. */ -Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; +struct charset_lookup *chlook; -/* Table of charsets indexed by type/final-byte/direction. */ +static const struct lrecord_description charset_lookup_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct charset_lookup, charset_by_leading_byte), #ifdef UTF2000 -Lisp_Object charset_by_attributes[4][128]; + 128+4*128 #else -Lisp_Object charset_by_attributes[4][128][2]; + 128+4*128*2 #endif + }, { XD_END } +}; + +static const struct struct_description charset_lookup_description = { + sizeof(struct charset_lookup), + charset_lookup_description_1 +}; #ifndef UTF2000 /* Table of number of bytes in the string representation of a character @@ -149,14 +156,14 @@ Bytecount rep_bytes_by_first_byte[0xA0] = #ifdef UTF2000 static Lisp_Object -mark_char_byte_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_char_byte_table (Lisp_Object obj) { struct Lisp_Char_Byte_Table *cte = XCHAR_BYTE_TABLE (obj); int i; for (i = 0; i < 256; i++) { - markobj (cte->property[i]); + mark_object (cte->property[i]); } return Qnil; } @@ -248,7 +255,7 @@ copy_char_byte_table (Lisp_Object entry) static Lisp_Object -mark_char_code_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_char_code_table (Lisp_Object obj) { struct Lisp_Char_Code_Table *cte = XCHAR_CODE_TABLE (obj); @@ -1053,7 +1060,8 @@ non_ascii_valid_char_p (Emchar ch) if (f3 < 0x20) return 0; - if (f3 != 0x20 && f3 != 0x7F) + if (f3 != 0x20 && f3 != 0x7F && !(f2 >= MIN_CHAR_FIELD2_PRIVATE && + f2 <= MAX_CHAR_FIELD2_PRIVATE)) return 1; /* @@ -1062,6 +1070,8 @@ non_ascii_valid_char_p (Emchar ch) FIELD2_TO_PRIVATE_LEADING_BYTE are the same. */ charset = CHARSET_BY_LEADING_BYTE (f2 + FIELD2_TO_OFFICIAL_LEADING_BYTE); + if (EQ (charset, Qnil)) + return 0; return (XCHARSET_CHARS (charset) == 96); } else @@ -1086,7 +1096,8 @@ non_ascii_valid_char_p (Emchar ch) } #endif /* ENABLE_COMPOSITE_CHARS */ - if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F) + if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F + && !(f1 >= MIN_CHAR_FIELD1_PRIVATE && f1 <= MAX_CHAR_FIELD1_PRIVATE)) return 1; if (f1 <= MAX_CHAR_FIELD1_OFFICIAL) @@ -1096,6 +1107,8 @@ non_ascii_valid_char_p (Emchar ch) charset = CHARSET_BY_LEADING_BYTE (f1 + FIELD1_TO_PRIVATE_LEADING_BYTE); + if (EQ (charset, Qnil)) + return 0; return (XCHARSET_CHARS (charset) == 96); } } @@ -1202,17 +1215,17 @@ Lstream_funget_emchar (Lstream *stream, Emchar ch) /************************************************************************/ static Lisp_Object -mark_charset (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_charset (Lisp_Object obj) { struct Lisp_Charset *cs = XCHARSET (obj); - markobj (cs->short_name); - markobj (cs->long_name); - markobj (cs->doc_string); - markobj (cs->registry); - markobj (cs->ccl_program); + mark_object (cs->short_name); + mark_object (cs->long_name); + mark_object (cs->doc_string); + mark_object (cs->registry); + mark_object (cs->ccl_program); #ifdef UTF2000 - markobj (cs->decoding_table); + mark_object (cs->decoding_table); #endif return cs->name; } @@ -1357,17 +1370,17 @@ make_charset (Charset_ID id, Lisp_Object name, #if UTF2000 if (code_offset == 0) { - assert (NILP (charset_by_attributes[type][final])); - charset_by_attributes[type][final] = obj; + assert (NILP (chlook->charset_by_attributes[type][final])); + chlook->charset_by_attributes[type][final] = obj; } #else - assert (NILP (charset_by_attributes[type][final][direction])); - charset_by_attributes[type][final][direction] = obj; + assert (NILP (chlook->charset_by_attributes[type][final][direction])); + chlook->charset_by_attributes[type][final][direction] = obj; #endif } - assert (NILP (charset_by_leading_byte[id - MIN_LEADING_BYTE])); - charset_by_leading_byte[id - MIN_LEADING_BYTE] = obj; + assert (NILP (chlook->charset_by_leading_byte[id - MIN_LEADING_BYTE])); + chlook->charset_by_leading_byte[id - MIN_LEADING_BYTE] = obj; #ifndef UTF2000 if (id < 0xA0) /* official leading byte */ @@ -1507,56 +1520,50 @@ range_charset_code_point (Lisp_Object charset, Emchar ch) Lisp_Object split_builtin_char (Emchar c) { - if (c < MIN_CHAR_OBS_94x94) + if (c <= MAX_CHAR_BASIC_LATIN) { - if (c <= MAX_CHAR_BASIC_LATIN) - { - return list2 (Vcharset_ascii, make_int (c)); - } - else if (c < 0xA0) - { - return list2 (Vcharset_control_1, make_int (c & 0x7F)); - } - else if (c <= 0xff) - { - return list2 (Vcharset_latin_iso8859_1, make_int (c & 0x7F)); - } - else if ((MIN_CHAR_GREEK <= c) && (c <= MAX_CHAR_GREEK)) - { - return list2 (Vcharset_greek_iso8859_7, - make_int (c - MIN_CHAR_GREEK + 0x20)); - } - else if ((MIN_CHAR_CYRILLIC <= c) && (c <= MAX_CHAR_CYRILLIC)) - { - return list2 (Vcharset_cyrillic_iso8859_5, - make_int (c - MIN_CHAR_CYRILLIC + 0x20)); - } - else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW)) - { - return list2 (Vcharset_hebrew_iso8859_8, - make_int (c - MIN_CHAR_HEBREW + 0x20)); - } - else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI)) - { - return list2 (Vcharset_thai_tis620, - make_int (c - MIN_CHAR_THAI + 0x20)); - } - else - { - return list3 (Vcharset_ucs_bmp, - make_int (c >> 8), make_int (c & 0xff)); - } + return list2 (Vcharset_ascii, make_int (c)); } - else if (c <= MAX_CHAR_OBS_94x94) + else if (c < 0xA0) { - return list3 (CHARSET_BY_ATTRIBUTES - (CHARSET_TYPE_94X94, - ((c - MIN_CHAR_OBS_94x94) / (94 * 94)) + '@', - CHARSET_LEFT_TO_RIGHT), - make_int ((((c - MIN_CHAR_OBS_94x94) / 94) % 94) + 33), - make_int (((c - MIN_CHAR_OBS_94x94) % 94) + 33)); + return list2 (Vcharset_control_1, make_int (c & 0x7F)); + } + else if (c <= 0xff) + { + return list2 (Vcharset_latin_iso8859_1, make_int (c & 0x7F)); + } + else if ((MIN_CHAR_GREEK <= c) && (c <= MAX_CHAR_GREEK)) + { + return list2 (Vcharset_greek_iso8859_7, + make_int (c - MIN_CHAR_GREEK + 0x20)); + } + else if ((MIN_CHAR_CYRILLIC <= c) && (c <= MAX_CHAR_CYRILLIC)) + { + return list2 (Vcharset_cyrillic_iso8859_5, + make_int (c - MIN_CHAR_CYRILLIC + 0x20)); + } + else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW)) + { + return list2 (Vcharset_hebrew_iso8859_8, + make_int (c - MIN_CHAR_HEBREW + 0x20)); + } + else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI)) + { + return list2 (Vcharset_thai_tis620, + make_int (c - MIN_CHAR_THAI + 0x20)); } - else if (c <= MAX_CHAR_DAIKANWA) + else if ((MIN_CHAR_HALFWIDTH_KATAKANA <= c) + && (c <= MAX_CHAR_HALFWIDTH_KATAKANA)) + { + return list2 (Vcharset_katakana_jisx0201, + make_int (c - MIN_CHAR_HALFWIDTH_KATAKANA + 33)); + } + else if (c <= MAX_CHAR_BMP) + { + return list3 (Vcharset_ucs_bmp, + make_int (c >> 8), make_int (c & 0xff)); + } + else if ((MIN_CHAR_DAIKANWA <= c) && (c <= MAX_CHAR_DAIKANWA)) { return list3 (Vcharset_ideograph_daikanwa, make_int ((c - MIN_CHAR_DAIKANWA) >> 8), @@ -2606,21 +2613,24 @@ vars_of_mule_charset (void) int k; #endif + chlook = xnew (struct charset_lookup); + dumpstruct (&chlook, &charset_lookup_description); + /* Table of charsets indexed by leading byte. */ - for (i = 0; i < countof (charset_by_leading_byte); i++) - charset_by_leading_byte[i] = Qnil; + for (i = 0; i < countof (chlook->charset_by_leading_byte); i++) + chlook->charset_by_leading_byte[i] = Qnil; #ifdef UTF2000 /* Table of charsets indexed by type/final-byte. */ - for (i = 0; i < countof (charset_by_attributes); i++) - for (j = 0; j < countof (charset_by_attributes[0]); j++) - charset_by_attributes[i][j] = Qnil; + for (i = 0; i < countof (chlook->charset_by_attributes); i++) + for (j = 0; j < countof (chlook->charset_by_attributes[0]); j++) + chlook->charset_by_attributes[i][j] = Qnil; #else /* Table of charsets indexed by type/final-byte/direction. */ - for (i = 0; i < countof (charset_by_attributes); i++) - for (j = 0; j < countof (charset_by_attributes[0]); j++) - for (k = 0; k < countof (charset_by_attributes[0][0]); k++) - charset_by_attributes[i][j][k] = Qnil; + for (i = 0; i < countof (chlook->charset_by_attributes); i++) + for (j = 0; j < countof (chlook->charset_by_attributes[0]); j++) + for (k = 0; k < countof (chlook->charset_by_attributes[0][0]); k++) + chlook->charset_by_attributes[i][j][k] = Qnil; #endif #ifdef UTF2000 @@ -2672,6 +2682,7 @@ complex_vars_of_mule_charset (void) ease of access. */ #ifdef UTF2000 + staticpro (&Vcharset_ucs_bmp); Vcharset_ucs_bmp = make_charset (LEADING_BYTE_UCS_BMP, Qucs_bmp, CHARSET_TYPE_256X256, 1, 2, 0, @@ -2693,6 +2704,7 @@ complex_vars_of_mule_charset (void) # define MIN_CHAR_CYRILLIC 0 # define MAX_CHAR_CYRILLIC 0 #endif + staticpro (&Vcharset_ascii); Vcharset_ascii = make_charset (LEADING_BYTE_ASCII, Qascii, CHARSET_TYPE_94, 1, 0, 'B', @@ -2702,6 +2714,7 @@ complex_vars_of_mule_charset (void) build_string ("ASCII (ISO646 IRV)"), build_string ("\\(iso8859-[0-9]*\\|-ascii\\)"), Qnil, 0, 0x7F, 0, 0); + staticpro (&Vcharset_control_1); Vcharset_control_1 = make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1, CHARSET_TYPE_94, 1, 1, 0, @@ -2711,6 +2724,7 @@ complex_vars_of_mule_charset (void) build_string ("Control characters 128-191"), build_string (""), Qnil, 0x80, 0x9F, 0, 0); + staticpro (&Vcharset_latin_iso8859_1); Vcharset_latin_iso8859_1 = make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1, CHARSET_TYPE_96, 1, 1, 'A', @@ -2720,6 +2734,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-1 (Latin-1)"), build_string ("iso8859-1"), Qnil, 0xA0, 0xFF, 0, 32); + staticpro (&Vcharset_latin_iso8859_2); Vcharset_latin_iso8859_2 = make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2, CHARSET_TYPE_96, 1, 1, 'B', @@ -2729,6 +2744,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-2 (Latin-2)"), build_string ("iso8859-2"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_latin_iso8859_3); Vcharset_latin_iso8859_3 = make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3, CHARSET_TYPE_96, 1, 1, 'C', @@ -2738,6 +2754,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-3 (Latin-3)"), build_string ("iso8859-3"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_latin_iso8859_4); Vcharset_latin_iso8859_4 = make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4, CHARSET_TYPE_96, 1, 1, 'D', @@ -2747,6 +2764,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-4 (Latin-4)"), build_string ("iso8859-4"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_thai_tis620); Vcharset_thai_tis620 = make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620, CHARSET_TYPE_96, 1, 1, 'T', @@ -2756,6 +2774,7 @@ complex_vars_of_mule_charset (void) build_string ("TIS620.2529 (Thai)"), build_string ("tis620"), Qnil, MIN_CHAR_THAI, MAX_CHAR_THAI, 0, 32); + staticpro (&Vcharset_greek_iso8859_7); Vcharset_greek_iso8859_7 = make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, CHARSET_TYPE_96, 1, 1, 'F', @@ -2765,6 +2784,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-7 (Greek)"), build_string ("iso8859-7"), Qnil, MIN_CHAR_GREEK, MAX_CHAR_GREEK, 0, 32); + staticpro (&Vcharset_arabic_iso8859_6); Vcharset_arabic_iso8859_6 = make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, CHARSET_TYPE_96, 1, 1, 'G', @@ -2774,6 +2794,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-6 (Arabic)"), build_string ("iso8859-6"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_hebrew_iso8859_8); Vcharset_hebrew_iso8859_8 = make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, CHARSET_TYPE_96, 1, 1, 'H', @@ -2783,6 +2804,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-8 (Hebrew)"), build_string ("iso8859-8"), Qnil, MIN_CHAR_HEBREW, MAX_CHAR_HEBREW, 0, 32); + staticpro (&Vcharset_katakana_jisx0201); Vcharset_katakana_jisx0201 = make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201, CHARSET_TYPE_94, 1, 1, 'I', @@ -2792,6 +2814,7 @@ complex_vars_of_mule_charset (void) build_string ("JISX0201.1976 Japanese Kana"), build_string ("jisx0201\\.1976"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_latin_jisx0201); Vcharset_latin_jisx0201 = make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201, CHARSET_TYPE_94, 1, 0, 'J', @@ -2801,6 +2824,7 @@ complex_vars_of_mule_charset (void) build_string ("JISX0201.1976 Japanese Roman"), build_string ("jisx0201\\.1976"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_cyrillic_iso8859_5); Vcharset_cyrillic_iso8859_5 = make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5, CHARSET_TYPE_96, 1, 1, 'L', @@ -2810,6 +2834,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-5 (Cyrillic)"), build_string ("iso8859-5"), Qnil, MIN_CHAR_CYRILLIC, MAX_CHAR_CYRILLIC, 0, 32); + staticpro (&Vcharset_latin_iso8859_9); Vcharset_latin_iso8859_9 = make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9, CHARSET_TYPE_96, 1, 1, 'M', @@ -2819,6 +2844,7 @@ complex_vars_of_mule_charset (void) build_string ("ISO8859-9 (Latin-5)"), build_string ("iso8859-9"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_japanese_jisx0208_1978); Vcharset_japanese_jisx0208_1978 = make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978, CHARSET_TYPE_94X94, 2, 0, '@', @@ -2829,6 +2855,7 @@ complex_vars_of_mule_charset (void) ("JIS X0208:1978 Japanese Kanji (so called \"old JIS\")"), build_string ("\\(jisx0208\\|jisc6226\\)\\.1978"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_chinese_gb2312); Vcharset_chinese_gb2312 = make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, CHARSET_TYPE_94X94, 2, 0, 'A', @@ -2838,6 +2865,7 @@ complex_vars_of_mule_charset (void) build_string ("GB2312 Chinese simplified"), build_string ("gb2312"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_japanese_jisx0208); Vcharset_japanese_jisx0208 = make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208, CHARSET_TYPE_94X94, 2, 0, 'B', @@ -2847,6 +2875,7 @@ complex_vars_of_mule_charset (void) build_string ("JIS X0208:1983 Japanese Kanji"), build_string ("jisx0208\\.1983"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_japanese_jisx0208_1990); Vcharset_japanese_jisx0208_1990 = make_charset (LEADING_BYTE_JAPANESE_JISX0208_1990, Qjapanese_jisx0208_1990, @@ -2859,6 +2888,7 @@ complex_vars_of_mule_charset (void) Qnil, MIN_CHAR_JIS_X0208_1990, MAX_CHAR_JIS_X0208_1990, 0, 33); + staticpro (&Vcharset_korean_ksc5601); Vcharset_korean_ksc5601 = make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601, CHARSET_TYPE_94X94, 2, 0, 'C', @@ -2868,6 +2898,7 @@ complex_vars_of_mule_charset (void) build_string ("KSC5601 Korean Hangul and Hanja"), build_string ("ksc5601"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_japanese_jisx0212); Vcharset_japanese_jisx0212 = make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212, CHARSET_TYPE_94X94, 2, 0, 'D', @@ -2879,6 +2910,7 @@ complex_vars_of_mule_charset (void) Qnil, 0, 0, 0, 33); #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$" + staticpro (&Vcharset_chinese_cns11643_1); Vcharset_chinese_cns11643_1 = make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qchinese_cns11643_1, CHARSET_TYPE_94X94, 2, 0, 'G', @@ -2889,6 +2921,7 @@ complex_vars_of_mule_charset (void) ("CNS 11643 Plane 1 Chinese traditional"), build_string (CHINESE_CNS_PLANE_RE("1")), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_chinese_cns11643_2); Vcharset_chinese_cns11643_2 = make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2, CHARSET_TYPE_94X94, 2, 0, 'H', @@ -2900,6 +2933,7 @@ complex_vars_of_mule_charset (void) build_string (CHINESE_CNS_PLANE_RE("2")), Qnil, 0, 0, 0, 33); #ifdef UTF2000 + staticpro (&Vcharset_latin_viscii_lower); Vcharset_latin_viscii_lower = make_charset (LEADING_BYTE_LATIN_VISCII_LOWER, Qlatin_viscii_lower, CHARSET_TYPE_96, 1, 1, '1', @@ -2909,6 +2943,7 @@ complex_vars_of_mule_charset (void) build_string ("VISCII lower (Vietnamese)"), build_string ("MULEVISCII-LOWER"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_latin_viscii_upper); Vcharset_latin_viscii_upper = make_charset (LEADING_BYTE_LATIN_VISCII_UPPER, Qlatin_viscii_upper, CHARSET_TYPE_96, 1, 1, '2', @@ -2918,6 +2953,7 @@ complex_vars_of_mule_charset (void) build_string ("VISCII upper (Vietnamese)"), build_string ("MULEVISCII-UPPER"), Qnil, 0, 0, 0, 32); + staticpro (&Vcharset_latin_viscii); Vcharset_latin_viscii = make_charset (LEADING_BYTE_LATIN_VISCII, Qlatin_viscii, CHARSET_TYPE_256, 1, 2, 0, @@ -2927,6 +2963,7 @@ complex_vars_of_mule_charset (void) build_string ("VISCII 1.1 (Vietnamese)"), build_string ("VISCII1\\.1"), Qnil, 0, 0, 0, 0); + staticpro (&Vcharset_ideograph_daikanwa); Vcharset_ideograph_daikanwa = make_charset (LEADING_BYTE_DAIKANWA, Qideograph_daikanwa, CHARSET_TYPE_256X256, 2, 2, 0, @@ -2936,6 +2973,7 @@ complex_vars_of_mule_charset (void) build_string ("Daikanwa dictionary by MOROHASHI Tetsuji"), build_string ("Daikanwa"), Qnil, MIN_CHAR_DAIKANWA, MAX_CHAR_DAIKANWA, 0, 0); + staticpro (&Vcharset_mojikyo_pj_1); Vcharset_mojikyo_pj_1 = make_charset (LEADING_BYTE_MOJIKYO_PJ_1, Qmojikyo_pj_1, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2946,6 +2984,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 1"), build_string ("jisx0208\\.Mojikyo-1$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_2); Vcharset_mojikyo_pj_2 = make_charset (LEADING_BYTE_MOJIKYO_PJ_2, Qmojikyo_pj_2, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2956,6 +2995,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 2"), build_string ("jisx0208\\.Mojikyo-2$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_3); Vcharset_mojikyo_pj_3 = make_charset (LEADING_BYTE_MOJIKYO_PJ_3, Qmojikyo_pj_3, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2966,6 +3006,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 3"), build_string ("jisx0208\\.Mojikyo-3$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_4); Vcharset_mojikyo_pj_4 = make_charset (LEADING_BYTE_MOJIKYO_PJ_4, Qmojikyo_pj_4, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2976,6 +3017,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 4"), build_string ("jisx0208\\.Mojikyo-4$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_5); Vcharset_mojikyo_pj_5 = make_charset (LEADING_BYTE_MOJIKYO_PJ_5, Qmojikyo_pj_5, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2986,6 +3028,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 5"), build_string ("jisx0208\\.Mojikyo-5$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_6); Vcharset_mojikyo_pj_6 = make_charset (LEADING_BYTE_MOJIKYO_PJ_6, Qmojikyo_pj_6, CHARSET_TYPE_94X94, 2, 0, 0, @@ -2996,6 +3039,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 6"), build_string ("jisx0208\\.Mojikyo-6$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_7); Vcharset_mojikyo_pj_7 = make_charset (LEADING_BYTE_MOJIKYO_PJ_7, Qmojikyo_pj_7, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3006,6 +3050,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 7"), build_string ("jisx0208\\.Mojikyo-7$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_8); Vcharset_mojikyo_pj_8 = make_charset (LEADING_BYTE_MOJIKYO_PJ_8, Qmojikyo_pj_8, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3016,6 +3061,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 8"), build_string ("jisx0208\\.Mojikyo-8$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_9); Vcharset_mojikyo_pj_9 = make_charset (LEADING_BYTE_MOJIKYO_PJ_9, Qmojikyo_pj_9, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3026,6 +3072,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 9"), build_string ("jisx0208\\.Mojikyo-9$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_10); Vcharset_mojikyo_pj_10 = make_charset (LEADING_BYTE_MOJIKYO_PJ_10, Qmojikyo_pj_10, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3036,6 +3083,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 10"), build_string ("jisx0208\\.Mojikyo-10$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_11); Vcharset_mojikyo_pj_11 = make_charset (LEADING_BYTE_MOJIKYO_PJ_11, Qmojikyo_pj_11, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3046,6 +3094,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 11"), build_string ("jisx0208\\.Mojikyo-11$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_12); Vcharset_mojikyo_pj_12 = make_charset (LEADING_BYTE_MOJIKYO_PJ_12, Qmojikyo_pj_12, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3056,6 +3105,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 12"), build_string ("jisx0208\\.Mojikyo-12$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_13); Vcharset_mojikyo_pj_13 = make_charset (LEADING_BYTE_MOJIKYO_PJ_13, Qmojikyo_pj_13, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3066,6 +3116,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 13"), build_string ("jisx0208\\.Mojikyo-13$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_14); Vcharset_mojikyo_pj_14 = make_charset (LEADING_BYTE_MOJIKYO_PJ_14, Qmojikyo_pj_14, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3076,6 +3127,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 14"), build_string ("jisx0208\\.Mojikyo-14$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_15); Vcharset_mojikyo_pj_15 = make_charset (LEADING_BYTE_MOJIKYO_PJ_15, Qmojikyo_pj_15, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3086,6 +3138,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 15"), build_string ("jisx0208\\.Mojikyo-15$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_16); Vcharset_mojikyo_pj_16 = make_charset (LEADING_BYTE_MOJIKYO_PJ_16, Qmojikyo_pj_16, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3096,6 +3149,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 16"), build_string ("jisx0208\\.Mojikyo-16$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_17); Vcharset_mojikyo_pj_17 = make_charset (LEADING_BYTE_MOJIKYO_PJ_17, Qmojikyo_pj_17, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3106,6 +3160,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 17"), build_string ("jisx0208\\.Mojikyo-17$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_18); Vcharset_mojikyo_pj_18 = make_charset (LEADING_BYTE_MOJIKYO_PJ_18, Qmojikyo_pj_18, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3116,6 +3171,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 18"), build_string ("jisx0208\\.Mojikyo-18$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_19); Vcharset_mojikyo_pj_19 = make_charset (LEADING_BYTE_MOJIKYO_PJ_19, Qmojikyo_pj_19, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3126,6 +3182,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 19"), build_string ("jisx0208\\.Mojikyo-19$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_20); Vcharset_mojikyo_pj_20 = make_charset (LEADING_BYTE_MOJIKYO_PJ_20, Qmojikyo_pj_20, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3136,6 +3193,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 20"), build_string ("jisx0208\\.Mojikyo-20$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_mojikyo_pj_21); Vcharset_mojikyo_pj_21 = make_charset (LEADING_BYTE_MOJIKYO_PJ_21, Qmojikyo_pj_21, CHARSET_TYPE_94X94, 2, 0, 0, @@ -3146,6 +3204,7 @@ complex_vars_of_mule_charset (void) ("Konjaku-Mojikyo (pseudo JIS encoding) part 21"), build_string ("jisx0208\\.Mojikyo-21$"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_ethiopic_ucs); Vcharset_ethiopic_ucs = make_charset (LEADING_BYTE_ETHIOPIC_UCS, Qethiopic_ucs, CHARSET_TYPE_256X256, 2, 2, 0, @@ -3156,6 +3215,7 @@ complex_vars_of_mule_charset (void) build_string ("Ethiopic-Unicode"), Qnil, 0x1200, 0x137F, 0x1200, 0); #endif + staticpro (&Vcharset_chinese_big5_1); Vcharset_chinese_big5_1 = make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1, CHARSET_TYPE_94X94, 2, 0, '0', @@ -3166,6 +3226,7 @@ complex_vars_of_mule_charset (void) ("Big5 Level-1 Chinese traditional"), build_string ("big5"), Qnil, 0, 0, 0, 33); + staticpro (&Vcharset_chinese_big5_2); Vcharset_chinese_big5_2 = make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2, CHARSET_TYPE_94X94, 2, 0, '1', @@ -3181,6 +3242,7 @@ complex_vars_of_mule_charset (void) /* #### For simplicity, we put composite chars into a 96x96 charset. This is going to lead to problems because you can run out of room, esp. as we don't yet recycle numbers. */ + staticpro (&Vcharset_composite); Vcharset_composite = make_charset (LEADING_BYTE_COMPOSITE, Qcomposite, CHARSET_TYPE_96X96, 2, 0, 0, @@ -3190,6 +3252,7 @@ complex_vars_of_mule_charset (void) build_string ("Composite characters"), build_string ("")); + /* #### not dumped properly */ composite_char_row_next = 32; composite_char_col_next = 32; diff --git a/src/mule-charset.h b/src/mule-charset.h index a8dcad9..5948f1b 100644 --- a/src/mule-charset.h +++ b/src/mule-charset.h @@ -334,40 +334,48 @@ typedef int Charset_ID; #define LEADING_BYTE_COMPOSITE 0x80 /* for a composite character */ #define LEADING_BYTE_CONTROL_1 0x8F /* represent normal 80-9F */ -/** The following are for 1-byte characters in an official charset. **/ +/* Note the gap in each official charset can cause core dump + as first and last values are used to determine whether + charset is defined or not in non_ascii_valid_char_p */ -#define LEADING_BYTE_LATIN_ISO8859_1 0x81 /* Right half of ISO 8859-1 */ -#define LEADING_BYTE_LATIN_ISO8859_2 0x82 /* Right half of ISO 8859-2 */ -#define LEADING_BYTE_LATIN_ISO8859_3 0x83 /* Right half of ISO 8859-3 */ -#define LEADING_BYTE_LATIN_ISO8859_4 0x84 /* Right half of ISO 8859-4 */ -#define LEADING_BYTE_THAI_TIS620 0x85 /* TIS620-2533 */ -#define LEADING_BYTE_GREEK_ISO8859_7 0x86 /* Right half of ISO 8859-7 */ -#define LEADING_BYTE_ARABIC_ISO8859_6 0x87 /* Right half of ISO 8859-6 */ -#define LEADING_BYTE_HEBREW_ISO8859_8 0x88 /* Right half of ISO 8859-8 */ -#define LEADING_BYTE_KATAKANA_JISX0201 0x89 /* Right half of JIS X0201-1976 */ -#define LEADING_BYTE_LATIN_JISX0201 0x8A /* Left half of JIS X0201-1976 */ -#define LEADING_BYTE_CYRILLIC_ISO8859_5 0x8C /* Right half of ISO 8859-5 */ -#define LEADING_BYTE_LATIN_ISO8859_9 0x8D /* Right half of ISO 8859-9 */ +/** The following are for 1-byte characters in an official charset. **/ +enum LEADING_BYTE_OFFICIAL_1 +{ + LEADING_BYTE_LATIN_ISO8859_1 = 0x81, /* Right half of ISO 8859-1 */ + LEADING_BYTE_LATIN_ISO8859_2, /* 0x82 Right half of ISO 8859-2 */ + LEADING_BYTE_LATIN_ISO8859_3, /* 0x83 Right half of ISO 8859-3 */ + LEADING_BYTE_LATIN_ISO8859_4, /* 0x84 Right half of ISO 8859-4 */ + LEADING_BYTE_THAI_TIS620, /* 0x85 TIS620-2533 */ + LEADING_BYTE_GREEK_ISO8859_7, /* 0x86 Right half of ISO 8859-7 */ + LEADING_BYTE_ARABIC_ISO8859_6, /* 0x87 Right half of ISO 8859-6 */ + LEADING_BYTE_HEBREW_ISO8859_8, /* 0x88 Right half of ISO 8859-8 */ + LEADING_BYTE_KATAKANA_JISX0201, /* 0x89 Right half of JIS X0201-1976 */ + LEADING_BYTE_LATIN_JISX0201, /* 0x8A Left half of JIS X0201-1976 */ + LEADING_BYTE_CYRILLIC_ISO8859_5,/* 0x8B Right half of ISO 8859-5 */ + LEADING_BYTE_LATIN_ISO8859_9 /* 0x8C Right half of ISO 8859-9 */ + /* 0x8D unused */ +}; #define MIN_LEADING_BYTE_OFFICIAL_1 LEADING_BYTE_LATIN_ISO8859_1 #define MAX_LEADING_BYTE_OFFICIAL_1 LEADING_BYTE_LATIN_ISO8859_9 /** The following are for 2-byte characters in an official charset. **/ - -#define LEADING_BYTE_JAPANESE_JISX0208_1978 0x90/* Japanese JIS X0208-1978 */ -#define LEADING_BYTE_CHINESE_GB2312 0x91 /* Chinese Hanzi GB2312-1980 */ -#define LEADING_BYTE_JAPANESE_JISX0208 0x92 /* Japanese JIS X0208-1983 */ -#define LEADING_BYTE_KOREAN_KSC5601 0x93 /* Hangul KS C5601-1987 */ -#define LEADING_BYTE_JAPANESE_JISX0212 0x94 /* Japanese JIS X0212-1990 */ -#define LEADING_BYTE_CHINESE_CNS11643_1 0x95 /* Chinese CNS11643 Set 1 */ -#define LEADING_BYTE_CHINESE_CNS11643_2 0x96 /* Chinese CNS11643 Set 2 */ -#define LEADING_BYTE_CHINESE_BIG5_1 0x97 /* Big5 Level 1 */ -#define LEADING_BYTE_CHINESE_BIG5_2 0x98 /* Big5 Level 2 */ - /* 0x99 unused */ - /* 0x9A unused */ - /* 0x9B unused */ - /* 0x9C unused */ - /* 0x9D unused */ +enum LEADING_BYTE_OFFICIAL_2 +{ + LEADING_BYTE_JAPANESE_JISX0208_1978 = 0x90, /* Japanese JIS X0208-1978 */ + LEADING_BYTE_CHINESE_GB2312, /* 0x91 Chinese Hanzi GB2312-1980 */ + LEADING_BYTE_JAPANESE_JISX0208, /* 0x92 Japanese JIS X0208-1983 */ + LEADING_BYTE_KOREAN_KSC5601, /* 0x93 Hangul KS C5601-1987 */ + LEADING_BYTE_JAPANESE_JISX0212, /* 0x94 Japanese JIS X0212-1990 */ + LEADING_BYTE_CHINESE_CNS11643_1, /* 0x95 Chinese CNS11643 Set 1 */ + LEADING_BYTE_CHINESE_CNS11643_2, /* 0x96 Chinese CNS11643 Set 2 */ + LEADING_BYTE_CHINESE_BIG5_1, /* 0x97 Big5 Level 1 */ + LEADING_BYTE_CHINESE_BIG5_2 /* 0x98 Big5 Level 2 */ + /* 0x99 unused */ + /* 0x9A unused */ + /* 0x9B unused */ + /* 0x9C unused */ +}; #define MIN_LEADING_BYTE_OFFICIAL_2 LEADING_BYTE_JAPANESE_JISX0208_1978 #define MAX_LEADING_BYTE_OFFICIAL_2 LEADING_BYTE_CHINESE_BIG5_2 @@ -488,7 +496,6 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); #define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset) #define XSETCHARSET(x, p) XSETRECORD (x, p, charset) #define CHARSETP(x) RECORDP (x, charset) -#define GC_CHARSETP(x) GC_RECORDP (x, charset) #define CHECK_CHARSET(x) CHECK_RECORD (x, charset) #define CONCHECK_CHARSET(x) CONCHECK_RECORD (x, charset) @@ -502,7 +509,7 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); /* Leading byte and id have been regrouped. -- OG */ #define CHARSET_ID(cs) ((cs)->id) -#define CHARSET_LEADING_BYTE(cs) ((Bufbyte)(CHARSET_ID(cs))) +#define CHARSET_LEADING_BYTE(cs) ((Bufbyte) CHARSET_ID(cs)) #define CHARSET_NAME(cs) ((cs)->name) #define CHARSET_SHORT_NAME(cs) ((cs)->short_name) #define CHARSET_LONG_NAME(cs) ((cs)->long_name) @@ -542,11 +549,15 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); #define XCHARSET_REVERSE_DIRECTION_CHARSET(cs) \ CHARSET_REVERSE_DIRECTION_CHARSET (XCHARSET (cs)) -/* Table of charsets indexed by (leading byte - 128). */ -extern Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; +struct charset_lookup { + /* Table of charsets indexed by (leading byte - MIN_LEADING_BYTE). */ + Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; + + /* Table of charsets indexed by type/final-byte/direction. */ + Lisp_Object charset_by_attributes[4][128][2]; +}; -/* Table of charsets indexed by type/final-byte/direction. */ -extern Lisp_Object charset_by_attributes[4][128][2]; +extern struct charset_lookup *chlook; /* Table of number of bytes in the string representation of a character indexed by the first byte of that representation. @@ -569,18 +580,18 @@ CHARSET_BY_LEADING_BYTE (int lb) { assert (lb >= MIN_LEADING_BYTE && lb < (MIN_LEADING_BYTE + NUM_LEADING_BYTES)); - return charset_by_leading_byte[lb - MIN_LEADING_BYTE]; + return chlook->charset_by_leading_byte[lb - MIN_LEADING_BYTE]; } #else #define CHARSET_BY_LEADING_BYTE(lb) \ - (charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) + (chlook->charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) #endif #define CHARSET_BY_ATTRIBUTES(type, final, dir) \ - (charset_by_attributes[type][final][dir]) + (chlook->charset_by_attributes[type][final][dir]) #ifdef ERROR_CHECK_TYPECHECK diff --git a/src/mule-wnnfns.c b/src/mule-wnnfns.c index 9f16e8c..50d2840 100644 --- a/src/mule-wnnfns.c +++ b/src/mule-wnnfns.c @@ -1875,10 +1875,23 @@ syms_of_mule_wnn (void) } void -vars_of_mule_wnn (void) +reinit_vars_of_mule_wnn (void) { int i; + for (i = 0; i < NSERVER; i++) + { + wnnfns_buf[i] = (struct wnn_buf *) 0; + wnnfns_env_norm[i] = (struct wnn_env *) 0; + wnnfns_env_rev[i] = (struct wnn_env *) 0; + } +} + +void +vars_of_mule_wnn (void) +{ + reinit_vars_of_mule_wnn (); + DEFVAR_INT ("lb-sisheng", &lb_sisheng /* Leading character for Sisheng. */ ); @@ -1901,13 +1914,6 @@ Leading character for Sisheng. Vwnn_uniq_level = Qwnn_uniq; - for (i = 0; i < NSERVER; i++) - { - wnnfns_buf[i] = (struct wnn_buf *) 0; - wnnfns_env_norm[i] = (struct wnn_env *) 0; - wnnfns_env_rev[i] = (struct wnn_env *) 0; - } - Fprovide(intern("wnn")); } diff --git a/src/nas.c b/src/nas.c index b8abdfc..a338ad1 100644 --- a/src/nas.c +++ b/src/nas.c @@ -146,10 +146,18 @@ init_play ( #else char *server #endif + ); +char * +init_play ( +#ifdef XTOOLKIT + Display *display +#else + char *server +#endif ) { char *err_message; - SIGTYPE (*old_sigpipe) (); + SIGTYPE (*old_sigpipe) (int); #ifdef XTOOLKIT char * server = DisplayString (display); @@ -223,7 +231,7 @@ init_play ( return NULL; } -void +static void close_down_play (void) { @@ -238,7 +246,7 @@ close_down_play (void) \********************************************************************/ static void -doneCB (AuServer *aud, +doneCB (AuServer *auserver, AuEventHandlerRec *handler, AuEvent *ev, AuPointer data) @@ -274,23 +282,23 @@ do_caching_play (Sound s, if (list == NULL) { - unsigned char *my_buf; + AuPointer my_buf; if (buf==NULL) { - if ((my_buf=malloc (SoundNumBytes (s)))==NULL) + if ((my_buf= (AuPointer) malloc (SoundNumBytes (s)))==NULL) { return; } - if (SoundReadFile (my_buf, SoundNumBytes (s), s) != SoundNumBytes (s)) + if (SoundReadFile ((char *) my_buf, SoundNumBytes (s), s) != SoundNumBytes (s)) { free (my_buf); return; } } else - my_buf=buf; + my_buf = (AuPointer) buf; id = AuSoundCreateBucketFromData (aud, s, @@ -322,6 +330,7 @@ do_caching_play (Sound s, #endif /* CACHE_SOUNDS */ +void wait_for_sounds (void); void wait_for_sounds (void) @@ -335,11 +344,12 @@ wait_for_sounds (void) } } +int play_sound_file (char *sound_file, int volume); int play_sound_file (char *sound_file, int volume) { - SIGTYPE (*old_sigpipe) (); + SIGTYPE (*old_sigpipe) (int); #ifdef ROBUST_PLAY old_sigpipe=signal (SIGPIPE, sigpipe_handle); @@ -427,6 +437,7 @@ play_sound_file (char *sound_file, return 1; } +int play_sound_data (unsigned char *data, int length, int volume); int play_sound_data (unsigned char *data, int length, @@ -434,7 +445,7 @@ play_sound_data (unsigned char *data, { Sound s; int offset; - SIGTYPE (*old_sigpipe) (); + SIGTYPE (*old_sigpipe) (int); #if !defined (XTEVENTS) AuEvent ev; @@ -613,11 +624,11 @@ CatchErrorAndJump (AuServer *old_aud, /* Create a name from the sound. */ static char * -NameFromData (CONST unsigned char *buf, +NameFromData (CONST char *buf, int len) { - unsigned char name[9]; + char name[9]; int i; char *s; @@ -642,11 +653,11 @@ NameFromData (CONST unsigned char *buf, if (i==8) { - strcpy (s=malloc (10), name); + strcpy (s = (char *) malloc (10), name); } else { - strcpy (s=malloc (15), "short sound"); + strcpy (s = (char *) malloc (15), "short sound"); } return s; @@ -729,15 +740,15 @@ SndOpenDataForReading (CONST char *data, /* These functions here are for faking file I/O from buffer. */ /* The "file" position */ -static int file_posn; +static size_t file_posn; /* The length of the "file" */ -static int file_len; +static size_t file_len; /* The actual "file" data. */ -CONST static char* file_data; +static CONST void* file_data; /* Like fopen, but for a buffer in memory */ static void -dopen(CONST char* data, int length) +dopen (CONST void* data, size_t length) { file_data = data; file_len = length; @@ -746,15 +757,13 @@ dopen(CONST char* data, int length) /* Like fread, but for a buffer in memory */ static int -dread(char* buf, int size, int nitems) +dread (void* buf, size_t size, size_t nitems) { - int nread; - - nread = size * nitems; + size_t nread = size * nitems; if (file_posn + nread <= file_len) { - memcpy(buf, file_data + file_posn, size * nitems); + memcpy(buf, (char *) file_data + file_posn, size * nitems); file_posn += nread; return nitems; } @@ -766,19 +775,17 @@ dread(char* buf, int size, int nitems) /* Like fgetc, but for a buffer in memory */ static int -dgetc() +dgetc (void) { - int ch; - if (file_posn < file_len) - return file_data[file_posn++]; + return ((char *)file_data)[file_posn++]; else return -1; } /* Like fseek, but for a buffer in memory */ static int -dseek(long offset, int from) +dseek (long offset, int from) { if (from == 0) file_posn = offset; @@ -791,7 +798,7 @@ dseek(long offset, int from) } /* Like ftell, but for a buffer in memory */ -static int +static long dtell() { return file_posn; @@ -981,20 +988,20 @@ SoundOpenDataForReading (unsigned char *data, if (!(s = (Sound) malloc (sizeof (SoundRec)))) return NULL; - if ((s->formatInfo = SndOpenDataForReading (data, length)) != NULL) + if ((s->formatInfo = SndOpenDataForReading ((char *) data, length)) != NULL) { - if (!(SoundFileInfo[SoundFileFormatSnd].toSound) (s)) + if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatSnd].toSound)) (s)) { - SndCloseFile (s->formatInfo); + SndCloseFile ((SndInfo *) (s->formatInfo)); free (s); return NULL; } } - else if ((s->formatInfo = WaveOpenDataForReading (data, length)) != NULL) + else if ((s->formatInfo = WaveOpenDataForReading ((char *) data, length)) != NULL) { - if (!(SoundFileInfo[SoundFileFormatWave].toSound) (s)) + if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatWave].toSound)) (s)) { - WaveCloseFile (s->formatInfo); + WaveCloseFile ((WaveInfo *) (s->formatInfo)); free (s); return NULL; } @@ -1002,4 +1009,3 @@ SoundOpenDataForReading (unsigned char *data, return s; } - diff --git a/src/nt.c b/src/nt.c index 54e06e1..0c99c25 100644 --- a/src/nt.c +++ b/src/nt.c @@ -131,13 +131,13 @@ static struct passwd the_passwd = the_passwd_shell, }; -int +uid_t getuid () { return the_passwd.pw_uid; } -int +uid_t geteuid () { /* I could imagine arguing for checking to see whether the user is @@ -146,20 +146,20 @@ geteuid () return getuid (); } -int +gid_t getgid () { return the_passwd.pw_gid; } -int +gid_t getegid () { return getgid (); } struct passwd * -getpwuid (int uid) +getpwuid (uid_t uid) { if (uid == the_passwd.pw_uid) return &the_passwd; @@ -608,7 +608,9 @@ init_environment () "EMACSLOCKDIR", "INFOPATH" }; - +#ifdef HEAP_IN_DATA + cache_system_info (); +#endif for (i = 0; i < countof (env_vars); i++) { if (!getenv (env_vars[i]) && @@ -1313,6 +1315,40 @@ generate_inode_val (const char * name) #endif +/* Since stat is encapsulated on Windows NT, we need to encapsulate + the equally broken fstat as well. */ +int +fstat (int handle, struct stat *buffer) +{ + int ret; + BY_HANDLE_FILE_INFORMATION lpFileInfo; + /* Initialize values */ + buffer->st_mode = 0; + buffer->st_size = 0; + buffer->st_dev = 0; + buffer->st_rdev = 0; + buffer->st_atime = 0; + buffer->st_ctime = 0; + buffer->st_mtime = 0; + buffer->st_nlink = 0; + ret = GetFileInformationByHandle((HANDLE) handle, &lpFileInfo); + if (!ret) + { + return -1; + } + else + { + buffer->st_mtime = convert_time (lpFileInfo.ftLastWriteTime); + buffer->st_atime = convert_time (lpFileInfo.ftLastAccessTime); + if (buffer->st_atime == 0) buffer->st_atime = buffer->st_mtime; + buffer->st_ctime = convert_time (lpFileInfo.ftCreationTime); + if (buffer->st_ctime == 0) buffer->st_ctime = buffer->st_mtime; + buffer->st_size = lpFileInfo.nFileSizeLow; + buffer->st_nlink = (short) lpFileInfo.nNumberOfLinks; + return 0; + } +} + /* MSVC stat function can't cope with UNC names and has other bugs, so replace it with our own. This also allows us to calculate consistent inode values without hacks in the main Emacs code. */ diff --git a/src/ntheap.h b/src/ntheap.h index 6bde266..1d193a3 100644 --- a/src/ntheap.h +++ b/src/ntheap.h @@ -87,7 +87,7 @@ extern unsigned char *round_to_next (unsigned char *address, /* Useful routines for manipulating memory-mapped files. */ typedef struct file_data { - char *name; + CONST char *name; unsigned long size; HANDLE file; HANDLE file_mapping; diff --git a/src/ntplay.c b/src/ntplay.c index 2b85ab8..398e27a 100644 --- a/src/ntplay.c +++ b/src/ntplay.c @@ -25,7 +25,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "sysfile.h" #include "lisp.h" -#if defined (__CYGWIN32__) || defined(__MINGW32__) +#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ + CYGWIN_VERSION_DLL_MAJOR < 21 extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD); #else #include diff --git a/src/ntproc.c b/src/ntproc.c index 5618847..1546a74 100644 --- a/src/ntproc.c +++ b/src/ntproc.c @@ -445,16 +445,8 @@ create_child (CONST char *exe, char *cmdline, char *env, cp->procinfo.hThread=NULL; cp->procinfo.hProcess=NULL; - /* Hack for Windows 95, which assigns large (ie negative) pids */ - if (cp->pid < 0) - cp->pid = -cp->pid; - /* pid must fit in a Lisp_Int */ -#ifdef USE_UNION_TYPE - cp->pid = (cp->pid & ((1U << VALBITS) - 1)); -#else - cp->pid = (cp->pid & VALMASK); -#endif + *pPid = cp->pid; @@ -1456,8 +1448,8 @@ syms_of_ntproc () void vars_of_ntproc (void) { - Qhigh = intern ("high"); - Qlow = intern ("low"); + defsymbol (&Qhigh, "high"); + defsymbol (&Qlow, "low"); DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args /* Non-nil enables quoting of process arguments to ensure correct parsing. diff --git a/src/objects-msw.c b/src/objects-msw.c index 20f2201..b7a8309 100644 --- a/src/objects-msw.c +++ b/src/objects-msw.c @@ -49,7 +49,8 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "insdel.h" -#if defined(__CYGWIN32__) || defined(__MINGW32__) +#if (defined(__CYGWIN32__) || defined(__MINGW32__)) && \ + CYGWIN_VERSION_DLL_MAJOR < 21 #define stricmp strcasecmp #define FONTENUMPROC FONTENUMEXPROC #define ntmTm ntmentm @@ -1066,8 +1067,7 @@ mswindows_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object #if 0 static void -mswindows_mark_color_instance (struct Lisp_Color_Instance *c, - void (*markobj) (Lisp_Object)) +mswindows_mark_color_instance (struct Lisp_Color_Instance *c) { } #endif @@ -1105,7 +1105,7 @@ mswindows_color_instance_equal (struct Lisp_Color_Instance *c1, static unsigned long mswindows_color_instance_hash (struct Lisp_Color_Instance *c, int depth) { - return (unsigned long)(COLOR_INSTANCE_MSWINDOWS_COLOR(c)); + return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR(c); } static Lisp_Object @@ -1406,8 +1406,7 @@ mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object na #if 0 static void -mswindows_mark_font_instance (struct Lisp_Font_Instance *f, - void (*markobj) (Lisp_Object)) +mswindows_mark_font_instance (struct Lisp_Font_Instance *f) { } #endif diff --git a/src/objects-tty.c b/src/objects-tty.c index a7dc78c..376b6bf 100644 --- a/src/objects-tty.c +++ b/src/objects-tty.c @@ -168,10 +168,9 @@ tty_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name, } static void -tty_mark_color_instance (struct Lisp_Color_Instance *c, - void (*markobj) (Lisp_Object)) +tty_mark_color_instance (struct Lisp_Color_Instance *c) { - markobj (COLOR_INSTANCE_TTY_SYMBOL (c)); + mark_object (COLOR_INSTANCE_TTY_SYMBOL (c)); } static void @@ -256,10 +255,9 @@ tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name, } static void -tty_mark_font_instance (struct Lisp_Font_Instance *f, - void (*markobj) (Lisp_Object)) +tty_mark_font_instance (struct Lisp_Font_Instance *f) { - markobj (FONT_INSTANCE_TTY_CHARSET (f)); + mark_object (FONT_INSTANCE_TTY_CHARSET (f)); } static void diff --git a/src/objects-x.c b/src/objects-x.c index 29d51cf..536228c 100644 --- a/src/objects-x.c +++ b/src/objects-x.c @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include #include "console-x.h" #include "objects-x.h" @@ -45,11 +46,13 @@ int x_handle_non_fully_specified_fonts; /* Replacement for XAllocColor() that tries to return the nearest available color if the colormap is full. Original was from FSFmacs, - but rewritten by Jareth Hein 97/11/25 */ + but rewritten by Jareth Hein 97/11/25 + Modified by Lee Kindness 31/08/99 to handle previous + total failure which was due to a read/write colorcell being the nearest + match - tries the next nearest... -/* Return value is 1 for normal success, 2 for nearest color success, - 3 for Non-deallocable sucess, and 0 for absolute failure (shouldn't - happen?) */ + Return value is 1 for normal success, 2 for nearest color success, + 3 for Non-deallocable sucess. */ int allocate_nearest_color (Display *display, Colormap colormap, Visual *visual, XColor *color_def) @@ -140,30 +143,35 @@ allocate_nearest_color (Display *display, Colormap colormap, Visual *visual, } else { + XColor *cells = NULL; + /* JH: I can't believe there's no way to go backwards from a + colormap ID and get its visual and number of entries, but X + apparently isn't built that way... */ + int no_cells = visual->map_entries; + status = 0; + if (XAllocColor (display, colormap, color_def) != 0) status = 1; - else + else while( status != 2 ) { /* If we got to this point, the colormap is full, so we're going to try and get the next closest color. The algorithm used is a least-squares matching, which is what X uses for closest color matching with StaticColor visuals. */ - XColor *cells; - /* JH: I can't believe there's no way to go backwards from a - colormap ID and get its visual and number of entries, but X - apparently isn't built that way... */ - int no_cells = visual->map_entries; int nearest; long nearest_delta, trial_delta; int x; - cells = alloca_array (XColor, no_cells); + if( cells == NULL ) + { + cells = alloca_array (XColor, no_cells); + for (x = 0; x < no_cells; x++) + cells[x].pixel = x; - for (x = 0; x < no_cells; x++) - cells[x].pixel = x; + /* read the current colormap */ + XQueryColors (display, colormap, cells, no_cells); + } - /* read the current colormap */ - XQueryColors (display, colormap, cells, no_cells); nearest = 0; /* I'm assuming CSE so I'm not going to condense this. */ nearest_delta = ((((color_def->red >> 8) - (cells[0].red >> 8)) @@ -184,7 +192,10 @@ allocate_nearest_color (Display *display, Colormap colormap, Visual *visual, + (((color_def->blue >> 8) - (cells[x].blue >> 8)) * ((color_def->blue >> 8) - (cells[x].blue >> 8)))); - if (trial_delta < nearest_delta) + + /* less? Ignore cells marked as previously failing */ + if( (trial_delta < nearest_delta) && + (cells[x].pixel != ULONG_MAX) ) { nearest = x; nearest_delta = trial_delta; @@ -193,12 +204,15 @@ allocate_nearest_color (Display *display, Colormap colormap, Visual *visual, color_def->red = cells[nearest].red; color_def->green = cells[nearest].green; color_def->blue = cells[nearest].blue; - if (XAllocColor (display, colormap, color_def) != 0) { - status = 2; - } else { - status = 0; /* JH: how does this happen??? DOES this happen??? */ - fprintf(stderr,"allocate_nearest_color returned 0!!!\n"); - } + if (XAllocColor (display, colormap, color_def) != 0) + status = 2; + else + /* LSK: Either the colour map has changed since + * we read it, or the colour is allocated + * read/write... Mark this cmap entry so it's + * ignored in the next iteration. + */ + cells[nearest].pixel = ULONG_MAX; } } return status; @@ -208,15 +222,11 @@ int x_parse_nearest_color (struct device *d, XColor *color, Bufbyte *name, Bytecount len, Error_behavior errb) { - Display *dpy; - Colormap cmap; - Visual *visual; + Display *dpy = DEVICE_X_DISPLAY (d); + Colormap cmap = DEVICE_X_COLORMAP (d); + Visual *visual = DEVICE_X_VISUAL (d); int result; - dpy = DEVICE_X_DISPLAY (d); - cmap = DEVICE_X_COLORMAP(d); - visual = DEVICE_X_VISUAL (d); - xzero (*color); { CONST Extbyte *extname; @@ -447,10 +457,9 @@ x_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name, } static void -x_mark_font_instance (struct Lisp_Font_Instance *f, - void (*markobj) (Lisp_Object)) +x_mark_font_instance (struct Lisp_Font_Instance *f) { - markobj (FONT_INSTANCE_X_TRUENAME (f)); + mark_object (FONT_INSTANCE_X_TRUENAME (f)); } static void diff --git a/src/objects.c b/src/objects.c index 69fcab6..9e9e8b1 100644 --- a/src/objects.c +++ b/src/objects.c @@ -57,12 +57,12 @@ finalose (void *ptr) Lisp_Object Qcolor_instancep; static Lisp_Object -mark_color_instance (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_color_instance (Lisp_Object obj) { struct Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj); - markobj (c->name); + mark_object (c->name); if (!NILP (c->device)) /* Vthe_null_color_instance */ - MAYBE_DEVMETH (XDEVICE (c->device), mark_color_instance, (c, markobj)); + MAYBE_DEVMETH (XDEVICE (c->device), mark_color_instance, (c)); return c->device; } @@ -106,7 +106,7 @@ color_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) struct Lisp_Color_Instance *c2 = XCOLOR_INSTANCE (obj2); return (c1 == c2) || - ((EQ (c1->device, c2->device)) && + (EQ (c1->device, c2->device) && DEVICEP (c1->device) && HAS_DEVMETH_P (XDEVICE (c1->device), color_instance_equal) && DEVMETH (XDEVICE (c1->device), color_instance_equal, (c1, c2, depth))); @@ -237,13 +237,13 @@ static Lisp_Object font_instance_truename_internal (Lisp_Object xfont, Error_behavior errb); static Lisp_Object -mark_font_instance (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_font_instance (Lisp_Object obj) { struct Lisp_Font_Instance *f = XFONT_INSTANCE (obj); - markobj (f->name); + mark_object (f->name); if (!NILP (f->device)) /* Vthe_null_font_instance */ - MAYBE_DEVMETH (XDEVICE (f->device), mark_font_instance, (f, markobj)); + MAYBE_DEVMETH (XDEVICE (f->device), mark_font_instance, (f)); return f->device; } @@ -489,12 +489,12 @@ color_create (Lisp_Object obj) } static void -color_mark (Lisp_Object obj, void (*markobj) (Lisp_Object)) +color_mark (Lisp_Object obj) { struct Lisp_Specifier *color = XCOLOR_SPECIFIER (obj); - markobj (COLOR_SPECIFIER_FACE (color)); - markobj (COLOR_SPECIFIER_FACE_PROPERTY (color)); + mark_object (COLOR_SPECIFIER_FACE (color)); + mark_object (COLOR_SPECIFIER_FACE_PROPERTY (color)); } /* No equal or hash methods; ignore the face the color is based off @@ -667,12 +667,12 @@ font_create (Lisp_Object obj) } static void -font_mark (Lisp_Object obj, void (*markobj) (Lisp_Object)) +font_mark (Lisp_Object obj) { struct Lisp_Specifier *font = XFONT_SPECIFIER (obj); - markobj (FONT_SPECIFIER_FACE (font)); - markobj (FONT_SPECIFIER_FACE_PROPERTY (font)); + mark_object (FONT_SPECIFIER_FACE (font)); + mark_object (FONT_SPECIFIER_FACE_PROPERTY (font)); } /* No equal or hash methods; ignore the face the font is based off @@ -874,12 +874,12 @@ face_boolean_create (Lisp_Object obj) } static void -face_boolean_mark (Lisp_Object obj, void (*markobj) (Lisp_Object)) +face_boolean_mark (Lisp_Object obj) { struct Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj); - markobj (FACE_BOOLEAN_SPECIFIER_FACE (face_boolean)); - markobj (FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean)); + mark_object (FACE_BOOLEAN_SPECIFIER_FACE (face_boolean)); + mark_object (FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean)); } /* No equal or hash methods; ignore the face the face-boolean is based off @@ -1036,6 +1036,21 @@ syms_of_objects (void) defsymbol (&Qface_boolean, "face-boolean"); } +static const struct lrecord_description color_specifier_description[] = { + { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct color_specifier, face), 2 }, + { XD_END } +}; + +static const struct lrecord_description font_specifier_description[] = { + { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct font_specifier, face), 2 }, + { XD_END } +}; + +static const struct lrecord_description face_boolean_specifier_description[] = { + { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct face_boolean_specifier, face), 2 }, + { XD_END } +}; + void specifier_type_create_objects (void) { @@ -1070,9 +1085,17 @@ specifier_type_create_objects (void) } void -vars_of_objects (void) +reinit_specifier_type_create_objects (void) { - staticpro (&Vthe_null_color_instance); + REINITIALIZE_SPECIFIER_TYPE (color); + REINITIALIZE_SPECIFIER_TYPE (font); + REINITIALIZE_SPECIFIER_TYPE (face_boolean); +} + +void +reinit_vars_of_objects (void) +{ + staticpro_nodump (&Vthe_null_color_instance); { struct Lisp_Color_Instance *c = alloc_lcrecord_type (struct Lisp_Color_Instance, &lrecord_color_instance); @@ -1083,7 +1106,7 @@ vars_of_objects (void) XSETCOLOR_INSTANCE (Vthe_null_color_instance, c); } - staticpro (&Vthe_null_font_instance); + staticpro_nodump (&Vthe_null_font_instance); { struct Lisp_Font_Instance *f = alloc_lcrecord_type (struct Lisp_Font_Instance, &lrecord_font_instance); @@ -1099,3 +1122,9 @@ vars_of_objects (void) XSETFONT_INSTANCE (Vthe_null_font_instance, f); } } + +void +vars_of_objects (void) +{ + reinit_vars_of_objects (); +} diff --git a/src/objects.h b/src/objects.h index c5d3492..fdce3e8 100644 --- a/src/objects.h +++ b/src/objects.h @@ -38,7 +38,7 @@ struct color_specifier Lisp_Object face_property; /* property of that face */ }; -#define COLOR_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, color)) +#define COLOR_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, color) #define COLOR_SPECIFIER_FACE(g) (COLOR_SPECIFIER_DATA (g)->face) #define COLOR_SPECIFIER_FACE_PROPERTY(g) \ (COLOR_SPECIFIER_DATA (g)->face_property) @@ -63,7 +63,7 @@ struct font_specifier Lisp_Object face_property; /* property of that face */ }; -#define FONT_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, font)) +#define FONT_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, font) #define FONT_SPECIFIER_FACE(g) (FONT_SPECIFIER_DATA (g)->face) #define FONT_SPECIFIER_FACE_PROPERTY(g) \ (FONT_SPECIFIER_DATA (g)->face_property) @@ -88,7 +88,7 @@ struct face_boolean_specifier Lisp_Object face_property; /* property of that face */ }; -#define FACE_BOOLEAN_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, face_boolean)) +#define FACE_BOOLEAN_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, face_boolean) #define FACE_BOOLEAN_SPECIFIER_FACE(g) (FACE_BOOLEAN_SPECIFIER_DATA (g)->face) #define FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY(g) \ (FACE_BOOLEAN_SPECIFIER_DATA (g)->face_property) @@ -116,7 +116,6 @@ DECLARE_LRECORD (color_instance, struct Lisp_Color_Instance); XRECORD (x, color_instance, struct Lisp_Color_Instance) #define XSETCOLOR_INSTANCE(x, p) XSETRECORD (x, p, color_instance) #define COLOR_INSTANCEP(x) RECORDP (x, color_instance) -#define GC_COLOR_INSTANCEP(x) GC_RECORDP (x, color_instance) #define CHECK_COLOR_INSTANCE(x) CHECK_RECORD (x, color_instance) #define CONCHECK_COLOR_INSTANCE(x) CONCHECK_RECORD (x, color_instance) @@ -145,7 +144,6 @@ DECLARE_LRECORD (font_instance, struct Lisp_Font_Instance); #define XFONT_INSTANCE(x) XRECORD (x, font_instance, struct Lisp_Font_Instance) #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance) #define FONT_INSTANCEP(x) RECORDP (x, font_instance) -#define GC_FONT_INSTANCEP(x) GC_RECORDP (x, font_instance) #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance) #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance) diff --git a/src/opaque.c b/src/opaque.c index 70d29b9..b36abf1 100644 --- a/src/opaque.c +++ b/src/opaque.c @@ -32,67 +32,23 @@ Boston, MA 02111-1307, USA. */ OPAQUE OBJECTS SHOULD NEVER ESCAPE TO THE LISP LEVEL. Some code depends on this. As such, opaque objects are a generalization of the Qunbound marker. - - "Opaque lists" are used to keep track of lots of opaque objects - of a particular size so that they can be efficiently "freed" and - re-used again without actually entering the Lisp allocation system - (and consequently doing a malloc()). */ #include #include "lisp.h" #include "opaque.h" -Lisp_Object Qopaquep; - -static int in_opaque_list_marking; - -/* Holds freed opaque objects created with make_opaque_ptr(). - We do this quite often so it's a noticeable win if we don't - create GC junk. */ Lisp_Object Vopaque_ptr_free_list; -static Lisp_Object -mark_opaque (Lisp_Object obj, void (*markobj) (Lisp_Object)) -{ - Lisp_Opaque *p = XOPAQUE (obj); - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain = p->size_or_chain; -#ifdef ERROR_CHECK_GC - if (!in_opaque_list_marking) - /* size is non-int for objects on an opaque free list. We sure - as hell better not be marking any of these objects unless - we're marking an opaque list. */ - assert (GC_INTP (size_or_chain)); - else - /* marking an opaque on the free list doesn't do any recursive - markings, so we better not have non-freed opaques on a free - list. */ - assert (!GC_INTP (size_or_chain)); -#endif - if (GC_INTP (size_or_chain) && OPAQUE_MARKFUN (p)) - return OPAQUE_MARKFUN (p) (obj, markobj); - else - return size_or_chain; -} - /* Should never, ever be called. (except by an external debugger) */ static void print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { CONST Lisp_Opaque *p = XOPAQUE (obj); - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain = p->size_or_chain; char buf[200]; - char size_buf[50]; - - if (INTP (size_or_chain)) - sprintf (size_buf, "size=%lu", (unsigned long) OPAQUE_SIZE (p)); - else - sprintf (size_buf, "freed"); - sprintf (buf, "#", - size_buf, (unsigned long) p); + sprintf (buf, "#", + (long)(p->size), (unsigned long) p); write_c_string (buf, printcharfun); } @@ -100,10 +56,7 @@ static size_t sizeof_opaque (CONST void *header) { CONST Lisp_Opaque *p = (CONST Lisp_Opaque *) header; - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain = p->size_or_chain; - return offsetof (Lisp_Opaque, data) - + (GC_INTP (size_or_chain) ? XINT (size_or_chain) : 0); + return offsetof (Lisp_Opaque, data) + p->size; } /* Return an opaque object of size SIZE. @@ -115,8 +68,7 @@ make_opaque (size_t size, CONST void *data) { Lisp_Opaque *p = (Lisp_Opaque *) alloc_lcrecord (offsetof (Lisp_Opaque, data) + size, &lrecord_opaque); - p->markfun = 0; - p->size_or_chain = make_int (size); + p->size = size; if (data == OPAQUE_CLEAR) memset (p->data, '\0', size); @@ -137,21 +89,9 @@ make_opaque (size_t size, CONST void *data) static int equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int depth) { -#ifdef DEBUG_XEMACS - { - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain_1 = XOPAQUE (obj1)->size_or_chain; - Lisp_Object size_or_chain_2 = XOPAQUE (obj2)->size_or_chain; - assert (INTP (size_or_chain_1)); - assert (INTP (size_or_chain_2)); - assert (!XOPAQUE_MARKFUN (obj1) && !XOPAQUE_MARKFUN (obj2)); - } -#endif - { - size_t size; - return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) && - !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size)); - } + size_t size; + return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) && + !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size)); } /* This will not work correctly for opaques with subobjects! */ @@ -159,102 +99,59 @@ equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int depth) static unsigned long hash_opaque (Lisp_Object obj, int depth) { -#ifdef DEBUG_XEMACS - { - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain = XOPAQUE (obj)->size_or_chain; - assert (INTP (size_or_chain)); - assert (!XOPAQUE_MARKFUN (obj)); - } -#endif if (XOPAQUE_SIZE (obj) == sizeof (unsigned long)) return *((unsigned long *) XOPAQUE_DATA (obj)); else return memory_hash (XOPAQUE_DATA (obj), XOPAQUE_SIZE (obj)); } +static const struct lrecord_description opaque_description[] = { + { XD_END } +}; + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("opaque", opaque, - mark_opaque, print_opaque, 0, - equal_opaque, hash_opaque, 0, + 0, print_opaque, 0, + equal_opaque, hash_opaque, + opaque_description, sizeof_opaque, Lisp_Opaque); -static Lisp_Object -mark_opaque_list (Lisp_Object obj, void (*markobj) (Lisp_Object)) -{ - in_opaque_list_marking++; - markobj (XOPAQUE_LIST (obj)->free); - in_opaque_list_marking--; - return Qnil; -} +/* stuff to handle opaque pointers */ -Lisp_Object -make_opaque_list (size_t size, - Lisp_Object (*markfun) (Lisp_Object obj, - void (*markobj) (Lisp_Object))) +/* Should never, ever be called. (except by an external debugger) */ +static void +print_opaque_ptr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { - Lisp_Object val; - Lisp_Opaque_List *p = - alloc_lcrecord_type (Lisp_Opaque_List, &lrecord_opaque_list); + CONST Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj); + char buf[200]; - p->markfun = markfun; - p->size = size; - p->free = Qnil; - XSETOPAQUE_LIST (val, p); - return val; + sprintf (buf, "#", + (long)(p->ptr), (unsigned long) p); + write_c_string (buf, printcharfun); } -DEFINE_LRECORD_IMPLEMENTATION ("opaque-list", opaque_list, - mark_opaque_list, internal_object_printer, - 0, 0, 0, 0, Lisp_Opaque_List); - -Lisp_Object -allocate_managed_opaque (Lisp_Object opaque_list, CONST void *data) +static int +equal_opaque_ptr (Lisp_Object obj1, Lisp_Object obj2, int depth) { - Lisp_Opaque_List *li = XOPAQUE_LIST (opaque_list); - Lisp_Object val; - - if (!NILP (li->free)) - { - val = li->free; - li->free = XOPAQUE (val)->size_or_chain; -#ifdef ERROR_CHECK_GC - assert (NILP (li->free) || OPAQUEP (li->free)); -#endif - XOPAQUE (val)->size_or_chain = make_int (li->size); - if (data) - memcpy (XOPAQUE (val)->data, data, li->size); - else - memset (XOPAQUE (val)->data, 0, li->size); - } - else - val = make_opaque (li->size, data); - XOPAQUE (val)->markfun = li->markfun; - return val; + return (XOPAQUE_PTR (obj1)->ptr == XOPAQUE_PTR (obj2)->ptr); } -void -free_managed_opaque (Lisp_Object opaque_list, Lisp_Object opaque) +static unsigned long +hash_opaque_ptr (Lisp_Object obj, int depth) { - Lisp_Opaque_List *li = XOPAQUE_LIST (opaque_list); - -#ifdef ERROR_CHECK_GC - { - /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */ - Lisp_Object size_or_chain = XOPAQUE (opaque)->size_or_chain; - assert (INTP (size_or_chain)); - } -#endif - XOPAQUE (opaque)->size_or_chain = li->free; - li->free = opaque; + return (unsigned long) XOPAQUE_PTR (obj)->ptr; } -/* stuff to handle opaque pointers */ +DEFINE_LRECORD_IMPLEMENTATION ("opaque_ptr", opaque_ptr, + 0, print_opaque_ptr, 0, + equal_opaque_ptr, hash_opaque_ptr, 0, + Lisp_Opaque_Ptr); Lisp_Object -make_opaque_ptr (CONST void *val) +make_opaque_ptr (void *val) { - return allocate_managed_opaque (Vopaque_ptr_free_list, - (CONST void *) &val); + Lisp_Object res = allocate_managed_lcrecord(Vopaque_ptr_free_list); + set_opaque_ptr (res, val); + return res; } /* Be very very careful with this. Same admonitions as with @@ -263,18 +160,18 @@ make_opaque_ptr (CONST void *val) void free_opaque_ptr (Lisp_Object ptr) { - free_managed_opaque (Vopaque_ptr_free_list, ptr); + free_managed_lcrecord (Vopaque_ptr_free_list, ptr); } -Lisp_Object -make_opaque_long (long val) +void +reinit_opaque_once_early (void) { - return make_opaque (sizeof (val), (void *) &val); + Vopaque_ptr_free_list = make_lcrecord_list (sizeof (Lisp_Opaque_Ptr), &lrecord_opaque_ptr); + staticpro_nodump (&Vopaque_ptr_free_list); } void init_opaque_once_early (void) { - Vopaque_ptr_free_list = make_opaque_list (sizeof (void *), 0); - staticpro (&Vopaque_ptr_free_list); + reinit_opaque_once_early (); } diff --git a/src/opaque.h b/src/opaque.h index f12a985..4788cf0 100644 --- a/src/opaque.h +++ b/src/opaque.h @@ -35,69 +35,46 @@ typedef union { typedef struct Lisp_Opaque { struct lcrecord_header header; - Lisp_Object (*markfun) (Lisp_Object obj, void (*markobj) (Lisp_Object)); - /* An integral size for non-freed objects, an opaque or nil for - freed objects. */ - Lisp_Object size_or_chain; + size_t size; max_align_t data[1]; } Lisp_Opaque; -typedef struct Lisp_Opaque_List -{ - struct lcrecord_header header; - /* `markfun' allows you to put lisp objects inside of opaque objects - without having to create a new object type. */ - Lisp_Object (*markfun) (Lisp_Object obj, void (*markobj) (Lisp_Object)); - Lisp_Object free; - size_t size; -} Lisp_Opaque_List; - DECLARE_LRECORD (opaque, Lisp_Opaque); #define XOPAQUE(x) XRECORD (x, opaque, Lisp_Opaque) #define XSETOPAQUE(x, p) XSETRECORD (x, p, opaque) #define OPAQUEP(x) RECORDP (x, opaque) -#define GC_OPAQUEP(x) GC_RECORDP (x, opaque) /* #define CHECK_OPAQUE(x) CHECK_RECORD (x, opaque) Opaque pointers should never escape to the Lisp level, so functions should not be doing this. */ -DECLARE_LRECORD (opaque_list, Lisp_Opaque_List); -#define XOPAQUE_LIST(x) XRECORD (x, opaque_list, Lisp_Opaque_List) -#define XSETOPAQUE_LIST(x, p) XSETRECORD (x, p, opaque_list) -#define OPAQUE_LISTP(x) RECORDP (x, opaque_list) -#define GC_OPAQUE_LISTP(x) GC_RECORDP (x, opaque_list) -/* #define CHECK_OPAQUE_LIST(x) CHECK_RECORD (x, opaque_list) - Opaque lists should never escape to the Lisp level, so - functions should not be doing this. */ - /* Alternative DATA arguments to make_opaque */ #define OPAQUE_CLEAR ((CONST void *) 0) #define OPAQUE_UNINIT ((CONST void *) -1) -Lisp_Object make_opaque (size_t size, CONST void *data); -Lisp_Object make_opaque_ptr (CONST void *val); -Lisp_Object make_opaque_long (long val); -void free_opaque_ptr (Lisp_Object ptr); - -#define OPAQUE_SIZE(op) XINT ((op)->size_or_chain) +#define OPAQUE_SIZE(op) ((op)->size) #define OPAQUE_DATA(op) ((void *) ((op)->data)) #define OPAQUE_MARKFUN(op) ((op)->markfun) #define XOPAQUE_SIZE(op) OPAQUE_SIZE (XOPAQUE (op)) #define XOPAQUE_DATA(op) OPAQUE_DATA (XOPAQUE (op)) #define XOPAQUE_MARKFUN(op) OPAQUE_MARKFUN (XOPAQUE (op)) -#define get_opaque_ptr(op) (* (void **) XOPAQUE_DATA (op)) -#define set_opaque_ptr(op, ptr) (get_opaque_ptr (op) = (void *) ptr) -#define get_opaque_long(op) (* (long *) XOPAQUE_DATA (op)) -#define set_opaque_long(op, ptr) (get_opaque_long (op) = ptr) -#define set_opaque_markfun(op, fun) (XOPAQUE_MARKFUN (op) = fun) - -Lisp_Object make_opaque_list (size_t size, - Lisp_Object (*markfun) - (Lisp_Object obj, - void (*markobj) (Lisp_Object))); -Lisp_Object allocate_managed_opaque (Lisp_Object opaque_list, - CONST void *data); -void free_managed_opaque (Lisp_Object opaque_list, Lisp_Object opaque); +Lisp_Object make_opaque (size_t size, CONST void *data); + +typedef struct Lisp_Opaque_Ptr +{ + struct lcrecord_header header; + void *ptr; +} Lisp_Opaque_Ptr; + +DECLARE_LRECORD (opaque_ptr, Lisp_Opaque_Ptr); +#define XOPAQUE_PTR(x) XRECORD (x, opaque_ptr, Lisp_Opaque_Ptr) +#define XSETOPAQUE_PTR(x, p) XSETRECORD (x, p, opaque_ptr) +#define OPAQUE_PTRP(x) RECORDP (x, opaque_ptr) + +Lisp_Object make_opaque_ptr (void *val); +void free_opaque_ptr (Lisp_Object ptr); + +#define get_opaque_ptr(op) (XOPAQUE_PTR (op)->ptr) +#define set_opaque_ptr(op, ptr_) (XOPAQUE_PTR (op)->ptr = (ptr_)) #endif /* _XEMACS_OPAQUE_H_ */ diff --git a/src/print.c b/src/print.c index 8ded305..2616896 100644 --- a/src/print.c +++ b/src/print.c @@ -51,14 +51,13 @@ Lisp_Object Vstandard_output, Qstandard_output; /* The subroutine object for external-debugging-output is kept here for the convenience of the debugger. */ Lisp_Object Qexternal_debugging_output; -Lisp_Object Qalternate_debugging_output; /* Avoid actual stack overflow in print. */ static int print_depth; /* Detect most circularities to print finite output. */ #define PRINT_CIRCLE 200 -Lisp_Object being_printed[PRINT_CIRCLE]; +static Lisp_Object being_printed[PRINT_CIRCLE]; /* Maximum length of list or vector to print in full; noninteger means effectively infinity */ @@ -92,9 +91,6 @@ int print_readably; Lisp_Object Vprint_gensym; Lisp_Object Vprint_gensym_alist; -Lisp_Object Qprint_escape_newlines; -Lisp_Object Qprint_readably; - Lisp_Object Qdisplay_error; Lisp_Object Qprint_message_label; @@ -711,7 +707,6 @@ Display ERROR-OBJECT on STREAM in a user-friendly way. #ifdef LISP_FLOAT_TYPE Lisp_Object Vfloat_output_format; -Lisp_Object Qfloat_output_format; /* * This buffer should be at least as large as the max string size of the @@ -1362,8 +1357,8 @@ print_symbol (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) getting rid of this function altogether? Does anything actually *use* it? --hniksic */ -int alternate_do_pointer; -char alternate_do_string[5000]; +static int alternate_do_pointer; +static char alternate_do_string[5000]; DEFUN ("alternate-debugging-output", Falternate_debugging_output, 1, 1, 0, /* Append CHARACTER to the array `alternate_do_string'. @@ -1467,7 +1462,6 @@ FILE = nil means just close any termscript file currently open. /* Debugging kludge -- unbuffered */ static int debug_print_length = 50; static int debug_print_level = 15; -Lisp_Object debug_temp; static void debug_print_no_newline (Lisp_Object debug_print_obj) @@ -1604,15 +1598,8 @@ debug_short_backtrace (int length) void syms_of_print (void) { - defsymbol (&Qprint_escape_newlines, "print-escape-newlines"); - defsymbol (&Qprint_readably, "print-readably"); - defsymbol (&Qstandard_output, "standard-output"); -#ifdef LISP_FLOAT_TYPE - defsymbol (&Qfloat_output_format, "float-output-format"); -#endif - defsymbol (&Qprint_length, "print-length"); defsymbol (&Qprint_string_length, "print-string-length"); @@ -1629,7 +1616,6 @@ syms_of_print (void) DEFSUBR (Fterpri); DEFSUBR (Fwrite_char); DEFSUBR (Falternate_debugging_output); - defsymbol (&Qalternate_debugging_output, "alternate-debugging-output"); DEFSUBR (Fexternal_debugging_output); DEFSUBR (Fopen_termscript); defsymbol (&Qexternal_debugging_output, "external-debugging-output"); @@ -1637,9 +1623,15 @@ syms_of_print (void) } void -vars_of_print (void) +reinit_vars_of_print (void) { alternate_do_pointer = 0; +} + +void +vars_of_print (void) +{ + reinit_vars_of_print (); DEFVAR_LISP ("standard-output", &Vstandard_output /* Output stream `print' uses by default for outputting a character. diff --git a/src/process-nt.c b/src/process-nt.c index 0582761..1bdc703 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -53,6 +53,7 @@ Lisp_Object Qnt_quote_process_args; struct nt_process_data { HANDLE h_process; + int need_enable_child_signals; }; #define NT_DATA(p) ((struct nt_process_data*)((p)->process_data)) @@ -409,8 +410,6 @@ nt_init_process (void) * must signal an error instead. */ -/* #### This function completely ignores Vprocess_environment */ - static void signal_cannot_launch (Lisp_Object image_file, DWORD err) { @@ -423,9 +422,10 @@ nt_create_process (struct Lisp_Process *p, Lisp_Object *argv, int nargv, Lisp_Object program, Lisp_Object cur_dir) { - HANDLE hmyshove, hmyslurp, hprocin, hprocout; + HANDLE hmyshove, hmyslurp, hprocin, hprocout, hprocerr; LPTSTR command_line; BOOL do_io, windowed; + char *proc_env; /* Find out whether the application is windowed or not */ { @@ -473,6 +473,10 @@ nt_create_process (struct Lisp_Process *p, CreatePipe (&hprocin, &hmyshove, &sa, 0); CreatePipe (&hmyslurp, &hprocout, &sa, 0); + /* Duplicate the stdout handle for use as stderr */ + DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), &hprocerr, + 0, TRUE, DUPLICATE_SAME_ACCESS); + /* Stupid Win32 allows to create a pipe with *both* ends either inheritable or not. We need process ends inheritable, and local ends not inheritable. */ @@ -513,6 +517,80 @@ nt_create_process (struct Lisp_Process *p, UNGCPRO; /* args_or_ret */ } + /* Set `proc_env' to a nul-separated array of the strings in + Vprocess_environment terminated by 2 nuls. */ + + { + extern int compare_env (const char **strp1, const char **strp2); + char **env; + REGISTER Lisp_Object tem; + REGISTER char **new_env; + REGISTER int new_length = 0, i, new_space; + char *penv; + + for (tem = Vprocess_environment; + (CONSP (tem) + && STRINGP (XCAR (tem))); + tem = XCDR (tem)) + new_length++; + + /* new_length + 1 to include terminating 0. */ + env = new_env = alloca_array (char *, new_length + 1); + + /* Copy the Vprocess_environment strings into new_env. */ + for (tem = Vprocess_environment; + (CONSP (tem) + && STRINGP (XCAR (tem))); + tem = XCDR (tem)) + { + char **ep = env; + char *string = (char *) XSTRING_DATA (XCAR (tem)); + /* See if this string duplicates any string already in the env. + If so, don't put it in. + When an env var has multiple definitions, + we keep the definition that comes first in process-environment. */ + for (; ep != new_env; ep++) + { + char *p = *ep, *q = string; + while (1) + { + if (*q == 0) + /* The string is malformed; might as well drop it. */ + goto duplicate; + if (*q != *p) + break; + if (*q == '=') + goto duplicate; + p++, q++; + } + } + *new_env++ = string; + duplicate: ; + } + *new_env = 0; + + /* Sort the environment variables */ + new_length = new_env - env; + qsort (env, new_length, sizeof (char *), compare_env); + + /* Work out how much space to allocate */ + new_space = 0; + for (i = 0; i < new_length; i++) + { + new_space += strlen(env[i]) + 1; + } + new_space++; + + /* Allocate space and copy variables into it */ + penv = proc_env = alloca(new_space); + for (i = 0; i < new_length; i++) + { + strcpy(penv, env[i]); + penv += strlen(env[i]) + 1; + } + *penv = 0; + } + /* Create process */ { STARTUPINFO si; @@ -526,14 +604,14 @@ nt_create_process (struct Lisp_Process *p, { si.hStdInput = hprocin; si.hStdOutput = hprocout; - si.hStdError = hprocout; + si.hStdError = hprocerr; si.dwFlags |= STARTF_USESTDHANDLES; } err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP | CREATE_SUSPENDED, - NULL, (char *) XSTRING_DATA (cur_dir), &si, &pi) + proc_env, (char *) XSTRING_DATA (cur_dir), &si, &pi) ? 0 : GetLastError ()); if (do_io) @@ -541,6 +619,7 @@ nt_create_process (struct Lisp_Process *p, /* These just have been inherited; we do not need a copy */ CloseHandle (hprocin); CloseHandle (hprocout); + CloseHandle (hprocerr); } /* Handle process creation failure */ @@ -567,15 +646,19 @@ nt_create_process (struct Lisp_Process *p, CloseHandle (pi.hProcess); } - if (!windowed) - enable_child_signals (pi.hProcess); - ResumeThread (pi.hThread); CloseHandle (pi.hThread); - /* Hack to support Windows 95 negative pids */ - return ((int)pi.dwProcessId < 0 - ? -(int)pi.dwProcessId : (int)pi.dwProcessId); + /* Remember to enable child signals later if this is not a windowed + app. Can't do it right now because that screws up the MKS Toolkit + shell. */ + if (!windowed) + { + NT_DATA(p)->need_enable_child_signals = 10; + kick_status_notify (); + } + + return ((int)pi.dwProcessId); } } @@ -591,6 +674,18 @@ static void nt_update_status_if_terminated (struct Lisp_Process* p) { DWORD exit_code; + + if (NT_DATA(p)->need_enable_child_signals > 1) + { + NT_DATA(p)->need_enable_child_signals -= 1; + kick_status_notify (); + } + else if (NT_DATA(p)->need_enable_child_signals == 1) + { + enable_child_signals(NT_DATA(p)->h_process); + NT_DATA(p)->need_enable_child_signals = 0; + } + if (GetExitCodeProcess (NT_DATA(p)->h_process, &exit_code) && exit_code != STILL_ACTIVE) { @@ -622,7 +717,8 @@ nt_update_status_if_terminated (struct Lisp_Process* p) static void nt_send_process (Lisp_Object proc, struct lstream* lstream) { - struct Lisp_Process *p = XPROCESS (proc); + volatile Lisp_Object vol_proc = proc; + struct Lisp_Process *volatile p = XPROCESS (proc); /* use a reasonable-sized buffer (somewhere around the size of the stream buffer) so as to avoid inundating the stream with blocked @@ -632,7 +728,7 @@ nt_send_process (Lisp_Object proc, struct lstream* lstream) while (1) { - int writeret; + ssize_t writeret; chunklen = Lstream_read (lstream, chunkbuf, 128); if (chunklen <= 0) @@ -652,7 +748,7 @@ nt_send_process (Lisp_Object proc, struct lstream* lstream) p->core_dumped = 0; p->tick++; process_tick++; - deactivate_process (proc); + deactivate_process (*((Lisp_Object *) (&vol_proc))); error ("Broken pipe error sending to process %s; closed it", XSTRING_DATA (p->name)); } @@ -692,6 +788,14 @@ nt_kill_child_process (Lisp_Object proc, int signo, { struct Lisp_Process *p = XPROCESS (proc); + /* Enable child signals if necessary. This may lose the first + but it's better than nothing. */ + if (NT_DATA(p)->need_enable_child_signals > 0) + { + enable_child_signals(NT_DATA(p)->h_process); + NT_DATA(p)->need_enable_child_signals = 0; + } + /* Signal error if SIGNO cannot be sent */ validate_signal_number (signo); @@ -785,6 +889,12 @@ get_internet_address (Lisp_Object host, struct sockaddr_in *address, /* Ok, got an answer */ if (WSAGETASYNCERROR(msg.lParam) == NO_ERROR) success = 1; + else + { + warn_when_safe(Qstream, Qwarning, + "cannot get IP address for host \"%s\"", + XSTRING_DATA (host)); + } goto done; } else if (msg.message == WM_TIMER && msg.wParam == SOCK_TIMER_ID) @@ -834,7 +944,7 @@ nt_canonicalize_host_name (Lisp_Object host) static void nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, - Lisp_Object family, void** vinfd, void** voutfd) + Lisp_Object protocol, void** vinfd, void** voutfd) { struct sockaddr_in address; SOCKET s; @@ -843,9 +953,9 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, CHECK_STRING (host); - if (!EQ (family, Qtcpip)) - error ("Unsupported protocol family \"%s\"", - string_data (symbol_name (XSYMBOL (family)))); + if (!EQ (protocol, Qtcp)) + error ("Unsupported protocol \"%s\"", + string_data (symbol_name (XSYMBOL (protocol)))); if (INTP (service)) port = htons ((unsigned short) XINT (service)); @@ -875,7 +985,6 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, retval = connect (s, (struct sockaddr *) &address, sizeof (address)); if (retval != NO_ERROR && WSAGetLastError() != WSAEWOULDBLOCK) goto connect_failed; - /* Wait while connection is established */ while (1) { @@ -918,6 +1027,10 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, connect_failed: closesocket (s); + warn_when_safe(Qstream, Qwarning, + "failure to open network stream to host \"%s\" for service \"%s\"", + XSTRING_DATA (host), + XSTRING_DATA (service)); report_file_error ("connection failed", list2 (host, name)); } diff --git a/src/process-unix.c b/src/process-unix.c index 6f8e7c6..85539ed 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -212,9 +212,11 @@ allocate_pty (void) end of the ptys. */ int failed_count = 0; #endif - int i; int fd; +#ifndef HAVE_GETPT + int i; int c; +#endif #ifdef PTY_ITERATION PTY_ITERATION @@ -261,7 +263,7 @@ allocate_pty (void) #else sprintf (pty_name, "/dev/tty%c%x", c, i); #endif /* no PTY_TTY_NAME_SPRINTF */ -#ifndef UNIPLUS +#if !defined(UNIPLUS) && !defined(HAVE_GETPT) if (access (pty_name, 6) != 0) { close (fd); @@ -384,7 +386,7 @@ set_socket_nonblocking_maybe (int fd, int port, CONST char* proto) else continue; } - else if ((INTP (tail_port)) && (htons ((unsigned short) XINT (tail_port)) == port)) + else if (INTP (tail_port) && (htons ((unsigned short) XINT (tail_port)) == port)) break; } @@ -663,10 +665,9 @@ unix_alloc_process_data (struct Lisp_Process *p) */ static void -unix_mark_process_data (struct Lisp_Process *proc, - void (*markobj) (Lisp_Object)) +unix_mark_process_data (struct Lisp_Process *proc) { - markobj (UNIX_DATA(proc)->tty_name); + mark_object (UNIX_DATA(proc)->tty_name); } /* @@ -1141,7 +1142,7 @@ unix_send_process (Lisp_Object proc, struct lstream* lstream) while (1) { - int writeret; + ssize_t writeret; chunklen = Lstream_read (lstream, chunkbuf, 512); if (chunklen <= 0) @@ -1429,19 +1430,21 @@ unix_canonicalize_host_name (Lisp_Object host) static void unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, - Lisp_Object family, void** vinfd, void** voutfd) + Lisp_Object protocol, void** vinfd, void** voutfd) { struct sockaddr_in address; - int s, inch, outch; + int inch; + int outch; + volatile int s; volatile int port; volatile int retry = 0; int retval; CHECK_STRING (host); - if (!EQ (family, Qtcpip)) - error ("Unsupported protocol family \"%s\"", - string_data (symbol_name (XSYMBOL (family)))); + if (!EQ (protocol, Qtcp) && !EQ (protocol, Qudp)) + error ("Unsupported protocol \"%s\"", + string_data (symbol_name (XSYMBOL (protocol)))); if (INTP (service)) port = htons ((unsigned short) XINT (service)); @@ -1449,7 +1452,12 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic { struct servent *svc_info; CHECK_STRING (service); - svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp"); + + if (EQ (protocol, Qtcp)) + svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp"); + else /* EQ (protocol, Qudp) */ + svc_info = getservbyname ((char *) XSTRING_DATA (service), "udp"); + if (svc_info == 0) error ("Unknown service \"%s\"", XSTRING_DATA (service)); port = svc_info->s_port; @@ -1458,7 +1466,11 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic get_internet_address (host, &address, ERROR_ME); address.sin_port = port; - s = socket (address.sin_family, SOCK_STREAM, 0); + if (EQ (protocol, Qtcp)) + s = socket (address.sin_family, SOCK_STREAM, 0); + else /* EQ (protocol, Qudp) */ + s = socket (address.sin_family, SOCK_DGRAM, 0); + if (s < 0) report_file_error ("error creating socket", list1 (name)); diff --git a/src/process.c b/src/process.c index c3b493a..4d20fad 100644 --- a/src/process.c +++ b/src/process.c @@ -71,7 +71,7 @@ Lisp_Object Qrun, Qstop; /* Qrun => Qopen, Qexit => Qclosed for "network connection" processes */ Lisp_Object Qopen, Qclosed; /* Protocol families */ -Lisp_Object Qtcpip; +Lisp_Object Qtcp, Qudp; #ifdef HAVE_MULTICAST Lisp_Object Qmulticast; /* Will be used for occasional warnings */ @@ -111,22 +111,22 @@ extern Lisp_Object Vlisp_EXEC_SUFFIXES; static Lisp_Object -mark_process (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_process (Lisp_Object obj) { struct Lisp_Process *proc = XPROCESS (obj); - MAYBE_PROCMETH (mark_process_data, (proc, markobj)); - markobj (proc->name); - markobj (proc->command); - markobj (proc->filter); - markobj (proc->sentinel); - markobj (proc->buffer); - markobj (proc->mark); - markobj (proc->pid); - markobj (proc->pipe_instream); - markobj (proc->pipe_outstream); + MAYBE_PROCMETH (mark_process_data, (proc)); + mark_object (proc->name); + mark_object (proc->command); + mark_object (proc->filter); + mark_object (proc->sentinel); + mark_object (proc->buffer); + mark_object (proc->mark); + mark_object (proc->pid); + mark_object (proc->pipe_instream); + mark_object (proc->pipe_outstream); #ifdef FILE_CODING - markobj (proc->coding_instream); - markobj (proc->coding_outstream); + mark_object (proc->coding_instream); + mark_object (proc->coding_outstream); #endif return proc->status_symbol; } @@ -147,10 +147,10 @@ print_process (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) else { int netp = network_connection_p (obj); - write_c_string (((netp) ? GETTEXT ("#name, printcharfun, 1); - write_c_string (((netp) ? " " : " pid "), printcharfun); + write_c_string ((netp ? " " : " pid "), printcharfun); print_internal (proc->pid, printcharfun, 1); write_c_string (" state:", printcharfun); print_internal (proc->status_symbol, printcharfun, 1); @@ -245,7 +245,7 @@ connected_via_filedesc_p (struct Lisp_Process *p) int network_connection_p (Lisp_Object process) { - return GC_CONSP (XPROCESS (process)->pid); + return CONSP (XPROCESS (process)->pid); } #endif @@ -272,7 +272,7 @@ Return the process named NAME, or nil if there is none. { Lisp_Object tail; - if (GC_PROCESSP (name)) + if (PROCESSP (name)) return name; if (!gc_in_progress) @@ -280,7 +280,7 @@ Return the process named NAME, or nil if there is none. of a signal or crash. */ CHECK_STRING (name); - for (tail = Vprocess_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object proc = XCAR (tail); QUIT; @@ -298,18 +298,18 @@ BUFFER may be a buffer or the name of one. { Lisp_Object buf, tail, proc; - if (GC_NILP (name)) return Qnil; + if (NILP (name)) return Qnil; buf = Fget_buffer (name); - if (GC_NILP (buf)) return Qnil; + if (NILP (buf)) return Qnil; - for (tail = Vprocess_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail)) { /* jwz: do not quit here - it isn't necessary, as there is no way for Vprocess_list to get circular or overwhelmingly long, and this function is called from layout_mode_element under redisplay. */ /* QUIT; */ proc = XCAR (tail); - if (GC_PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf)) + if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf)) return proc; } return Qnil; @@ -331,28 +331,28 @@ get_process (Lisp_Object name) /* This may be called during a GC from process_send_signal() from kill_buffer_processes() if emacs decides to abort(). */ - if (GC_PROCESSP (name)) + if (PROCESSP (name)) return name; - if (GC_STRINGP (name)) + if (STRINGP (name)) { obj = Fget_process (name); - if (GC_NILP (obj)) + if (NILP (obj)) obj = Fget_buffer (name); - if (GC_NILP (obj)) + if (NILP (obj)) error ("Process %s does not exist", XSTRING_DATA (name)); } - else if (GC_NILP (name)) + else if (NILP (name)) obj = Fcurrent_buffer (); else obj = name; /* Now obj should be either a buffer object or a process object. */ - if (GC_BUFFERP (obj)) + if (BUFFERP (obj)) { proc = Fget_buffer_process (obj); - if (GC_NILP (proc)) + if (NILP (proc)) error ("Buffer %s has no process", XSTRING_DATA (XBUFFER(obj)->name)); } else @@ -659,7 +659,7 @@ INCODE and OUTCODE specify the coding-system objects used in input/output DEFUN ("open-network-stream-internal", Fopen_network_stream_internal, 4, 5, 0, /* Open a TCP connection for a service to a host. -Returns a subprocess-object to represent the connection. +Return a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. NAME is name for process. It is modified if necessary to make it unique. @@ -671,10 +671,18 @@ BUFFER is the buffer (or buffer-name) to associate with the process. Third arg is name of the host to connect to, or its IP address. Fourth arg SERVICE is name of the service desired, or an integer specifying a port number to connect to. -Fifth argument FAMILY is a protocol family. When omitted, 'tcp/ip -\(Internet protocol family TCP/IP) is assumed. +Fifth argument PROTOCOL is a network protocol. Currently 'tcp + (Transmission Control Protocol) and 'udp (User Datagram Protocol) are + supported. When omitted, 'tcp is assumed. + +Ouput via `process-send-string' and input via buffer or filter (see +`set-process-filter') are stream-oriented. That means UDP datagrams are +not guaranteed to be sent and received in discrete packets. (But small +datagrams around 500 bytes that are not truncated by `process-send-string' +are usually fine.) Note further that UDP protocol does not guard against +lost packets. */ - (name, buffer, host, service, family)) + (name, buffer, host, service, protocol)) { /* !!#### This function has not been Mule-ized */ /* This function can GC */ @@ -682,17 +690,17 @@ Fifth argument FAMILY is a protocol family. When omitted, 'tcp/ip struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, ngcpro1; void *inch, *outch; - GCPRO5 (name, buffer, host, service, family); + GCPRO5 (name, buffer, host, service, protocol); CHECK_STRING (name); - if (NILP(family)) - family = Qtcpip; + if (NILP(protocol)) + protocol = Qtcp; else - CHECK_SYMBOL (family); + CHECK_SYMBOL (protocol); /* Since this code is inside HAVE_SOCKETS, existence of open_network_stream is mandatory */ - PROCMETH (open_network_stream, (name, host, service, family, + PROCMETH (open_network_stream, (name, host, service, protocol, &inch, &outch)); if (!NILP (buffer)) @@ -716,7 +724,7 @@ Fifth argument FAMILY is a protocol family. When omitted, 'tcp/ip DEFUN ("open-multicast-group-internal", Fopen_multicast_group_internal, 5, 5, 0, /* Open a multicast connection on the specified dest/port/ttl. -Returns a subprocess-object to represent the connection. +Return a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. NAME is name for process. It is modified if necessary to make it unique. @@ -965,7 +973,7 @@ send_process (Lisp_Object proc, if (nonrelocatable) lstream = make_fixed_buffer_input_stream (nonrelocatable + start, len); - else if (GC_BUFFERP (relocatable)) + else if (BUFFERP (relocatable)) lstream = make_lisp_buffer_input_stream (XBUFFER (relocatable), start, start + len, 0); else @@ -1898,12 +1906,12 @@ kill_buffer_processes (Lisp_Object buffer) { Lisp_Object tail; - for (tail = Vprocess_list; GC_CONSP (tail); + for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object proc = XCAR (tail); - if (GC_PROCESSP (proc) - && (GC_NILP (buffer) || GC_EQ (XPROCESS (proc)->buffer, buffer))) + if (PROCESSP (proc) + && (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer))) { if (network_connection_p (proc)) Fdelete_process (proc); @@ -1975,7 +1983,8 @@ syms_of_process (void) defsymbol (&Qopen, "open"); defsymbol (&Qclosed, "closed"); - defsymbol (&Qtcpip, "tcp/ip"); + defsymbol (&Qtcp, "tcp"); + defsymbol (&Qudp, "udp"); #ifdef HAVE_MULTICAST defsymbol(&Qmulticast, "multicast"); /* Used for occasional warnings */ diff --git a/src/process.h b/src/process.h index f2574d8..59adf41 100644 --- a/src/process.h +++ b/src/process.h @@ -44,7 +44,6 @@ DECLARE_LRECORD (process, struct Lisp_Process); #define XPROCESS(x) XRECORD (x, process, struct Lisp_Process) #define XSETPROCESS(x, p) XSETRECORD (x, p, process) #define PROCESSP(x) RECORDP (x, process) -#define GC_PROCESSP(x) GC_RECORDP (x, process) #define CHECK_PROCESS(x) CHECK_RECORD (x, process) #define PROCESS_LIVE_P(x) (!NILP (XPROCESS(x)->pipe_instream)) @@ -93,7 +92,7 @@ int network_connection_p (Lisp_Object process); #define network_connection_p(x) 0 #endif -extern Lisp_Object Qclosed, Qmulticast, Qopen, Qrun, Qstop, Qtcpip; +extern Lisp_Object Qclosed, Qmulticast, Qopen, Qrun, Qstop, Qtcp, Qudp; extern Lisp_Object Vprocess_connection_type, Vprocess_list; /* Report all recent events of a change in process status @@ -134,4 +133,13 @@ Lisp_Object canonicalize_host_name (Lisp_Object host); #endif /* emacs */ +#ifdef HAVE_GETPT +#define PTY_ITERATION +#define PTY_OPEN \ + if ((fd = getpt()) < 0 || grantpt (fd) < 0 || unlockpt (fd) < 0) \ + return -1; +#define PTY_NAME_SPRINTF +#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ptsname (fd)); +#endif + #endif /* _XEMACS_PROCESS_H_ */ diff --git a/src/procimpl.h b/src/procimpl.h index b16c1e0..ded0881 100644 --- a/src/procimpl.h +++ b/src/procimpl.h @@ -37,8 +37,7 @@ struct Lisp_Process; struct process_methods { - void (*mark_process_data) (struct Lisp_Process *proc, - void (*markobj) (Lisp_Object)); + void (*mark_process_data) (struct Lisp_Process *proc); void (*print_process_data) (struct Lisp_Process *proc, Lisp_Object printcharfun); void (*finalize_process_data) (struct Lisp_Process *proc, int for_disksave); @@ -51,7 +50,7 @@ struct process_methods int (*tooltalk_connection_p) (struct Lisp_Process *p); #ifdef HAVE_SOCKETS void (*open_network_stream) (Lisp_Object name, Lisp_Object host, - Lisp_Object service, Lisp_Object family, + Lisp_Object service, Lisp_Object protocol, void** vinfd, void** voutfd); #ifdef HAVE_MULTICAST void (*open_multicast_group) (Lisp_Object name, Lisp_Object dest, @@ -159,7 +158,7 @@ struct Lisp_Process /* Random externs from process.c */ extern Lisp_Object Qrun, Qstop, Qopen, Qclosed; -extern Lisp_Object Qtcpip; +extern Lisp_Object Qtcp, Qudp; extern Lisp_Object Vprocess_connection_type; extern Lisp_Object Vprocess_list; diff --git a/src/profile.c b/src/profile.c index 6fa506b..648026f 100644 --- a/src/profile.c +++ b/src/profile.c @@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */ even be useful to provide a way to turn on only one profiling mechanism, but I haven't done so yet. --hniksic */ -struct hash_table *big_profile_table; +static struct hash_table *big_profile_table; Lisp_Object Vcall_count_profile_table; int default_profiling_interval; @@ -68,10 +68,10 @@ int profiling_active; and is not set the whole time we're in redisplay. */ int profiling_redisplay_flag; -Lisp_Object QSin_redisplay; -Lisp_Object QSin_garbage_collection; -Lisp_Object QSprocessing_events_at_top_level; -Lisp_Object QSunknown; +static Lisp_Object QSin_redisplay; +static Lisp_Object QSin_garbage_collection; +static Lisp_Object QSprocessing_events_at_top_level; +static Lisp_Object QSunknown; /* We use inside_profiling to prevent the handler from writing to the table while another routine is operating on it. We also set @@ -119,9 +119,9 @@ sigprof_handler (int signo) { fun = *backtrace_list->function; - if (!GC_SYMBOLP (fun) && - !GC_COMPILED_FUNCTIONP (fun) && - !GC_SUBRP (fun)) + if (!SYMBOLP (fun) && + !COMPILED_FUNCTIONP (fun) && + !SUBRP (fun)) fun = QSunknown; } else @@ -262,11 +262,6 @@ Return the profiling info as an alist. return closure.accum; } -struct mark_profiling_info_closure -{ - void (*markfun) (Lisp_Object); -}; - static int mark_profiling_info_maphash (CONST void *void_key, void *void_val, @@ -275,21 +270,18 @@ mark_profiling_info_maphash (CONST void *void_key, Lisp_Object key; CVOID_TO_LISP (key, void_key); - (((struct mark_profiling_info_closure *) void_closure)->markfun) (key); + mark_object (key); return 0; } void -mark_profiling_info (void (*markfun) (Lisp_Object)) +mark_profiling_info (void) { - /* This function does not GC (if markfun doesn't) */ - struct mark_profiling_info_closure closure; - - closure.markfun = markfun; + /* This function does not GC */ if (big_profile_table) { inside_profiling = 1; - maphash (mark_profiling_info_maphash, big_profile_table, &closure); + maphash (mark_profiling_info_maphash, big_profile_table, 0); inside_profiling = 0; } } diff --git a/src/ralloc.c b/src/ralloc.c index 5f336a9..9cc4416 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -98,7 +98,7 @@ static int r_alloc_initialized = 0; /* Declarations for working with the malloc, ralloc, and system breaks. */ /* Function to set the real break value. */ -static POINTER (*real_morecore) (long size); +static POINTER (*real_morecore) (ptrdiff_t size); /* The break value, as seen by malloc (). */ static POINTER virtual_break_value; @@ -339,7 +339,7 @@ get_more_space (SIZE size) If SIZE is more than a page, return the space to the system. */ static void -relinquish () +relinquish (void) { register heap_ptr h; int excess = 0; @@ -790,9 +790,9 @@ free_bloc (bloc_ptr bloc) __morecore hook values - in particular, __default_morecore in the GNU malloc package. */ -POINTER r_alloc_sbrk (long size); +POINTER r_alloc_sbrk (ptrdiff_t size); POINTER -r_alloc_sbrk (long size) +r_alloc_sbrk (ptrdiff_t size) { register bloc_ptr b; POINTER address; @@ -1082,7 +1082,7 @@ r_alloc_freeze (long size) void r_alloc_thaw (void); void -r_alloc_thaw () +r_alloc_thaw (void) { if (! r_alloc_initialized) @@ -1109,14 +1109,11 @@ r_alloc_thaw () /* The hook `malloc' uses for the function which gets more space from the system. */ #ifndef DOUG_LEA_MALLOC -extern POINTER (*__morecore) (long size); +extern POINTER (*__morecore) (ptrdiff_t size); #endif /* Initialize various things for memory allocation. */ -#define SET_FUN_PTR(fun_ptr, fun_val) \ - (*((void **) (&fun_ptr)) = ((void *) (fun_val))) - void init_ralloc (void) { @@ -1124,8 +1121,12 @@ init_ralloc (void) return; r_alloc_initialized = 1; - SET_FUN_PTR (real_morecore, __morecore); - SET_FUN_PTR (__morecore, r_alloc_sbrk); + real_morecore = (POINTER (*) (ptrdiff_t)) __morecore; + __morecore = +#ifdef __GNUC__ + (__typeof__ (__morecore)) +#endif + r_alloc_sbrk; first_heap = last_heap = &heap_base; first_heap->next = first_heap->prev = NIL_HEAP; @@ -1172,21 +1173,25 @@ init_ralloc (void) Emacs. This is needed when using Doug Lea's malloc from GNU libc. */ void r_alloc_reinit (void); void -r_alloc_reinit () +r_alloc_reinit (void) { /* Only do this if the hook has been reset, so that we don't get an infinite loop, in case Emacs was linked statically. */ - if ( ((void*) __morecore) != (void *) (r_alloc_sbrk)) + if ( (POINTER (*) (ptrdiff_t)) __morecore != r_alloc_sbrk) { - SET_FUN_PTR (real_morecore, __morecore); - SET_FUN_PTR (__morecore, r_alloc_sbrk); + real_morecore = (POINTER (*) (ptrdiff_t)) __morecore; + __morecore = +#ifdef __GNUC__ + (__typeof__ (__morecore)) +#endif + r_alloc_sbrk; } } #if 0 #ifdef DEBUG void -r_alloc_check () +r_alloc_check (void) { int found = 0; heap_ptr h, ph = 0; diff --git a/src/rangetab.c b/src/rangetab.c index b7d9983..8d5bdba 100644 --- a/src/rangetab.c +++ b/src/rangetab.c @@ -41,13 +41,13 @@ Lisp_Object Qrange_table; is not hard but just requires moving that stuff out of that file. */ static Lisp_Object -mark_range_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_range_table (Lisp_Object obj) { struct Lisp_Range_Table *rt = XRANGE_TABLE (obj); int i; for (i = 0; i < Dynarr_length (rt->entries); i++) - markobj (Dynarr_at (rt->entries, i).val); + mark_object (Dynarr_at (rt->entries, i).val); return Qnil; } @@ -132,9 +132,35 @@ range_table_hash (Lisp_Object obj, int depth) return hash; } +static const struct lrecord_description rte_description_1[] = { + { XD_LISP_OBJECT, offsetof(range_table_entry, val), 1 }, + { XD_END } +}; + +static const struct struct_description rte_description = { + sizeof(range_table_entry), + rte_description_1 +}; + +static const struct lrecord_description rted_description_1[] = { + XD_DYNARR_DESC(range_table_entry_dynarr, &rte_description), + { XD_END } +}; + +static const struct struct_description rted_description = { + sizeof(range_table_entry_dynarr), + rted_description_1 +}; + +static const struct lrecord_description range_table_description[] = { + { XD_STRUCT_PTR, offsetof(struct Lisp_Range_Table, entries), 1, &rted_description }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table, mark_range_table, print_range_table, 0, - range_table_equal, range_table_hash, 0, + range_table_equal, range_table_hash, + range_table_description, struct Lisp_Range_Table); /************************************************************************/ diff --git a/src/rangetab.h b/src/rangetab.h index f54c433..0a3a21a 100644 --- a/src/rangetab.h +++ b/src/rangetab.h @@ -50,7 +50,6 @@ DECLARE_LRECORD (range_table, struct Lisp_Range_Table); XRECORD (x, range_table, struct Lisp_Range_Table) #define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table) #define RANGE_TABLEP(x) RECORDP (x, range_table) -#define GC_RANGE_TABLEP(x) GC_RECORDP (x, range_table) #define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table) #endif diff --git a/src/realpath.c b/src/realpath.c index 78ccc25..f81bab6 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -22,25 +22,20 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -#ifdef HAVE_CONFIG_H #include -#endif #include -#if defined(HAVE_UNISTD_H) || defined(STDC_HEADERS) -#include -#endif #include #include +#include +#ifdef HAVE_UNISTD_H +#include +#endif #ifdef _POSIX_VERSION #include /* for PATH_MAX */ #else #include /* for MAXPATHLEN */ #endif -#include -#ifndef STDC_HEADERS -extern int errno; -#endif #ifdef WINDOWSNT #include @@ -62,13 +57,8 @@ extern int errno; #define MAX_READLINKS 32 -#ifdef __STDC__ -char *xrealpath(const char *path, char resolved_path []) -#else -char *xrealpath(path, resolved_path) -const char *path; -char resolved_path []; -#endif +char * +xrealpath (const char *path, char resolved_path []) { char copy_path[PATH_MAX]; char *new_path = resolved_path; diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index 5d3f815..9ac8e95 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -64,19 +64,8 @@ static void mswindows_redraw_exposed_windows (Lisp_Object window, int x, int y, int width, int height); static void mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p, - int x, int y, - int clip_x, int clip_y, - int clip_width, int clip_height, - int width, int height, - int pixmap_offset, - int offset_bitmap); -static void mswindows_output_pixmap (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, - int xoffset, int start_pixpos, int width, - face_index findex, int cursor_start, - int cursor_width, int cursor_height, - int offset_bitmap); -void bevel_modeline (struct window *w, struct display_line *dl); + struct display_box* db, + struct display_glyph_area* dga); typedef struct textual_run { @@ -304,28 +293,37 @@ mswindows_output_hline (struct window *w, struct display_line *dl, struct rune * of its face. ****************************************************************************/ static void -mswindows_output_blank (struct window *w, struct display_line *dl, struct rune *rb, int start_pixpos) +mswindows_output_blank (struct window *w, struct display_line *dl, + struct rune *rb, int start_pixpos) { struct frame *f = XFRAME (w->frame); - RECT rect = { rb->xpos, dl->ypos-dl->ascent, - rb->xpos+rb->width, dl->ypos+dl->descent-dl->clip }; + RECT rect = { rb->xpos, DISPLAY_LINE_YPOS (dl), + rb->xpos+rb->width, + DISPLAY_LINE_YEND (dl) }; struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, rb->findex); Lisp_Object bg_pmap = WINDOW_FACE_CACHEL_BACKGROUND_PIXMAP (w, rb->findex); + /* Unmap all subwindows in the area we are going to blank. */ + redisplay_unmap_subwindows_maybe (f, rb->xpos, DISPLAY_LINE_YPOS (dl), + rb->width, DISPLAY_LINE_HEIGHT (dl)); + if (!IMAGE_INSTANCEP (bg_pmap) || !IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) bg_pmap = Qnil; if (!NILP(bg_pmap)) { + struct display_box db; + struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, rb->xpos, + /*rb->object.dglyph.xoffset*/ 0, + start_pixpos, rb->width, + &db, &dga); /* blank the background in the appropriate color */ mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, cachel->foreground, cachel->background, Qnil); - - mswindows_output_pixmap (w, dl, bg_pmap, - rb->xpos, 0 /*rb->object.dglyph.xoffset*/, - start_pixpos, rb->width, rb->findex, + redisplay_output_pixmap (w, bg_pmap, &db, &dga, rb->findex, 0, 0, 0, TRUE); } else @@ -359,15 +357,19 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos, char *p_char = NULL; int n_char = 0; RECT rect = { xpos, - dl->ypos - dl->ascent, + DISPLAY_LINE_YPOS (dl), xpos + width, - dl->ypos + dl->descent - dl->clip}; + DISPLAY_LINE_YEND (dl) }; Lisp_Object bar = symbol_value_in_buffer (Qbar_cursor, WINDOW_BUFFER (w)); int bar_p = image_p || !NILP (bar); int cursor_p = !NILP (w->text_cursor_visible_p); int real_char_p = ch != 0; + /* Unmap all subwindows in the area we are going to blank. */ + redisplay_unmap_subwindows_maybe (f, xpos, DISPLAY_LINE_YPOS (dl), + width, DISPLAY_LINE_HEIGHT (dl)); + if (real_char_p) { /* Use the font from the underlying character */ @@ -466,8 +468,10 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos, ****************************************************************************/ void mswindows_output_string (struct window *w, struct display_line *dl, - Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, - int width, face_index findex) + Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, + int width, face_index findex, + int cursor, int cursor_start, int cursor_width, + int cursor_height) { struct frame *f = XFRAME (w->frame); /* struct device *d = XDEVICE (f->device);*/ @@ -506,9 +510,13 @@ mswindows_output_string (struct window *w, struct display_line *dl, /* sort out the destination rectangle */ height = DISPLAY_LINE_HEIGHT (dl); rect.left = clip_start; - rect.top = dl->ypos - dl->ascent; + rect.top = DISPLAY_LINE_YPOS (dl); rect.right = clip_end; - rect.bottom = height + dl->ypos - dl->ascent; + rect.bottom = rect.top + height; + + /* make sure the area we are about to display is subwindow free. */ + redisplay_unmap_subwindows_maybe (f, clip_start, DISPLAY_LINE_YPOS (dl), + clip_end - clip_start, DISPLAY_LINE_HEIGHT (dl)); /* output the background pixmap if there is one */ bg_pmap = cachel->background_pixmap; @@ -518,13 +526,14 @@ mswindows_output_string (struct window *w, struct display_line *dl, if (!NILP(bg_pmap)) { + struct display_box db; + struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, xpos + xoffset, 0, + clip_start, width, &db, &dga); /* blank the background in the appropriate color */ mswindows_update_dc (hdc, Qnil, cachel->foreground, cachel->background, Qnil); - - mswindows_output_pixmap (w, dl, bg_pmap, - xpos, xoffset, - clip_start, width, findex, + redisplay_output_pixmap (w, bg_pmap, &db, &dga, findex, 0, 0, 0, TRUE); /* output pixmap calls this so we have to recall to get correct references */ @@ -549,14 +558,14 @@ mswindows_output_string (struct window *w, struct display_line *dl, this_width = mswindows_text_width_single_run (hdc, cachel, runs + i); /* cope with fonts taller than lines */ - if ((int) fi->height < (int) (height + dl->clip)) + if ((int) fi->height < (int) (height + dl->clip + dl->top_clip)) { int clear_start = max (xpos, clip_start); int clear_end = min (xpos + this_width, clip_end); { redisplay_clear_region (window, findex, clear_start, - dl->ypos - dl->ascent, + DISPLAY_LINE_YPOS (dl), clear_end - clear_start, height); /* output pixmap calls this so we have to recall to get correct @@ -581,31 +590,12 @@ mswindows_output_string (struct window *w, struct display_line *dl, static void mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p, - int x, int y, - int clip_x, int clip_y, - int clip_width, int clip_height, - int width, int height, int pixmap_offset, - int offset_bitmap) + struct display_box* db, + struct display_glyph_area* dga) { HDC hdc = FRAME_MSWINDOWS_DC (f); HGDIOBJ old=NULL; COLORREF bgcolor = GetBkColor (hdc); - int need_clipping = (clip_x || clip_y); - int yoffset=0; - int xoffset=0; - - /* do we need to offset the pixmap vertically? this is necessary - for background pixmaps. */ - if (offset_bitmap) - { - yoffset = y % IMAGE_INSTANCE_PIXMAP_HEIGHT (p); - xoffset = x % IMAGE_INSTANCE_PIXMAP_WIDTH (p); - /* the width is handled by mswindows_output_pixmap_region */ - } - - if (need_clipping) - { - } /* first blt the mask */ if (IMAGE_INSTANCE_MSWINDOWS_MASK (p)) @@ -622,93 +612,94 @@ mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p, SetDIBColorTable (FRAME_MSWINDOWS_CDC (f), 1, 1, &col); BitBlt (hdc, - x,y, - width, height, + db->xpos, db->ypos, + dga->width, dga->height, FRAME_MSWINDOWS_CDC (f), - xoffset,yoffset, + dga->xoffset, dga->yoffset, SRCCOPY); SelectObject (FRAME_MSWINDOWS_CDC (f), old); } - /* now blt the bitmap itself. */ + /* Now blt the bitmap itself, or one of its slices. */ old = SelectObject (FRAME_MSWINDOWS_CDC (f), - IMAGE_INSTANCE_MSWINDOWS_BITMAP (p)); + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE + (p, IMAGE_INSTANCE_PIXMAP_SLICE (p))); BitBlt (hdc, - x,y, - width, height, + db->xpos, db->ypos, + dga->width, dga->height, FRAME_MSWINDOWS_CDC (f), - xoffset, yoffset, + dga->xoffset, dga->yoffset, IMAGE_INSTANCE_MSWINDOWS_MASK (p) ? SRCINVERT : SRCCOPY); SelectObject (FRAME_MSWINDOWS_CDC (f),old); - - if (need_clipping) - { - } } -/* - * X gc's have this nice property that setting the bg pixmap will +/* X gc's have this nice property that setting the bg pixmap will * output it offset relative to the window. Windows doesn't have this - * feature so we have to emulate this by outputting multiple pixmaps - */ + * feature so we have to emulate this by outputting multiple pixmaps. + * This is only used for background pixmaps. Normal pixmaps are + * outputted once and are scrollable */ static void mswindows_output_dibitmap_region (struct frame *f, struct Lisp_Image_Instance *p, - int x, int y, - int clip_x, int clip_y, - int clip_width, int clip_height, - int width, int height, int pixmap_offset, - int offset_bitmap) + struct display_box *db, + struct display_glyph_area *dga) { - int pwidth = min (width, IMAGE_INSTANCE_PIXMAP_WIDTH (p)); - int pheight = min (height, IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); + struct display_box xdb = { db->xpos, db->ypos, db->width, db->height }; + struct display_glyph_area xdga + = { 0, 0, IMAGE_INSTANCE_PIXMAP_WIDTH (p), + IMAGE_INSTANCE_PIXMAP_HEIGHT (p) }; int pxoffset = 0, pyoffset = 0; + if (dga) + { + xdga.width = dga->width; + xdga.height = dga->height; + } + else if (!redisplay_normalize_glyph_area (&xdb, &xdga)) + return; + /* when doing a bg pixmap do a partial pixmap first so that we blt whole pixmaps thereafter */ + xdga.height = min (xdga.height, IMAGE_INSTANCE_PIXMAP_HEIGHT (p) - + db->ypos % IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); - if (offset_bitmap) - { - pheight = min (pheight, IMAGE_INSTANCE_PIXMAP_HEIGHT (p) - - y % IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); - } - - while (pheight > 0) + while (xdga.height > 0) { - if (offset_bitmap) - { - pwidth = min (min (width, IMAGE_INSTANCE_PIXMAP_WIDTH (p)), + xdga.width = min (min (db->width, IMAGE_INSTANCE_PIXMAP_WIDTH (p)), IMAGE_INSTANCE_PIXMAP_WIDTH (p) - - x % IMAGE_INSTANCE_PIXMAP_WIDTH (p)); - pxoffset = 0; - } - while (pwidth > 0) + db->xpos % IMAGE_INSTANCE_PIXMAP_WIDTH (p)); + pxoffset = 0; + while (xdga.width > 0) { - mswindows_output_dibitmap (f, p, - x + pxoffset, y + pyoffset, - clip_x, clip_y, - clip_width, clip_height, - pwidth, pheight, pixmap_offset, - offset_bitmap); - pxoffset += pwidth; - pwidth = min ((width-pxoffset), - IMAGE_INSTANCE_PIXMAP_WIDTH (p)); + xdb.xpos = db->xpos + pxoffset; + xdb.ypos = db->ypos + pyoffset; + /* do we need to offset the pixmap vertically? this is necessary + for background pixmaps. */ + xdga.yoffset = xdb.ypos % IMAGE_INSTANCE_PIXMAP_HEIGHT (p); + xdga.xoffset = xdb.xpos % IMAGE_INSTANCE_PIXMAP_WIDTH (p); + /* the width is handled by mswindows_output_pixmap_region */ + mswindows_output_dibitmap (f, p, &xdb, &xdga); + pxoffset += xdga.width; + xdga.width = min ((db->width - pxoffset), + IMAGE_INSTANCE_PIXMAP_WIDTH (p)); } - pyoffset += pheight; - pheight = min ((height-pyoffset), - IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); + pyoffset += xdga.height; + xdga.height = min ((db->height - pyoffset), + IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); } } +/* Output a pixmap at the desired location. + DB normalized display_box. + DGA normalized display_glyph_area. */ static void -mswindows_output_pixmap (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, int xoffset, - int start_pixpos, int width, face_index findex, - int cursor_start, int cursor_width, int cursor_height, - int offset_bitmap) +mswindows_output_pixmap (struct window *w, Lisp_Object image_instance, + struct display_box *db, struct display_glyph_area *dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height, int bg_pixmap) { struct frame *f = XFRAME (w->frame); HDC hdc = FRAME_MSWINDOWS_DC (f); @@ -716,100 +707,18 @@ mswindows_output_pixmap (struct window *w, struct display_line *dl, struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object window; - int lheight = DISPLAY_LINE_HEIGHT (dl); - int pheight = ((int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > lheight ? lheight : - IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); - int clip_x, clip_y, clip_width, clip_height; - - /* The pixmap_offset is used to center the pixmap on lines which are - shorter than it is. This results in odd effects when scrolling - pixmaps off of the bottom. Let's try not using it. */ -#if 0 - int pixmap_offset = (int) (IMAGE_INSTANCE_PIXMAP_HEIGHT (p) - lheight) / 2; -#else - int pixmap_offset = 0; -#endif - XSETWINDOW (window, w); - if ((start_pixpos >= 0 && start_pixpos > xpos) || xoffset) - { - if (start_pixpos > xpos && start_pixpos > xpos + width) - return; - - clip_x = xoffset; - clip_width = width; - if (start_pixpos > xpos) - { - clip_x += (start_pixpos - xpos); - clip_width -= (start_pixpos - xpos); - } - } - else - { - clip_x = 0; - clip_width = 0; - } - - /* Place markers for possible future functionality (clipping the top - half instead of the bottom half; think pixel scrolling). */ - clip_y = 0; - clip_height = pheight; - - /* Clear the area the pixmap is going into. The pixmap itself will - always take care of the full width. We don't want to clear where - it is going to go in order to avoid flicker. So, all we have to - take care of is any area above or below the pixmap. */ - /* #### We take a shortcut for now. We know that since we have - pixmap_offset hardwired to 0 that the pixmap is against the top - edge so all we have to worry about is below it. */ - /* #### Unless the pixmap has a mask in which case we have to clear - the whole damn thing since we can't yet clear just the area not - included in the mask. */ - if (((int) (dl->ypos - dl->ascent + pheight) < - (int) (dl->ypos + dl->descent - dl->clip)) - || IMAGE_INSTANCE_MSWINDOWS_MASK (p)) - { - int clear_x, clear_y, clear_width, clear_height; - - if (IMAGE_INSTANCE_MSWINDOWS_MASK (p)) - { - clear_y = dl->ypos - dl->ascent; - clear_height = lheight; - } - else - { - clear_y = dl->ypos - dl->ascent + pheight; - clear_height = lheight - pheight; - } - - if (start_pixpos >= 0 && start_pixpos > xpos) - { - clear_x = start_pixpos; - clear_width = xpos + width - start_pixpos; - } - else - { - clear_x = xpos; - clear_width = width; - } - - if (!offset_bitmap) /* i.e. not a bg pixmap */ - redisplay_clear_region (window, findex, clear_x, clear_y, - clear_width, clear_height); - } - /* Output the pixmap. Have to do this as many times as is required to fill the given area */ mswindows_update_dc (hdc, Qnil, WINDOW_FACE_CACHEL_FOREGROUND (w, findex), WINDOW_FACE_CACHEL_BACKGROUND (w, findex), Qnil); - mswindows_output_dibitmap_region (f, p, xpos - xoffset, - dl->ypos - dl->ascent, - clip_x, clip_y, clip_width, clip_height, - width + xoffset, pheight, pixmap_offset, - offset_bitmap); + if (bg_pixmap) + mswindows_output_dibitmap_region (f, p, db, dga); + else + mswindows_output_dibitmap (f, p, db, dga); } #ifdef HAVE_SCROLLBARS @@ -901,12 +810,11 @@ mswindows_redraw_exposed_window (struct window *w, int x, int y, int width, for (line = 0; line < Dynarr_length (cdla); line++) { struct display_line *cdl = Dynarr_atp (cdla, line); - int top_y = cdl->ypos - cdl->ascent; - int bottom_y = cdl->ypos + cdl->descent; - if (bottom_y >= rect_draw.top) + if (DISPLAY_LINE_YPOS (cdl) + DISPLAY_LINE_HEIGHT (cdl) + >= rect_draw.top) { - if (top_y > rect_draw.bottom) + if (DISPLAY_LINE_YPOS (cdl) > rect_draw.bottom) { if (line == 0) continue; @@ -986,29 +894,47 @@ mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int hei ****************************************************************************/ static void mswindows_bevel_area (struct window *w, face_index findex, int x, int y, - int width, int height, int shadow_thickness) + int width, int height, int thickness, + int edges, enum edge_style style) { struct frame *f = XFRAME (w->frame); UINT edge; + UINT border = 0; - if (shadow_thickness < -1) - edge = EDGE_SUNKEN; - else if (shadow_thickness < 0) - edge = BDR_SUNKENINNER; - else if (shadow_thickness == 1) - edge = BDR_RAISEDINNER; - else - edge = EDGE_RAISED; + if (style == EDGE_ETCHED_IN) + edge = EDGE_ETCHED; + else if (style == EDGE_ETCHED_OUT) + edge = EDGE_BUMP; + else if (style == EDGE_BEVEL_IN) + { + if (thickness == 1) + edge = BDR_SUNKENINNER; + else + edge = EDGE_SUNKEN; + } + else /* EDGE_BEVEL_OUT */ + { + if (thickness == 1) + edge = BDR_RAISEDINNER; + else + edge = EDGE_RAISED; + } - if (shadow_thickness < 0) - shadow_thickness = -shadow_thickness; + if (edges & EDGE_TOP) + border |= BF_TOP; + if (edges & EDGE_LEFT) + border |= BF_LEFT; + if (edges & EDGE_BOTTOM) + border |= BF_BOTTOM; + if (edges & EDGE_RIGHT) + border |= BF_RIGHT; { RECT rect = { x, y, x + width, y + height }; Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, color, Qnil); - DrawEdge (FRAME_MSWINDOWS_DC (f), &rect, edge, BF_RECT); + DrawEdge (FRAME_MSWINDOWS_DC (f), &rect, edge, border); } } @@ -1141,7 +1067,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b if (Dynarr_length (buf)) { mswindows_output_string (w, dl, buf, xpos, 0, start_pixpos, width, - findex); + findex, 0, 0, 0, 0); xpos = rb->xpos; width = 0; } @@ -1175,10 +1101,9 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b else if (rb->object.chr.ch == '\n') { /* Clear in case a cursor was formerly here. */ - int height = DISPLAY_LINE_HEIGHT (dl); - - redisplay_clear_region (window, findex, xpos, dl->ypos - dl->ascent, - rb->width, height); + redisplay_clear_region (window, findex, xpos, + DISPLAY_LINE_YPOS (dl), + rb->width, DISPLAY_LINE_HEIGHT (dl)); elt++; } } @@ -1214,6 +1139,11 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b else if (rb->type == RUNE_DGLYPH) { Lisp_Object instance; + struct display_box db; + struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, + start_pixpos, rb->width, + &db, &dga); XSETWINDOW (window, w); instance = glyph_image_instance (rb->object.dglyph.glyph, @@ -1238,17 +1168,17 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b else /* #### redisplay-x passes -1 as the width: why ? */ mswindows_output_string (w, dl, buf, xpos, rb->object.dglyph.xoffset, - start_pixpos, rb->width, findex); + start_pixpos, rb->width, findex, + 0, 0, 0, 0); Dynarr_reset (buf); } break; case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - mswindows_output_pixmap (w, dl, instance, xpos, - rb->object.dglyph.xoffset, start_pixpos, - rb->width, findex, cursor_start, - cursor_width, cursor_height, 0); + redisplay_output_pixmap (w, instance, &db, &dga, findex, + cursor_start, cursor_width, + cursor_height, 0); if (rb->cursor_type == CURSOR_ON) mswindows_output_cursor (w, dl, xpos, cursor_width, findex, 0, 1); @@ -1259,10 +1189,18 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b case IMAGE_SUBWINDOW: case IMAGE_WIDGET: - redisplay_output_subwindow (w, dl, instance, xpos, - rb->object.dglyph.xoffset, start_pixpos, - rb->width, findex, cursor_start, - cursor_width, cursor_height); + redisplay_output_subwindow (w, instance, &db, &dga, findex, + cursor_start, cursor_width, + cursor_height); + if (rb->cursor_type == CURSOR_ON) + mswindows_output_cursor (w, dl, xpos, cursor_width, + findex, 0, 1); + break; + + case IMAGE_LAYOUT: + redisplay_output_layout (w, instance, &db, &dga, findex, + cursor_start, cursor_width, + cursor_height); if (rb->cursor_type == CURSOR_ON) mswindows_output_cursor (w, dl, xpos, cursor_width, findex, 0, 1); @@ -1285,7 +1223,8 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b } if (Dynarr_length (buf)) - mswindows_output_string (w, dl, buf, xpos, 0, start_pixpos, width, findex); + mswindows_output_string (w, dl, buf, xpos, 0, start_pixpos, width, findex, + 0, 0, 0, 0); if (dl->modeline && !EQ (Qzero, w->modeline_shadow_thickness) @@ -1400,12 +1339,11 @@ mswindows_clear_region (Lisp_Object locale, struct device* d, struct frame* f, if (!NILP (background_pixmap)) { + struct display_box db = { x, y, width, height }; mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, fcolor, bcolor, background_pixmap); - mswindows_output_dibitmap_region - ( f, XIMAGE_INSTANCE (background_pixmap), - x, y, 0, 0, 0, 0, width, height, 0, TRUE); + ( f, XIMAGE_INSTANCE (background_pixmap), &db, 0); } else { @@ -1449,4 +1387,6 @@ console_type_create_redisplay_mswindows (void) CONSOLE_HAS_METHOD (mswindows, flash); CONSOLE_HAS_METHOD (mswindows, ring_bell); CONSOLE_HAS_METHOD (mswindows, bevel_area); + CONSOLE_HAS_METHOD (mswindows, output_string); + CONSOLE_HAS_METHOD (mswindows, output_pixmap); } diff --git a/src/redisplay-output.c b/src/redisplay-output.c index ae041e9..f767790 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -2,6 +2,7 @@ Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. Copyright (C) 1995, 1996 Ben Wing. Copyright (C) 1996 Chuck Thompson. + Copyright (C) 1999 Andy Piper. This file is part of XEmacs. @@ -26,6 +27,9 @@ Boston, MA 02111-1307, USA. */ /* Author: Chuck Thompson */ +/* Heavily hacked for modularity, gutter and subwindow support by Andy + Piper. */ + #include #include "lisp.h" @@ -45,6 +49,15 @@ static void redisplay_output_display_block (struct window *w, struct display_lin int block, int start, int end, int start_pixpos, int cursor_start, int cursor_width, int cursor_height); +static void redisplay_normalize_display_box (struct display_box* dest, + struct display_glyph_area* src); +static int redisplay_display_boxes_in_window_p (struct window* w, + struct display_box* db, + struct display_glyph_area* dga); +static void redisplay_clear_clipped_region (Lisp_Object locale, face_index findex, + struct display_box* dest, + struct display_glyph_area* glyphsrc, + int fullheight_p, Lisp_Object); /***************************************************************************** sync_rune_structs @@ -177,6 +190,27 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) /* Do not compare the values of bufpos and endpos. They do not affect the display characteristics. */ + /* Note: (hanoi 6) spends 95% of its time in redisplay, and about + 30% here. Not using bitfields for rune.type alone gives a redisplay + speed up of 10%. + + #### In profile arcs run of a normal Gnus session this function + is run 6.76 million times, only to return 1 in 6.73 million of + those. + + In addition a quick look GCC sparc assembly shows that GCC is not + doing a good job here. + 1. The function is not inlined (too complicated?) + 2. It seems to be reloading the crb and drb variables all the + time. + 3. It doesn't seem to notice that the second half of these if's + are really a switch statement. + + So I (JV) conjecture + + #### It would really be worth it to arrange for this function to + be (almost) a single call to memcmp. */ + if ((crb->findex != drb->findex) || (WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))) return 0; @@ -191,15 +225,28 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) else if (crb->type == RUNE_CHAR && (crb->object.chr.ch != drb->object.chr.ch)) return 0; - else if (crb->type == RUNE_DGLYPH && - (!EQ (crb->object.dglyph.glyph, drb->object.dglyph.glyph) || - !EQ (crb->object.dglyph.extent, drb->object.dglyph.extent) || - crb->object.dglyph.xoffset != drb->object.dglyph.xoffset)) - return 0; else if (crb->type == RUNE_HLINE && (crb->object.hline.thickness != drb->object.hline.thickness || crb->object.hline.yoffset != drb->object.hline.yoffset)) return 0; + else if (crb->type == RUNE_DGLYPH && + (!EQ (crb->object.dglyph.glyph, drb->object.dglyph.glyph) || + !EQ (crb->object.dglyph.extent, drb->object.dglyph.extent) || + crb->object.dglyph.xoffset != drb->object.dglyph.xoffset)) + return 0; + /* Only check dirtiness if we know something has changed. */ + else if (crb->type == RUNE_DGLYPH && + XFRAME (w->frame)->glyphs_changed) + { + glyph_index gindex = get_glyph_cachel_index (w, drb->object.dglyph.glyph); + /* Although doing the cachel lookup for every comparison is + very expensive.we have to do it to make sure the cache is + up-to-date. */ + if (GLYPH_CACHEL_DIRTYP (w, gindex)) + return 0; + else + return 1; + } else return 1; } @@ -351,8 +398,14 @@ compare_display_blocks (struct window *w, struct display_line *cdl, force = 1; if (f->windows_structure_changed || + /* #### Why is this so? We have face cachels so that we don't + have to recalculate all the display blocks when faces + change. I have fixed this for glyphs and am inclined to think + that faces should "Just Work", but I'm not feeling brave + today. Maybe its because the face cachels represent merged + faces rather than simply instantiations in a particular + domain. */ f->faces_changed || - f->glyphs_changed || cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || cdl->descent != ddl->descent || @@ -589,6 +642,7 @@ output_display_line (struct window *w, display_line_dynarr *cdla, (cdl && (cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || cdl->descent != ddl->descent || + cdl->top_clip != ddl->top_clip || cdl->clip != ddl->clip))) { int x, y, width, height; @@ -596,9 +650,9 @@ output_display_line (struct window *w, display_line_dynarr *cdla, must_sync = 1; x = start_pixpos; - y = ddl->ypos - ddl->ascent; + y = DISPLAY_LINE_YPOS (ddl); width = min (next_start_pixpos, block_end) - x; - height = ddl->ascent + ddl->descent - ddl->clip; + height = DISPLAY_LINE_HEIGHT (ddl); if (x < ddl->bounds.left_in) { @@ -658,7 +712,11 @@ output_display_line (struct window *w, display_line_dynarr *cdla, region or if it was a block of a different type, then output the entire ddb. Otherwise, compare cdb and ddb and output only the changed region. */ - if (!force && cdb && ddb->type == cdb->type && b == old_b) + if (!force && cdb && ddb->type == cdb->type + /* If there was no buffer being display before the + compare anyway as we might be outputting a gutter. */ + && + (b == old_b || !old_b)) { must_sync |= compare_display_blocks (w, cdl, ddl, old_block, block, start_pixpos, @@ -709,19 +767,23 @@ output_display_line (struct window *w, display_line_dynarr *cdla, if (f->windows_structure_changed || f->faces_changed || clear_border || f->clear) { - int y = ddl->ypos - ddl->ascent; - int height = ddl->ascent + ddl->descent - ddl->clip; + int y = DISPLAY_LINE_YPOS (ddl); + int height = DISPLAY_LINE_HEIGHT (ddl); - if (ddl->modeline) + /* If we are in the gutter then we musn't clear the borders. */ + if (y >= WINDOW_TEXT_TOP (w) && (y + height) <= WINDOW_TEXT_BOTTOM (w)) { - y -= MODELINE_SHADOW_THICKNESS (w); - height += (2 * MODELINE_SHADOW_THICKNESS (w)); + if (ddl->modeline) + { + y -= MODELINE_SHADOW_THICKNESS (w); + height += (2 * MODELINE_SHADOW_THICKNESS (w)); + } + + if (window_is_leftmost (w)) + clear_left_border (w, y, height); + if (window_is_rightmost (w)) + clear_right_border (w, y, height); } - - if (window_is_leftmost (w)) - clear_left_border (w, y, height); - if (window_is_rightmost (w)) - clear_right_border (w, y, height); } if (cdla) @@ -1005,20 +1067,38 @@ redisplay_output_display_block (struct window *w, struct display_line *dl, int b { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); + struct display_block *db = Dynarr_atp (dl->display_blocks, block); + rune_dynarr *rba = db->runes; + struct rune *rb; + int xpos, width; + rb = Dynarr_atp (rba, start); + + if (!rb) + /* Nothing to do so don't do anything. */ + return; + xpos = max (start_pixpos, rb->xpos); + + if (end < 0) + end = Dynarr_length (rba); + + rb = Dynarr_atp (rba, end - 1); + width = rb->xpos + rb->width - xpos; + /* now actually output the block. */ DEVMETH (d, output_display_block, (w, dl, block, start, end, start_pixpos, cursor_start, cursor_width, cursor_height)); } - + /**************************************************************************** redisplay_unmap_subwindows Remove subwindows from the area in the box defined by the given parameters. ****************************************************************************/ -static void redisplay_unmap_subwindows (struct frame* f, int x, int y, int width, int height) +static void redisplay_unmap_subwindows (struct frame* f, int x, int y, int width, int height, + Lisp_Object ignored_window) { int elt; @@ -1031,7 +1111,9 @@ static void redisplay_unmap_subwindows (struct frame* f, int x, int y, int width && cachel->x + cachel->width > x && cachel->x < x + width && - cachel->y + cachel->height > y && cachel->y < y + height) + cachel->y + cachel->height > y && cachel->y < y + height + && + !EQ (cachel->subwindow, ignored_window)) { unmap_subwindow (cachel->subwindow); } @@ -1048,79 +1130,340 @@ void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, { if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) { - redisplay_unmap_subwindows (f, x, y, width, height); + redisplay_unmap_subwindows (f, x, y, width, height, Qnil); + } +} + +static void redisplay_unmap_subwindows_except_us (struct frame* f, int x, int y, int width, + int height, Lisp_Object subwindow) +{ + if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) + { + redisplay_unmap_subwindows (f, x, y, width, height, subwindow); } } /**************************************************************************** redisplay_output_subwindow - output a subwindow. This code borrows heavily from the pixmap stuff, although is much simpler not needing to account for partial pixmaps, backgrounds etc. ****************************************************************************/ void -redisplay_output_subwindow (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, int xoffset, - int start_pixpos, int width, face_index findex, - int cursor_start, int cursor_width, int cursor_height) +redisplay_output_subwindow (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height) { struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object window; + struct display_glyph_area sdga; + + dga->height = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p); + dga->width = IMAGE_INSTANCE_SUBWINDOW_WIDTH (p); - int lheight = dl->ascent + dl->descent - dl->clip; - int pheight = ((int) IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p) > lheight ? lheight : - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p)); + /* This makes the glyph area fit into the display area. */ + if (!redisplay_normalize_glyph_area (db, dga)) + return; XSETWINDOW (window, w); - /* Clear the area the subwindow is going into. The subwindow itself - will always take care of the full width. We don't want to clear - where it is going to go in order to avoid flicker. So, all we - have to take care of is any area above or below the subwindow. Of - course this is rubbish if the subwindow has transparent areas - (for instance with frames). */ - /* #### We take a shortcut for now. We know that since we have - subwindow_offset hardwired to 0 that the subwindow is against the top - edge so all we have to worry about is below it. */ - if ((int) (dl->ypos - dl->ascent + pheight) < - (int) (dl->ypos + dl->descent - dl->clip)) + /* Clear the area the subwindow is going into. */ + redisplay_clear_clipped_region (window, findex, + db, dga, 0, image_instance); + + /* This shrinks the display box to exactly enclose the glyph + area. */ + redisplay_normalize_display_box (db, dga); + + /* if we can't view the whole window we can't view any of it. We + have to be careful here since we may be being asked to display + part of a subwindow, the rest of which is on-screen as well. We + need to allow this case and map the entire subwindow. We also + need to be careful since the subwindow could be outside the + window in the gutter or modeline - we also need to allow these + cases.*/ + sdga.xoffset = -dga->xoffset; + sdga.yoffset = -dga->yoffset; + sdga.height = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p); + sdga.width = IMAGE_INSTANCE_SUBWINDOW_WIDTH (p); + + if (redisplay_display_boxes_in_window_p (w, db, &sdga) < 0) + { + map_subwindow (image_instance, db->xpos, db->ypos, dga); + } + else { - int clear_x, clear_width; + sdga.xoffset = sdga.yoffset = 0; + map_subwindow (image_instance, db->xpos - dga->xoffset, + db->ypos - dga->yoffset, &sdga); + } +} + +/**************************************************************************** + redisplay_output_layout - int clear_y = dl->ypos - dl->ascent + pheight; - int clear_height = lheight - pheight; + Output a widget hierarchy. This can safely call itself recursively. + ****************************************************************************/ +void +redisplay_output_layout (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height) +{ + struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); + Lisp_Object window, rest; + Emchar_dynarr *buf = Dynarr_new (Emchar); + struct frame *f = XFRAME (w->frame); + struct device *d = XDEVICE (f->device); + int layout_height, layout_width; + /* We bogusly don't take f->extents_changed and f->glyphs_changed + into account. This is because if we do we always redisplay the + entire layout. So far I have seen no ill effects to we'll see. */ + int frame_really_changed = (f->buffers_changed || + f->clip_changed || + f->faces_changed || + f->frame_changed || + f->modeline_changed || + f->subwindows_changed || + f->windows_changed || + f->windows_structure_changed); - if (start_pixpos >= 0 && start_pixpos > xpos) + XSETWINDOW (window, w); + + layout_height = glyph_height (image_instance, Qnil, findex, window); + layout_width = glyph_width (image_instance, Qnil, findex, window); + + dga->height = layout_height; + dga->width = layout_width; + + /* This makes the glyph area fit into the display area. */ + if (!redisplay_normalize_glyph_area (db, dga)) + return; + + /* Highly dodgy optimization. We want to only output the whole + layout if we really have to. */ + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (p)) + { + /* First clear the area we are drawing into. This is the easiest + thing to do since we have many gaps that we have to make sure are + filled in. */ + redisplay_clear_clipped_region (window, findex, db, dga, 1, Qnil); + + /* Output a border if required */ + if (!NILP (IMAGE_INSTANCE_LAYOUT_BORDER (p))) { - clear_x = start_pixpos; - clear_width = xpos + width - start_pixpos; + int edges = 0; + enum edge_style style; + int ypos = db->ypos; + int height = dga->height; + + if (dga->xoffset >= 0) + edges |= EDGE_LEFT; + if (dga->width - dga->xoffset == layout_width) + edges |= EDGE_RIGHT; + if (dga->yoffset >= 0) + edges |= EDGE_TOP; + if (dga->height - dga->yoffset == layout_height) + edges |= EDGE_BOTTOM; + + if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_in)) + style = EDGE_ETCHED_IN; + else if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_out)) + style = EDGE_ETCHED_OUT; + else if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qbevel_in)) + style = EDGE_BEVEL_IN; + else if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (p))) + { + style = EDGE_ETCHED_IN; + if (edges & EDGE_TOP) + { + ypos += XINT (IMAGE_INSTANCE_LAYOUT_BORDER (p)); + height -= XINT (IMAGE_INSTANCE_LAYOUT_BORDER (p)); + } + } + else + style = EDGE_BEVEL_OUT; + + MAYBE_DEVMETH (d, bevel_area, + (w, findex, db->xpos, + ypos, + dga->width, height, 2, edges, style)); } - else + } + + /* This shrinks the display box to exactly enclose the glyph + area. */ + redisplay_normalize_display_box (db, dga); + + /* Flip through the widgets in the layout displaying as necessary */ + LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (p)) + { + Lisp_Object child = XCAR (rest); + + struct display_box cdb; + /* For losing HP-UX */ + cdb.xpos = db->xpos; + cdb.ypos = db->ypos; + cdb.width = db->width; + cdb.height = db->height; + + /* First determine if the image is visible at all */ + if (IMAGE_INSTANCEP (child)) { - clear_x = xpos; - clear_width = width; + struct Lisp_Image_Instance* childii = XIMAGE_INSTANCE (child); + /* The enclosing layout offsets are +ve at this point */ + struct display_glyph_area cdga; + cdga.xoffset = IMAGE_INSTANCE_XOFFSET (childii) - dga->xoffset; + cdga.yoffset = IMAGE_INSTANCE_YOFFSET (childii) - dga->yoffset; + cdga.width = glyph_width (child, Qnil, findex, window); + cdga.height = glyph_height (child, Qnil, findex, window); + + /* Although normalization is done by the output routines + we have to do it here so that they don't try and + clear all of db. This is true below also. */ + if (redisplay_normalize_glyph_area (&cdb, &cdga)) + { + redisplay_normalize_display_box (&cdb, &cdga); + /* Since the display boxes will now be totally in the + window if they are visible at all we can now check this easily. */ + if (cdb.xpos < db->xpos || cdb.ypos < db->ypos + || cdb.xpos + cdb.width > db->xpos + db->width + || cdb.ypos + cdb.height > db->ypos + db->height) + continue; + /* We have to invert the offset here as normalization + will have made them positive which the output + routines will treat as a truely +ve offset. */ + cdga.xoffset = -cdga.xoffset; + cdga.yoffset = -cdga.yoffset; + + switch (IMAGE_INSTANCE_TYPE (childii)) + { + case IMAGE_TEXT: + { + /* #### This is well hacked and could use some + generalisation.*/ + if (redisplay_normalize_glyph_area (&cdb, &cdga) + && + (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))) + { + struct display_line dl; /* this is fake */ + Lisp_Object string = + IMAGE_INSTANCE_TEXT_STRING (childii); + convert_bufbyte_string_into_emchar_dynarr + (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + + redisplay_normalize_display_box (&cdb, &cdga); + /* Offsets are now +ve again so be careful + when fixing up the display line. */ + xzero (dl); + /* Munge boxes into display lines. */ + dl.ypos = (cdb.ypos - cdga.yoffset) + + glyph_ascent (child, Qnil, findex, window); + dl.ascent = glyph_ascent (child, Qnil, findex, window); + dl.descent = glyph_descent (child, Qnil, findex, window); + dl.top_clip = cdga.yoffset; + dl.clip = (dl.ypos + dl.descent) - (cdb.ypos + cdb.height); + /* output_string doesn't understand offsets in + the same way as other routines - we have to + add the offset to the width so that we + output the full string. */ + MAYBE_DEVMETH (d, output_string, (w, &dl, buf, cdb.xpos, + cdga.xoffset, cdb.xpos, + cdga.width + cdga.xoffset, + findex, 0, 0, 0, 0)); + Dynarr_reset (buf); + } + } + break; + + case IMAGE_MONO_PIXMAP: + case IMAGE_COLOR_PIXMAP: + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) + redisplay_output_pixmap (w, child, &cdb, &cdga, findex, + 0, 0, 0, 0); + break; + + case IMAGE_WIDGET: + case IMAGE_SUBWINDOW: + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) + redisplay_output_subwindow (w, child, &cdb, &cdga, findex, + 0, 0, 0); + break; + + case IMAGE_LAYOUT: + redisplay_output_layout (w, child, &cdb, &cdga, findex, + 0, 0, 0); + break; + + case IMAGE_NOTHING: + /* nothing is as nothing does */ + break; + + case IMAGE_POINTER: + default: + abort (); + } + } } - - redisplay_clear_region (window, findex, clear_x, clear_y, - clear_width, clear_height); } -#if 0 - redisplay_clear_region (window, findex, xpos - xoffset, dl->ypos - dl->ascent, - width, lheight); -#endif - /* if we can't view the whole window we can't view any of it */ - if (IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p) > lheight - || - IMAGE_INSTANCE_SUBWINDOW_WIDTH (p) > width) + Dynarr_free (buf); +} + +/**************************************************************************** + redisplay_output_pixmap + + + output a pixmap. + ****************************************************************************/ +void +redisplay_output_pixmap (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height, int offset_bitmap) +{ + struct frame *f = XFRAME (w->frame); + struct device *d = XDEVICE (f->device); + struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); + Lisp_Object window; + XSETWINDOW (window, w); + + dga->height = IMAGE_INSTANCE_PIXMAP_HEIGHT (p); + dga->width = IMAGE_INSTANCE_PIXMAP_WIDTH (p); + + /* This makes the glyph area fit into the display area. */ + if (!redisplay_normalize_glyph_area (db, dga)) + return; + + /* Clear the area the pixmap is going into. The pixmap itself will + always take care of the full width. We don't want to clear where + it is going to go in order to avoid flicker. So, all we have to + take care of is any area above or below the pixmap. If the pixmap + has a mask in which case we have to clear the whole damn thing + since we can't yet clear just the area not included in the + mask. */ + if (!offset_bitmap) { - redisplay_clear_region (window, findex, xpos - xoffset, dl->ypos - dl->ascent, - width, lheight); - unmap_subwindow (image_instance); + redisplay_clear_clipped_region (window, findex, + db, dga, + (int)IMAGE_INSTANCE_PIXMAP_MASK (p), + Qnil); + + /* This shrinks the display box to exactly enclose the glyph + area. */ + redisplay_normalize_display_box (db, dga); } - else - map_subwindow (image_instance, xpos - xoffset, dl->ypos - dl->ascent); + assert (db->xpos >= 0 && db->ypos >= 0); + + MAYBE_DEVMETH (d, output_pixmap, (w, image_instance, + db, dga, + findex, cursor_start, + cursor_width, cursor_height, + offset_bitmap)); } /**************************************************************************** @@ -1159,10 +1502,7 @@ redisplay_clear_region (Lisp_Object locale, face_index findex, int x, int y, d = XDEVICE (f->device); /* if we have subwindows in the region we have to unmap them */ - if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) - { - redisplay_unmap_subwindows (f, x, y, width, height); - } + redisplay_unmap_subwindows_maybe (f, x, y, width, height); /* #### This isn't quite right for when this function is called from the toolbar code. */ @@ -1228,6 +1568,224 @@ redisplay_clear_region (Lisp_Object locale, face_index findex, int x, int y, (locale, d, f, findex, x, y, width, height, fcolor, bcolor, background_pixmap)); } +/**************************************************************************** + redisplay_clear_clipped_region + + Clear the area in the dest display_box not covered by the src + display_glyph_area using the given face. This is a common occurance + for images shorter than the display line. Clipping can be played + around with by altering these. glyphsrc should be normalized. + ****************************************************************************/ +static void +redisplay_clear_clipped_region (Lisp_Object window, face_index findex, + struct display_box* dest, struct display_glyph_area* glyphsrc, + int fullheight_p, Lisp_Object ignored_subwindow) +{ + /* assume dest->xpos >= 0 */ + int clear_x; + struct frame* f = XFRAME (XWINDOW (window)->frame); + + if (glyphsrc->xoffset > 0) + { + clear_x = dest->xpos + glyphsrc->xoffset; + } + else + { + clear_x = dest->xpos; + } + + /* If we need the whole height cleared then just do it. */ + if (fullheight_p) + { + redisplay_clear_region (window, findex, clear_x, dest->ypos, + glyphsrc->width, dest->height); + } + else + { + int yoffset = (glyphsrc->yoffset > 0 ? glyphsrc->yoffset : 0); + + /* We need to make sure that subwindows are unmapped from the + whole area. */ + redisplay_unmap_subwindows_except_us (f, clear_x, dest->ypos, + glyphsrc->width, dest->height, + ignored_subwindow); + /* first the top box */ + if (yoffset > 0) + { + redisplay_clear_region (window, findex, clear_x, dest->ypos, + glyphsrc->width, yoffset); + + } + /* Then the bottom box */ + if (yoffset + glyphsrc->height < dest->height) + { + redisplay_clear_region (window, findex, clear_x, + dest->ypos + yoffset + glyphsrc->height, + glyphsrc->width, + dest->height - (yoffset + glyphsrc->height)); + + } + } +} + +/***************************************************************************** + redisplay_normalize_glyph_area + redisplay_normalize_display_box + + Calculate the visible box for displaying src in dest. + ****************************************************************************/ +int +redisplay_normalize_glyph_area (struct display_box* dest, + struct display_glyph_area* glyphsrc) +{ + if (dest->xpos + glyphsrc->xoffset > dest->xpos + dest->width + || + dest->ypos + glyphsrc->yoffset > dest->ypos + dest->height + || + -glyphsrc->xoffset >= glyphsrc->width + || + -glyphsrc->yoffset >= glyphsrc->height) + { + /* It's all clipped out */ + return 0; + } + + /* Horizontal offsets. This works because xoffset can be -ve as well as +ve */ + if (dest->xpos + glyphsrc->xoffset + glyphsrc->width > dest->xpos + dest->width) + { + if (glyphsrc->xoffset > 0) + glyphsrc->width = dest->width - glyphsrc->xoffset; + else + glyphsrc->width = dest->width; + } + + if (glyphsrc->xoffset < 0) + glyphsrc->width += glyphsrc->xoffset; + + /* Vertical offsets. This works because yoffset can be -ve as well as +ve */ + if (dest->ypos + glyphsrc->yoffset + glyphsrc->height > dest->ypos + dest->height) + { + if (glyphsrc->yoffset > 0) + glyphsrc->height = dest->height - glyphsrc->yoffset; + else + glyphsrc->height = dest->height; + } + + if (glyphsrc->yoffset < 0) + glyphsrc->height += glyphsrc->yoffset; + + return 1; +} + +static void +redisplay_normalize_display_box (struct display_box* dest, + struct display_glyph_area* glyphsrc) +{ + /* Adjust the destination area. At the end of this the destination + area will exactly enclose the glyph area. The only remaining + adjustment will be offsets into the glyph area. */ + + /* Horizontal adjustment. */ + if (glyphsrc->xoffset > 0) + { + dest->xpos += glyphsrc->xoffset; + dest->width -= glyphsrc->xoffset; + glyphsrc->xoffset = 0; + } + else + glyphsrc->xoffset = -glyphsrc->xoffset; + + if (glyphsrc->width < dest->width) + dest->width = glyphsrc->width; + + /* Vertical adjustment. */ + if (glyphsrc->yoffset > 0) + { + dest->ypos += glyphsrc->yoffset; + dest->height -= glyphsrc->yoffset; + glyphsrc->yoffset = 0; + } + else + glyphsrc->yoffset = -glyphsrc->yoffset; + + if (glyphsrc->height < dest->height) + dest->height = glyphsrc->height; +} + +/***************************************************************************** + redisplay_display_boxes_in_window_p + + Determine whether the require display_glyph_area is completely inside + the window. 0 means the display_box is not in the window. 1 means the + display_box and the display_glyph_area are in the window. -1 means + the display_box is in the window but the display_glyph_area is not. + ****************************************************************************/ +static int +redisplay_display_boxes_in_window_p (struct window* w, + struct display_box* db, + struct display_glyph_area* dga) +{ + int left = WINDOW_TEXT_LEFT (w); + int right = WINDOW_TEXT_RIGHT (w); + int top = WINDOW_TEXT_TOP (w); + int bottom = WINDOW_TEXT_BOTTOM (w); + + if (db->xpos < left || db->ypos < top + || db->xpos + db->width > right + || db->ypos + db->height > bottom) + /* We are not displaying in a window at all */ + return 0; + + if (db->xpos + dga->xoffset >= left + && + db->ypos + dga->yoffset >= top + && + db->xpos + dga->xoffset + dga->width <= right + && + db->ypos + dga->yoffset + dga->height <= bottom) + return 1; + + return -1; +} + +/***************************************************************************** + redisplay_calculate_display_boxes + + Convert from rune/display_line co-ordinates to display_box + co-ordinates. + ****************************************************************************/ +int +redisplay_calculate_display_boxes (struct display_line *dl, int xpos, + int xoffset, int start_pixpos, int width, + struct display_box* dest, + struct display_glyph_area* src) +{ + dest->xpos = xpos; + dest->ypos = DISPLAY_LINE_YPOS (dl); + dest->width = width; + dest->height = DISPLAY_LINE_HEIGHT (dl); + + src->xoffset = -xoffset; + src->yoffset = -dl->top_clip; + src->width = 0; + src->height = 0; + + if (start_pixpos >=0 && start_pixpos > xpos) + { + /* Oops, we're asking for a start outside of the displayable + area. */ + if (start_pixpos > xpos + width) + return 0; + dest->xpos = start_pixpos; + dest->width -= (start_pixpos - xpos); + /* Offsets are -ve when we want to clip pixels off the displayed + glyph. */ + src->xoffset -= (start_pixpos - xpos); + } + + return 1; +} + /***************************************************************************** redisplay_clear_top_of_window @@ -1283,7 +1841,6 @@ redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2) if (height) { - struct frame *f = XFRAME (w->frame); Lisp_Object window; int bflag = 0 ; /* (window_needs_vertical_divider (w) ? 0 : 1);*/ layout_bounds bounds; @@ -1332,7 +1889,6 @@ redisplay_clear_bottom_of_window (struct window *w, display_line_dynarr *ddla, int min_start, int max_end) { struct frame *f = XFRAME (w->frame); - struct device *d = XDEVICE (f->device); int ypos1, ypos2; int ddla_len = Dynarr_length (ddla); @@ -1684,6 +2240,7 @@ bevel_modeline (struct window *w, struct display_line *dl) struct device *d = XDEVICE (f->device); int x, y, width, height; int shadow_thickness = MODELINE_SHADOW_THICKNESS (w); + enum edge_style style; x = WINDOW_MODELINE_LEFT (w); width = WINDOW_MODELINE_RIGHT (w) - x; @@ -1691,8 +2248,15 @@ bevel_modeline (struct window *w, struct display_line *dl) height = dl->ascent + dl->descent + 2 * shadow_thickness; if (XINT (w->modeline_shadow_thickness) < 0) - shadow_thickness = - shadow_thickness; + { + style = EDGE_BEVEL_IN; + } + else + { + style = EDGE_BEVEL_OUT; + } MAYBE_DEVMETH (d, bevel_area, - (w, MODELINE_INDEX, x, y, width, height, shadow_thickness)); + (w, MODELINE_INDEX, x, y, width, height, shadow_thickness, + EDGE_ALL, style)); } diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 0f051fb..bf89187 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -392,6 +392,7 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, case IMAGE_COLOR_PIXMAP: case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + case IMAGE_LAYOUT: /* just do nothing here */ break; @@ -464,7 +465,7 @@ tty_output_vertical_divider (struct window *w, int clear) static void tty_clear_region (Lisp_Object window, struct device* d, struct frame * f, face_index findex, int x, int y, - int width, int height, Lisp_Object fcolor, Lisp_Object bcolor, + int width, int height, Lisp_Object fcolor, Lisp_Object bcolor, Lisp_Object background_pixmap) { struct console *c = XCONSOLE (FRAME_CONSOLE (f)); @@ -949,11 +950,11 @@ tty_redisplay_shutdown (struct console *c) { Lisp_Object dev = CONSOLE_SELECTED_DEVICE (c); - if (!GC_NILP (dev)) + if (!NILP (dev)) { Lisp_Object frm = DEVICE_SELECTED_FRAME (XDEVICE (dev)); - if (!GC_NILP (frm)) + if (!NILP (frm)) { struct frame *f = XFRAME (frm); @@ -1304,7 +1305,8 @@ init_tty_for_redisplay (struct device *d, char *terminal_type) struct fkey_table { - CONST char *cap, *name; + CONST char *cap; + CONST char *name; }; /* Termcap capability names that correspond directly to X keysyms. @@ -1444,22 +1446,18 @@ term_get_fkeys_1 (Lisp_Object function_key_map) describes F10, whereas othertimes it describes F0 and "k;" describes F10. We will attempt to politely accommodate both systems by testing for "k;", and if it is present, assuming that "k0" denotes F0, otherwise F10. - */ + */ { - char *k_semi = tgetstr ("k;", address); - char *k0 = tgetstr ("k0", address); - CONST char *k0_name = "f10"; + CONST char *k_semi = tgetstr ("k;", address); + CONST char *k0 = tgetstr ("k0", address); if (k_semi) - { - Fdefine_key (function_key_map, build_ext_string (k_semi, FORMAT_BINARY), - vector1 (intern ("f10"))); - k0_name = "f0"; - } + Fdefine_key (function_key_map, build_ext_string (k_semi, FORMAT_BINARY), + vector1 (intern ("f10"))); if (k0) Fdefine_key (function_key_map, build_ext_string (k0, FORMAT_BINARY), - vector1 (intern (k0_name))); + vector1 (intern (k_semi ? "f0" : "f10"))); } /* Set up cookies for numbered function keys above f10. */ @@ -1487,42 +1485,40 @@ term_get_fkeys_1 (Lisp_Object function_key_map) } } } - } + } /* * Various mappings to try and get a better fit. */ - { -#define CONDITIONAL_REASSIGN(cap1, cap2, sym) \ - if (!tgetstr (cap1, address)) \ - { \ - char *sequence = tgetstr (cap2, address); \ - if (sequence) \ - Fdefine_key (function_key_map, \ - build_ext_string (sequence, FORMAT_BINARY), \ - vector1 (intern (sym))); \ - } +#define CONDITIONAL_REASSIGN(cap1, cap2, keyname) \ + if (!tgetstr (cap1, address)) \ + { \ + char *sequence = tgetstr (cap2, address); \ + if (sequence) \ + Fdefine_key (function_key_map, \ + build_ext_string (sequence, FORMAT_BINARY), \ + vector1 (intern (keyname))); \ + } - /* if there's no key_next keycap, map key_npage to `next' keysym */ - CONDITIONAL_REASSIGN ("%5", "kN", "next"); - /* if there's no key_prev keycap, map key_ppage to `previous' keysym */ - CONDITIONAL_REASSIGN ("%8", "kP", "prior"); - /* if there's no key_dc keycap, map key_ic to `insert' keysym */ - CONDITIONAL_REASSIGN ("kD", "kI", "insert"); - - /* IBM has their own non-standard dialect of terminfo. - If the standard name isn't found, try the IBM name. */ - CONDITIONAL_REASSIGN ("kB", "KO", "backtab"); - CONDITIONAL_REASSIGN ("@4", "kJ", "execute"); /* actually "action" */ - CONDITIONAL_REASSIGN ("@4", "kc", "execute"); /* actually "command" */ - CONDITIONAL_REASSIGN ("%7", "ki", "menu"); - CONDITIONAL_REASSIGN ("@7", "kw", "end"); - CONDITIONAL_REASSIGN ("F1", "k<", "f11"); - CONDITIONAL_REASSIGN ("F2", "k>", "f12"); - CONDITIONAL_REASSIGN ("%1", "kq", "help"); - CONDITIONAL_REASSIGN ("*6", "kU", "select"); + /* if there's no key_next keycap, map key_npage to `next' keysym */ + CONDITIONAL_REASSIGN ("%5", "kN", "next"); + /* if there's no key_prev keycap, map key_ppage to `previous' keysym */ + CONDITIONAL_REASSIGN ("%8", "kP", "prior"); + /* if there's no key_dc keycap, map key_ic to `insert' keysym */ + CONDITIONAL_REASSIGN ("kD", "kI", "insert"); + + /* IBM has their own non-standard dialect of terminfo. + If the standard name isn't found, try the IBM name. */ + CONDITIONAL_REASSIGN ("kB", "KO", "backtab"); + CONDITIONAL_REASSIGN ("@4", "kJ", "execute"); /* actually "action" */ + CONDITIONAL_REASSIGN ("@4", "kc", "execute"); /* actually "command" */ + CONDITIONAL_REASSIGN ("%7", "ki", "menu"); + CONDITIONAL_REASSIGN ("@7", "kw", "end"); + CONDITIONAL_REASSIGN ("F1", "k<", "f11"); + CONDITIONAL_REASSIGN ("F2", "k>", "f12"); + CONDITIONAL_REASSIGN ("%1", "kq", "help"); + CONDITIONAL_REASSIGN ("*6", "kU", "select"); #undef CONDITIONAL_REASSIGN - } return Qnil; } diff --git a/src/redisplay-x.c b/src/redisplay-x.c index cf1766e..d599c91 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -54,17 +54,10 @@ Boston, MA 02111-1307, USA. */ #endif /* Number of pixels below each line. */ -/* #### implement me */ -int x_interline_space; +int x_interline_space; /* #### implement me */ #define EOL_CURSOR_WIDTH 5 -static void x_output_pixmap (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, - int xoffset, - int start_pixpos, int width, face_index findex, - int cursor_start, int cursor_width, - int cursor_height); static void x_output_vertical_divider (struct window *w, int clear); static void x_output_blank (struct window *w, struct display_line *dl, struct rune *rb, int start_pixpos, @@ -79,7 +72,6 @@ static void x_output_eol_cursor (struct window *w, struct display_line *dl, int xpos, face_index findex); static void x_clear_frame (struct frame *f); static void x_clear_frame_windows (Lisp_Object window); -void bevel_modeline (struct window *w, struct display_line *dl); /* Note: We do not use the Xmb*() functions and XFontSets. @@ -408,10 +400,10 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, else if (rb->object.chr.ch == '\n') { /* Clear in case a cursor was formerly here. */ - int height = dl->ascent + dl->descent - dl->clip; - - redisplay_clear_region (window, findex, xpos, dl->ypos - dl->ascent, - rb->width, height); + redisplay_clear_region (window, findex, xpos, + DISPLAY_LINE_YPOS (dl), + rb->width, + DISPLAY_LINE_HEIGHT (dl)); elt++; } } @@ -445,6 +437,11 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, else if (rb->type == RUNE_DGLYPH) { Lisp_Object instance; + struct display_box dbox; + struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, + start_pixpos, rb->width, + &dbox, &dga); XSETWINDOW (window, w); instance = glyph_image_instance (rb->object.dglyph.glyph, @@ -475,26 +472,29 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - x_output_pixmap (w, dl, instance, xpos, - rb->object.dglyph.xoffset, start_pixpos, - rb->width, findex, cursor_start, - cursor_width, cursor_height); + redisplay_output_pixmap (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height, 0); break; - case IMAGE_POINTER: - abort (); - case IMAGE_WIDGET: case IMAGE_SUBWINDOW: - redisplay_output_subwindow (w, dl, instance, xpos, - rb->object.dglyph.xoffset, start_pixpos, - rb->width, findex, cursor_start, - cursor_width, cursor_height); + redisplay_output_subwindow (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + break; + + case IMAGE_LAYOUT: + redisplay_output_layout (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + break; case IMAGE_NOTHING: /* nothing is as nothing does */ break; + case IMAGE_POINTER: default: abort (); } @@ -531,7 +531,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, static void x_bevel_area (struct window *w, face_index findex, int x, int y, int width, int height, - int shadow_thickness) + int shadow_thickness, int edges, enum edge_style style) { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); @@ -549,6 +549,7 @@ x_bevel_area (struct window *w, face_index findex, int flip_gcs = 0; unsigned long mask; + assert (shadow_thickness >=0); memset (&gcv, ~0, sizeof (XGCValues)); tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); @@ -618,24 +619,33 @@ x_bevel_area (struct window *w, face_index findex, gcv.foreground = background_pixel; background_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask); - /* possibly revert the GC's in case the shadow thickness is < 0. - This will give a depressed look to the divider */ - if (shadow_thickness < 0) + /* possibly revert the GC's This will give a depressed look to the + divider */ + if (style == EDGE_ETCHED_IN || style == EDGE_BEVEL_IN) { GC temp; temp = top_shadow_gc; top_shadow_gc = bottom_shadow_gc; bottom_shadow_gc = temp; - - /* better avoid a Bad Address XLib error ;-) */ - shadow_thickness = - shadow_thickness; } + if (style == EDGE_ETCHED_IN || style == EDGE_ETCHED_OUT) + shadow_thickness /= 2; + /* Draw the shadows around the divider line */ x_output_shadows (f, x, y, width, height, top_shadow_gc, bottom_shadow_gc, - background_gc, shadow_thickness); + background_gc, shadow_thickness, edges); + + if (style == EDGE_ETCHED_IN || style == EDGE_ETCHED_OUT) + { + /* Draw the shadows around the divider line */ + x_output_shadows (f, x + shadow_thickness, y + shadow_thickness, + width - 2*shadow_thickness, height - 2*shadow_thickness, + bottom_shadow_gc, top_shadow_gc, + background_gc, shadow_thickness, edges); + } } /***************************************************************************** @@ -803,7 +813,7 @@ x_output_string (struct window *w, struct display_line *dl, if (width < 0) width = x_text_width (f, cachel, Dynarr_atp (buf, 0), Dynarr_length (buf)); - height = dl->ascent + dl->descent - dl->clip; + height = DISPLAY_LINE_HEIGHT (dl); /* Regularize the variables passed in. */ @@ -816,6 +826,10 @@ x_output_string (struct window *w, struct display_line *dl, xpos -= xoffset; + /* make sure the area we are about to display is subwindow free. */ + redisplay_unmap_subwindows_maybe (f, clip_start, DISPLAY_LINE_YPOS (dl), + clip_end - clip_start, DISPLAY_LINE_HEIGHT (dl)); + nruns = separate_textual_runs (text_storage, runs, Dynarr_atp (buf, 0), Dynarr_length (buf)); @@ -860,7 +874,7 @@ x_output_string (struct window *w, struct display_line *dl, if (bgc) XFillRectangle (dpy, x_win, bgc, clip_start, - dl->ypos - dl->ascent, clip_end - clip_start, + DISPLAY_LINE_YPOS (dl), clip_end - clip_start, height); for (i = 0; i < nruns; i++) @@ -881,7 +895,7 @@ x_output_string (struct window *w, struct display_line *dl, the given font. It is possible that a font is being displayed on a line taller than it is, so this would cause us to fail to clear some areas. */ - if ((int) fi->height < (int) (height + dl->clip)) + if ((int) fi->height < (int) (height + dl->clip + dl->top_clip)) { int clear_start = max (xpos, clip_start); int clear_end = min (xpos + this_width, clip_end); @@ -892,8 +906,8 @@ x_output_string (struct window *w, struct display_line *dl, ypos1_string = dl->ypos - fi->ascent; ypos2_string = dl->ypos + fi->descent; - ypos1_line = dl->ypos - dl->ascent; - ypos2_line = dl->ypos + dl->descent - dl->clip; + ypos1_line = DISPLAY_LINE_YPOS (dl); + ypos2_line = ypos1_line + DISPLAY_LINE_HEIGHT (dl); /* Make sure we don't clear below the real bottom of the line. */ @@ -919,7 +933,7 @@ x_output_string (struct window *w, struct display_line *dl, else { redisplay_clear_region (window, findex, clear_start, - dl->ypos - dl->ascent, clear_end - clear_start, + DISPLAY_LINE_YPOS (dl), clear_end - clear_start, height); } } @@ -952,7 +966,7 @@ x_output_string (struct window *w, struct display_line *dl, clip_box[0].width = clip_end - clip_start; clip_box[0].height = height; - XSetClipRectangles (dpy, gc, clip_start, dl->ypos - dl->ascent, + XSetClipRectangles (dpy, gc, clip_start, DISPLAY_LINE_YPOS (dl), clip_box, 1, Unsorted); } @@ -1052,7 +1066,7 @@ x_output_string (struct window *w, struct display_line *dl, clip_box[0].width = cursor_width; clip_box[0].height = height; - XSetClipRectangles (dpy, cgc, cursor_start, dl->ypos - dl->ascent, + XSetClipRectangles (dpy, cgc, cursor_start, DISPLAY_LINE_YPOS (dl), clip_box, 1, Unsorted); if (runs[i].dimension == 1) @@ -1112,12 +1126,12 @@ x_output_string (struct window *w, struct display_line *dl, tmp_y = dl->ypos - bogusly_obtained_ascent_value; tmp_height = cursor_height; - if (tmp_y + tmp_height > (int) (dl->ypos - dl->ascent + height)) + if (tmp_y + tmp_height > (int) (DISPLAY_LINE_YPOS(dl) + height)) { - tmp_y = dl->ypos - dl->ascent + height - tmp_height; - if (tmp_y < (int) (dl->ypos - dl->ascent)) - tmp_y = dl->ypos - dl->ascent; - tmp_height = dl->ypos - dl->ascent + height - tmp_y; + tmp_y = DISPLAY_LINE_YPOS (dl) + height - tmp_height; + if (tmp_y < (int) DISPLAY_LINE_YPOS (dl)) + tmp_y = DISPLAY_LINE_YPOS (dl); + tmp_height = DISPLAY_LINE_YPOS (dl) + height - tmp_y; } if (need_clipping) @@ -1153,9 +1167,9 @@ x_output_string (struct window *w, struct display_line *dl, void x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x, - int y, int clip_x, int clip_y, int clip_width, - int clip_height, int width, int height, int pixmap_offset, - unsigned long fg, unsigned long bg, GC override_gc) + int y, int xoffset, int yoffset, + int width, int height, unsigned long fg, unsigned long bg, + GC override_gc) { struct device *d = XDEVICE (f->device); Display *dpy = DEVICE_X_DISPLAY (d); @@ -1164,7 +1178,6 @@ x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x, GC gc; XGCValues gcv; unsigned long pixmap_mask; - int need_clipping = (clip_x || clip_y); if (!override_gc) { @@ -1178,17 +1191,16 @@ x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x, { gcv.function = GXcopy; gcv.clip_mask = IMAGE_INSTANCE_X_MASK (p); - gcv.clip_x_origin = x; - gcv.clip_y_origin = y - pixmap_offset; + gcv.clip_x_origin = x - xoffset; + gcv.clip_y_origin = y - yoffset; pixmap_mask |= (GCFunction | GCClipMask | GCClipXOrigin | GCClipYOrigin); - /* Can't set a clip rectangle below because we already have a mask. - We could conceivably create a new clipmask by zeroing out - everything outside the clip region. Is it worth it? + /* Can't set a clip rectangle because we already have a mask. Is it possible to get an equivalent effect by changing the args to XCopyArea below rather than messing with a clip box? - - dkindred@cs.cmu.edu */ - need_clipping = 0; + - dkindred@cs.cmu.edu + Yes. We don't clip at all now - andy@xemacs.org + */ } gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, pixmap_mask); @@ -1199,19 +1211,6 @@ x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x, /* override_gc might have a mask already--we don't want to nuke it. Maybe we can insist that override_gc have no mask, or use one of the suggestions above. */ - need_clipping = 0; - } - - if (need_clipping) - { - XRectangle clip_box[1]; - - clip_box[0].x = clip_x; - clip_box[0].y = clip_y; - clip_box[0].width = clip_width; - clip_box[0].height = clip_height; - - XSetClipRectangles (dpy, gc, x, y, clip_box, 1, Unsorted); } /* depth of 0 means it's a bitmap, not a pixmap, and we should use @@ -1220,126 +1219,33 @@ x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x, pixel values, instead of symbolic of fg/bg. */ if (IMAGE_INSTANCE_PIXMAP_DEPTH (p) > 0) { - XCopyArea (dpy, IMAGE_INSTANCE_X_PIXMAP (p), x_win, gc, 0, - pixmap_offset, width, + XCopyArea (dpy, + IMAGE_INSTANCE_X_PIXMAP_SLICE + (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc, xoffset, + yoffset, width, height, x, y); } else { - XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP (p), x_win, gc, 0, - (pixmap_offset < 0 - ? 0 - : pixmap_offset), - width, height, x, - (pixmap_offset < 0 - ? y - pixmap_offset - : y), - 1L); - } - - if (need_clipping) - { - XSetClipMask (dpy, gc, None); - XSetClipOrigin (dpy, gc, 0, 0); + XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE + (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc, + xoffset, yoffset, width, height, x, y, 1L); } } static void -x_output_pixmap (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, int xoffset, - int start_pixpos, int width, face_index findex, - int cursor_start, int cursor_width, int cursor_height) +x_output_pixmap (struct window *w, Lisp_Object image_instance, + struct display_box *db, struct display_glyph_area *dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height, int bg_pixmap) { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); - Lisp_Object window; Display *dpy = DEVICE_X_DISPLAY (d); Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); - int lheight = dl->ascent + dl->descent - dl->clip; - int pheight = ((int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > lheight ? lheight : - IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); - int pwidth = min (width + xoffset, (int) IMAGE_INSTANCE_PIXMAP_WIDTH (p)); - int clip_x, clip_y, clip_width, clip_height; - - /* The pixmap_offset is used to center the pixmap on lines which are - shorter than it is. This results in odd effects when scrolling - pixmaps off of the bottom. Let's try not using it. */ -#if 0 - int pixmap_offset = (int) (IMAGE_INSTANCE_PIXMAP_HEIGHT (p) - lheight) / 2; -#else - int pixmap_offset = 0; -#endif - - XSETWINDOW (window, w); - - if ((start_pixpos >= 0 && start_pixpos > xpos) || xoffset) - { - if (start_pixpos > xpos && start_pixpos > xpos + width) - return; - - clip_x = xoffset; - clip_width = width; - if (start_pixpos > xpos) - { - clip_x += (start_pixpos - xpos); - clip_width -= (start_pixpos - xpos); - } - } - else - { - clip_x = 0; - clip_width = 0; - } - - /* Place markers for possible future functionality (clipping the top - half instead of the bottom half; think pixel scrolling). */ - clip_y = 0; - clip_height = pheight; - - /* Clear the area the pixmap is going into. The pixmap itself will - always take care of the full width. We don't want to clear where - it is going to go in order to avoid flicker. So, all we have to - take care of is any area above or below the pixmap. */ - /* #### We take a shortcut for now. We know that since we have - pixmap_offset hardwired to 0 that the pixmap is against the top - edge so all we have to worry about is below it. */ - /* #### Unless the pixmap has a mask in which case we have to clear - the whole damn thing since we can't yet clear just the area not - included in the mask. */ - if (((int) (dl->ypos - dl->ascent + pheight) < - (int) (dl->ypos + dl->descent - dl->clip)) - || IMAGE_INSTANCE_X_MASK (p)) - { - int clear_x, clear_y, clear_width, clear_height; - - if (IMAGE_INSTANCE_X_MASK (p)) - { - clear_y = dl->ypos - dl->ascent; - clear_height = lheight; - } - else - { - clear_y = dl->ypos - dl->ascent + pheight; - clear_height = lheight - pheight; - } - - if (start_pixpos >= 0 && start_pixpos > xpos) - { - clear_x = start_pixpos; - clear_width = xpos + width - start_pixpos; - } - else - { - clear_x = xpos; - clear_width = width; - } - - redisplay_clear_region (window, findex, clear_x, clear_y, - clear_width, clear_height); - } - + /* Output the pixmap. */ { Lisp_Object tmp_pixel; @@ -1350,20 +1256,19 @@ x_output_pixmap (struct window *w, struct display_line *dl, tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); tmp_bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); - x_output_x_pixmap (f, p, xpos - xoffset, dl->ypos - dl->ascent, clip_x, - clip_y, clip_width, clip_height, - pwidth, pheight, pixmap_offset, + x_output_x_pixmap (f, p, db->xpos, db->ypos, + dga->xoffset, dga->yoffset, + dga->width, dga->height, tmp_fcolor.pixel, tmp_bcolor.pixel, 0); } /* Draw a cursor over top of the pixmap. */ - if (cursor_width && cursor_height && (cursor_start >= xpos) + if (cursor_width && cursor_height && (cursor_start >= db->xpos) && !NILP (w->text_cursor_visible_p) - && (cursor_start < xpos + pwidth)) + && (cursor_start < db->xpos + dga->width)) { GC gc; int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); - int y = dl->ypos - dl->ascent; struct face_cachel *cursor_cachel = WINDOW_FACE_CACHEL (w, get_builtin_face_cache_index @@ -1371,17 +1276,17 @@ x_output_pixmap (struct window *w, struct display_line *dl, gc = x_get_gc (d, Qnil, cursor_cachel->background, Qnil, Qnil, Qnil); - if (cursor_width > xpos + pwidth - cursor_start) - cursor_width = xpos + pwidth - cursor_start; + if (cursor_width > db->xpos + dga->width - cursor_start) + cursor_width = db->xpos + dga->width - cursor_start; if (focus) { - XFillRectangle (dpy, x_win, gc, cursor_start, y, cursor_width, + XFillRectangle (dpy, x_win, gc, cursor_start, db->ypos, cursor_width, cursor_height); } else { - XDrawRectangle (dpy, x_win, gc, cursor_start, y, cursor_width, + XDrawRectangle (dpy, x_win, gc, cursor_start, db->ypos, cursor_width, cursor_height); } } @@ -1404,6 +1309,7 @@ x_output_vertical_divider (struct window *w, int clear) XColor tmp_color; XGCValues gcv; GC background_gc; + enum edge_style style; unsigned long mask; int x, y1, y2, width, shadow_thickness, spacing, line_width; @@ -1439,10 +1345,20 @@ x_output_vertical_divider (struct window *w, int clear) x + spacing + shadow_thickness, y1, line_width, y2 - y1); + if (shadow_thickness < 0) + { + shadow_thickness = -shadow_thickness; + style = EDGE_BEVEL_IN; + } + else + { + style = EDGE_BEVEL_OUT; + } + /* Draw the shadows around the divider line */ x_bevel_area (w, div_face, x + spacing, y1, width - 2 * spacing, y2 - y1, - shadow_thickness); + shadow_thickness, EDGE_ALL, style); } /***************************************************************************** @@ -1471,9 +1387,12 @@ x_output_blank (struct window *w, struct display_line *dl, struct rune *rb, buffer); int x = rb->xpos; - int y = dl->ypos - dl->ascent; + int y = DISPLAY_LINE_YPOS (dl); int width = rb->width; - int height = dl->ascent + dl->descent - dl->clip; + int height = DISPLAY_LINE_HEIGHT (dl); + + /* Unmap all subwindows in the area we are going to blank. */ + redisplay_unmap_subwindows_maybe (f, x, y, width, height); if (start_pixpos > x) { @@ -1567,10 +1486,10 @@ x_output_hline (struct window *w, struct display_line *dl, struct rune *rb) int x = rb->xpos; int width = rb->width; - int height = dl->ascent + dl->descent - dl->clip; + int height = DISPLAY_LINE_HEIGHT (dl); int ypos1, ypos2, ypos3, ypos4; - ypos1 = dl->ypos - dl->ascent; + ypos1 = DISPLAY_LINE_YPOS (dl); ypos2 = ypos1 + rb->object.hline.yoffset; ypos3 = ypos2 + rb->object.hline.thickness; ypos4 = dl->ypos + dl->descent - dl->clip; @@ -1609,7 +1528,7 @@ x_output_hline (struct window *w, struct display_line *dl, struct rune *rb) void x_output_shadows (struct frame *f, int x, int y, int width, int height, GC top_shadow_gc, GC bottom_shadow_gc, GC background_gc, - int shadow_thickness) + int shadow_thickness, int edges) { struct device *d = XDEVICE (f->device); @@ -1631,28 +1550,41 @@ x_output_shadows (struct frame *f, int x, int y, int width, int height, for (elt = 0; elt < shadow_thickness; elt++) { int seg1 = elt; - int seg2 = elt + shadow_thickness; - - top_shadow[seg1].x1 = x; - top_shadow[seg1].x2 = x + width - elt - 1; - top_shadow[seg1].y1 = top_shadow[seg1].y2 = y + elt; - - top_shadow[seg2].x1 = top_shadow[seg2].x2 = x + elt; - top_shadow[seg2].y1 = y + shadow_thickness; - top_shadow[seg2].y2 = y + height - elt - 1; + int seg2 = (edges & EDGE_TOP) ? elt + shadow_thickness : elt; + int bot_seg2 = (edges & EDGE_BOTTOM) ? elt + shadow_thickness : elt; - bottom_shadow[seg1].x1 = x + elt + 1; - bottom_shadow[seg1].x2 = x + width - 1; - bottom_shadow[seg1].y1 = bottom_shadow[seg1].y2 = y + height - elt - 1; - - bottom_shadow[seg2].x1 = bottom_shadow[seg2].x2 = x + width - elt - 1; - bottom_shadow[seg2].y1 = y + elt + 1; - bottom_shadow[seg2].y2 = y + height - shadow_thickness; + if (edges & EDGE_TOP) + { + top_shadow[seg1].x1 = x + elt; + top_shadow[seg1].x2 = x + width - elt - 1; + top_shadow[seg1].y1 = top_shadow[seg1].y2 = y + elt; + } + if (edges & EDGE_LEFT) + { + top_shadow[seg2].x1 = top_shadow[seg2].x2 = x + elt; + top_shadow[seg2].y1 = y + elt; + top_shadow[seg2].y2 = y + height - elt - 1; + } + if (edges & EDGE_BOTTOM) + { + bottom_shadow[seg1].x1 = x + elt; + bottom_shadow[seg1].x2 = x + width - elt - 1; + bottom_shadow[seg1].y1 = bottom_shadow[seg1].y2 = y + height - elt - 1; + } + if (edges & EDGE_RIGHT) + { + bottom_shadow[bot_seg2].x1 = bottom_shadow[bot_seg2].x2 = x + width - elt - 1; + bottom_shadow[bot_seg2].y1 = y + elt; + bottom_shadow[bot_seg2].y2 = y + height - elt - 1; + } } - XDrawSegments (dpy, x_win, top_shadow_gc, top_shadow, shadow_thickness * 2); + XDrawSegments (dpy, x_win, top_shadow_gc, top_shadow, + ((edges & EDGE_TOP) ? shadow_thickness : 0) + + ((edges & EDGE_LEFT) ? shadow_thickness : 0)); XDrawSegments (dpy, x_win, bottom_shadow_gc, bottom_shadow, - shadow_thickness * 2); + ((edges & EDGE_BOTTOM) ? shadow_thickness : 0) + + ((edges & EDGE_RIGHT) ? shadow_thickness : 0)); } /***************************************************************************** @@ -1923,9 +1855,9 @@ x_output_eol_cursor (struct window *w, struct display_line *dl, int xpos, WINDOW_BUFFER (w)); int x = xpos; - int y = dl->ypos - dl->ascent; + int y = DISPLAY_LINE_YPOS (dl); int width = EOL_CURSOR_WIDTH; - int height = dl->ascent + dl->descent - dl->clip; + int height = DISPLAY_LINE_HEIGHT (dl); int cursor_height, cursor_y; int defheight, defascent; @@ -2153,4 +2085,6 @@ console_type_create_redisplay_x (void) CONSOLE_HAS_METHOD (x, flash); CONSOLE_HAS_METHOD (x, ring_bell); CONSOLE_HAS_METHOD (x, bevel_area); + CONSOLE_HAS_METHOD (x, output_string); + CONSOLE_HAS_METHOD (x, output_pixmap); } diff --git a/src/redisplay.c b/src/redisplay.c index 47a876a..ea20973 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -154,6 +154,10 @@ typedef struct position_redisplay_data_type (those off the left side of the screen) need to be skipped before anything is displayed. */ Bytind bi_start_col_enabled; + int start_col_xoffset; /* Number of pixels that still need to + be skipped. This is used for + horizontal scrolling of glyphs, where we want + to be able to scroll over part of the glyph. */ int hscroll_glyph_width_adjust; /* how much the width of the hscroll glyph differs from space_width (w). @@ -259,8 +263,7 @@ static prop_block_dynarr *add_glyph_rune (pos_data *data, int pos_type, int allow_cursor, struct glyph_cachel *cachel); static Bytind create_text_block (struct window *w, struct display_line *dl, - Bytind bi_start_pos, int start_col, - prop_block_dynarr **prop, + Bytind bi_start_pos, prop_block_dynarr **prop, int type); static int create_overlay_glyph_block (struct window *w, struct display_line *dl); @@ -275,9 +278,6 @@ static void free_display_line (struct display_line *dl); static void update_line_start_cache (struct window *w, Bufpos from, Bufpos to, Bufpos point, int no_regen); static int point_visible (struct window *w, Bufpos point, int type); -extern Bytind bi_find_next_emchar_in_string (struct Lisp_String* str, Emchar target, - Bytind st, EMACS_INT count); -extern int string_column_at_point (struct Lisp_String* s, Bufpos init_pos, int tab_width); /* This used to be 10 but 30 seems to give much better performance. */ #define INIT_MAX_PREEMPTS 30 @@ -302,8 +302,8 @@ display_line_dynarr *cmotion_display_lines; /* Used by generate_formatted_string. Global because they get used so much that the dynamic allocation time adds up. */ -Emchar_dynarr *formatted_string_emchar_dynarr; -struct display_line formatted_string_display_line; +static Emchar_dynarr *formatted_string_emchar_dynarr; +static struct display_line formatted_string_display_line; /* We store the extents that we need to generate in a Dynarr and then frob them all on at the end of generating the string. We do it this way rather than adding them as we generate the string because @@ -311,9 +311,9 @@ struct display_line formatted_string_display_line; (to avoid having to resize the string multiple times), and we don't want to go around adding extents to a string when the extents might stretch off the end of the string. */ -EXTENT_dynarr *formatted_string_extent_dynarr; -Bytecount_dynarr *formatted_string_extent_start_dynarr; -Bytecount_dynarr *formatted_string_extent_end_dynarr; +static EXTENT_dynarr *formatted_string_extent_dynarr; +static Bytecount_dynarr *formatted_string_extent_start_dynarr; +static Bytecount_dynarr *formatted_string_extent_end_dynarr; /* #### probably temporary */ @@ -338,7 +338,7 @@ int vertical_clip; int horizontal_clip; /* Set if currently inside update_line_start_cache. */ -int updating_line_start_cache; +static int updating_line_start_cache; /* Nonzero means reading single-character input with prompt so put cursor on minibuffer after the prompt. */ @@ -378,6 +378,11 @@ int glyphs_changed_set; int subwindows_changed; int subwindows_changed_set; +/* non-zero if any displayed subwindow is in need of updating + somewhere. */ +int subwindows_state_changed; +int subwindows_state_changed_set; + /* This variable is 1 if the icon has to be updated. It is set to 1 when `frame-icon-glyph' changes. */ int icon_changed; @@ -453,7 +458,7 @@ Lisp_Object Voverlay_arrow_position; Lisp_Object Voverlay_arrow_string; Lisp_Object Vwindow_size_change_functions; -Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; +Lisp_Object Vwindow_scroll_functions; Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; #define INHIBIT_REDISPLAY_HOOKS /* #### Until we've thought about @@ -465,7 +470,7 @@ Lisp_Object Vpre_redisplay_hook, Vpost_redisplay_hook; Lisp_Object Qpre_redisplay_hook, Qpost_redisplay_hook; #endif /* INHIBIT_REDISPLAY_HOOKS */ -int last_display_warning_tick, display_warning_tick; +static int last_display_warning_tick, display_warning_tick; Lisp_Object Qdisplay_warning_buffer; int inhibit_warning_display; @@ -475,6 +480,10 @@ Lisp_Object Vuse_left_overflow, Vuse_right_overflow; Lisp_Object Vtext_cursor_visible_p; int column_number_start_at_one; + +#define WINDOW_SCROLLED(w) \ +(w->hscroll > 0 || w->left_xoffset) + /***************************************************************************/ /* */ @@ -644,8 +653,8 @@ next_tab_position (struct window *w, int start_pixpos, int left_pixpos) int pix_tab_width = tab_pix_width (w); /* Adjust n_pos for any hscrolling which has happened. */ - if (w->hscroll > 1) - n_pos -= space_width (w) * (w->hscroll - 1); + if (WINDOW_SCROLLED (w)) + n_pos -= space_width (w) * (w->hscroll - 1) + w->left_xoffset; while (n_pos <= start_pixpos) n_pos += pix_tab_width; @@ -697,8 +706,7 @@ calculate_display_line_boundaries (struct window *w, int modeline) static Bufpos generate_display_line (struct window *w, struct display_line *dl, int bounds, - Bufpos start_pos, int start_col, - prop_block_dynarr **prop, + Bufpos start_pos, prop_block_dynarr **prop, int type) { Bufpos ret_bufpos; @@ -731,7 +739,7 @@ generate_display_line (struct window *w, struct display_line *dl, int bounds, /* #### urk urk urk!!! Chuck fix this shit! */ Bytind hacked_up_bytind = create_text_block (w, dl, bufpos_to_bytind (b, start_pos), - start_col, prop, type); + prop, type); if (hacked_up_bytind > BI_BUF_ZV (b)) ret_bufpos = BUF_ZV (b) + 1; else @@ -1548,7 +1556,7 @@ add_glyph_rune (pos_data *data, struct glyph_block *gb, int pos_type, if (!width) return NULL; - if (data->start_col) + if (data->start_col || data->start_col_xoffset) { prop_block_dynarr *retval; int glyph_char_width = width / space_width (w); @@ -1782,8 +1790,7 @@ add_glyph_runes (pos_data *data, int pos_type) static Bytind create_text_block (struct window *w, struct display_line *dl, - Bytind bi_start_pos, int start_col, - prop_block_dynarr **prop, + Bytind bi_start_pos, prop_block_dynarr **prop, int type) { struct frame *f = XFRAME (w->frame); @@ -1927,6 +1934,7 @@ create_text_block (struct window *w, struct display_line *dl, data.cursor_x = -1; data.start_col = w->hscroll; + data.start_col_xoffset = w->left_xoffset; data.bi_start_col_enabled = (w->hscroll ? bi_start_pos : 0); data.hscroll_glyph_width_adjust = 0; @@ -2246,6 +2254,7 @@ create_text_block (struct window *w, struct display_line *dl, data.blank_width = DEVMETH (d, eol_cursor_width, ()); data.findex = DEFAULT_INDEX; data.start_col = 0; + data.start_col_xoffset = 0; data.bi_start_col_enabled = 0; add_emchar_rune (&data); @@ -2279,7 +2288,8 @@ create_text_block (struct window *w, struct display_line *dl, int prop_width = 0; if (data.start_col > 1) - tab_start_pixpos -= (space_width (w) * (data.start_col - 1)); + tab_start_pixpos -= (space_width (w) * (data.start_col - 1)) + + data.start_col_xoffset; next_tab_start = next_tab_position (w, tab_start_pixpos, @@ -2486,6 +2496,7 @@ done: data.blank_width = DEVMETH (d, eol_cursor_width, ()); data.findex = DEFAULT_INDEX; data.start_col = 0; + data.start_col_xoffset = 0; data.bi_start_col_enabled = 0; data.max_pixpos += data.blank_width; @@ -4234,8 +4245,10 @@ create_string_text_block (struct window *w, Lisp_Object disp_string, struct frame *f = XFRAME (w->frame); /* Note that a lot of the buffer controlled stuff has been left in because you might well want to make use of it (selective display - etc), its just the buffer text that we do not use. */ - struct buffer *b = XBUFFER (w->buffer); + etc), its just the buffer text that we do not use. However, it + seems to be possible for buffer to be nil sometimes so protect + against this case. */ + struct buffer *b = BUFFERP (w->buffer) ? XBUFFER (w->buffer) : 0; struct device *d = XDEVICE (f->device); struct Lisp_String* s = XSTRING (disp_string); @@ -4246,7 +4259,7 @@ create_string_text_block (struct window *w, Lisp_Object disp_string, pos_data data; - int truncate_win = window_truncation_on (w); + int truncate_win = b ? window_truncation_on (w) : 0; int end_glyph_width = 0; /* we're going to ditch selective display for static text, its an @@ -4296,10 +4309,10 @@ create_string_text_block (struct window *w, Lisp_Object disp_string, Since more than one display table is possible, you have great flexibility in mapping ranges of characters. */ - Emchar printable_min = (CHAR_OR_CHAR_INTP (b->ctl_arrow) + Emchar printable_min = b ? (CHAR_OR_CHAR_INTP (b->ctl_arrow) ? XCHAR_OR_CHAR_INT (b->ctl_arrow) : ((EQ (b->ctl_arrow, Qt) || EQ (b->ctl_arrow, Qnil)) - ? 255 : 160)); + ? 255 : 160)) : 255; Lisp_Object face_dt, window_dt; @@ -4730,27 +4743,10 @@ done: } else if (data.bi_bufpos == bi_string_zv) { - /* We need to add a marker to the end of the line since there is no - newline character in order for the cursor to get drawn. We label - it as a newline so that it gets handled correctly by the - whitespace routines below. */ - - data.ch = '\n'; - data.blank_width = DEVMETH (d, eol_cursor_width, ()); - data.findex = default_face; - data.start_col = 0; - data.bi_start_col_enabled = 0; - - data.max_pixpos += data.blank_width; - add_emchar_rune (&data); - data.max_pixpos -= data.blank_width; - - /* #### urk! Chuck, this shit is bad news. Going around - manipulating invalid positions is guaranteed to result in - trouble sooner or later. */ - data.bi_bufpos = bi_string_zv + 1; + /* create_text_block () adds a bogus \n marker here which screws + up subwindow display. Since we never have a cursor in the + gutter we can safely ignore it. */ } - /* Calculate left whitespace boundary. */ { int elt = 0; @@ -4854,7 +4850,7 @@ done: dl->end_bufpos = buffer_or_string_bytind_to_bufpos (disp_string, data.bi_bufpos) - 1; if (truncate_win) data.dl->num_chars = - string_column_at_point (s, dl->end_bufpos, XINT (b->tab_width)); + string_column_at_point (s, dl->end_bufpos, b ? XINT (b->tab_width) : 8); else /* This doesn't correctly take into account tabs and control characters but if the window isn't being truncated then this @@ -4909,7 +4905,7 @@ generate_string_display_line (struct window *w, Lisp_Object disp_string, Bufpos ret_bufpos; /* you must set bounds before calling this. */ - + /* Reset what this line is using. */ if (dl->display_blocks) Dynarr_reset (dl->display_blocks); @@ -4970,7 +4966,7 @@ generate_displayable_area (struct window *w, Lisp_Object disp_string, if (NILP (disp_string)) return; - s_zv = XSTRING_CHAR_LENGTH (disp_string) - 1; + s_zv = XSTRING_CHAR_LENGTH (disp_string); bounds.left_out = xpos; bounds.right_out = xpos + width; @@ -5066,6 +5062,7 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) struct buffer *b = XBUFFER (w->buffer); int ypos = WINDOW_TEXT_TOP (w); int yend; /* set farther down */ + int yclip = WINDOW_TEXT_TOP_CLIP (w); prop_block_dynarr *prop; layout_bounds bounds; @@ -5140,17 +5137,37 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) dlp->bounds = bounds; dlp->offset = 0; - start_pos = generate_display_line (w, dlp, 1, start_pos, - w->hscroll, &prop, type); - dlp->ypos = ypos + dlp->ascent; + start_pos = generate_display_line (w, dlp, 1, start_pos, &prop, type); + + if (yclip > dlp->ascent) + { + /* this should never happen, but if it does just display the + whole line */ + yclip = 0; + } + + dlp->ypos = (ypos + dlp->ascent) - yclip; ypos = dlp->ypos + dlp->descent; + /* See if we've been asked to start midway through a line, for + partial display line scrolling. */ + if (yclip) + { + dlp->top_clip = yclip; + yclip = 0; + } + else + dlp->top_clip = 0; + if (ypos > yend) { int visible_height = dlp->ascent + dlp->descent; dlp->clip = (ypos - yend); - visible_height -= dlp->clip; + /* Although this seems strange we could have a single very + tall line visible for which we need to account for both + the top clip and the bottom clip. */ + visible_height -= (dlp->clip + dlp->top_clip); if (visible_height < VERTICAL_CLIP (w, 1)) { @@ -5393,7 +5410,7 @@ regenerate_window_extents_only_changed (struct window *w, Bufpos startp, return 0; new_start = generate_display_line (w, ddl, 0, ddl->bufpos + ddl->offset, - w->hscroll, &prop, DESIRED_DISP); + &prop, DESIRED_DISP); ddl->offset = 0; /* #### If there is propagated stuff the fail. We could @@ -5412,6 +5429,7 @@ regenerate_window_extents_only_changed (struct window *w, Bufpos startp, if (cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || cdl->descent != ddl->descent + || cdl->top_clip != ddl->top_clip || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1) || old_start != ddl->bufpos @@ -5555,7 +5573,7 @@ regenerate_window_incrementally (struct window *w, Bufpos startp, return 0; new_start = generate_display_line (w, ddl, 0, ddl->bufpos + ddl->offset, - w->hscroll, &prop, DESIRED_DISP); + &prop, DESIRED_DISP); ddl->offset = 0; /* If there is propagated stuff then it is pretty much a @@ -5585,6 +5603,7 @@ regenerate_window_incrementally (struct window *w, Bufpos startp, if (cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || cdl->descent != ddl->descent + || cdl->top_clip != ddl->top_clip || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1)) { @@ -5877,10 +5896,11 @@ redisplay_window (Lisp_Object window, int skip_selected) else mark_face_cachels_as_not_updated (w); - /* Ditto the glyph cache elements. */ + /* Ditto the glyph cache elements, although we do *not* invalidate + the cache purely because glyphs have changed - this is now + handled by the dirty flag.*/ if ((!echo_active && b != window_display_buffer (w)) - || !Dynarr_length (w->glyph_cachels) - || f->glyphs_changed) + || !Dynarr_length (w->glyph_cachels)) reset_glyph_cachels (w); else mark_glyph_cachels_as_not_updated (w); @@ -5966,6 +5986,7 @@ redisplay_window (Lisp_Object window, int skip_selected) && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed + && !f->subwindows_state_changed && !f->point_changed && !f->windows_structure_changed) { @@ -5987,6 +6008,7 @@ redisplay_window (Lisp_Object window, int skip_selected) && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed + && !f->subwindows_state_changed && !f->windows_structure_changed) { if (point_visible (w, pointm, CURRENT_DISP) @@ -6045,6 +6067,7 @@ redisplay_window (Lisp_Object window, int skip_selected) && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed + && !f->subwindows_state_changed && !f->windows_structure_changed && !f->frame_changed && !truncation_changed @@ -6141,6 +6164,10 @@ regeneration_done: somewhere else once tty updates occur on a per-frame basis. */ mark_face_cachels_as_clean (w); + /* The glyph cachels only get dirty if someone changed something. */ + if (glyphs_changed) + mark_glyph_cachels_as_clean (w); + w->windows_changed = 0; } @@ -6262,7 +6289,6 @@ redisplay_frame (struct frame *f, int preemption_check) being handled. */ update_frame_menubars (f); #endif /* HAVE_MENUBARS */ - update_frame_gutters (f); /* widgets are similar to menus in that they can call lisp to determine activation etc. Therefore update them before we get into redisplay. This is primarily for connected widgets such as @@ -6273,6 +6299,30 @@ redisplay_frame (struct frame *f, int preemption_check) update_frame_toolbars (f); #endif /* HAVE_TOOLBARS */ + /* If we clear the frame we have to force its contents to be redrawn. */ + if (f->clear) + f->frame_changed = 1; + + /* invalidate the subwindow cache. We use subwindows_changed here to + cause subwindows to get instantiated. This is because + subwindows_state_changed is less strict - dealing with things + like the clicked state of button. We have to do this before + redisplaying the gutters as subwindows get unmapped in the + process.*/ + if (!Dynarr_length (f->subwindow_cachels) + || f->subwindows_changed + || f->frame_changed) + { + reset_subwindow_cachels (f); + /* we have to do this so the gutter gets regenerated. */ + reset_gutter_display_lines (f); + } + else + mark_subwindow_cachels_as_not_updated (f); + /* We can now update the gutters, safe in the knowledge that our + efforts won't get undone. */ + update_frame_gutters (f); + hold_frame_size_changes (); /* ----------------- BEGIN CRITICAL REDISPLAY SECTION ---------------- */ @@ -6299,27 +6349,12 @@ redisplay_frame (struct frame *f, int preemption_check) #### If a frame-size change does occur we should probably actually be preempting redisplay. */ - /* If we clear the frame we have to force its contents to be redrawn. */ - if (f->clear) - f->frame_changed = 1; - /* Erase the frame before outputting its contents. */ if (f->clear) { DEVMETH (d, clear_frame, (f)); } - /* invalidate the subwindow cache. we are going to reuse the glyphs - flag here to cause subwindows to get instantiated. This is - because subwindows changed is less strict - dealing with things - like the clicked state of button. */ - if (!Dynarr_length (f->subwindow_cachels) - || f->glyphs_changed - || f->frame_changed) - reset_subwindow_cachels (f); - else - mark_subwindow_cachels_as_not_updated (f); - /* Do the selected window first. */ redisplay_window (FRAME_SELECTED_WINDOW (f), 0); @@ -6334,24 +6369,9 @@ redisplay_frame (struct frame *f, int preemption_check) update_frame_title (f); - f->buffers_changed = 0; - f->clip_changed = 0; - f->extents_changed = 0; - f->faces_changed = 0; - f->frame_changed = 0; - f->glyphs_changed = 0; - f->subwindows_changed = 0; - f->icon_changed = 0; - f->menubar_changed = 0; - f->modeline_changed = 0; - f->point_changed = 0; - f->toolbar_changed = 0; - f->gutter_changed = 0; - f->windows_changed = 0; - f->windows_structure_changed = 0; + CLASS_RESET_CHANGED_FLAGS (f); f->window_face_cache_reset = 0; f->echo_area_garbaged = 0; - f->clear = 0; if (!f->size_change_pending) @@ -6401,12 +6421,7 @@ redisplay_device (struct device *d) if (FRAME_REPAINT_P (f)) { - if (f->buffers_changed || f->clip_changed || f->extents_changed || - f->faces_changed || f->frame_changed || f->menubar_changed || - f->modeline_changed || f->point_changed || f->size_changed || - f->toolbar_changed || f->windows_changed || f->size_slipped || - f->windows_structure_changed || f->glyphs_changed || - f->subwindows_changed || f->gutter_changed) + if (CLASS_REDISPLAY_FLAGS_CHANGEDP(f)) { preempted = redisplay_frame (f, 0); } @@ -6436,12 +6451,7 @@ redisplay_device (struct device *d) if (FRAME_REPAINT_P (f)) { - if (f->buffers_changed || f->clip_changed || f->extents_changed || - f->faces_changed || f->frame_changed || f->menubar_changed || - f->modeline_changed || f->point_changed || f->size_changed || - f->toolbar_changed || f->windows_changed || - f->windows_structure_changed || f->gutter_changed || - f->glyphs_changed || f->subwindows_changed) + if (CLASS_REDISPLAY_FLAGS_CHANGEDP (f)) { preempted = redisplay_frame (f, 0); } @@ -6456,21 +6466,7 @@ redisplay_device (struct device *d) /* If we get here then we redisplayed all of our frames without getting preempted so mark ourselves as clean. */ - d->buffers_changed = 0; - d->clip_changed = 0; - d->extents_changed = 0; - d->faces_changed = 0; - d->frame_changed = 0; - d->glyphs_changed = 0; - d->subwindows_changed = 0; - d->icon_changed = 0; - d->menubar_changed = 0; - d->modeline_changed = 0; - d->point_changed = 0; - d->toolbar_changed = 0; - d->gutter_changed = 0; - d->windows_changed = 0; - d->windows_structure_changed = 0; + CLASS_RESET_CHANGED_FLAGS (d); if (!size_change_failed) d->size_changed = 0; @@ -6505,12 +6501,7 @@ redisplay_without_hooks (void) if (asynch_device_change_pending) handle_asynch_device_change (); - if (!buffers_changed && !clip_changed && !extents_changed && - !faces_changed && !frame_changed && !icon_changed && - !menubar_changed && !modeline_changed && !point_changed && - !size_changed && !toolbar_changed && !windows_changed && - !glyphs_changed && !subwindows_changed && - !gutter_changed && !windows_structure_changed && + if (!GLOBAL_REDISPLAY_FLAGS_CHANGEDP && !disable_preemption && preemption_count < max_preempts) goto done; @@ -6519,12 +6510,7 @@ redisplay_without_hooks (void) struct device *d = XDEVICE (XCAR (devcons)); int preempted; - if (d->buffers_changed || d->clip_changed || d->extents_changed || - d->faces_changed || d->frame_changed || d->icon_changed || - d->menubar_changed || d->modeline_changed || d->point_changed || - d->size_changed || d->toolbar_changed || d->windows_changed || - d->windows_structure_changed || d->gutter_changed || - d->glyphs_changed || d->subwindows_changed) + if (CLASS_REDISPLAY_FLAGS_CHANGEDP (d)) { preempted = redisplay_device (d); @@ -6543,20 +6529,7 @@ redisplay_without_hooks (void) preemption_count = 0; /* Mark redisplay as accurate */ - buffers_changed = 0; - clip_changed = 0; - extents_changed = 0; - frame_changed = 0; - glyphs_changed = 0; - subwindows_changed = 0; - icon_changed = 0; - menubar_changed = 0; - modeline_changed = 0; - point_changed = 0; - toolbar_changed = 0; - gutter_changed = 0; - windows_changed = 0; - windows_structure_changed = 0; + GLOBAL_RESET_CHANGED_FLAGS; RESET_CHANGED_SET_FLAGS; if (faces_changed) @@ -6787,7 +6760,6 @@ decode_mode_spec (struct window *w, Emchar spec, int type) case 'p': { Bufpos pos = marker_position (w->start[type]); - Charcount total = BUF_ZV (b) - BUF_BEGV (b); /* This had better be while the desired lines are being done. */ if (w->window_end_pos[type] <= BUF_Z (b) - BUF_ZV (b)) @@ -6804,15 +6776,20 @@ decode_mode_spec (struct window *w, Emchar spec, int type) /* This hard limit is ok since the string it will hold has a fixed maximum length of 3. But just to be safe... */ char buf[10]; + Charcount chars = pos - BUF_BEGV (b); + Charcount total = BUF_ZV (b) - BUF_BEGV (b); - total = ((pos - BUF_BEGV (b)) * 100 + total - 1) / total; + /* Avoid overflow on big buffers */ + int percent = total > LONG_MAX/200 ? + (chars + total/200) / (total / 100) : + (chars * 100 + total/2) / total; /* We can't normally display a 3-digit number, so get us a 2-digit number that is close. */ - if (total == 100) - total = 99; + if (percent == 100) + percent = 99; - sprintf (buf, "%2d%%", total); + sprintf (buf, "%d%%", percent); Dynarr_add_many (mode_spec_bufbyte_string, (Bufbyte *) buf, strlen (buf)); @@ -6827,7 +6804,6 @@ decode_mode_spec (struct window *w, Emchar spec, int type) { Bufpos toppos = marker_position (w->start[type]); Bufpos botpos = BUF_Z (b) - w->window_end_pos[type]; - Charcount total = BUF_ZV (b) - BUF_BEGV (b); /* botpos is only accurate as of the last redisplay, so we can only treat it as a hint. In particular, after erase-buffer, @@ -6847,18 +6823,23 @@ decode_mode_spec (struct window *w, Emchar spec, int type) /* This hard limit is ok since the string it will hold has a fixed maximum length of around 6. But just to be safe... */ char buf[10]; + Charcount chars = botpos - BUF_BEGV (b); + Charcount total = BUF_ZV (b) - BUF_BEGV (b); - total = ((botpos - BUF_BEGV (b)) * 100 + total - 1) / total; + /* Avoid overflow on big buffers */ + int percent = total > LONG_MAX/200 ? + (chars + total/200) / (total / 100) : + (chars * 100 + total/2) / max (total, 1); /* We can't normally display a 3-digit number, so get us a 2-digit number that is close. */ - if (total == 100) - total = 99; + if (percent == 100) + percent = 99; if (toppos <= BUF_BEGV (b)) - sprintf (buf, "Top%2d%%", total); + sprintf (buf, "Top%d%%", percent); else - sprintf (buf, "%2d%%", total); + sprintf (buf, "%d%%", percent); Dynarr_add_many (mode_spec_bufbyte_string, (Bufbyte *) buf, strlen (buf)); @@ -6961,7 +6942,7 @@ free_display_line (struct display_line *dl) /* Given an array of display lines, free them and all data structures contained within them. */ -static void +void free_display_lines (display_line_dynarr *dla) { int line; @@ -6994,7 +6975,7 @@ free_display_structs (struct window_mirror *mir) static void -mark_glyph_block_dynarr (glyph_block_dynarr *gba, void (*markobj) (Lisp_Object)) +mark_glyph_block_dynarr (glyph_block_dynarr *gba) { if (gba) { @@ -7004,15 +6985,15 @@ mark_glyph_block_dynarr (glyph_block_dynarr *gba, void (*markobj) (Lisp_Object)) for (; gb < gb_last; gb++) { if (!NILP (gb->glyph)) - markobj (gb->glyph); + mark_object (gb->glyph); if (!NILP (gb->extent)) - markobj (gb->extent); + mark_object (gb->extent); } } } static void -mark_redisplay_structs (display_line_dynarr *dla, void (*markobj) (Lisp_Object)) +mark_redisplay_structs (display_line_dynarr *dla) { display_line *dl = Dynarr_atp (dla, 0); display_line *dl_last = Dynarr_atp (dla, Dynarr_length (dla)); @@ -7034,35 +7015,35 @@ mark_redisplay_structs (display_line_dynarr *dla, void (*markobj) (Lisp_Object)) if (r->type == RUNE_DGLYPH) { if (!NILP (r->object.dglyph.glyph)) - markobj (r->object.dglyph.glyph); + mark_object (r->object.dglyph.glyph); if (!NILP (r->object.dglyph.extent)) - markobj (r->object.dglyph.extent); + mark_object (r->object.dglyph.extent); } } } - mark_glyph_block_dynarr (dl->left_glyphs, markobj); - mark_glyph_block_dynarr (dl->right_glyphs, markobj); + mark_glyph_block_dynarr (dl->left_glyphs); + mark_glyph_block_dynarr (dl->right_glyphs); } } static void -mark_window_mirror (struct window_mirror *mir, void (*markobj)(Lisp_Object)) +mark_window_mirror (struct window_mirror *mir) { - mark_redisplay_structs (mir->current_display_lines, markobj); - mark_redisplay_structs (mir->desired_display_lines, markobj); + mark_redisplay_structs (mir->current_display_lines); + mark_redisplay_structs (mir->desired_display_lines); if (mir->next) - mark_window_mirror (mir->next, markobj); + mark_window_mirror (mir->next); if (mir->hchild) - mark_window_mirror (mir->hchild, markobj); + mark_window_mirror (mir->hchild); else if (mir->vchild) - mark_window_mirror (mir->vchild, markobj); + mark_window_mirror (mir->vchild); } void -mark_redisplay (void (*markobj)(Lisp_Object)) +mark_redisplay (void) { Lisp_Object frmcons, devcons, concons; @@ -7070,7 +7051,7 @@ mark_redisplay (void (*markobj)(Lisp_Object)) { struct frame *f = XFRAME (XCAR (frmcons)); update_frame_window_mirror (f); - mark_window_mirror (f->root_mirror, markobj); + mark_window_mirror (f->root_mirror); } } @@ -7134,7 +7115,7 @@ mark_redisplay (void (*markobj)(Lisp_Object)) /* This will get used quite a bit so we don't want to be constantly allocating and freeing it. */ -line_start_cache_dynarr *internal_cache; +static line_start_cache_dynarr *internal_cache; /* Makes internal_cache represent the TYPE display structs and only the TYPE display structs. */ @@ -7428,7 +7409,7 @@ int point_would_be_visible (struct window *w, Bufpos startp, Bufpos point) { struct buffer *b = XBUFFER (w->buffer); - int pixpos = 0; + int pixpos = -WINDOW_TEXT_TOP_CLIP(w); int bottom = WINDOW_TEXT_HEIGHT (w); int start_elt; @@ -7653,7 +7634,7 @@ start_with_line_at_pixpos (struct window *w, Bufpos point, int pixpos) } cur_elt--; - if (cur_elt < 0) + while (cur_elt < 0) { Bufpos from, to; int win_char_height; @@ -7673,7 +7654,20 @@ start_with_line_at_pixpos (struct window *w, Bufpos point, int pixpos) update_line_start_cache (w, from, to, point, 0); cur_elt = point_in_line_start_cache (w, cur_pos, 2) - 1; - assert (cur_elt >= 0); + assert (cur_elt >= -1); + /* This used to be cur_elt>=0 under the assumption that if + point is in the top line and not at BUF_BEGV, then + setting the window_start to a newline before the start of + the first line will always cause scrolling. + + However in my (jv) opinion this is wrong. That new line + can be hidden in various ways: invisible extents, an + explicit window-start not at a newline character etc. + The existence of those are indeed known to create crashes + on that assert. So we have no option but to continue the + search if we found point at the top of the line_start_cache + again. */ + cur_pos = Dynarr_atp (w->line_start_cache,0)->start; } prev_pos = cur_pos; } @@ -8969,6 +8963,8 @@ redisplay_variable_changed (Lisp_Object sym, Lisp_Object *val, return 0; } +/* This is called if the built-in glyphs have their properties + changed. */ void redisplay_glyph_changed (Lisp_Object glyph, Lisp_Object property, Lisp_Object locale) @@ -9091,7 +9087,9 @@ init_redisplay (void) preemption_count = 0; max_preempts = INIT_MAX_PREEMPTS; +#ifndef PDUMP if (!initialized) +#endif { cmotion_display_lines = Dynarr_new (display_line); mode_spec_bufbyte_string = Dynarr_new (Bufbyte); @@ -9171,7 +9169,6 @@ syms_of_redisplay (void) #endif /* INHIBIT_REDISPLAY_HOOKS */ defsymbol (&Qdisplay_warning_buffer, "display-warning-buffer"); defsymbol (&Qbar_cursor, "bar-cursor"); - defsymbol (&Qwindow_scroll_functions, "window-scroll-functions"); defsymbol (&Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions"); @@ -9185,8 +9182,16 @@ syms_of_redisplay (void) } void +reinit_vars_of_redisplay (void) +{ + updating_line_start_cache = 0; +} + +void vars_of_redisplay (void) { + reinit_vars_of_redisplay (); + #if 0 staticpro (&last_arrow_position); staticpro (&last_arrow_string); @@ -9194,8 +9199,6 @@ vars_of_redisplay (void) last_arrow_string = Qnil; #endif /* 0 */ - updating_line_start_cache = 0; - /* #### Probably temporary */ DEFVAR_INT ("redisplay-cache-adjustment", &cache_adjustment /* \(Temporary) Setting this will impact the performance of the internal @@ -9280,7 +9283,7 @@ instead. Vwindow_system = Qnil; /* #### Temporary shit until window-system is eliminated. */ - DEFVAR_LISP ("initial-window-system", &Vinitial_window_system /* + DEFVAR_CONST_LISP ("initial-window-system", &Vinitial_window_system /* DON'T TOUCH */ ); Vinitial_window_system = Qnil; diff --git a/src/redisplay.h b/src/redisplay.h index 57c0004..04f2538 100644 --- a/src/redisplay.h +++ b/src/redisplay.h @@ -91,6 +91,13 @@ typedef struct but control characters have two -- a ^ and a letter -- and other non-printing characters (those displayed in octal) have four. */ +/* WARNING! In compare_runes (one of the most heavily used functions) + two runes are compared. So please be careful with changes to this + structure. See comments in compare_runes. + + #### This should really be made smaller. +*/ + typedef struct rune rune; struct rune { @@ -105,10 +112,6 @@ struct rune each of the face properties in this particular window. */ - short xpos; /* horizontal starting position in pixels */ - short width; /* pixel width of rune */ - - Bufpos bufpos; /* buffer position this rune is displaying; for the modeline, the value here is a Charcount, but who's looking? */ @@ -116,11 +119,26 @@ struct rune /* #### Chuck, what does it mean for a rune to cover a range of pos? I don't get this. */ - unsigned int cursor_type :3; /* is this rune covered by the cursor? */ - unsigned int type :3; /* type of rune object */ + /* #### This isn't used as an rvalue anywhere! + remove! */ + + + short xpos; /* horizontal starting position in pixels */ + short width; /* pixel width of rune */ + + + unsigned char cursor_type; /* is this rune covered by the cursor? */ + unsigned char type; /* type of rune object */ + /* We used to do bitfields here, but if I + (JV) count correctly that doesn't matter + for the size of the structure. All the bit + fiddling _does_ slow down redisplay by + about 10%. So don't do that */ union /* Information specific to the type of rune */ { + /* #### GLyps are are. Is it really necessary to waste 8 bytes on every + rune for that?! */ /* DGLYPH */ struct { @@ -145,8 +163,8 @@ struct rune /* HLINE */ struct { - int thickness; /* how thick to make hline */ - int yoffset; /* how far down from top of line to put top */ + short thickness; /* how thick to make hline */ + short yoffset; /* how far down from top of line to put top */ } hline; } object; /* actual rune object */ }; @@ -273,6 +291,8 @@ struct display_line pixel-row itself, I think. */ unsigned short clip; /* amount of bottom of line to clip in pixels.*/ + unsigned short top_clip; /* amount of top of line to clip + in pixels.*/ Bufpos bufpos; /* first buffer position on line */ Bufpos end_bufpos; /* last buffer position on line */ Charcount offset; /* adjustment to bufpos vals */ @@ -301,15 +321,45 @@ struct display_line }; #define DISPLAY_LINE_HEIGHT(dl) \ -(dl->ascent + dl->descent - dl->clip) +(dl->ascent + dl->descent - (dl->clip + dl->top_clip)) #define DISPLAY_LINE_YPOS(dl) \ -(dl->ypos - dl->ascent) +(dl->ypos - (dl->ascent - dl->top_clip)) +#define DISPLAY_LINE_YEND(dl) \ +((dl->ypos + dl->descent) - dl->clip) typedef struct { Dynarr_declare (display_line); } display_line_dynarr; +/* The following two structures are used to represent an area to +displayed and where to display it. Using these two structures all +combinations of clipping and position can be accommodated. */ + +/* This represents an area to be displayed into. */ +typedef struct display_box display_box; +struct display_box +{ + int xpos; /* absolute horizontal position of area */ + int ypos; /* absolute vertical position of area */ + int width, height; +}; + +/* This represents the area from a glyph to be displayed. */ +typedef struct display_glyph_area display_glyph_area; +struct display_glyph_area +{ + int xoffset; /* horizontal offset of the glyph, +ve means + display the glyph with x offset by xoffset, + -ve means display starting xoffset into the + glyph. */ + int yoffset; /* vertical offset of the glyph, +ve means + display the glyph with y offset by yoffset, + -ve means display starting xoffset into the + glyph. */ + int width, height; /* width and height of glyph to display. */ +}; + /* It could be argued that the following two structs belong in extents.h, but they're only used by redisplay and it simplifies the header files to put them here. */ @@ -345,6 +395,12 @@ struct extent_fragment unsigned int invisible_ellipses_already_displayed:1; }; +#define EDGE_TOP 1 +#define EDGE_LEFT 2 +#define EDGE_BOTTOM 4 +#define EDGE_RIGHT 8 +#define EDGE_ALL (EDGE_TOP | EDGE_LEFT | EDGE_BOTTOM | EDGE_RIGHT) + /*************************************************************************/ /* change flags */ @@ -390,6 +446,11 @@ extern int glyphs_changed_set; extern int subwindows_changed; extern int subwindows_changed_set; +/* True if any displayed subwindow is in need of updating + somewhere. */ +extern int subwindows_state_changed; +extern int subwindows_state_changed_set; + /* True if an icon is in need of updating somewhere. */ extern int icon_changed; extern int icon_changed_set; @@ -463,23 +524,102 @@ extern int windows_structure_changed; #define MARK_GUTTER_CHANGED MARK_TYPE_CHANGED (gutter) #define MARK_GLYPHS_CHANGED MARK_TYPE_CHANGED (glyphs) #define MARK_SUBWINDOWS_CHANGED MARK_TYPE_CHANGED (subwindows) +#define MARK_SUBWINDOWS_STATE_CHANGED MARK_TYPE_CHANGED (subwindows_state) + + +#define CLASS_RESET_CHANGED_FLAGS(p) do { \ + (p)->buffers_changed = 0; \ + (p)->clip_changed = 0; \ + (p)->extents_changed = 0; \ + (p)->faces_changed = 0; \ + (p)->frame_changed = 0; \ + (p)->icon_changed = 0; \ + (p)->menubar_changed = 0; \ + (p)->modeline_changed = 0; \ + (p)->point_changed = 0; \ + (p)->toolbar_changed = 0; \ + (p)->gutter_changed = 0; \ + (p)->glyphs_changed = 0; \ + (p)->subwindows_changed = 0; \ + (p)->subwindows_state_changed = 0; \ + (p)->windows_changed = 0; \ + (p)->windows_structure_changed = 0; \ +} while (0) + +#define GLOBAL_RESET_CHANGED_FLAGS do { \ + buffers_changed = 0; \ + clip_changed = 0; \ + extents_changed = 0; \ + faces_changed = 0; \ + frame_changed = 0; \ + icon_changed = 0; \ + menubar_changed = 0; \ + modeline_changed = 0; \ + point_changed = 0; \ + toolbar_changed = 0; \ + gutter_changed = 0; \ + glyphs_changed = 0; \ + subwindows_changed = 0; \ + subwindows_state_changed = 0; \ + windows_changed = 0; \ + windows_structure_changed = 0; \ +} while (0) + +#define CLASS_REDISPLAY_FLAGS_CHANGEDP(p) \ + ( (p)->buffers_changed || \ + (p)->clip_changed || \ + (p)->extents_changed || \ + (p)->faces_changed || \ + (p)->frame_changed || \ + (p)->icon_changed || \ + (p)->menubar_changed || \ + (p)->modeline_changed || \ + (p)->point_changed || \ + (p)->toolbar_changed || \ + (p)->gutter_changed || \ + (p)->glyphs_changed || \ + (p)->size_changed || \ + (p)->subwindows_changed || \ + (p)->subwindows_state_changed || \ + (p)->windows_changed || \ + (p)->windows_structure_changed ) + +#define GLOBAL_REDISPLAY_FLAGS_CHANGEDP \ + ( buffers_changed || \ + clip_changed || \ + extents_changed || \ + faces_changed || \ + frame_changed || \ + icon_changed || \ + menubar_changed || \ + modeline_changed || \ + point_changed || \ + toolbar_changed || \ + gutter_changed || \ + glyphs_changed || \ + size_changed || \ + subwindows_changed || \ + subwindows_state_changed || \ + windows_changed || \ + windows_structure_changed ) + /* Anytime a console, device or frame is added or deleted we need to reset these flags. */ -#define RESET_CHANGED_SET_FLAGS \ - do { \ - buffers_changed_set = 0; \ - clip_changed_set = 0; \ - extents_changed_set = 0; \ - icon_changed_set = 0; \ - menubar_changed_set = 0; \ - modeline_changed_set = 0; \ - point_changed_set = 0; \ - toolbar_changed_set = 0; \ - gutter_changed_set = 0; \ - glyphs_changed_set = 0; \ - subwindows_changed_set = 0; \ - } while (0) +#define RESET_CHANGED_SET_FLAGS do { \ + buffers_changed_set = 0; \ + clip_changed_set = 0; \ + extents_changed_set = 0; \ + icon_changed_set = 0; \ + menubar_changed_set = 0; \ + modeline_changed_set = 0; \ + point_changed_set = 0; \ + toolbar_changed_set = 0; \ + gutter_changed_set = 0; \ + glyphs_changed_set = 0; \ + subwindows_changed_set = 0; \ + subwindows_state_changed_set = 0; \ +} while (0) /*************************************************************************/ @@ -555,6 +695,7 @@ int line_at_center (struct window *w, int type, Bufpos start, Bufpos point); int window_half_pixpos (struct window *w); void redisplay_echo_area (void); void free_display_structs (struct window_mirror *mir); +void free_display_lines (display_line_dynarr *dla); Bufbyte *generate_formatted_string (struct window *w, Lisp_Object format_str, Lisp_Object result_str, face_index findex, int type); @@ -571,7 +712,7 @@ int pixel_to_glyph_translation (struct frame *f, int x_coord, Lisp_Object *obj1, Lisp_Object *obj2); void glyph_to_pixel_translation (struct window *w, int char_x, int char_y, int *pix_x, int *pix_y); -void mark_redisplay (void (*) (Lisp_Object)); +void mark_redisplay (void); int point_in_line_start_cache (struct window *w, Bufpos point, int min_past); int point_would_be_visible (struct window *w, Bufpos startp, @@ -599,12 +740,28 @@ int compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn, int get_next_display_block (layout_bounds bounds, display_block_dynarr *dba, int start_pos, int *next_start); -void redisplay_output_subwindow (struct window *w, struct display_line *dl, - Lisp_Object image_instance, int xpos, - int xoffset, int start_pixpos, int width, - face_index findex, int cursor_start, - int cursor_width, int cursor_height); +void redisplay_output_layout (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height); +void redisplay_output_subwindow (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height); void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, int height); +void redisplay_output_pixmap (struct window *w, + Lisp_Object image_instance, + struct display_box* db, struct display_glyph_area* dga, + face_index findex, int cursor_start, int cursor_width, + int cursor_height, int offset_bitmap); +int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, + int xoffset, int start_pixpos, int width, + struct display_box* dest, + struct display_glyph_area* src); +int redisplay_normalize_glyph_area (struct display_box* dest, + struct display_glyph_area* glyphsrc); void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2); void redisplay_clear_region (Lisp_Object window, face_index findex, int x, int y, int width, int height); @@ -614,6 +771,7 @@ void redisplay_clear_bottom_of_window (struct window *w, void redisplay_update_line (struct window *w, int first_line, int last_line, int update_values); void redisplay_output_window (struct window *w); +void bevel_modeline (struct window *w, struct display_line *dl); int redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end); void redisplay_redraw_cursor (struct frame *f, int run_begin_end_meths); diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index 65ee42d..def1faa 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -47,8 +47,12 @@ Boston, MA 02111-1307, USA. */ #include #else #ifdef SIGIO +#define CYGWIN_VERSION_DLL_MAJOR 19 +#define CYGWIN_VERSION_DLL_MINOR 0 #define CYGWIN_B19 #else +#define CYGWIN_VERSION_DLL_MAJOR 18 +#define CYGWIN_VERSION_DLL_MINOR 0 #define BROKEN_CYGWIN #endif #endif @@ -57,7 +61,7 @@ extern void cygwin32_win32_to_posix_path_list(const char*, char*); extern int cygwin32_win32_to_posix_path_list_buf_size(const char*); extern void cygwin32_posix_to_win32_path_list(const char*, char*); extern int cygwin32_posix_to_win32_path_list_buf_size(const char*); -#ifndef CYGWIN_VERSION_DLL_MAJOR +#if CYGWIN_VERSION_DLL_MAJOR < 20 struct timeval; struct timezone; struct itimerval; @@ -105,6 +109,19 @@ extern long random(); #endif #endif +#ifndef SPI_GETWHEELSCROLLLINES +#define SPI_GETWHEELSCROLLLINES 104 +#endif +#ifndef WHEEL_PAGESCROLL +#define WHEEL_PAGESCROLL (UINT_MAX) +#endif +#ifndef WHEEL_DELTA +#define WHEEL_DELTA 120 +#endif +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL 0x20A +#endif + #define PBS_SMOOTH 0x01 #ifdef HAVE_MS_WINDOWS diff --git a/src/s/mingw32.h b/src/s/mingw32.h index 4f0fd96..32783cf 100644 --- a/src/s/mingw32.h +++ b/src/s/mingw32.h @@ -54,6 +54,19 @@ Boston, MA 02111-1307, USA. */ #define SHGFI_EXETYPE 0x2000 #define NSIG 23 +#ifndef SPI_GETWHEELSCROLLLINES +#define SPI_GETWHEELSCROLLLINES 104 +#endif +#ifndef WHEEL_PAGESCROLL +#define WHEEL_PAGESCROLL (UINT_MAX) +#endif +#ifndef WHEEL_DELTA +#define WHEEL_DELTA 120 +#endif +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL 0x20A +#endif + /* translate NT world unexec stuff to our a.out definitions */ #define strnicmp strncasecmp @@ -202,10 +215,15 @@ int kill (int pid, int sig); #define popen _popen #define pclose _pclose +typedef int uid_t; +typedef int gid_t; +typedef int pid_t; +typedef int ssize_t; + /* Encapsulation of system calls */ #ifndef DONT_ENCAPSULATE #define getpid sys_getpid -int getpid (void); +pid_t getpid (void); #endif #define DONT_USE_LITOUT @@ -222,12 +240,12 @@ char *getwd (char *dir); void *sbrk (unsigned long increment); struct passwd; -struct passwd *getpwuid (int uid); +struct passwd *getpwuid (uid_t uid); struct passwd *getpwnam (const char *name); -int getuid (); -int geteuid (); -int getgid (void); -int getegid (); +uid_t getuid (void); +uid_t geteuid (void); +gid_t getgid (void); +gid_t getegid (void); #define _timeb timeb /* Stuff that gets set wrongly or otherwise */ diff --git a/src/s/windowsnt.h b/src/s/windowsnt.h index da826bc..f602178 100644 --- a/src/s/windowsnt.h +++ b/src/s/windowsnt.h @@ -125,7 +125,8 @@ typedef int pid_t; /* XEmacs file I/O for DOS text files requires FILE_CODING */ #define FILE_CODING -#define DIRECTORY_SEP '\\' +extern Lisp_Object Vdirectory_sep_char; +#define DIRECTORY_SEP ((char)XCHARVAL(Vdirectory_sep_char)) /* Define this to be the separator between devices and paths */ #define DEVICE_SEP ':' @@ -281,10 +282,15 @@ int kill (int pid, int sig); #endif /* 0 */ +typedef int uid_t; +typedef int gid_t; +typedef int pid_t; +typedef int ssize_t; + /* Encapsulation of system calls */ #ifndef DONT_ENCAPSULATE #define getpid sys_getpid -int getpid (void); +pid_t getpid (void); #endif /* Random global functions called everywhere. Implemented in nt.c */ @@ -299,12 +305,12 @@ char *getwd (char *dir); void *sbrk (unsigned long increment); struct passwd; -struct passwd *getpwuid (int uid); +struct passwd *getpwuid (uid_t uid); struct passwd *getpwnam (const char *name); -int getuid (); -int geteuid (); -int getgid (void); -int getegid (); +uid_t getuid (void); +uid_t geteuid (void); +gid_t getgid (void); +gid_t getegid (void); /* Setitimer is emulated */ #define HAVE_SETITIMER @@ -370,3 +376,10 @@ int getegid (); #pragma data_seg("xdata") #pragma bss_seg("xdata") #endif + +#ifdef HAVE_SCROLLBARS +/* Ensure the NT 4 mouse definitions in winuser.h are available */ + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif +#endif diff --git a/src/scrollbar-msw.c b/src/scrollbar-msw.c index 20eeb9c..4f5a0fd 100644 --- a/src/scrollbar-msw.c +++ b/src/scrollbar-msw.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ #include +#include #include "lisp.h" #include "console-msw.h" @@ -265,6 +266,69 @@ mswindows_handle_scrollbar_event (HWND hwnd, int code, int pos) } } +static int +can_scroll(struct scrollbar_instance* scrollbar) +{ + return scrollbar != NULL + && IsWindowVisible (SCROLLBAR_MSW_HANDLE (scrollbar)) + && IsWindowEnabled (SCROLLBAR_MSW_HANDLE (scrollbar)); +} + +int +mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta) +{ + int hasVertBar, hasHorzBar; /* Indicates prescence of scroll bars */ + unsigned wheelScrollLines = 0; /* Number of lines per wheel notch */ + + /* Find the currently selected window */ + Lisp_Object win = FRAME_SELECTED_WINDOW (XFRAME (frame)); + struct window* w = XWINDOW (win); + struct window_mirror* mirror = find_window_mirror (w); + + /* Check that there is something to scroll */ + hasVertBar = can_scroll (mirror->scrollbar_vertical_instance); + hasHorzBar = can_scroll (mirror->scrollbar_horizontal_instance); + if (!hasVertBar && !hasHorzBar) + return FALSE; + + /* No support for panning and zooming, so ignore */ + if (keys & (MK_SHIFT | MK_CONTROL)) + return FALSE; + + /* Get the number of lines per wheel delta */ + SystemParametersInfo (SPI_GETWHEELSCROLLLINES, 0, &wheelScrollLines, 0); + + /* Calculate the amount to scroll */ + if (wheelScrollLines == WHEEL_PAGESCROLL) + { + /* Scroll by a page */ + Lisp_Object function; + if (hasVertBar) + function = delta > 0 ? Qscrollbar_page_up : Qscrollbar_page_down; + else + function = delta > 0 ? Qscrollbar_page_left : Qscrollbar_page_right; + mswindows_enqueue_misc_user_event (frame, function, Fcons (win, Qnil)); + } + else /* Scroll by a number of lines */ + { + /* Calc the number of lines to scroll */ + int toScroll = MulDiv (delta, wheelScrollLines, WHEEL_DELTA); + + /* Do the scroll */ + Lisp_Object function; + if (hasVertBar) + function = delta > 0 ? Qscrollbar_line_up : Qscrollbar_line_down; + else + function = delta > 0 ? Qscrollbar_char_left : Qscrollbar_char_right; + if (toScroll < 0) + toScroll = -toScroll; + while (toScroll--) + mswindows_enqueue_misc_user_event (frame, function, win); + } + + return TRUE; +} + #ifdef MEMORY_USAGE_STATS static int diff --git a/src/scrollbar-msw.h b/src/scrollbar-msw.h index 615a546..d73a7fe 100644 --- a/src/scrollbar-msw.h +++ b/src/scrollbar-msw.h @@ -57,6 +57,7 @@ EMACS_INT mswindows_window_is_scrollbar (struct frame *f, Window win); */ void mswindows_handle_scrollbar_event (HWND hwnd, int code, int pos); +int mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta); #endif /* HAVE_MS_WINDOWS and HAVE_SCROLLBARS */ #endif /* _XEMACS_SCROLLBAR_MSW_H_ */ diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index e35084e..7034321 100644 --- a/src/scrollbar-x.c +++ b/src/scrollbar-x.c @@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" #include "console-x.h" +#include "EmacsFrame.h" #include "glyphs-x.h" #include "gui-x.h" #include "scrollbar-x.h" @@ -672,19 +673,6 @@ x_scrollbar_pointer_changed_in_window (struct window *w) 0, (Window) NULL); } -/* Called directly from x_any_window_to_frame in frame-x.c */ -EMACS_INT -x_window_is_scrollbar (struct frame *f, Window win) -{ - if (!FRAME_X_P (f)) - return 0; - - if (f->mirror_dirty) - update_frame_window_mirror (f); - return (EMACS_INT) x_scrollbar_loop (X_WINDOW_IS_SCROLLBAR, f->root_window, - f->root_mirror, 0, win); -} - /* Make sure that all scrollbars on frame are up-to-date. Called directly from x_set_frame_properties in frame-x.c*/ void @@ -745,8 +733,16 @@ console_type_create_scrollbar_x (void) } void +reinit_vars_of_scrollbar_x (void) +{ + stupid_vertical_scrollbar_drag_hack = 1; +} + +void vars_of_scrollbar_x (void) { + reinit_vars_of_scrollbar_x (); + #if defined (LWLIB_SCROLLBARS_LUCID) Fprovide (intern ("lucid-scrollbars")); #elif defined (LWLIB_SCROLLBARS_MOTIF) @@ -754,5 +750,4 @@ vars_of_scrollbar_x (void) #elif defined (LWLIB_SCROLLBARS_ATHENA) Fprovide (intern ("athena-scrollbars")); #endif - stupid_vertical_scrollbar_drag_hack = 1; } diff --git a/src/scrollbar-x.h b/src/scrollbar-x.h index 071cc7c..d4b1652 100644 --- a/src/scrollbar-x.h +++ b/src/scrollbar-x.h @@ -69,7 +69,6 @@ struct x_scrollbar_data void x_update_frame_scrollbars (struct frame *f); void x_set_scrollbar_pointer (struct frame *f, Lisp_Object cursor); -EMACS_INT x_window_is_scrollbar (struct frame *f, Window win); #endif /* HAVE_X_WINDOWS and HAVE_SCROLLBARS */ #endif /* _XEMACS_SCROLLBAR_H_ */ diff --git a/src/search.c b/src/search.c index 445bd87..a66abc0 100644 --- a/src/search.c +++ b/src/search.c @@ -54,10 +54,10 @@ struct regexp_cache { }; /* The instances of that struct. */ -struct regexp_cache searchbufs[REGEXP_CACHE_SIZE]; +static struct regexp_cache searchbufs[REGEXP_CACHE_SIZE]; /* The head of the linked list; points to the most recently used buffer. */ -struct regexp_cache *searchbuf_head; +static struct regexp_cache *searchbuf_head; /* Every call to re_match, etc., must pass &search_regs as the regs @@ -2574,9 +2574,12 @@ syms_of_search (void) } void -vars_of_search (void) +reinit_vars_of_search (void) { - REGISTER int i; + int i; + + last_thing_searched = Qnil; + staticpro_nodump (&last_thing_searched); for (i = 0; i < REGEXP_CACHE_SIZE; ++i) { @@ -2584,13 +2587,16 @@ vars_of_search (void) searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100); searchbufs[i].buf.fastmap = searchbufs[i].fastmap; searchbufs[i].regexp = Qnil; - staticpro (&searchbufs[i].regexp); + staticpro_nodump (&searchbufs[i].regexp); searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]); } searchbuf_head = &searchbufs[0]; +} - last_thing_searched = Qnil; - staticpro (&last_thing_searched); +void +vars_of_search (void) +{ + reinit_vars_of_search (); DEFVAR_LISP ("forward-word-regexp", &Vforward_word_regexp /* *Regular expression to be used in `forward-word'. diff --git a/src/select-msw.c b/src/select-msw.c index 616f0d6..a760eb0 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "frame.h" #include "select.h" #include "console-msw.h" @@ -41,6 +42,7 @@ Copy STRING to the mswindows clipboard. int rawsize, size, i; unsigned char *src, *dst, *next; HGLOBAL h = NULL; + struct frame *f = NULL; CHECK_STRING (string); @@ -52,7 +54,8 @@ Copy STRING to the mswindows clipboard. if (src[i] == '\n') size++; - if (!OpenClipboard (NULL)) + f = selected_frame (); + if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f))) return Qnil; if (!EmptyClipboard () || @@ -88,7 +91,6 @@ Copy STRING to the mswindows clipboard. i = (SetClipboardData (CF_TEXT, h) != NULL); CloseClipboard (); - GlobalFree (h); return i ? Qt : Qnil; } @@ -184,7 +186,16 @@ Remove the current MS-Windows selection from the clipboard. */ ()) { - return EmptyClipboard () ? Qt : Qnil; + BOOL success = OpenClipboard (NULL); + if (success) + { + success = EmptyClipboard (); + /* Close it regardless of whether empty worked. */ + if (!CloseClipboard ()) + success = FALSE; + } + + return success ? Qt : Qnil; } static void diff --git a/src/select-x.c b/src/select-x.c index cc6031a..0332a45 100644 --- a/src/select-x.c +++ b/src/select-x.c @@ -1492,15 +1492,18 @@ initialize_cut_buffers (Display *display, Window window) cut_buffers_initialized = 1; } -#define CHECK_CUTBUFFER(symbol) \ - { CHECK_SYMBOL (symbol); \ - if (!EQ((symbol),QCUT_BUFFER0) && !EQ((symbol),QCUT_BUFFER1) && \ - !EQ((symbol),QCUT_BUFFER2) && !EQ((symbol),QCUT_BUFFER3) && \ - !EQ((symbol),QCUT_BUFFER4) && !EQ((symbol),QCUT_BUFFER5) && \ - !EQ((symbol),QCUT_BUFFER6) && !EQ((symbol),QCUT_BUFFER7)) \ - signal_error (Qerror, list2 (build_string ("Doesn't name a cutbuffer"), \ - (symbol))); \ - } +#define CHECK_CUTBUFFER(symbol) do { \ + CHECK_SYMBOL (symbol); \ + if (! (EQ (symbol, QCUT_BUFFER0) || \ + EQ (symbol, QCUT_BUFFER1) || \ + EQ (symbol, QCUT_BUFFER2) || \ + EQ (symbol, QCUT_BUFFER3) || \ + EQ (symbol, QCUT_BUFFER4) || \ + EQ (symbol, QCUT_BUFFER5) || \ + EQ (symbol, QCUT_BUFFER6) || \ + EQ (symbol, QCUT_BUFFER7))) \ + signal_simple_error ("Doesn't name a cutbuffer", symbol); \ +} while (0) DEFUN ("x-get-cutbuffer-internal", Fx_get_cutbuffer_internal, 1, 1, 0, /* Return the value of the named CUTBUFFER (typically CUT_BUFFER0). @@ -1694,18 +1697,24 @@ console_type_create_select_x (void) } void -vars_of_xselect (void) +reinit_vars_of_xselect (void) { -#ifdef CUT_BUFFER_SUPPORT - cut_buffers_initialized = 0; - Fprovide (intern ("cut-buffer")); -#endif - reading_selection_reply = 0; reading_which_selection = 0; selection_reply_timed_out = 0; for_whom_the_bell_tolls = 0; prop_location_tick = 0; +} + +void +vars_of_xselect (void) +{ + reinit_vars_of_xselect (); + +#ifdef CUT_BUFFER_SUPPORT + cut_buffers_initialized = 0; + Fprovide (intern ("cut-buffer")); +#endif DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks /* A function or functions to be called after we have responded to some diff --git a/src/sound.c b/src/sound.c index 170efbd..09e21fb 100644 --- a/src/sound.c +++ b/src/sound.c @@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */ Hacked on quite a bit by various others. */ #include +#include #include "lisp.h" #include "buffer.h" @@ -44,7 +45,14 @@ Boston, MA 02111-1307, USA. */ # include #endif +#ifdef HAVE_ESD_SOUND +extern int esd_play_sound_file (char *file, int vol); +extern int esd_play_sound_data (unsigned char *data, size_t length, int vol); +# define DEVICE_CONNECTED_TO_ESD_P(x) 1 /* FIXME: better check */ +#endif + int bell_volume; +int bell_inhibit_time; Lisp_Object Vsound_alist; Lisp_Object Vsynchronous_sounds; Lisp_Object Vnative_sound_only_on_console; @@ -77,7 +85,8 @@ Windows the sound file must be in WAV format. { /* This function can call lisp */ int vol; -#if defined (HAVE_NATIVE_SOUND) || defined (HAVE_NAS_SOUND) +#if defined (HAVE_NATIVE_SOUND) || defined (HAVE_NAS_SOUND) \ + || defined (HAVE_ESD_SOUND) struct device *d = decode_device (device); #endif struct gcpro gcpro1; @@ -124,6 +133,17 @@ Windows the sound file must be in WAV format. } #endif /* HAVE_NAS_SOUND */ +#ifdef HAVE_ESD_SOUND + if (DEVICE_CONNECTED_TO_ESD_P (d)) + { + char *fileext; + + GET_C_STRING_FILENAME_DATA_ALLOCA (file, fileext); + if (esd_play_sound_file (fileext, vol)) + return Qnil; + } +#endif /* HAVE_ESD_SOUND */ + #ifdef HAVE_NATIVE_SOUND if (NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d)) { @@ -300,6 +320,18 @@ See the variable `sound-alist'. } #endif /* HAVE_NAS_SOUND */ +#ifdef HAVE_ESD_SOUND + if (DEVICE_CONNECTED_TO_ESD_P (d) && STRINGP (sound)) + { + Extbyte *soundext; + Extcount soundextlen; + + GET_STRING_BINARY_DATA_ALLOCA (sound, soundext, soundextlen); + if (esd_play_sound_data (soundext, soundextlen, vol)) + return Qnil; + } +#endif /* HAVE_ESD_SOUND */ + #ifdef HAVE_NATIVE_SOUND if ((NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d)) && STRINGP (sound)) @@ -347,25 +379,28 @@ device). */ (arg, sound, device)) { - struct device *d = decode_device (device); + static time_t last_bell_time; + static struct device *last_bell_device; + time_t now; + struct device *d = decode_device (device); XSETDEVICE (device, d); + now = time (0); - /* #### This is utterly disgusting, and is probably a remnant from - legacy code that used `ding'+`message' to signal error instead - calling `error'. As a result, there is no way to beep from Lisp - directly, without also invoking this aspect. Maybe we should - define a `ring-bell' function that simply beeps on the console, - which `ding' should invoke? --hniksic */ if (NILP (arg) && !NILP (Vexecuting_macro)) /* Stop executing a keyboard macro. */ error ("Keyboard macro terminated by a command ringing the bell"); + + if (d == last_bell_device && now-last_bell_time < bell_inhibit_time) + return Qnil; else if (visible_bell && DEVMETH (d, flash, (d))) ; else Fplay_sound (sound, Qnil, device); - - return Qnil; + + last_bell_time = now; + last_bell_device = d; + return Qnil; } DEFUN ("wait-for-sounds", Fwait_for_sounds, 0, 1, 0, /* @@ -527,11 +562,19 @@ vars_of_sound (void) #ifdef HAVE_NAS_SOUND Fprovide (intern ("nas-sound")); #endif +#ifdef HAVE_ESD_SOUND + Fprovide (intern ("esd-sound")); +#endif DEFVAR_INT ("bell-volume", &bell_volume /* *How loud to be, from 0 to 100. */ ); bell_volume = 50; + + DEFVAR_INT ("bell-inhibit-time", &bell_inhibit_time /* +*Don't ring the bell on the same device more than once within this many seconds. +*/ ); + bell_inhibit_time = 0; DEFVAR_LISP ("sound-alist", &Vsound_alist /* An alist associating names with sounds. @@ -559,8 +602,8 @@ You should probably add things to this list by calling the function load-sound-file. Caveats: - - You can only play audio data if running on the console screen of a - Sun SparcStation, SGI, or HP9000s700. + - XEmacs must be built with sound support for your system. Not all + systems support sound. - The pitch, duration, and volume options are available everywhere, but many X servers ignore the `pitch' option. diff --git a/src/specifier.c b/src/specifier.c index 6c5942a..b344d5f 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -64,7 +64,28 @@ typedef struct Dynarr_declare (specifier_type_entry); } specifier_type_entry_dynarr; -specifier_type_entry_dynarr *the_specifier_type_entry_dynarr; +static specifier_type_entry_dynarr *the_specifier_type_entry_dynarr; + +static const struct lrecord_description ste_description_1[] = { + { XD_LISP_OBJECT, offsetof(specifier_type_entry, symbol), 1 }, + { XD_STRUCT_PTR, offsetof(specifier_type_entry, meths), 1, &specifier_methods_description }, + { XD_END } +}; + +static const struct struct_description ste_description = { + sizeof(specifier_type_entry), + ste_description_1 +}; + +static const struct lrecord_description sted_description_1[] = { + XD_DYNARR_DESC(specifier_type_entry_dynarr, &ste_description), + { XD_END } +}; + +static const struct struct_description sted_description = { + sizeof(specifier_type_entry_dynarr), + sted_description_1 +}; static Lisp_Object Vspecifier_type_list; @@ -180,19 +201,19 @@ kill_specifier_buffer_locals (Lisp_Object buffer) } static Lisp_Object -mark_specifier (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_specifier (Lisp_Object obj) { struct Lisp_Specifier *specifier = XSPECIFIER (obj); - markobj (specifier->global_specs); - markobj (specifier->device_specs); - markobj (specifier->frame_specs); - markobj (specifier->window_specs); - markobj (specifier->buffer_specs); - markobj (specifier->magic_parent); - markobj (specifier->fallback); + mark_object (specifier->global_specs); + mark_object (specifier->device_specs); + mark_object (specifier->frame_specs); + mark_object (specifier->window_specs); + mark_object (specifier->buffer_specs); + mark_object (specifier->magic_parent); + mark_object (specifier->fallback); if (!GHOST_SPECIFIER_P (XSPECIFIER (obj))) - MAYBE_SPECMETH (specifier, mark, (obj, markobj)); + MAYBE_SPECMETH (specifier, mark, (obj)); return Qnil; } @@ -216,24 +237,24 @@ mark_specifier (Lisp_Object obj, void (*markobj) (Lisp_Object)) */ void -prune_specifiers (int (*obj_marked_p) (Lisp_Object)) +prune_specifiers (void) { Lisp_Object rest, prev = Qnil; for (rest = Vall_specifiers; - !GC_NILP (rest); + !NILP (rest); rest = XSPECIFIER (rest)->next_specifier) { - if (! obj_marked_p (rest)) + if (! marked_p (rest)) { struct Lisp_Specifier* sp = XSPECIFIER (rest); /* A bit of assertion that we're removing both parts of the magic one altogether */ - assert (!GC_MAGIC_SPECIFIER_P(sp) - || (GC_BODILY_SPECIFIER_P(sp) && obj_marked_p (sp->fallback)) - || (GC_GHOST_SPECIFIER_P(sp) && obj_marked_p (sp->magic_parent))); + assert (!MAGIC_SPECIFIER_P(sp) + || (BODILY_SPECIFIER_P(sp) && marked_p (sp->fallback)) + || (GHOST_SPECIFIER_P(sp) && marked_p (sp->magic_parent))); /* This specifier is garbage. Remove it from the list. */ - if (GC_NILP (prev)) + if (NILP (prev)) Vall_specifiers = sp->next_specifier; else XSPECIFIER (prev)->next_specifier = sp->next_specifier; @@ -280,7 +301,7 @@ finalize_specifier (void *header, int for_disksave) { struct Lisp_Specifier *sp = (struct Lisp_Specifier *) header; /* don't be snafued by the disksave finalization. */ - if (!for_disksave && !GC_GHOST_SPECIFIER_P(sp) && sp->caching) + if (!for_disksave && !GHOST_SPECIFIER_P(sp) && sp->caching) { xfree (sp->caching); sp->caching = 0; @@ -336,18 +357,51 @@ static size_t sizeof_specifier (CONST void *header) { if (GHOST_SPECIFIER_P ((struct Lisp_Specifier *) header)) - return sizeof (struct Lisp_Specifier); + return offsetof (struct Lisp_Specifier, data); else { CONST struct Lisp_Specifier *p = (CONST struct Lisp_Specifier *) header; - return sizeof (*p) + p->methods->extra_data_size - 1; + return offsetof (struct Lisp_Specifier, data) + p->methods->extra_data_size; } } +static const struct lrecord_description specifier_methods_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct specifier_methods, predicate_symbol), 1 }, + { XD_END } +}; + +const struct struct_description specifier_methods_description = { + sizeof(struct specifier_methods), + specifier_methods_description_1 +}; + +static const struct lrecord_description specifier_caching_description_1[] = { + { XD_END } +}; + +static const struct struct_description specifier_caching_description = { + sizeof(struct specifier_caching), + specifier_caching_description_1 +}; + +static const struct lrecord_description specifier_description[] = { + { XD_STRUCT_PTR, offsetof(struct Lisp_Specifier, methods), 1, &specifier_methods_description }, + { XD_LO_LINK, offsetof(struct Lisp_Specifier, next_specifier) }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Specifier, global_specs), 5 }, + { XD_STRUCT_PTR, offsetof(struct Lisp_Specifier, caching), 1, &specifier_caching_description }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Specifier, magic_parent), 2 }, + { XD_SPECIFIER_END } +}; + +const struct lrecord_description specifier_empty_extra_description[] = { + { XD_END } +}; + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier, mark_specifier, print_specifier, finalize_specifier, - specifier_equal, specifier_hash, 0, + specifier_equal, specifier_hash, + specifier_description, sizeof_specifier, struct Lisp_Specifier); @@ -414,8 +468,8 @@ make_specifier_internal (struct specifier_methods *spec_meths, { Lisp_Object specifier; struct Lisp_Specifier *sp = (struct Lisp_Specifier *) - alloc_lcrecord (sizeof (struct Lisp_Specifier) + - data_size - 1, &lrecord_specifier); + alloc_lcrecord (offsetof (struct Lisp_Specifier, data) + + data_size, &lrecord_specifier); sp->methods = spec_meths; sp->global_specs = Qnil; @@ -3125,6 +3179,7 @@ void specifier_type_create (void) { the_specifier_type_entry_dynarr = Dynarr_new (specifier_type_entry); + dumpstruct (&the_specifier_type_entry_dynarr, &sted_description); Vspecifier_type_list = Qnil; staticpro (&Vspecifier_type_list); @@ -3149,6 +3204,16 @@ specifier_type_create (void) } void +reinit_specifier_type_create (void) +{ + REINITIALIZE_SPECIFIER_TYPE (generic); + REINITIALIZE_SPECIFIER_TYPE (integer); + REINITIALIZE_SPECIFIER_TYPE (natnum); + REINITIALIZE_SPECIFIER_TYPE (boolean); + REINITIALIZE_SPECIFIER_TYPE (display_table); +} + +void vars_of_specifier (void) { Vcached_specifiers = Qnil; @@ -3157,6 +3222,7 @@ vars_of_specifier (void) /* Do NOT mark through this, or specifiers will never be GC'd. This is the same deal as for weak hash tables. */ Vall_specifiers = Qnil; + pdump_wire_list (&Vall_specifiers); Vuser_defined_tags = Qnil; staticpro (&Vuser_defined_tags); diff --git a/src/specifier.h b/src/specifier.h index 674be41..506319e 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -83,6 +83,8 @@ Boston, MA 02111-1307, USA. */ same time. */ +extern const struct struct_description specifier_methods_description; + struct specifier_methods { CONST char *name; @@ -95,7 +97,7 @@ struct specifier_methods /* Mark method: Mark any lisp object within specifier data structure. Not required if no specifier data are Lisp_Objects. */ - void (*mark_method) (Lisp_Object specifier, void (*markobj) (Lisp_Object)); + void (*mark_method) (Lisp_Object specifier); /* Equal method: Compare two specifiers. This is called after ensuring that the two specifiers are of the same type, and have @@ -185,6 +187,7 @@ struct specifier_methods void (*after_change_method) (Lisp_Object specifier, Lisp_Object locale); + const struct lrecord_description *extra_description; int extra_data_size; }; @@ -232,7 +235,6 @@ DECLARE_LRECORD (specifier, struct Lisp_Specifier); #define XSPECIFIER(x) XRECORD (x, specifier, struct Lisp_Specifier) #define XSETSPECIFIER(x, p) XSETRECORD (x, p, specifier) #define SPECIFIERP(x) RECORDP (x, specifier) -#define GC_SPECIFIERP(x) GC_RECORDP (x, specifier) #define CHECK_SPECIFIER(x) CHECK_RECORD (x, specifier) #define CONCHECK_SPECIFIER(x) CONCHECK_RECORD (x, specifier) @@ -251,6 +253,9 @@ DECLARE_LRECORD (specifier, struct Lisp_Specifier); /***** Defining new specifier types *****/ +#define specifier_data_offset (offsetof(struct Lisp_Specifier, data)) +extern const struct lrecord_description specifier_empty_extra_description[]; + #ifdef ERROR_CHECK_TYPECHECK #define DECLARE_SPECIFIER_TYPE(type) \ extern struct specifier_methods * type##_specifier_methods; \ @@ -279,10 +284,17 @@ extern struct specifier_methods * type##_specifier_methods struct specifier_methods * type##_specifier_methods #define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ - type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ - type##_specifier_methods->name = obj_name; \ - defsymbol (&type##_specifier_methods->predicate_symbol, pred_sym); \ - add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ + type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ + type##_specifier_methods->name = obj_name; \ + type##_specifier_methods->extra_description = \ + specifier_empty_extra_description; \ + defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ + add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ + dumpstruct (&type##_specifier_methods, &specifier_methods_description); \ +} while (0) + +#define REINITIALIZE_SPECIFIER_TYPE(type) do { \ + staticpro_nodump (&type##_specifier_methods->predicate_symbol); \ } while (0) #define INITIALIZE_SPECIFIER_TYPE_WITH_DATA(type, obj_name, pred_sym) \ @@ -290,6 +302,8 @@ do { \ INITIALIZE_SPECIFIER_TYPE (type, obj_name, pred_sym); \ type##_specifier_methods->extra_data_size = \ sizeof (struct type##_specifier); \ + type##_specifier_methods->extra_description = \ + type##_specifier_description; \ } while (0) /* Declare that specifier-type TYPE has method METH; used in @@ -303,24 +317,13 @@ do { \ ((sp)->methods == type##_specifier_methods) /* Any of the two of the magic spec */ -#define MAGIC_SPECIFIER_P(sp) \ - (!NILP((sp)->magic_parent)) +#define MAGIC_SPECIFIER_P(sp) (!NILP((sp)->magic_parent)) /* Normal part of the magic specifier */ -#define BODILY_SPECIFIER_P(sp) \ - (EQ ((sp)->magic_parent, Qt)) +#define BODILY_SPECIFIER_P(sp) EQ ((sp)->magic_parent, Qt) /* Ghost part of the magic specifier */ -#define GHOST_SPECIFIER_P(sp) \ - (SPECIFIERP((sp)->magic_parent)) -/* The same three, when used in GC */ -#define GC_MAGIC_SPECIFIER_P(sp) \ - (!GC_NILP((sp)->magic_parent)) -#define GC_BODILY_SPECIFIER_P(sp) \ - (GC_EQ ((sp)->magic_parent, Qt)) -#define GC_GHOST_SPECIFIER_P(sp) \ - (GC_SPECIFIERP((sp)->magic_parent)) - -#define GHOST_SPECIFIER(sp) \ - (XSPECIFIER ((sp)->fallback)) +#define GHOST_SPECIFIER_P(sp) SPECIFIERP((sp)->magic_parent) + +#define GHOST_SPECIFIER(sp) XSPECIFIER ((sp)->fallback) #ifdef ERROR_CHECK_TYPECHECK # define SPECIFIER_TYPE_DATA(sp, type) \ @@ -425,7 +428,7 @@ void remove_ghost_specifier (Lisp_Object specifier, Lisp_Object locale, int unlock_ghost_specifiers_protected (void); void cleanup_specifiers (void); -void prune_specifiers (int (*obj_marked_p) (Lisp_Object)); +void prune_specifiers (void); void setup_device_initial_specifier_tags (struct device *d); void kill_specifier_buffer_locals (Lisp_Object buffer); diff --git a/src/src-headers b/src/src-headers index cb0e337..d94b992 100644 --- a/src/src-headers +++ b/src/src-headers @@ -28,8 +28,8 @@ my ($myName, $srcdir); ($myName = $0) =~ s@.*/@@; my $usage =" Usage: $myName -Generates header file fragments from the Emacs sources. -"; +Generates header file fragments from the Emacs sources +and writes them to stdout.\n"; die $usage if @ARGV; diff --git a/src/symbols.c b/src/symbols.c index 9b3192d..8c45073 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -63,7 +63,7 @@ Lisp_Object Qad_advice_info, Qad_activate; Lisp_Object Qget_value, Qset_value, Qbound_predicate, Qmake_unbound; Lisp_Object Qlocal_predicate, Qmake_local; -Lisp_Object Qboundp, Qfboundp, Qglobally_boundp, Qmakunbound; +Lisp_Object Qboundp, Qglobally_boundp, Qmakunbound; Lisp_Object Qsymbol_value, Qset, Qdefault_boundp, Qdefault_value; Lisp_Object Qset_default, Qsetq_default; Lisp_Object Qmake_variable_buffer_local, Qmake_local_variable; @@ -87,20 +87,20 @@ static Lisp_Object follow_varalias_pointers (Lisp_Object symbol, static Lisp_Object -mark_symbol (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_symbol (Lisp_Object obj) { struct Lisp_Symbol *sym = XSYMBOL (obj); Lisp_Object pname; - markobj (sym->value); - markobj (sym->function); + mark_object (sym->value); + mark_object (sym->function); XSETSTRING (pname, sym->name); - markobj (pname); + mark_object (pname); if (!symbol_next (sym)) return sym->plist; else { - markobj (sym->plist); + mark_object (sym->plist); /* Mark the rest of the symbols in the obarray hash-chain */ sym = symbol_next (sym); XSETSYMBOL (obj, sym); @@ -109,7 +109,8 @@ mark_symbol (Lisp_Object obj, void (*markobj) (Lisp_Object)) } static const struct lrecord_description symbol_description[] = { - { XD_LISP_OBJECT, offsetof(struct Lisp_Symbol, next), 5 } + { XD_LISP_OBJECT, offsetof(struct Lisp_Symbol, next), 5 }, + { XD_END } }; DEFINE_BASIC_LRECORD_IMPLEMENTATION ("symbol", symbol, @@ -895,8 +896,7 @@ Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. symbol to operate on. */ static Lisp_Object -mark_symbol_value_buffer_local (Lisp_Object obj, - void (*markobj) (Lisp_Object)) +mark_symbol_value_buffer_local (Lisp_Object obj) { struct symbol_value_buffer_local *bfwd; @@ -906,15 +906,14 @@ mark_symbol_value_buffer_local (Lisp_Object obj, #endif bfwd = XSYMBOL_VALUE_BUFFER_LOCAL (obj); - markobj (bfwd->default_value); - markobj (bfwd->current_value); - markobj (bfwd->current_buffer); + mark_object (bfwd->default_value); + mark_object (bfwd->current_value); + mark_object (bfwd->current_buffer); return bfwd->current_alist_element; } static Lisp_Object -mark_symbol_value_lisp_magic (Lisp_Object obj, - void (*markobj) (Lisp_Object)) +mark_symbol_value_lisp_magic (Lisp_Object obj) { struct symbol_value_lisp_magic *bfwd; int i; @@ -924,22 +923,21 @@ mark_symbol_value_lisp_magic (Lisp_Object obj, bfwd = XSYMBOL_VALUE_LISP_MAGIC (obj); for (i = 0; i < MAGIC_HANDLER_MAX; i++) { - markobj (bfwd->handler[i]); - markobj (bfwd->harg[i]); + mark_object (bfwd->handler[i]); + mark_object (bfwd->harg[i]); } return bfwd->shadowed; } static Lisp_Object -mark_symbol_value_varalias (Lisp_Object obj, - void (*markobj) (Lisp_Object)) +mark_symbol_value_varalias (Lisp_Object obj) { struct symbol_value_varalias *bfwd; assert (XSYMBOL_VALUE_MAGIC_TYPE (obj) == SYMVAL_VARALIAS); bfwd = XSYMBOL_VALUE_VARALIAS (obj); - markobj (bfwd->shadowed); + mark_object (bfwd->shadowed); return bfwd->aliasee; } @@ -956,8 +954,13 @@ print_symbol_value_magic (Lisp_Object obj, write_c_string (buf, printcharfun); } +static const struct lrecord_description symbol_value_forward_description[] = { + { XD_END } +}; + static const struct lrecord_description symbol_value_buffer_local_description[] = { - { XD_LISP_OBJECT, offsetof(struct symbol_value_buffer_local, default_value), 4 }, + { XD_LISP_OBJECT, offsetof(struct symbol_value_buffer_local, default_value), 1 }, + { XD_LO_RESET_NIL, offsetof(struct symbol_value_buffer_local, current_value), 3 }, { XD_END } }; @@ -974,7 +977,8 @@ static const struct lrecord_description symbol_value_varalias_description[] = { DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-forward", symbol_value_forward, this_one_is_unmarkable, - print_symbol_value_magic, 0, 0, 0, 0, + print_symbol_value_magic, 0, 0, 0, + symbol_value_forward_description, struct symbol_value_forward); DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-buffer-local", @@ -1214,7 +1218,7 @@ store_symval_forwarding (Lisp_Object sym, Lisp_Object ovalue, if (magicfun) magicfun (sym, &newval, Qnil, 0); *((int *) symbol_value_forward_forward (fwd)) - = ((NILP (newval)) ? 0 : 1); + = !NILP (newval); return; case SYMVAL_OBJECT_FORWARD: @@ -1547,7 +1551,9 @@ find_symbol_value (Lisp_Object sym) /* This can also get called while we're preparing to shutdown. #### What should really happen in that case? Should we actually fix things so we can't get here in that case? */ +#ifndef PDUMP assert (!initialized || preparing_for_armageddon); +#endif con = 0; } @@ -1583,7 +1589,9 @@ find_symbol_value_quickly (Lisp_Object symbol_cons, int find_it_p) /* This can also get called while we're preparing to shutdown. #### What should really happen in that case? Should we actually fix things so we can't get here in that case? */ +#ifndef PDUMP assert (!initialized || preparing_for_armageddon); +#endif con = 0; } @@ -3153,6 +3161,19 @@ init_symbols_once_early (void) defsymbol (&Qt, "t"); XSYMBOL (Qt)->value = Qt; /* Veritas aetera */ Vquit_flag = Qnil; + + pdump_wire (&Qnil); + pdump_wire (&Qunbound); + pdump_wire (&Vquit_flag); +} + +void +defsymbol_nodump (Lisp_Object *location, CONST char *name) +{ + *location = Fintern (make_string_nocopy ((CONST Bufbyte *) name, + strlen (name)), + Qnil); + staticpro_nodump (location); } void @@ -3268,11 +3289,11 @@ deferror (Lisp_Object *symbol, CONST char *name, CONST char *messuhhj, assert (SYMBOLP (inherits_from)); conds = Fget (inherits_from, Qerror_conditions, Qnil); - pure_put (*symbol, Qerror_conditions, Fcons (*symbol, conds)); + Fput (*symbol, Qerror_conditions, Fcons (*symbol, conds)); /* NOT build_translated_string (). This function is called at load time and the string needs to get translated at run time. (This happens in the function (display-error) in cmdloop.el.) */ - pure_put (*symbol, Qerror_message, build_string (messuhhj)); + Fput (*symbol, Qerror_message, build_string (messuhhj)); } void @@ -3291,7 +3312,6 @@ syms_of_symbols (void) defsymbol (&Qmake_local, "make-local"); defsymbol (&Qboundp, "boundp"); - defsymbol (&Qfboundp, "fboundp"); defsymbol (&Qglobally_boundp, "globally-boundp"); defsymbol (&Qmakunbound, "makunbound"); defsymbol (&Qsymbol_value, "symbol-value"); diff --git a/src/symeval.h b/src/symeval.h index 7aa5c48..f51e9a4 100644 --- a/src/symeval.h +++ b/src/symeval.h @@ -282,6 +282,7 @@ void defsubr_macro (Lisp_Subr *); #define DEFSUBR_MACRO(Fname) defsubr_macro (&S##Fname) void defsymbol (Lisp_Object *location, CONST char *name); +void defsymbol_nodump (Lisp_Object *location, CONST char *name); void defkeyword (Lisp_Object *location, CONST char *name); diff --git a/src/symsinit.h b/src/symsinit.h index 1e0136a..7ae439d 100644 --- a/src/symsinit.h +++ b/src/symsinit.h @@ -33,11 +33,13 @@ void init_process_times_very_early (void); void init_ralloc (void); void init_signals_very_early (void); -/* Early Lisp-engine initialization (dump-time only). */ +/* Early Lisp-engine initialization (dump-time for init, run-time for reinit). */ void init_alloc_once_early (void); +void reinit_alloc_once_early (void); void init_symbols_once_early (void); void init_errors_once_early (void); +void reinit_opaque_once_early (void); void init_opaque_once_early (void); /* Declare the built-in symbols and primitives (dump-time only). */ @@ -99,6 +101,7 @@ void syms_of_gui_x (void); void syms_of_gui (void); void syms_of_gutter (void); void syms_of_indent (void); +void syms_of_input_method_xlib (void); void syms_of_intl (void); void syms_of_keymap (void); void syms_of_lread (void); @@ -146,18 +149,23 @@ void syms_of_widget (void); void syms_of_window (void); void syms_of_xselect (void); void syms_of_eldap (void); +void syms_of_gpmevent (void); -/* Initialize the console types (dump-time only). */ +/* Initialize the console types (dump-time but for reinit_). */ void console_type_create (void); void console_type_create_stream (void); +void reinit_console_type_create_stream (void); void console_type_create_tty (void); +void reinit_console_type_create_tty (void); void console_type_create_device_tty (void); void console_type_create_frame_tty (void); void console_type_create_objects_tty (void); void console_type_create_redisplay_tty (void); void console_type_create_x (void); +void reinit_console_type_create_x (void); void console_type_create_device_x (void); +void reinit_console_type_create_device_x (void); void console_type_create_frame_x (void); void console_type_create_glyphs_x (void); void console_type_create_menubar_x (void); @@ -168,6 +176,7 @@ void console_type_create_select_x (void); void console_type_create_toolbar_x (void); void console_type_create_dialog_x (void); void console_type_create_mswindows (void); +void reinit_console_type_create_mswindows (void); void console_type_create_device_mswindows (void); void console_type_create_frame_mswindows (void); void console_type_create_menubar_mswindows (void); @@ -182,10 +191,15 @@ void console_type_create_select_mswindows (void); /* Initialize the specifier types (dump-time only). */ void specifier_type_create (void); +void reinit_specifier_type_create (void); void specifier_type_create_image (void); +void reinit_specifier_type_create_image (void); void specifier_type_create_gutter (void); +void reinit_specifier_type_create_gutter (void); void specifier_type_create_objects (void); +void reinit_specifier_type_create_objects (void); void specifier_type_create_toolbar (void); +void reinit_specifier_type_create_toolbar (void); /* Initialize the structure types (dump-time only). */ @@ -220,12 +234,13 @@ void process_type_create_unix (void); void init_provide_once (void); -/* Initialize most variables (dump-time only). */ +/* Initialize most variables (dump-time for vars_, run-time for reinit_vars). */ void vars_of_abbrev (void); void vars_of_alloc (void); void vars_of_balloon_x (void); void vars_of_buffer (void); +void reinit_vars_of_buffer (void); void vars_of_bytecode (void); void vars_of_callint (void); void vars_of_callproc (void); @@ -233,15 +248,19 @@ void vars_of_chartab (void); void vars_of_cmdloop (void); void vars_of_cmds (void); void vars_of_console (void); +void reinit_vars_of_console (void); void vars_of_console_stream (void); void vars_of_console_mswindows (void); void vars_of_console_tty (void); void vars_of_data (void); void vars_of_database (void); void vars_of_debug (void); +void reinit_vars_of_debug (void); void vars_of_device (void); +void reinit_vars_of_device (void); void vars_of_device_mswindows (void); void vars_of_device_x (void); +void reinit_vars_of_device_x (void); void vars_of_dialog (void); void vars_of_dialog_x (void); void vars_of_dialog_mswindows (void); @@ -253,17 +272,25 @@ void vars_of_editfns (void); void vars_of_elhash (void); void vars_of_emacs (void); void vars_of_eval (void); +void reinit_vars_of_eval (void); void vars_of_event_stream (void); +void reinit_vars_of_event_stream (void); void vars_of_event_tty (void); +void reinit_vars_of_event_tty (void); void vars_of_event_mswindows (void); +void reinit_vars_of_event_mswindows (void); void vars_of_event_Xt (void); +void reinit_vars_of_event_Xt (void); void vars_of_events (void); +void reinit_vars_of_events (void); void vars_of_extents (void); +void reinit_vars_of_extents (void); void vars_of_faces (void); void vars_of_fileio (void); void vars_of_filelock (void); void vars_of_floatfns (void); void vars_of_font_lock (void); +void reinit_vars_of_font_lock (void); void vars_of_frame_tty (void); void vars_of_frame_mswindows (void); void vars_of_frame_x (void); @@ -271,26 +298,35 @@ void vars_of_frame (void); void vars_of_glyphs_x (void); void vars_of_glyphs_eimage (void); void vars_of_glyphs_widget (void); +void reinit_vars_of_glyphs_widget (void); void vars_of_glyphs_mswindows (void); void vars_of_glyphs (void); +void reinit_vars_of_glyphs (void); void vars_of_gui_x (void); +void reinit_vars_of_gui_x (void); void vars_of_gui (void); void vars_of_gutter (void); void vars_of_input_method_motif (void); void vars_of_input_method_xlib (void); void vars_of_indent (void); void vars_of_insdel (void); +void reinit_vars_of_insdel (void); void vars_of_intl (void); void vars_of_keymap (void); void vars_of_lread (void); +void reinit_vars_of_lread (void); void vars_of_lstream (void); +void reinit_vars_of_lstream (void); void vars_of_macros (void); void vars_of_md5 (void); void vars_of_menubar_x (void); +void reinit_vars_of_menubar_x (void); void vars_of_menubar (void); void vars_of_menubar_mswindows (void); void vars_of_minibuf (void); +void reinit_vars_of_minibuf (void); void vars_of_module (void); +void reinit_vars_of_module (void); void vars_of_mule (void); void vars_of_mule_canna (void); void vars_of_mule_ccl(void); @@ -299,20 +335,25 @@ void vars_of_file_coding (void); void vars_of_mule_wnn (void); void vars_of_ntproc (void); void vars_of_objects (void); +void reinit_vars_of_objects (void); void vars_of_objects_tty (void); void vars_of_objects_mswindows (void); void vars_of_objects_x (void); void vars_of_print (void); +void reinit_vars_of_print (void); void vars_of_process (void); void vars_of_process_nt (void); void vars_of_process_unix (void); void vars_of_profile (void); void vars_of_ralloc (void); void vars_of_redisplay (void); +void reinit_vars_of_redisplay (void); void vars_of_scrollbar_x (void); +void reinit_vars_of_scrollbar_x (void); void vars_of_scrollbar (void); void vars_of_scrollbar_mswindows (void); void vars_of_search (void); +void reinit_vars_of_search (void); void vars_of_select (void); void vars_of_select_mswindows (void); void vars_of_sound (void); @@ -323,9 +364,13 @@ void vars_of_syntax (void); void vars_of_toolbar (void); void vars_of_tooltalk (void); void vars_of_undo (void); +void reinit_vars_of_undo (void); void vars_of_window (void); +void reinit_vars_of_window (void); void vars_of_xselect (void); +void reinit_vars_of_xselect (void); void vars_of_eldap (void); +void vars_of_gpmevent (void); /* Initialize specifier variables (dump-time only). */ @@ -338,7 +383,7 @@ void specifier_vars_of_toolbar (void); void specifier_vars_of_window (void); /* Initialize variables with complex dependencies - on other variables (dump-time only). */ + on other variables (dump-time for complex_vars_, run-time for reinit_). */ void complex_vars_of_regex (void); void complex_vars_of_search (void); @@ -358,11 +403,13 @@ void complex_vars_of_casetab (void); void complex_vars_of_syntax (void); void complex_vars_of_chartab (void); void complex_vars_of_buffer (void); +void reinit_complex_vars_of_buffer (void); void complex_vars_of_console (void); +void reinit_complex_vars_of_console (void); void complex_vars_of_emacs (void); void complex_vars_of_minibuf (void); +void reinit_complex_vars_of_minibuf (void); void complex_vars_of_callproc (void); -void complex_vars_of_filelock (void); void complex_vars_of_keymap (void); /* Reset the Lisp engine (run-time only). */ diff --git a/src/syntax.c b/src/syntax.c index 4fdc4be..2e0dde9 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -327,6 +327,7 @@ syntax table. } + #ifdef MULE /* Return 1 if there is a word boundary between two word-constituent characters C1 and C2 if they appear in this order, else return 0. @@ -337,16 +338,6 @@ syntax table. && word_boundary_p (c1, c2)) extern int word_boundary_p (Emchar c1, Emchar c2); -#else -static int -word_constituent_p (struct buffer *buf, Bufpos pos, - struct Lisp_Char_Table *tab) -{ - enum syntaxcode code = SYNTAX_UNSAFE (tab, BUF_FETCH_CHAR (buf, pos)); - return ((words_include_escapes && - (code == Sescape || code == Scharquote)) - || (code == Sword)); -} #endif /* Return the position across COUNT words from FROM. @@ -358,11 +349,10 @@ scan_words (struct buffer *buf, Bufpos from, int count) { Bufpos limit = count > 0 ? BUF_ZV (buf) : BUF_BEGV (buf); struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); -#ifdef MULE Emchar ch0, ch1; enum syntaxcode code; -#endif + /* #### is it really worth it to hand expand both cases? JV */ while (count > 0) { QUIT; @@ -371,40 +361,36 @@ scan_words (struct buffer *buf, Bufpos from, int count) { if (from == limit) return 0; -#ifdef MULE + ch0 = BUF_FETCH_CHAR (buf, from); code = SYNTAX_UNSAFE (mirrortab, ch0); -#else - if (word_constituent_p (buf, from, mirrortab)) - break; -#endif - from++; -#ifdef MULE + if (words_include_escapes && (code == Sescape || code == Scharquote)) break; if (code == Sword) break; -#endif + + from++; } QUIT; - while ((from != limit) -#ifndef MULE - && word_constituent_p (buf, from, mirrortab) -#endif - ) + while (from != limit) { -#ifdef MULE ch1 = BUF_FETCH_CHAR (buf, from); code = SYNTAX_UNSAFE (mirrortab, ch1); if (!(words_include_escapes && (code == Sescape || code == Scharquote))) - if (code != Sword || WORD_BOUNDARY_P (ch0, ch1)) + if (code != Sword +#ifdef MULE + || WORD_BOUNDARY_P (ch0, ch1) +#endif + ) break; +#ifdef MULE ch0 = ch1; -#endif +#endif from++; } count--; @@ -418,12 +404,7 @@ scan_words (struct buffer *buf, Bufpos from, int count) { if (from == limit) return 0; -#ifndef MULE - if (word_constituent_p (buf, from - 1, mirrortab)) - break; -#endif - from--; -#ifdef MULE + ch1 = BUF_FETCH_CHAR (buf, from - 1); code = SYNTAX_UNSAFE (mirrortab, ch1); if (words_include_escapes @@ -431,24 +412,25 @@ scan_words (struct buffer *buf, Bufpos from, int count) break; if (code == Sword) break; -#endif + + from--; } QUIT; - while ((from != limit) -#ifndef MULE - && word_constituent_p (buf, from - 1, mirrortab) -#endif - ) + while (from != limit) { -#ifdef MULE ch0 = BUF_FETCH_CHAR (buf, from - 1); code = SYNTAX_UNSAFE (mirrortab, ch0); if (!(words_include_escapes && (code == Sescape || code == Scharquote))) - if (code != Sword || WORD_BOUNDARY_P (ch0, ch1)) + if (code != Sword +#ifdef MULE + || WORD_BOUNDARY_P (ch0, ch1) +#endif + ) break; +#ifdef MULE ch1 = ch0; #endif from--; @@ -679,7 +661,7 @@ Optional argument BUFFER defaults to the current buffer. Bufpos stop; Emchar c; enum syntaxcode code; - int count; + EMACS_INT count; struct buffer *buf = decode_buffer (buffer, 0); struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); @@ -1708,9 +1690,18 @@ Non-nil means `forward-word', etc., should treat escape chars part of words. no_quit_in_re_search = 0; } +static void +define_standard_syntax (CONST char *p, enum syntaxcode syn) +{ + for (; *p; p++) + Fput_char_table (make_char (*p), make_int (syn), Vstandard_syntax_table); +} + void complex_vars_of_syntax (void) { + Emchar i; + CONST char *p; /* Set this now, so first buffer creation can refer to it. */ /* Make it nil before calling copy-syntax-table so that copy-syntax-table will know not to try to copy from garbage */ @@ -1722,68 +1713,31 @@ complex_vars_of_syntax (void) Smax); staticpro (&Vsyntax_designator_chars_string); - fill_char_table (XCHAR_TABLE (Vstandard_syntax_table), - make_int (Spunct)); - - { - Emchar i; - - for (i = 0; i <= 32; i++) - Fput_char_table (make_char (i), make_int ((int) Swhitespace), - Vstandard_syntax_table); - for (i = 127; i <= 159; i++) - Fput_char_table (make_char (i), make_int ((int) Swhitespace), - Vstandard_syntax_table); + fill_char_table (XCHAR_TABLE (Vstandard_syntax_table), make_int (Spunct)); - for (i = 'a'; i <= 'z'; i++) - Fput_char_table (make_char (i), make_int ((int) Sword), - Vstandard_syntax_table); - for (i = 'A'; i <= 'Z'; i++) - Fput_char_table (make_char (i), make_int ((int) Sword), - Vstandard_syntax_table); - for (i = '0'; i <= '9'; i++) - Fput_char_table (make_char (i), make_int ((int) Sword), - Vstandard_syntax_table); - Fput_char_table (make_char ('$'), make_int ((int) Sword), + for (i = 0; i <= 32; i++) /* Control 0 plus SPACE */ + Fput_char_table (make_char (i), make_int (Swhitespace), Vstandard_syntax_table); - Fput_char_table (make_char ('%'), make_int ((int) Sword), + for (i = 127; i <= 159; i++) /* DEL plus Control 1 */ + Fput_char_table (make_char (i), make_int (Swhitespace), Vstandard_syntax_table); + define_standard_syntax ("abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + "$%", Sword); + define_standard_syntax ("\"", Sstring); + define_standard_syntax ("\\", Sescape); + define_standard_syntax ("_-+*/&|<>=", Ssymbol); + define_standard_syntax (".,;:?!#@~^'`", Spunct); + + for (p = "()[]{}"; *p; p+=2) { - Fput_char_table (make_char ('('), Fcons (make_int ((int) Sopen), - make_char (')')), - Vstandard_syntax_table); - Fput_char_table (make_char (')'), Fcons (make_int ((int) Sclose), - make_char ('(')), - Vstandard_syntax_table); - Fput_char_table (make_char ('['), Fcons (make_int ((int) Sopen), - make_char (']')), - Vstandard_syntax_table); - Fput_char_table (make_char (']'), Fcons (make_int ((int) Sclose), - make_char ('[')), + Fput_char_table (make_char (p[0]), + Fcons (make_int (Sopen), make_char (p[1])), Vstandard_syntax_table); - Fput_char_table (make_char ('{'), Fcons (make_int ((int) Sopen), - make_char ('}')), + Fput_char_table (make_char (p[1]), + Fcons (make_int (Sclose), make_char (p[0])), Vstandard_syntax_table); - Fput_char_table (make_char ('}'), Fcons (make_int ((int) Sclose), - make_char ('{')), - Vstandard_syntax_table); - } - - Fput_char_table (make_char ('"'), make_int ((int) Sstring), - Vstandard_syntax_table); - Fput_char_table (make_char ('\\'), make_int ((int) Sescape), - Vstandard_syntax_table); - - { - CONST char *p; - for (p = "_-+*/&|<>="; *p; p++) - Fput_char_table (make_char (*p), make_int ((int) Ssymbol), - Vstandard_syntax_table); - - for (p = ".,;:?!#@~^'`"; *p; p++) - Fput_char_table (make_char (*p), make_int ((int) Spunct), - Vstandard_syntax_table); } - } } diff --git a/src/syntax.h b/src/syntax.h index e141eb0..4c57a7a 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -238,9 +238,9 @@ extern CONST unsigned char syntax_spec_code[0400]; extern CONST unsigned char syntax_code_spec[]; -Lisp_Object scan_lists (struct buffer *buf, int from, int count, +Lisp_Object scan_lists (struct buffer *buf, Bufpos from, int count, int depth, int sexpflag, int no_error); -int char_quoted (struct buffer *buf, int pos); +int char_quoted (struct buffer *buf, Bufpos pos); /* NOTE: This does not refer to the mirror table, but to the syntax table itself. */ diff --git a/src/sysdep.c b/src/sysdep.c index 398eaca..7f5486b 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -234,8 +234,11 @@ wait_without_blocking (void) #endif /* NO_SUBPROCESSES */ -void -wait_for_termination (int pid) +#ifdef WINDOWSNT +void wait_for_termination (HANDLE pHandle) +#else +void wait_for_termination (int pid) +#endif { /* #### With the new improved SIGCHLD handling stuff, there is much less danger of race conditions and some of the comments below @@ -345,6 +348,49 @@ wait_for_termination (int pid) Since implementations may add their own error indicators on top, we ignore it by default. */ +#elif defined (WINDOWSNT) + int ret = 0, status = 0; + if (pHandle == NULL) + { + warn_when_safe (Qprocess, Qwarning, "Cannot wait for unknown process to terminate"); + return; + } + do + { + QUIT; + ret = WaitForSingleObject(pHandle, 100); + } + while (ret == WAIT_TIMEOUT); + if (ret == WAIT_FAILED) + { + warn_when_safe (Qprocess, Qwarning, "waiting for process failed"); + } + if (ret == WAIT_ABANDONED) + { + warn_when_safe (Qprocess, Qwarning, + "process to wait for has been abandoned"); + } + if (ret == WAIT_OBJECT_0) + { + ret = GetExitCodeProcess(pHandle, &status); + if (ret) + { + synch_process_alive = 0; + synch_process_retcode = status; + } + else + { + /* GetExitCodeProcess() didn't return a valid exit status, + nothing to do. APA */ + warn_when_safe (Qprocess, Qwarning, + "failure to obtain process exit value"); + } + } + if (pHandle != NULL && !CloseHandle(pHandle)) + { + warn_when_safe (Qprocess, Qwarning, + "failure to close unknown process"); + } #elif defined (EMACS_BLOCK_SIGNAL) && !defined (BROKEN_WAIT_FOR_SIGNAL) && defined (SIGCHLD) while (1) { @@ -376,7 +422,7 @@ wait_for_termination (int pid) Try defining BROKEN_WAIT_FOR_SIGNAL. */ EMACS_WAIT_FOR_SIGNAL (SIGCHLD); } -#else /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */ +#else /* not HAVE_WAITPID and not WINDOWSNT and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */ /* This approach is kind of cheesy but is guaranteed(?!) to work for all systems. */ while (1) @@ -424,7 +470,7 @@ void child_setup_tty (int out) { struct emacs_tty s; - EMACS_GET_TTY (out, &s); + emacs_get_tty (out, &s); #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS) assert (isatty(out)); @@ -516,7 +562,7 @@ child_setup_tty (int out) s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */ #endif /* not HAVE_TERMIO */ - EMACS_SET_TTY (out, &s, 0); + emacs_set_tty (out, &s, 0); #ifdef RTU { @@ -567,7 +613,7 @@ restore_signal_handlers (struct save_signal *saved_handlers) } #ifdef WINDOWSNT -int +pid_t sys_getpid (void) { return abs (getpid ()); @@ -578,7 +624,11 @@ sys_getpid (void) static void sys_subshell (void) { +#ifdef WINDOWSNT + HANDLE pid; +#else int pid; +#endif struct save_signal saved_handlers[5]; Lisp_Object dir; unsigned char *str = 0; @@ -617,7 +667,7 @@ sys_subshell (void) xyzzy: #ifdef WINDOWSNT - pid = -1; + pid = NULL; #else /* not WINDOWSNT */ pid = fork (); @@ -651,7 +701,7 @@ sys_subshell (void) #ifdef WINDOWSNT /* Waits for process completion */ pid = _spawnlp (_P_WAIT, sh, sh, NULL); - if (pid == -1) + if (pid == NULL) write (1, "Can't execute subshell", 22); #else /* not WINDOWSNT */ @@ -1372,7 +1422,8 @@ emacs_get_tty (int fd, struct emacs_tty *settings) /* Set the parameters of the tty on FD according to the contents of *SETTINGS. If FLUSHP is non-zero, we discard input. - Return 0 if all went well, and -1 if anything failed. */ + Return 0 if all went well, and -1 if anything failed. + #### All current callers use FLUSHP == 0. */ int emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) @@ -1482,7 +1533,7 @@ tty_init_sys_modes_on_device (struct device *d) input_fd = CONSOLE_TTY_DATA (con)->infd; output_fd = CONSOLE_TTY_DATA (con)->outfd; - EMACS_GET_TTY (input_fd, &CONSOLE_TTY_DATA (con)->old_tty); + emacs_get_tty (input_fd, &CONSOLE_TTY_DATA (con)->old_tty); tty = CONSOLE_TTY_DATA (con)->old_tty; con->tty_erase_char = Qnil; @@ -1649,7 +1700,7 @@ tty_init_sys_modes_on_device (struct device *d) tty.ltchars = new_ltchars; #endif /* HAVE_LTCHARS */ - EMACS_SET_TTY (input_fd, &tty, 0); + emacs_set_tty (input_fd, &tty, 0); /* This code added to insure that, if flow-control is not to be used, we have an unlocked terminal at the start. */ @@ -1756,7 +1807,7 @@ tabs_safe_p (struct device *d) { struct emacs_tty tty; - EMACS_GET_TTY (DEVICE_INFD (d), &tty); + emacs_get_tty (DEVICE_INFD (d), &tty); return EMACS_TTY_TABS_OK (&tty); } #endif @@ -1829,7 +1880,7 @@ eight_bit_tty (struct device *d) assert (DEVICE_TTY_P (d)); input_fd = DEVICE_INFD (d); - EMACS_GET_TTY (input_fd, &s); + emacs_get_tty (input_fd, &s); #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS) eight_bit = (s.main.c_cflag & CSIZE) == CS8; @@ -1879,7 +1930,7 @@ tty_reset_sys_modes_on_device (struct device *d) fsync (output_fd); #endif - while (EMACS_SET_TTY (input_fd, &CONSOLE_TTY_DATA (con)->old_tty, 0) + while (emacs_set_tty (input_fd, &CONSOLE_TTY_DATA (con)->old_tty, 0) < 0 && errno == EINTR) ; @@ -2573,8 +2624,8 @@ mswindows_set_last_errno (void) /* Ben sez: read Dick Gabriel's essay about the Worse Is Better approach to programming and its connection to the silly - interruptible-system-call business. To find it, look at - Jamie's home page (http://www.netscape.com/people/jwz). */ + interruptible-system-call business. To find it, look on + Jamie's home page (http://www.jwz.org/worse-is-better.html). */ #ifdef ENCAPSULATE_OPEN int @@ -2638,13 +2689,13 @@ interruptible_open (CONST char *path, int oflag, int mode) #ifdef ENCAPSULATE_CLOSE int -sys_close (int fd) +sys_close (int filedes) { #ifdef INTERRUPTIBLE_CLOSE int did_retry = 0; REGISTER int rtnval; - while ((rtnval = close (fd)) == -1 + while ((rtnval = close (filedes)) == -1 && (errno == EINTR)) did_retry = 1; @@ -2656,15 +2707,15 @@ sys_close (int fd) return rtnval; #else - return close (fd); + return close (filedes); #endif } #endif /* ENCAPSULATE_CLOSE */ -int +ssize_t sys_read_1 (int fildes, void *buf, size_t nbyte, int allow_quit) { - int rtnval; + ssize_t rtnval; /* No harm in looping regardless of the INTERRUPTIBLE_IO setting. */ while ((rtnval = read (fildes, buf, nbyte)) == -1 @@ -2677,24 +2728,23 @@ sys_read_1 (int fildes, void *buf, size_t nbyte, int allow_quit) } #ifdef ENCAPSULATE_READ -int +ssize_t sys_read (int fildes, void *buf, size_t nbyte) { return sys_read_1 (fildes, buf, nbyte, 0); } #endif /* ENCAPSULATE_READ */ -int +ssize_t sys_write_1 (int fildes, CONST void *buf, size_t nbyte, int allow_quit) { - int rtnval; - int bytes_written = 0; + ssize_t bytes_written = 0; CONST char *b = (CONST char *) buf; /* No harm in looping regardless of the INTERRUPTIBLE_IO setting. */ while (nbyte > 0) { - rtnval = write (fildes, b, nbyte); + ssize_t rtnval = write (fildes, b, nbyte); if (allow_quit) REALLY_QUIT; @@ -2704,17 +2754,17 @@ sys_write_1 (int fildes, CONST void *buf, size_t nbyte, int allow_quit) if (errno == EINTR) continue; else - return (bytes_written ? bytes_written : -1); + return bytes_written ? bytes_written : -1; } b += rtnval; nbyte -= rtnval; bytes_written += rtnval; } - return (bytes_written); + return bytes_written; } #ifdef ENCAPSULATE_WRITE -int +ssize_t sys_write (int fildes, CONST void *buf, size_t nbyte) { return sys_write_1 (fildes, buf, nbyte, 0); @@ -3038,6 +3088,15 @@ sys_readlink (CONST char *path, char *buf, size_t bufsiz) #endif /* ENCAPSULATE_READLINK */ +#ifdef ENCAPSULATE_FSTAT +int +sys_fstat (int fd, struct stat *buf) +{ + return fstat (fd, buf); +} +#endif /* ENCAPSULATE_FSTAT */ + + #ifdef ENCAPSULATE_STAT int sys_stat (CONST char *path, struct stat *buf) diff --git a/src/sysdep.h b/src/sysdep.h index 79e6a76..e4c3296 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -27,10 +27,6 @@ Boston, MA 02111-1307, USA. */ extern char **environ; -struct emacs_tty; -int emacs_get_tty (int fd, struct emacs_tty *settings); -int emacs_set_tty (int fd, struct emacs_tty *settings, int waitp); - int eight_bit_tty (struct device *d); void stuff_char (struct console *con, int c); @@ -48,7 +44,12 @@ Bufbyte get_eof_char (int fd); /* Wait for subprocess with process id `pid' to terminate and make sure it will get eliminated (not remain forever as a zombie) */ +#ifdef WINDOWSNT +#include +void wait_for_termination (HANDLE pid); +#else void wait_for_termination (int pid); +#endif /* flush any pending output * (may flush input as well; it does not matter the way we use it) @@ -78,10 +79,10 @@ void reset_poll_for_quit (void); extern JMP_BUF break_system_call_jump; extern volatile int can_break_system_calls; -int sys_write_1 (int fildes, CONST void *buf, size_t nbyte, - int allow_quit); -int sys_read_1 (int fildes, void *buf, size_t nbyte, - int allow_quit); +ssize_t sys_write_1 (int fildes, CONST void *buf, size_t nbyte, + int allow_quit); +ssize_t sys_read_1 (int fildes, void *buf, size_t nbyte, + int allow_quit); /* Call these functions if you want to change some terminal parameter -- reset the console, change the parameter, and init it again. */ diff --git a/src/sysdir.h b/src/sysdir.h index aee0223..3616ef6 100644 --- a/src/sysdir.h +++ b/src/sysdir.h @@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */ #ifdef SYSV_SYSTEM_DIR # include -#elif defined (NONSYSTEM_DIR_LIBRARY) +#elif defined (NONSYSTEM_DIR_LIBRARY) # include "ndir.h" #elif defined (MSDOS) # include diff --git a/src/sysdll.c b/src/sysdll.c index d6e7df9..abc70b8 100644 --- a/src/sysdll.c +++ b/src/sysdll.c @@ -23,6 +23,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #endif +#include #include "sysdll.h" /* This whole file is conditional upon HAVE_SHLIB */ diff --git a/src/sysfile.h b/src/sysfile.h index 3f4a694..cc8f2de 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -244,7 +244,7 @@ Boston, MA 02111-1307, USA. */ Other encapsulations are declared in the appropriate sys*.h file. */ #ifdef ENCAPSULATE_READ -int sys_read (int, void *, size_t); +ssize_t sys_read (int, void *, size_t); #endif #if defined (ENCAPSULATE_READ) && !defined (DONT_ENCAPSULATE) # undef read @@ -255,7 +255,7 @@ int sys_read (int, void *, size_t); #endif #ifdef ENCAPSULATE_WRITE -int sys_write (int, CONST void *, size_t); +ssize_t sys_write (int, CONST void *, size_t); #endif #if defined (ENCAPSULATE_WRITE) && !defined (DONT_ENCAPSULATE) # undef write @@ -380,6 +380,18 @@ int sys_readlink (CONST char *path, char *buf, size_t bufsiz); # define sys_readlink readlink #endif +#ifdef ENCAPSULATE_FSTAT +int sys_fstat (int fd, struct stat *buf); +#endif +#if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE) +# undef fstat +/* Need to use arguments to avoid messing with struct stat */ +# define fstat(fd, buf) sys_fstat (fd, buf) +#endif +#if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE) +# define sys_fstat fstat +#endif + #ifdef ENCAPSULATE_STAT int sys_stat (CONST char *path, struct stat *buf); #endif diff --git a/src/syssignal.h b/src/syssignal.h index 1332f39..1a3de7b 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -213,7 +213,7 @@ signal_handler_t sys_do_signal (int signal_number, signal_handler_t action); #define EMACS_KILLPG(gid, signo) killpg (gid, signo) #else #ifdef WINDOWSNT -#define EMACS_KILLPG(gid, signo) (kill (gid, signo)) +#define EMACS_KILLPG(gid, signo) kill (gid, signo) #else #define EMACS_KILLPG(gid, signo) kill (-(gid), signo) #endif diff --git a/src/systty.h b/src/systty.h index 3f9efdb..c72e0c5 100644 --- a/src/systty.h +++ b/src/systty.h @@ -338,7 +338,7 @@ Boston, MA 02111-1307, USA. */ if we're run from sh. */ # define EMACS_SET_PROCESS_GROUP(pg) #elif defined(__MINGW32__) -# define EMACS_SEPARATE_PROCESS_GROUP() +# define EMACS_SEPARATE_PROCESS_GROUP() #else /* Under NeXTstep, a process group of 0 is not the same as specifying your own process ID, so we go ahead and specify it explicitly. */ @@ -358,11 +358,11 @@ Boston, MA 02111-1307, USA. */ emacs_tty should contain an element for each parameter struct that Emacs may change. - EMACS_GET_TTY (int FD, struct emacs_tty *P) stores the parameters + emacs_get_tty (int FD, struct emacs_tty *P) stores the parameters of the tty on FD in *P. Return zero if all's well, or -1 if we ran into an error we couldn't deal with. - EMACS_SET_TTY (int FD, struct emacs_tty *P, int flushp) + emacs_set_tty (int FD, struct emacs_tty *P, int flushp) sets the parameters of the tty on FD according to the contents of *P. If flushp is non-zero, we discard queued input to be written before making the change. @@ -409,15 +409,9 @@ struct emacs_tty { #endif /* HAVE_TCHARS */ #endif /* HAVE_TERMIOS */ }; - -/* Define EMACS_GET_TTY and EMACS_SET_TTY, - the macros for reading and setting parts of `struct emacs_tty'. - - These got pretty unmanageable (huge macros are hard to debug), and - finally needed some code which couldn't be done as part of an - expression, so we moved them out to their own functions in sysdep.c. */ -#define EMACS_GET_TTY(fd, p) emacs_get_tty (fd, p) -#define EMACS_SET_TTY(fd, p, waitp) emacs_set_tty (fd, p, waitp) + +int emacs_get_tty (int fd, struct emacs_tty *settings); +int emacs_set_tty (int fd, struct emacs_tty *settings, int flushp); /* --------------------------------------------------------- */ diff --git a/src/terminfo.c b/src/terminfo.c index bbdb9da..bc49f8c 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -81,7 +81,7 @@ emacs_tparam (CONST char *string, char *outstring, int len, int arg1, temp = (char *) tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (outstring == 0) - outstring = ((char *) (xmalloc ((strlen (temp)) + 1))); + outstring = (char *) xmalloc (strlen (temp) + 1); strcpy (outstring, temp); return outstring; } diff --git a/src/text-coding.c b/src/text-coding.c index 7ce8b94..5d77048 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ #endif #include "file-coding.h" -Lisp_Object Qbuffer_file_coding_system, Qcoding_system_error; +Lisp_Object Qcoding_system_error; Lisp_Object Vkeyboard_coding_system; Lisp_Object Vterminal_coding_system; @@ -47,14 +47,37 @@ Lisp_Object Vfile_name_coding_system; /* Table of symbols identifying each coding category. */ Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST + 1]; -/* Coding system currently associated with each coding category. */ -Lisp_Object coding_category_system[CODING_CATEGORY_LAST + 1]; -/* Table of all coding categories in decreasing order of priority. - This describes a permutation of the possible coding categories. */ -int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; -Lisp_Object Qcoding_system_p; +struct file_coding_dump { + /* Coding system currently associated with each coding category. */ + Lisp_Object coding_category_system[CODING_CATEGORY_LAST + 1]; + + /* Table of all coding categories in decreasing order of priority. + This describes a permutation of the possible coding categories. */ + int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; + +#ifndef UTF2000 + Lisp_Object ucs_to_mule_table[65536]; +#endif +} *fcd; + +static const struct lrecord_description fcd_description_1[] = { + { XD_LISP_OBJECT, offsetof(struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST + 1 }, +#ifndef UTF2000 + { XD_LISP_OBJECT, offsetof(struct file_coding_dump, ucs_to_mule_table), 65536 }, +#endif + { XD_END } +}; + +static const struct struct_description fcd_description = { + sizeof(struct file_coding_dump), + fcd_description_1 +}; + +Lisp_Object mule_to_ucs_table; + +Lisp_Object Qcoding_systemp; Lisp_Object Qraw_text, Qno_conversion, Qccl, Qiso2022; /* Qinternal in general.c */ @@ -238,6 +261,26 @@ typedef struct Dynarr_declare (codesys_prop); } codesys_prop_dynarr; +static const struct lrecord_description codesys_prop_description_1[] = { + { XD_LISP_OBJECT, offsetof(codesys_prop, sym), 1 }, + { XD_END } +}; + +static const struct struct_description codesys_prop_description = { + sizeof(codesys_prop), + codesys_prop_description_1 +}; + +static const struct lrecord_description codesys_prop_dynarr_description_1[] = { + XD_DYNARR_DESC(codesys_prop_dynarr, &codesys_prop_description), + { XD_END } +}; + +static const struct struct_description codesys_prop_dynarr_description = { + sizeof(codesys_prop_dynarr), + codesys_prop_dynarr_description_1 +}; + codesys_prop_dynarr *the_codesys_prop_dynarr; enum codesys_prop_enum @@ -252,7 +295,7 @@ enum codesys_prop_enum /* Coding system functions */ /************************************************************************/ -static Lisp_Object mark_coding_system (Lisp_Object, void (*) (Lisp_Object)); +static Lisp_Object mark_coding_system (Lisp_Object); static void print_coding_system (Lisp_Object, Lisp_Object, int); static void finalize_coding_system (void *header, int for_disksave); @@ -266,7 +309,7 @@ static const struct struct_description ccs_description = { sizeof(charset_conversion_spec), ccs_description_1 }; - + static const struct lrecord_description ccsd_description_1[] = { XD_DYNARR_DESC(charset_conversion_spec_dynarr, &ccs_description), { XD_END } @@ -298,16 +341,16 @@ DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system, struct Lisp_Coding_System); static Lisp_Object -mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_coding_system (Lisp_Object obj) { Lisp_Coding_System *codesys = XCODING_SYSTEM (obj); - markobj (CODING_SYSTEM_NAME (codesys)); - markobj (CODING_SYSTEM_DOC_STRING (codesys)); - markobj (CODING_SYSTEM_MNEMONIC (codesys)); - markobj (CODING_SYSTEM_EOL_LF (codesys)); - markobj (CODING_SYSTEM_EOL_CRLF (codesys)); - markobj (CODING_SYSTEM_EOL_CR (codesys)); + mark_object (CODING_SYSTEM_NAME (codesys)); + mark_object (CODING_SYSTEM_DOC_STRING (codesys)); + mark_object (CODING_SYSTEM_MNEMONIC (codesys)); + mark_object (CODING_SYSTEM_EOL_LF (codesys)); + mark_object (CODING_SYSTEM_EOL_CRLF (codesys)); + mark_object (CODING_SYSTEM_EOL_CR (codesys)); switch (CODING_SYSTEM_TYPE (codesys)) { @@ -315,15 +358,15 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) int i; case CODESYS_ISO2022: for (i = 0; i < 4; i++) - markobj (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); + mark_object (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); if (codesys->iso2022.input_conv) { for (i = 0; i < Dynarr_length (codesys->iso2022.input_conv); i++) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.input_conv, i); - markobj (ccs->from_charset); - markobj (ccs->to_charset); + mark_object (ccs->from_charset); + mark_object (ccs->to_charset); } } if (codesys->iso2022.output_conv) @@ -332,22 +375,22 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.output_conv, i); - markobj (ccs->from_charset); - markobj (ccs->to_charset); + mark_object (ccs->from_charset); + mark_object (ccs->to_charset); } } break; case CODESYS_CCL: - markobj (CODING_SYSTEM_CCL_DECODE (codesys)); - markobj (CODING_SYSTEM_CCL_ENCODE (codesys)); + mark_object (CODING_SYSTEM_CCL_DECODE (codesys)); + mark_object (CODING_SYSTEM_CCL_ENCODE (codesys)); break; #endif /* MULE */ default: break; } - markobj (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); + mark_object (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); return CODING_SYSTEM_POST_READ_CONVERSION (codesys); } @@ -543,8 +586,7 @@ add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object value, (struct coding_system_list_closure *) coding_system_list_closure; Lisp_Object *coding_system_list = cscl->coding_system_list; - *coding_system_list = Fcons (XCODING_SYSTEM (value)->name, - *coding_system_list); + *coding_system_list = Fcons (key, *coding_system_list); return 0; } @@ -1025,7 +1067,7 @@ Define symbol ALIAS as an alias for coding system CODING-SYSTEM. FROB (CR, "-mac"); #undef FROB } - /* FSF return value is a vector of [ALIAS-unix ALIAS-doc ALIAS-mac], + /* FSF return value is a vector of [ALIAS-unix ALIAS-dos ALIAS-mac], but it doesn't look intentional, so I'd rather return something meaningful or nothing at all. */ return Qnil; @@ -1312,7 +1354,7 @@ previously. order. */ for (j = 0; j <= CODING_CATEGORY_LAST; j++) { - int cat = coding_category_by_priority[j]; + int cat = fcd->coding_category_by_priority[j]; if (category_to_priority[cat] < 0) category_to_priority[cat] = i++; } @@ -1321,7 +1363,7 @@ previously. constructed. */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) - coding_category_by_priority[category_to_priority[i]] = i; + fcd->coding_category_by_priority[category_to_priority[i]] = i; /* Phew! That was confusing. */ return Qnil; @@ -1336,7 +1378,7 @@ Return a list of coding categories in descending order of priority. Lisp_Object list = Qnil; for (i = CODING_CATEGORY_LAST; i >= 0; i--) - list = Fcons (coding_category_symbol[coding_category_by_priority[i]], + list = Fcons (coding_category_symbol[fcd->coding_category_by_priority[i]], list); return list; } @@ -1349,7 +1391,7 @@ Change the coding system associated with a coding category. int cat = decode_coding_category (coding_category); coding_system = Fget_coding_system (coding_system); - coding_category_system[cat] = coding_system; + fcd->coding_category_system[cat] = coding_system; return Qnil; } @@ -1359,7 +1401,7 @@ Return the coding system associated with a coding category. (coding_category)) { int cat = decode_coding_category (coding_category); - Lisp_Object sys = coding_category_system[cat]; + Lisp_Object sys = fcd->coding_category_system[cat]; if (!NILP (sys)) return XCODING_SYSTEM_NAME (sys); @@ -1463,21 +1505,19 @@ detect_eol_type (struct detection_state *st, CONST unsigned char *src, while (n--) { c = *src++; - if (c == '\r') - st->eol.just_saw_cr = 1; - else + if (c == '\n') { - if (c == '\n') - { - if (st->eol.just_saw_cr) - return EOL_CRLF; - else if (st->eol.seen_anything) - return EOL_LF; - } - else if (st->eol.just_saw_cr) - return EOL_CR; - st->eol.just_saw_cr = 0; + if (st->eol.just_saw_cr) + return EOL_CRLF; + else if (st->eol.seen_anything) + return EOL_LF; } + else if (st->eol.just_saw_cr) + return EOL_CR; + else if (c == '\r') + st->eol.just_saw_cr = 1; + else + st->eol.just_saw_cr = 0; st->eol.seen_anything = 1; } @@ -1502,7 +1542,7 @@ detect_eol_type (struct detection_state *st, CONST unsigned char *src, */ static int -detect_coding_type (struct detection_state *st, CONST unsigned char *src, +detect_coding_type (struct detection_state *st, CONST Extbyte *src, unsigned int n, int just_do_eol) { int c; @@ -1593,13 +1633,13 @@ coding_system_from_mask (int mask) the first one that is allowed. */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) { - cat = coding_category_by_priority[i]; + cat = fcd->coding_category_by_priority[i]; if ((mask & (1 << cat)) && - !NILP (coding_category_system[cat])) + !NILP (fcd->coding_category_system[cat])) break; } if (cat >= 0) - return coding_category_system[cat]; + return fcd->coding_category_system[cat]; else return Fget_coding_system (Qraw_text); } @@ -1607,13 +1647,15 @@ coding_system_from_mask (int mask) /* Given a seekable read stream and potential coding system and EOL type as specified, do any autodetection that is called for. If the - coding system and/or EOL type are not autodetect, they will be left + coding system and/or EOL type are not `autodetect', they will be left alone; but this function will never return an autodetect coding system or EOL type. This function does not automatically fetch subsidiary coding systems; that should be unnecessary with the explicit eol-type argument. */ +#define LENGTH(string_constant) (sizeof (string_constant) - 1) + void determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out, enum eol_type *eol_type_in_out) @@ -1628,68 +1670,110 @@ determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out, decst.mask = ~0; /* If autodetection is called for, do it now. */ - if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT || - *eol_type_in_out == EOL_AUTODETECT) + if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT + || *eol_type_in_out == EOL_AUTODETECT) { - unsigned char random_buffer[4096]; - int nread; + Extbyte buf[4096]; Lisp_Object coding_system = Qnil; - - nread = Lstream_read (stream, random_buffer, sizeof (random_buffer)); - if (nread) - { - unsigned char *cp = random_buffer; - - while (cp < random_buffer + nread) - { - if ((*cp++ == 'c') && (cp < random_buffer + nread) && - (*cp++ == 'o') && (cp < random_buffer + nread) && - (*cp++ == 'd') && (cp < random_buffer + nread) && - (*cp++ == 'i') && (cp < random_buffer + nread) && - (*cp++ == 'n') && (cp < random_buffer + nread) && - (*cp++ == 'g') && (cp < random_buffer + nread) && - (*cp++ == ':') && (cp < random_buffer + nread)) + Extbyte *p; + ssize_t nread = Lstream_read (stream, buf, sizeof (buf)); + Extbyte *scan_end; + + /* Look for initial "-*-"; mode line prefix */ + for (p = buf, + scan_end = buf + nread - LENGTH ("-*-coding:?-*-"); + p <= scan_end + && *p != '\n' + && *p != '\r'; + p++) + if (*p == '-' && *(p+1) == '*' && *(p+2) == '-') + { + Extbyte *local_vars_beg = p + 3; + /* Look for final "-*-"; mode line suffix */ + for (p = local_vars_beg, + scan_end = buf + nread - LENGTH ("-*-"); + p <= scan_end + && *p != '\n' + && *p != '\r'; + p++) + if (*p == '-' && *(p+1) == '*' && *(p+2) == '-') { - unsigned char coding_system_name[4096 - 6]; - unsigned char *np = coding_system_name; - - while ( (cp < random_buffer + nread) - && ((*cp == ' ') || (*cp == '\t')) ) - { - cp++; - } - while ( (cp < random_buffer + nread) && - (*cp != ' ') && (*cp != '\t') && (*cp != ';') ) - { - *np++ = *cp++; - } - *np = 0; - coding_system - = Ffind_coding_system (intern (coding_system_name)); + Extbyte *suffix = p; + /* Look for "coding:" */ + for (p = local_vars_beg, + scan_end = suffix - LENGTH ("coding:?"); + p <= scan_end; + p++) + if (memcmp ("coding:", p, LENGTH ("coding:")) == 0 + && (p == local_vars_beg + || (*(p-1) == ' ' || + *(p-1) == '\t' || + *(p-1) == ';'))) + { + Extbyte save; + int n; + p += LENGTH ("coding:"); + while (*p == ' ' || *p == '\t') p++; + + /* Get coding system name */ + save = *suffix; *suffix = '\0'; + /* Characters valid in a MIME charset name (rfc 1521), + and in a Lisp symbol name. */ + n = strspn ( (char *) p, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789" + "!$%&*+-.^_{|}~"); + *suffix = save; + if (n > 0) + { + save = p[n]; p[n] = '\0'; + coding_system = + Ffind_coding_system (intern ((char *) p)); + p[n] = save; + } + break; + } break; } - } - if (EQ(coding_system, Qnil)) - do{ - if (detect_coding_type (&decst, random_buffer, nread, - XCODING_SYSTEM_TYPE (*codesys_in_out) - != CODESYS_AUTODETECT)) - break; - nread = Lstream_read (stream, - random_buffer, sizeof (random_buffer)); - if (!nread) - break; - } while(1); - } + break; + } + + if (NILP (coding_system)) + do + { + if (detect_coding_type (&decst, buf, nread, + XCODING_SYSTEM_TYPE (*codesys_in_out) + != CODESYS_AUTODETECT)) + break; + nread = Lstream_read (stream, buf, sizeof (buf)); + if (nread == 0) + break; + } + while (1); + + else if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT + && XCODING_SYSTEM_EOL_TYPE (coding_system) == EOL_AUTODETECT) + do + { + if (detect_coding_type (&decst, buf, nread, 1)) + break; + nread = Lstream_read (stream, buf, sizeof (buf)); + if (!nread) + break; + } + while (1); + *eol_type_in_out = decst.eol_type; if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT) { - if (EQ(coding_system, Qnil)) + if (NILP (coding_system)) *codesys_in_out = coding_system_from_mask (decst.mask); else *codesys_in_out = coding_system; } } + /* If we absolutely can't determine the EOL type, just assume LF. */ if (*eol_type_in_out == EOL_AUTODETECT) *eol_type_in_out = EOL_LF; @@ -1726,7 +1810,7 @@ type. Optional arg BUFFER defaults to the current buffer. while (1) { unsigned char random_buffer[4096]; - int nread = Lstream_read (istr, random_buffer, sizeof (random_buffer)); + ssize_t nread = Lstream_read (istr, random_buffer, sizeof (random_buffer)); if (!nread) break; @@ -1747,10 +1831,10 @@ type. Optional arg BUFFER defaults to the current buffer. #endif for (i = CODING_CATEGORY_LAST; i >= 0; i--) { - int sys = coding_category_by_priority[i]; + int sys = fcd->coding_category_by_priority[i]; if (decst.mask & (1 << sys)) { - Lisp_Object codesys = coding_category_system[sys]; + Lisp_Object codesys = fcd->coding_category_system[sys]; if (!NILP (codesys)) codesys = subsidiary_coding_system (codesys, decst.eol_type); val = Fcons (codesys, val); @@ -1950,21 +2034,22 @@ struct decoding_stream struct detection_state decst; }; -static int decoding_reader (Lstream *stream, unsigned char *data, size_t size); -static int decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size); +static ssize_t decoding_reader (Lstream *stream, + unsigned char *data, size_t size); +static ssize_t decoding_writer (Lstream *stream, + CONST unsigned char *data, size_t size); static int decoding_rewinder (Lstream *stream); static int decoding_seekable_p (Lstream *stream); static int decoding_flusher (Lstream *stream); static int decoding_closer (Lstream *stream); -static Lisp_Object decoding_marker (Lisp_Object stream, - void (*markobj) (Lisp_Object)); +static Lisp_Object decoding_marker (Lisp_Object stream); DEFINE_LSTREAM_IMPLEMENTATION ("decoding", lstream_decoding, sizeof (struct decoding_stream)); static Lisp_Object -decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +decoding_marker (Lisp_Object stream) { Lstream *str = DECODING_STREAM_DATA (XLSTREAM (stream))->other_end; Lisp_Object str_obj; @@ -1974,9 +2059,9 @@ decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - markobj (str_obj); + mark_object (str_obj); if (str->imp->marker) - return (str->imp->marker) (str_obj, markobj); + return (str->imp->marker) (str_obj); else return Qnil; } @@ -1984,12 +2069,12 @@ decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) /* Read SIZE bytes of data and store it into DATA. We are a decoding stream so we read data from the other end, decode it, and store it into DATA. */ -static int +static ssize_t decoding_reader (Lstream *stream, unsigned char *data, size_t size) { struct decoding_stream *str = DECODING_STREAM_DATA (stream); unsigned char *orig_data = data; - int read_size; + ssize_t read_size; int error_occurred = 0; /* We need to interface to mule_decode(), which expects to take some @@ -2046,11 +2131,11 @@ decoding_reader (Lstream *stream, unsigned char *data, size_t size) return data - orig_data; } -static int +static ssize_t decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct decoding_stream *str = DECODING_STREAM_DATA (stream); - int retval; + ssize_t retval; /* Decode all our data into the runoff, and then attempt to write it all out to the other end. Remove whatever chunk we succeeded @@ -2320,7 +2405,7 @@ BUFFER defaults to the current buffer if unspecified. char tempbuf[1024]; /* some random amount */ Bufpos newpos, even_newer_pos; Bufpos oldpos = lisp_buffer_stream_startpos (istr); - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; @@ -2410,22 +2495,21 @@ struct encoding_stream #endif /* MULE */ }; -static int encoding_reader (Lstream *stream, unsigned char *data, size_t size); -static int encoding_writer (Lstream *stream, CONST unsigned char *data, - size_t size); +static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size); +static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data, + size_t size); static int encoding_rewinder (Lstream *stream); static int encoding_seekable_p (Lstream *stream); static int encoding_flusher (Lstream *stream); static int encoding_closer (Lstream *stream); -static Lisp_Object encoding_marker (Lisp_Object stream, - void (*markobj) (Lisp_Object)); +static Lisp_Object encoding_marker (Lisp_Object stream); DEFINE_LSTREAM_IMPLEMENTATION ("encoding", lstream_encoding, sizeof (struct encoding_stream)); static Lisp_Object -encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) +encoding_marker (Lisp_Object stream) { Lstream *str = ENCODING_STREAM_DATA (XLSTREAM (stream))->other_end; Lisp_Object str_obj; @@ -2435,9 +2519,9 @@ encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - markobj (str_obj); + mark_object (str_obj); if (str->imp->marker) - return (str->imp->marker) (str_obj, markobj); + return (str->imp->marker) (str_obj); else return Qnil; } @@ -2445,12 +2529,12 @@ encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) /* Read SIZE bytes of data and store it into DATA. We are a encoding stream so we read data from the other end, encode it, and store it into DATA. */ -static int +static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size) { struct encoding_stream *str = ENCODING_STREAM_DATA (stream); unsigned char *orig_data = data; - int read_size; + ssize_t read_size; int error_occurred = 0; /* We need to interface to mule_encode(), which expects to take some @@ -2507,11 +2591,11 @@ encoding_reader (Lstream *stream, unsigned char *data, size_t size) return data - orig_data; } -static int +static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data, size_t size) { struct encoding_stream *str = ENCODING_STREAM_DATA (stream); - int retval; + ssize_t retval; /* Encode all our data into the runoff, and then attempt to write it all out to the other end. Remove whatever chunk we succeeded @@ -2735,7 +2819,7 @@ text. BUFFER defaults to the current buffer if unspecified. char tempbuf[1024]; /* some random amount */ Bufpos newpos, even_newer_pos; Bufpos oldpos = lisp_buffer_stream_startpos (istr); - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; @@ -5243,7 +5327,7 @@ convert_from_external_format (CONST Extbyte *ptr, GCPRO3 (instream, outstream, da_outstream); while (1) { - int size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); + ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf)); if (!size_in_bytes) break; Lstream_write (ostr, tempbuf, size_in_bytes); @@ -5269,7 +5353,6 @@ convert_from_external_format (CONST Extbyte *ptr, void syms_of_file_coding (void) { - defsymbol (&Qbuffer_file_coding_system, "buffer-file-coding-system"); deferror (&Qcoding_system_error, "coding-system-error", "Coding-system error", Qio_error); @@ -5305,7 +5388,7 @@ syms_of_file_coding (void) DEFSUBR (Fdecode_big5_char); DEFSUBR (Fencode_big5_char); #endif /* MULE */ - defsymbol (&Qcoding_system_p, "coding-system-p"); + defsymbol (&Qcoding_systemp, "coding-system-p"); defsymbol (&Qno_conversion, "no-conversion"); defsymbol (&Qraw_text, "raw-text"); #ifdef MULE @@ -5400,11 +5483,14 @@ vars_of_file_coding (void) { int i; + fcd = xnew (struct file_coding_dump); + dumpstruct (&fcd, &fcd_description); + /* Initialize to something reasonable ... */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) { - coding_category_system[i] = Qnil; - coding_category_by_priority[i] = i; + fcd->coding_category_system[i] = Qnil; + fcd->coding_category_by_priority[i] = i; } Fprovide (intern ("file-coding")); @@ -5465,6 +5551,7 @@ complex_vars_of_file_coding (void) make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); the_codesys_prop_dynarr = Dynarr_new (codesys_prop); + dumpstruct (&the_codesys_prop_dynarr, &codesys_prop_dynarr_description); #define DEFINE_CODESYS_PROP(Prop_Type, Sym) do \ { \ @@ -5525,11 +5612,11 @@ complex_vars_of_file_coding (void) Fdefine_coding_system_alias (Qno_conversion, Qraw_text); /* Need this for bootstrapping */ - coding_category_system[CODING_CATEGORY_NO_CONVERSION] = + fcd->coding_category_system[CODING_CATEGORY_NO_CONVERSION] = Fget_coding_system (Qraw_text); #ifdef UTF2000 - coding_category_system[CODING_CATEGORY_UTF8] + fcd->coding_category_system[CODING_CATEGORY_UTF8] = Fget_coding_system (Qutf8); #endif } diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index 8d6389b..5a4acfd 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -59,6 +59,9 @@ GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p) #define MSWINDOWS_BLANK_SIZE 5 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 +static void +mswindows_move_toolbar (struct frame *f, enum toolbar_pos pos); + #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ do { \ switch (pos) \ @@ -460,6 +463,9 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) /* now display the window */ ShowWindow (toolbarwnd, SW_SHOW); + /* no idea why this is necessary but initial display will not + happen otherwise. */ + mswindows_move_toolbar (f, pos); if (button_tbl) xfree (button_tbl); @@ -525,6 +531,13 @@ mswindows_redraw_exposed_toolbars (struct frame *f, int x, int y, int width, } static void +mswindows_redraw_frame_toolbars (struct frame *f) +{ + mswindows_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f), + FRAME_PIXHEIGHT (f)); +} + +static void mswindows_initialize_frame_toolbars (struct frame *f) { @@ -636,5 +649,6 @@ console_type_create_toolbar_mswindows (void) CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars); + CONSOLE_HAS_METHOD (mswindows, redraw_frame_toolbars); } diff --git a/src/toolbar-x.c b/src/toolbar-x.c index 55f6c66..ab7e16d 100644 --- a/src/toolbar-x.c +++ b/src/toolbar-x.c @@ -77,7 +77,8 @@ x_draw_blank_toolbar_button (struct frame *f, int x, int y, int width, /* Draw the outline. */ x_output_shadows (f, sx, sy, swidth, sheight, top_shadow_gc, - bottom_shadow_gc, background_gc, shadow_thickness); + bottom_shadow_gc, background_gc, shadow_thickness, + EDGE_ALL); /* Blank the middle. */ XFillRectangle (dpy, x_win, background_gc, sx + shadow_thickness, @@ -158,7 +159,8 @@ x_output_toolbar_button (struct frame *f, Lisp_Object button) x_output_shadows (f, tb->x + x_adj, tb->y + y_adj, tb->width + width_adj, tb->height + height_adj, top_shadow_gc, - bottom_shadow_gc, background_gc, shadow_thickness); + bottom_shadow_gc, background_gc, shadow_thickness, + EDGE_ALL); /* Clear the pixmap area. */ XFillRectangle (dpy, x_win, background_gc, tb->x + x_adj + shadow_thickness, @@ -211,8 +213,8 @@ x_output_toolbar_button (struct frame *f, Lisp_Object button) } x_output_x_pixmap (f, XIMAGE_INSTANCE (instance), tb->x + x_offset, - tb->y + y_offset, 0, 0, 0, 0, width, height, - 0, 0, 0, background_gc); + tb->y + y_offset, 0, 0, width, height, + 0, 0, background_gc); } else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_TEXT) { diff --git a/src/toolbar.c b/src/toolbar.c index db2c69e..31732af 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -57,19 +57,19 @@ Lisp_Object Qinit_toolbar_from_resources; static Lisp_Object -mark_toolbar_button (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_toolbar_button (Lisp_Object obj) { struct toolbar_button *data = XTOOLBAR_BUTTON (obj); - markobj (data->next); - markobj (data->frame); - markobj (data->up_glyph); - markobj (data->down_glyph); - markobj (data->disabled_glyph); - markobj (data->cap_up_glyph); - markobj (data->cap_down_glyph); - markobj (data->cap_disabled_glyph); - markobj (data->callback); - markobj (data->enabled_p); + mark_object (data->next); + mark_object (data->frame); + mark_object (data->up_glyph); + mark_object (data->down_glyph); + mark_object (data->disabled_glyph); + mark_object (data->cap_up_glyph); + mark_object (data->cap_down_glyph); + mark_object (data->cap_disabled_glyph); + mark_object (data->callback); + mark_object (data->enabled_p); return data->help_string; } @@ -1312,6 +1312,12 @@ specifier_type_create_toolbar (void) } void +reinit_specifier_type_create_toolbar (void) +{ + REINITIALIZE_SPECIFIER_TYPE (toolbar); +} + +void specifier_vars_of_toolbar (void) { Lisp_Object fb; diff --git a/src/toolbar.h b/src/toolbar.h index 543ed2c..6440767 100644 --- a/src/toolbar.h +++ b/src/toolbar.h @@ -73,7 +73,6 @@ DECLARE_LRECORD (toolbar_button, struct toolbar_button); #define XTOOLBAR_BUTTON(x) XRECORD (x, toolbar_button, struct toolbar_button) #define XSETTOOLBAR_BUTTON(x, p) XSETRECORD (x, p, toolbar_button) #define TOOLBAR_BUTTONP(x) RECORDP (x, toolbar_button) -#define GC_TOOLBAR_BUTTONP(x) GC_RECORDP (x, toolbar_button) #define CHECK_TOOLBAR_BUTTON(x) CHECK_RECORD (x, toolbar_button) #define CONCHECK_TOOLBAR_BUTTON(x) CONCHECK_RECORD (x, toolbar_button) diff --git a/src/tooltalk.c b/src/tooltalk.c index 3f24b2e..f9a6d5e 100644 --- a/src/tooltalk.c +++ b/src/tooltalk.c @@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ /* Written by John Rose . - Heavily modified and cleaned up by Ben Wing . */ + Heavily modified and cleaned up by Ben Wing . */ #include #include "lisp.h" @@ -151,9 +151,9 @@ struct Lisp_Tooltalk_Message }; static Lisp_Object -mark_tooltalk_message (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_tooltalk_message (Lisp_Object obj) { - markobj (XTOOLTALK_MESSAGE (obj)->callback); + mark_object (XTOOLTALK_MESSAGE (obj)->callback); return XTOOLTALK_MESSAGE (obj)->plist_sym; } @@ -225,9 +225,9 @@ struct Lisp_Tooltalk_Pattern }; static Lisp_Object -mark_tooltalk_pattern (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_tooltalk_pattern (Lisp_Object obj) { - markobj (XTOOLTALK_PATTERN (obj)->callback); + mark_object (XTOOLTALK_PATTERN (obj)->callback); return XTOOLTALK_PATTERN (obj)->plist_sym; } @@ -502,7 +502,7 @@ tt_state_symbol (Tt_state n) static Lisp_Object tt_build_string (char *s) { - return build_string ((s) ? s : ""); + return build_string (s ? s : ""); } static Lisp_Object diff --git a/src/tooltalk.h b/src/tooltalk.h index bede554..16e991b 100644 --- a/src/tooltalk.h +++ b/src/tooltalk.h @@ -31,7 +31,6 @@ DECLARE_LRECORD (tooltalk_message, struct Lisp_Tooltalk_Message); #define XTOOLTALK_MESSAGE(x) XRECORD (x, tooltalk_message, struct Lisp_Tooltalk_Message) #define XSETTOOLTALK_MESSAGE(x, p) XSETRECORD (x, p, tooltalk_message) #define TOOLTALK_MESSAGEP(x) RECORDP (x, tooltalk_message) -#define GC_TOOLTALK_MESSAGEP(x) GC_RECORDP (x, tooltalk_message) #define CHECK_TOOLTALK_MESSAGE(x) CHECK_RECORD (x, tooltalk_message) struct Lisp_Tooltalk_Pattern; @@ -39,7 +38,6 @@ DECLARE_LRECORD (tooltalk_pattern, struct Lisp_Tooltalk_Pattern); #define XTOOLTALK_PATTERN(x) XRECORD (x, tooltalk_pattern, struct Lisp_Tooltalk_Pattern) #define XSETTOOLTALK_PATTERN(x, p) XSETRECORD (x, p, tooltalk_pattern) #define TOOLTALK_PATTERNP(x) RECORDP (x, tooltalk_pattern) -#define GC_TOOLTALK_PATTERNP(x) GC_RECORDP (x, tooltalk_pattern) #define CHECK_TOOLTALK_PATTERN(x) CHECK_RECORD (x, tooltalk_pattern) #define TOOLTALK_MESSAGE_KEY 100 diff --git a/src/undo.c b/src/undo.c index dd9a443..41af38e 100644 --- a/src/undo.c +++ b/src/undo.c @@ -46,7 +46,7 @@ Lisp_Object Qinhibit_read_only; which will be added to the list at the end of the command. This ensures we can't run out of space while trying to make an undo-boundary. */ -Lisp_Object pending_boundary; +static Lisp_Object pending_boundary; static void undo_boundary (struct buffer *b) @@ -547,9 +547,16 @@ syms_of_undo (void) } void -vars_of_undo (void) +reinit_vars_of_undo (void) { inside_undo = 0; +} + +void +vars_of_undo (void) +{ + reinit_vars_of_undo (); + pending_boundary = Qnil; staticpro (&pending_boundary); last_undo_buffer = Qnil; diff --git a/src/unexcw.c b/src/unexcw.c index 276f5ff..74f131e 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -40,7 +40,9 @@ unexec (char *, char *, void *, void *, void *) #else #undef CONST -#include +#ifndef MAX_PATH +#define MAX_PATH 260 +#endif #include #define ALLOC_UNIT 0xFFFF diff --git a/src/unexelf.c b/src/unexelf.c index 785915e..733a0f6 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -18,7 +18,7 @@ along with XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Synched up with: FSF 20.2. */ +/* Synched up with: FSF 20.4. */ /* * unexec.c - Convert a running program into an a.out file. @@ -424,10 +424,98 @@ extern void fatal (CONST char *, ...); #include #include #include +#if !defined (__NetBSD__) && !defined (__OpenBSD__) #include +#endif #include +#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#include +#include +#endif /* __sony_news && _SYSTYPE_SYSV */ +#ifdef __sgi +#include /* for HDRR declaration */ +#endif /* __sgi */ + +#if defined (__alpha__) && !defined (__NetBSD__) && !defined (__OpenBSD__) +/* Declare COFF debugging symbol table. This used to be in + /usr/include/sym.h, but this file is no longer included in Red Hat + 5.0 and presumably in any other glibc 2.x based distribution. */ +typedef struct { + short magic; + short vstamp; + int ilineMax; + int idnMax; + int ipdMax; + int isymMax; + int ioptMax; + int iauxMax; + int issMax; + int issExtMax; + int ifdMax; + int crfd; + int iextMax; + long cbLine; + long cbLineOffset; + long cbDnOffset; + long cbPdOffset; + long cbSymOffset; + long cbOptOffset; + long cbAuxOffset; + long cbSsOffset; + long cbSsExtOffset; + long cbFdOffset; + long cbRfdOffset; + long cbExtOffset; +} HDRR, *pHDRR; +#define cbHDRR sizeof(HDRR) +#define hdrNil ((pHDRR)0) +#endif + +#ifdef __NetBSD__ +/* + * NetBSD does not have normal-looking user-land ELF support. + */ +# ifdef __alpha__ +# define ELFSIZE 64 +# else +# define ELFSIZE 32 +# endif +# include + +# define PT_LOAD Elf_pt_load +# define SHT_SYMTAB Elf_sht_symtab +# define SHT_DYNSYM Elf_sht_dynsym +# define SHT_NULL Elf_sht_null +# define SHT_NOBITS Elf_sht_nobits +# define SHT_REL Elf_sht_rel +# define SHT_RELA Elf_sht_rela + +# define SHN_UNDEF Elf_eshn_undefined +# define SHN_ABS Elf_eshn_absolute +# define SHN_COMMON Elf_eshn_common + +/* + * The magic of picking the right size types is handled by the ELFSIZE + * definition above. + */ +# ifdef __STDC__ +# define ElfW(type) Elf_##type +# else +# define ElfW(type) Elf_/**/type +# endif + +# ifdef __alpha__ +# include +# define HDRR struct ecoff_symhdr +# define pHDRR HDRR * +# endif +#endif /* __NetBSD__ */ -#if __GLIBC__ - 0 >= 2 +#ifdef __OpenBSD__ +# include +#endif + +#if __GNU_LIBRARY__ - 0 >= 6 # include /* get ElfW etc */ #endif @@ -487,8 +575,8 @@ typedef unsigned char byte; /* Round X up to a multiple of Y. */ -static int -round_up (int x, int y) +static ElfW(Addr) +round_up (ElfW(Addr) x, ElfW(Addr) y) { int rem = x % y; if (rem == 0) @@ -531,7 +619,8 @@ unexec (char *new_name, char *old_name, unsigned int data_start, ElfW(Off) new_data2_offset; ElfW(Addr) new_data2_addr; - int n, nn, old_bss_index, old_data_index; + int n, nn, old_bss_index, old_data_index, new_data2_index; + int old_sbss_index, old_mdebug_index; struct stat stat_buf; /* Open the old file & map it into the address space. */ @@ -544,7 +633,7 @@ unexec (char *new_name, char *old_name, unsigned int data_start, if (fstat (old_file, &stat_buf) == -1) fatal ("Can't fstat (%s): errno %d\n", old_name, errno); - old_base = mmap (0, stat_buf.st_size, PROT_READ, MAP_SHARED, old_file, 0); + old_base = (caddr_t) mmap (0, stat_buf.st_size, PROT_READ, MAP_SHARED, old_file, 0); if (old_base == (caddr_t) -1) fatal ("Can't mmap (%s): errno %d\n", old_name, errno); @@ -580,8 +669,48 @@ unexec (char *new_name, char *old_name, unsigned int data_start, if (old_bss_index == old_file_h->e_shnum) fatal ("Can't find .bss in %s.\n", old_name, 0); - old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr; - old_bss_size = OLD_SECTION_H (old_bss_index).sh_size; + for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum; + old_sbss_index++) + { +#ifdef DEBUG + fprintf (stderr, "Looking for .sbss - found %s\n", + old_section_names + OLD_SECTION_H (old_sbss_index).sh_name); +#endif + if (!strcmp (old_section_names + OLD_SECTION_H (old_sbss_index).sh_name, + ".sbss")) + break; + } + if (old_sbss_index == old_file_h->e_shnum) + { + old_sbss_index = -1; + old_bss_addr = OLD_SECTION_H(old_bss_index).sh_addr; + old_bss_size = OLD_SECTION_H(old_bss_index).sh_size; + new_data2_offset = OLD_SECTION_H(old_bss_index).sh_offset; + new_data2_index = old_bss_index; + } + else + { + old_bss_addr = OLD_SECTION_H(old_sbss_index).sh_addr; + old_bss_size = OLD_SECTION_H(old_bss_index).sh_size + + OLD_SECTION_H(old_sbss_index).sh_size; + new_data2_offset = OLD_SECTION_H(old_sbss_index).sh_offset; + new_data2_index = old_sbss_index; + } + + for (old_mdebug_index = 1; old_mdebug_index < (int) old_file_h->e_shnum; + old_mdebug_index++) + { +#ifdef DEBUG + fprintf (stderr, "Looking for .mdebug - found %s\n", + old_section_names + OLD_SECTION_H (old_mdebug_index).sh_name); +#endif + if (!strcmp (old_section_names + OLD_SECTION_H (old_mdebug_index).sh_name, + ".mdebug")) + break; + } + if (old_mdebug_index == old_file_h->e_shnum) + old_mdebug_index = 0; + #if defined (emacs) || !defined (DEBUG) new_bss_addr = (ElfW(Addr)) sbrk (0); #else @@ -589,7 +718,6 @@ unexec (char *new_name, char *old_name, unsigned int data_start, #endif new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; - new_data2_offset = OLD_SECTION_H (old_bss_index).sh_offset; #ifdef DEBUG fprintf (stderr, "old_bss_index %d\n", old_bss_index); @@ -618,13 +746,13 @@ unexec (char *new_name, char *old_name, unsigned int data_start, if (ftruncate (new_file, new_file_size)) fatal ("Can't ftruncate (%s): errno %d\n", new_name, errno); + new_base = (caddr_t) mmap (0, new_file_size, PROT_READ | PROT_WRITE, #ifdef UNEXEC_USE_MAP_PRIVATE - new_base = mmap (0, new_file_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, - new_file, 0); + MAP_PRIVATE, #else - new_base = mmap (0, new_file_size, PROT_READ | PROT_WRITE, MAP_SHARED, - new_file, 0); + MAP_SHARED, #endif + new_file, 0); if (new_base == (caddr_t) -1) fatal ("Can't mmap (%s): errno %d\n", new_name, errno); @@ -674,24 +802,31 @@ unexec (char *new_name, char *old_name, unsigned int data_start, if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) alignment = OLD_SECTION_H (old_bss_index).sh_addralign; -#ifndef __mips /* ifndef added by jwz at suggestion of - r02kar@x4u2.desy.de (Karsten Kuenne) to avoid - "Program segment above .bss" when dumping. - */ - if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > old_bss_addr) - fatal ("Program segment above .bss in %s\n", old_name, 0); -#endif /* __mips */ +#ifdef __mips + /* According to r02kar@x4u2.desy.de (Karsten Kuenne) + and oliva@gnu.org (Alexandre Oliva), on IRIX 5.2, we + always get "Program segment above .bss" when dumping + when the executable doesn't have an sbss section. */ + if (old_sbss_index != -1) +#endif /* __mips */ + if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz + > (old_sbss_index == -1 + ? old_bss_addr + : round_up (old_bss_addr, alignment))) + fatal ("Program segment above .bss in %s\n", old_name, 0); if (NEW_PROGRAM_H (n).p_type == PT_LOAD - && (round_up ((int) ((NEW_PROGRAM_H (n)).p_vaddr - + (NEW_PROGRAM_H (n)).p_filesz), + && (round_up ((NEW_PROGRAM_H (n)).p_vaddr + + (NEW_PROGRAM_H (n)).p_filesz, alignment) - == round_up ((int) old_bss_addr, alignment))) + == round_up (old_bss_addr, alignment))) break; } if (n < 0) fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0); + /* Make sure that the size includes any padding before the old .bss + section. */ NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr; NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz; @@ -726,8 +861,10 @@ unexec (char *new_name, char *old_name, unsigned int data_start, for (n = 1, nn = 1; n < (int) old_file_h->e_shnum; n++, nn++) { caddr_t src; - /* If it is bss section, insert the new data2 section before it. */ - if (n == old_bss_index) + /* If it is (s)bss section, insert the new data2 section before it. */ + /* new_data2_index is the index of either old_sbss or old_bss, that was + chosen as a section for new_data2. */ + if (n == new_data2_index) { /* Steal the data section header for this data2 section. */ memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index), @@ -744,21 +881,24 @@ unexec (char *new_name, char *old_name, unsigned int data_start, /* Now copy over what we have in the memory now. */ memcpy (NEW_SECTION_H (nn).sh_offset + new_base, (caddr_t) OLD_SECTION_H (n).sh_addr, - /* #### mrb: should be old_bss_size instead? */ new_data2_size); nn++; } memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (n), old_file_h->e_shentsize); - - /* The new bss section's size is zero, and its file offset and virtual - address should be off by NEW_DATA2_SIZE. */ - if (n == old_bss_index) + + if (n == old_bss_index + /* The new bss and sbss section's size is zero, and its file offset + and virtual address should be off by NEW_DATA2_SIZE. */ + || n == old_sbss_index + ) { - /* NN should be `old_bss_index + 1' at this point. */ - NEW_SECTION_H (nn).sh_offset += new_data2_size; - NEW_SECTION_H (nn).sh_addr += new_data2_size; + /* NN should be `old_s?bss_index + 1' at this point. */ + NEW_SECTION_H (nn).sh_offset = + NEW_SECTION_H (new_data2_index).sh_offset + new_data2_size; + NEW_SECTION_H (nn).sh_addr = + NEW_SECTION_H (new_data2_index).sh_addr + new_data2_size; /* Let the new bss section address alignment be the same as the section address alignment followed the old bss section, so this section will be placed in exactly the same place. */ @@ -782,7 +922,9 @@ unexec (char *new_name, char *old_name, unsigned int data_start, >= OLD_SECTION_H (old_bss_index-1).sh_offset) NEW_SECTION_H (nn).sh_offset += new_data2_size; #else - if (NEW_SECTION_H (nn).sh_offset >= new_data2_offset) + if (round_up (NEW_SECTION_H (nn).sh_offset, + OLD_SECTION_H (old_bss_index).sh_addralign) + >= new_data2_offset) NEW_SECTION_H (nn).sh_offset += new_data2_size; #endif /* Any section that was originally placed after the section @@ -811,17 +953,24 @@ unexec (char *new_name, char *old_name, unsigned int data_start, /* Write out the sections. .data and .data1 (and data2, called ".data" in the strings table) get copied from the current process instead of the old file. */ -#ifdef __powerpc__ - /* The PowerPC has additional 'data' segments which need to be saved */ - if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata1")) -#else if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data") || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), - ".data1")) + ".sdata") + /* Taking these sections from the current process, breaks + Linux in a subtle way. Binaries only run on the + architecture (e.g. i586 vs i686) of the dumping machine */ +#ifdef __sgi + || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + ".lit4") + || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + ".lit8") + || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + ".got") #endif + || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + ".sdata1") + || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + ".data1")) src = (caddr_t) OLD_SECTION_H (n).sh_addr; else src = old_base + OLD_SECTION_H (n).sh_offset; @@ -829,6 +978,106 @@ unexec (char *new_name, char *old_name, unsigned int data_start, memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src, NEW_SECTION_H (nn).sh_size); +#ifdef __alpha__ + /* Update Alpha COFF symbol table: */ + if (strcmp (old_section_names + OLD_SECTION_H (n).sh_name, ".mdebug") + == 0) + { + pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base); + + symhdr->cbLineOffset += new_data2_size; + symhdr->cbDnOffset += new_data2_size; + symhdr->cbPdOffset += new_data2_size; + symhdr->cbSymOffset += new_data2_size; + symhdr->cbOptOffset += new_data2_size; + symhdr->cbAuxOffset += new_data2_size; + symhdr->cbSsOffset += new_data2_size; + symhdr->cbSsExtOffset += new_data2_size; + symhdr->cbFdOffset += new_data2_size; + symhdr->cbRfdOffset += new_data2_size; + symhdr->cbExtOffset += new_data2_size; + } +#endif /* __alpha__ */ + +#if defined (__sony_news) && defined (_SYSTYPE_SYSV) + if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index) + { + int diff = NEW_SECTION_H(nn).sh_offset + - OLD_SECTION_H(old_mdebug_index).sh_offset; + HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base); + + if (diff) + { + phdr->cbLineOffset += diff; + phdr->cbDnOffset += diff; + phdr->cbPdOffset += diff; + phdr->cbSymOffset += diff; + phdr->cbOptOffset += diff; + phdr->cbAuxOffset += diff; + phdr->cbSsOffset += diff; + phdr->cbSsExtOffset += diff; + phdr->cbFdOffset += diff; + phdr->cbRfdOffset += diff; + phdr->cbExtOffset += diff; + } + } +#endif /* __sony_news && _SYSTYPE_SYSV */ + +#ifdef __sgi + /* Adjust the HDRR offsets in .mdebug and copy the + line data if it's in its usual 'hole' in the object. + Makes the new file debuggable with dbx. + patches up two problems: the absolute file offsets + in the HDRR record of .mdebug (see /usr/include/syms.h), and + the ld bug that gets the line table in a hole in the + elf file rather than in the .mdebug section proper. + David Anderson. davea@sgi.com Jan 16,1994. */ + if (n == old_mdebug_index) + { +#define MDEBUGADJUST(__ct,__fileaddr) \ + if (n_phdrr->__ct > 0) \ + { \ + n_phdrr->__fileaddr += movement; \ + } + + HDRR * o_phdrr = (HDRR *)((byte *)old_base + OLD_SECTION_H (n).sh_offset); + HDRR * n_phdrr = (HDRR *)((byte *)new_base + NEW_SECTION_H (nn).sh_offset); + unsigned movement = new_data2_size; + + MDEBUGADJUST (idnMax, cbDnOffset); + MDEBUGADJUST (ipdMax, cbPdOffset); + MDEBUGADJUST (isymMax, cbSymOffset); + MDEBUGADJUST (ioptMax, cbOptOffset); + MDEBUGADJUST (iauxMax, cbAuxOffset); + MDEBUGADJUST (issMax, cbSsOffset); + MDEBUGADJUST (issExtMax, cbSsExtOffset); + MDEBUGADJUST (ifdMax, cbFdOffset); + MDEBUGADJUST (crfd, cbRfdOffset); + MDEBUGADJUST (iextMax, cbExtOffset); + /* The Line Section, being possible off in a hole of the object, + requires special handling. */ + if (n_phdrr->cbLine > 0) + { + if (o_phdrr->cbLineOffset > (OLD_SECTION_H (n).sh_offset + + OLD_SECTION_H (n).sh_size)) + { + /* line data is in a hole in elf. do special copy and adjust + for this ld mistake. + */ + n_phdrr->cbLineOffset += movement; + + memcpy (n_phdrr->cbLineOffset + new_base, + o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine); + } + else + { + /* somehow line data is in .mdebug as it is supposed to be. */ + MDEBUGADJUST (cbLine, cbLineOffset); + } + } + } +#endif /* __sgi */ + /* If it is the symbol table, its st_shndx field needs to be patched. */ if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM) @@ -886,17 +1135,21 @@ unexec (char *new_name, char *old_name, unsigned int data_start, be no harm in that provided that r_offset is always the first member. */ nn = section.sh_info; -#ifdef __powerpc__ - /* The PowerPC has additional 'data' segments which need to be saved */ - if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata") || - !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata1")) -#else if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data") || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".data1")) + ".sdata") +#ifdef __sgi + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), + ".lit4") + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), + ".lit8") + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), + ".got") #endif + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), + ".sdata1") + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), + ".data1")) { ElfW(Addr) offset = NEW_SECTION_H (nn).sh_addr - NEW_SECTION_H (nn).sh_offset; @@ -905,6 +1158,13 @@ unexec (char *new_name, char *old_name, unsigned int data_start, reloc += section.sh_entsize) { ElfW(Addr) addr = ((ElfW(Rel) *) reloc)->r_offset - offset; +#ifdef __alpha__ + /* The Alpha ELF binutils currently have a bug that + sometimes results in relocs that contain all + zeroes. Work around this for now... */ + if (((ElfW(Rel) *) reloc)->r_offset == 0) + continue; +#endif memcpy (new_base + addr, old_base + addr, sizeof(ElfW(Addr))); } } diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index c89fb01..9c2bad9 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c @@ -52,6 +52,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include #include @@ -80,7 +81,7 @@ Boston, MA 02111-1307, USA. */ #ifdef HPUX_USE_SHLIBS #include /* User-space dynamic loader entry points */ -void Save_Shared_Data(); +void Save_Shared_Data(void); int run_time_remap(); #endif diff --git a/src/unexnt.c b/src/unexnt.c index 60c8fe4..f13684f 100644 --- a/src/unexnt.c +++ b/src/unexnt.c @@ -261,7 +261,7 @@ unexec (char *new_name, char *old_name, void *start_data, void *start_bss, int -open_output_file (file_data *p_file, char *filename, unsigned long size) +open_output_file (file_data *p_file, CONST char *filename, unsigned long size) { HANDLE file; HANDLE file_mapping; diff --git a/src/unexsol2.c b/src/unexsol2.c index d9de182..06e71e7 100644 --- a/src/unexsol2.c +++ b/src/unexsol2.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1995/01/25 20:39:16 georgn Exp $" */ +/* #pragma ident "@(#) $Id: unexsol2.c,v 1.3 1997/10/13 03:35:33 steve Exp $" */ #include #include diff --git a/src/window.c b/src/window.c index 85a196b..cdf35a0 100644 --- a/src/window.c +++ b/src/window.c @@ -41,7 +41,7 @@ Boston, MA 02111-1307, USA. */ #include "gutter.h" Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configurationp; -Lisp_Object Qscroll_up, Qscroll_down, Qdisplay_buffer; +Lisp_Object Qdisplay_buffer; #ifdef MEMORY_USAGE_STATS Lisp_Object Qface_cache, Qglyph_cache, Qline_start_cache, Qother_redisplay; @@ -85,6 +85,9 @@ Lisp_Object Vvertical_divider_line_width; /* Spacing between outer egde of divider border and window edge */ Lisp_Object Vvertical_divider_spacing; +/* How much to scroll by per-line. */ +Lisp_Object Vwindow_pixel_scroll_increment; + /* Scroll if point lands on the bottom line and that line is partially clipped. */ int scroll_on_clipped_lines; @@ -118,7 +121,7 @@ Lisp_Object Qtemp_buffer_show_hook; int next_screen_context_lines; /* List of freed window configurations with 1 - 10 windows. */ -Lisp_Object Vwindow_configuration_free_list[10]; +static Lisp_Object Vwindow_configuration_free_list[10]; #define SET_LAST_MODIFIED(w, cache_too) \ do { \ @@ -138,38 +141,38 @@ do { \ #define MARK_DISP_VARIABLE(field) \ - markobj (window->field[CURRENT_DISP]); \ - markobj (window->field[DESIRED_DISP]); \ - markobj (window->field[CMOTION_DISP]); + mark_object (window->field[CURRENT_DISP]); \ + mark_object (window->field[DESIRED_DISP]); \ + mark_object (window->field[CMOTION_DISP]); static Lisp_Object -mark_window (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_window (Lisp_Object obj) { struct window *window = XWINDOW (obj); - markobj (window->frame); - markobj (window->mini_p); - markobj (window->next); - markobj (window->prev); - markobj (window->hchild); - markobj (window->vchild); - markobj (window->parent); - markobj (window->buffer); + mark_object (window->frame); + mark_object (window->mini_p); + mark_object (window->next); + mark_object (window->prev); + mark_object (window->hchild); + mark_object (window->vchild); + mark_object (window->parent); + mark_object (window->buffer); MARK_DISP_VARIABLE (start); MARK_DISP_VARIABLE (pointm); - markobj (window->sb_point); /* #### move to scrollbar.c? */ - markobj (window->use_time); + mark_object (window->sb_point); /* #### move to scrollbar.c? */ + mark_object (window->use_time); MARK_DISP_VARIABLE (last_modified); MARK_DISP_VARIABLE (last_point); MARK_DISP_VARIABLE (last_start); MARK_DISP_VARIABLE (last_facechange); - markobj (window->line_cache_last_updated); - markobj (window->redisplay_end_trigger); - markobj (window->subwindow_instance_cache); + mark_object (window->line_cache_last_updated); + mark_object (window->redisplay_end_trigger); + mark_object (window->subwindow_instance_cache); - mark_face_cachels (window->face_cachels, markobj); - mark_glyph_cachels (window->glyph_cachels, markobj); + mark_face_cachels (window->face_cachels); + mark_glyph_cachels (window->glyph_cachels); -#define WINDOW_SLOT(slot, compare) ((void) (markobj (window->slot))) +#define WINDOW_SLOT(slot, compare) mark_object (window->slot) #include "winslots.h" return Qnil; @@ -706,6 +709,11 @@ window_full_height_p (struct window *w) int window_truncation_on (struct window *w) { + /* Minibuffer windows are never truncated. + ### is this the right way ? */ + if (MINI_WINDOW_P (w)) + return 0; + /* Horizontally scrolled windows are truncated. */ if (w->hscroll) return 1; @@ -724,6 +732,17 @@ window_truncation_on (struct window *w) return 0; } +DEFUN ("window-truncated-p", Fwindow_truncated_p, 0, 1, 0, /* +Returns Non-Nil iff the window is truncated. +*/ + (window)) +{ + struct window *w = decode_window (window); + + return window_truncation_on (w) ? Qt : Qnil; +} + + static int have_undivided_common_edge (struct window *w_right, void *closure) { @@ -1096,6 +1115,26 @@ be used. Otherwise, the selected frame is used. } } +DEFUN ("last-nonminibuf-window", Flast_nonminibuf_window, 0, 1, 0, /* +Return the last selected window that is not a minibuffer window. +If the optional argument CON-DEV-OR-FRAME is specified and is a frame, +return the last non-minibuffer window used by that frame. If +CON-DEV-OR-FRAME is a device, then the selected frame on that device +will be used. If CON-DEV-OR-FRAME is a console, the selected frame on +that console's selected device will be used. Otherwise, the selected +frame is used. +*/ + (con_dev_or_frame)) +{ + if (NILP (con_dev_or_frame) && NILP (Fselected_device (Qnil))) + return Qnil; /* happens at startup */ + + { + struct frame *f = decode_frame_or_selected (con_dev_or_frame); + return FRAME_LAST_NONMINIBUF_WINDOW (f); + } +} + DEFUN ("minibuffer-window", Fminibuffer_window, 0, 1, 0, /* Return the window used now for minibuffers. If the optional argument CON-DEV-OR-FRAME is specified and is a frame, return @@ -1826,6 +1865,12 @@ will automatically call `save-buffers-kill-emacs'.) par = XWINDOW (parent); MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); + /* It's quite likely that deleting a window will result in + subwindows needing to be deleted also (since they are cached + per-window). So we mark them as changed, so that the cachels will + get reset by redisplay and thus deleted subwindows can get + GC'd. */ + MARK_FRAME_SUBWINDOWS_CHANGED (f); /* Are we trying to delete any frame's selected window? Note that we could be dealing with a non-leaf window @@ -3910,7 +3955,8 @@ change_window_height (struct window *win, int delta, int widthflag, -/* Scroll contents of window WINDOW up N lines. */ +/* Scroll contents of window WINDOW up N lines. If N < (top line height / + average line height) then we just adjust the top clip. */ void window_scroll (Lisp_Object window, Lisp_Object n, int direction, Error_behavior errb) @@ -3920,6 +3966,9 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction, int selected = EQ (window, Fselected_window (Qnil)); int value = 0; Lisp_Object point, tem; + display_line_dynarr *dla; + int fheight, fwidth, modeline = 0; + struct display_line* dl; if (selected) point = make_int (BUF_PT (b)); @@ -3949,6 +3998,7 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction, window, Qnil); Fset_marker (w->start[CURRENT_DISP], point, w->buffer); w->start_at_line_beg = beginning_of_line_p (b, XINT (point)); + WINDOW_TEXT_TOP_CLIP (w) = 0; MARK_WINDOWS_CHANGED (w); } @@ -3992,82 +4042,146 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction, { return; } - else if (value > 0) - { - int vtarget; - Bufpos startp, old_start; - old_start = marker_position (w->start[CURRENT_DISP]); - startp = vmotion (w, old_start, value, &vtarget); + /* Determine parameters to test for partial line scrolling with. */ + dla = window_display_lines (w, CURRENT_DISP); + + if (INTP (Vwindow_pixel_scroll_increment)) + fheight = XINT (Vwindow_pixel_scroll_increment); + else if (!NILP (Vwindow_pixel_scroll_increment)); + default_face_height_and_width (window, &fheight, &fwidth); + + if (Dynarr_length (dla) >= 1) + modeline = Dynarr_atp (dla, 0)->modeline; - if (vtarget < value && - (w->window_end_pos[CURRENT_DISP] == -1 - || (BUF_Z (b) - w->window_end_pos[CURRENT_DISP] > BUF_ZV (b)))) + dl = Dynarr_atp (dla, modeline); + + if (value > 0) + { + /* Go for partial display line scrolling. This just means bumping + the clip by a reasonable amount and redisplaying, everything else + remains unchanged. */ + if (!NILP (Vwindow_pixel_scroll_increment) + && + Dynarr_length (dla) >= (1 + modeline) + && + (dl->ascent - dl->top_clip) - fheight * value > 0) { - maybe_signal_error (Qend_of_buffer, Qnil, Qwindow, errb); - return; + WINDOW_TEXT_TOP_CLIP (w) += value * fheight; + MARK_WINDOWS_CHANGED (w); } else { - set_marker_restricted (w->start[CURRENT_DISP], make_int (startp), - w->buffer); - w->force_start = 1; - w->start_at_line_beg = beginning_of_line_p (b, startp); - MARK_WINDOWS_CHANGED (w); + int vtarget; + Bufpos startp, old_start; + + if (WINDOW_TEXT_TOP_CLIP (w)) + { + WINDOW_TEXT_TOP_CLIP (w) = 0; + MARK_WINDOWS_CHANGED (w); + } - if (!point_would_be_visible (w, startp, XINT (point))) + old_start = marker_position (w->start[CURRENT_DISP]); + startp = vmotion (w, old_start, value, &vtarget); + + if (vtarget < value && + (w->window_end_pos[CURRENT_DISP] == -1 + || (BUF_Z (b) - w->window_end_pos[CURRENT_DISP] > BUF_ZV (b)))) { - if (selected) - BUF_SET_PT (b, startp); - else - set_marker_restricted (w->pointm[CURRENT_DISP], - make_int (startp), - w->buffer); + maybe_signal_error (Qend_of_buffer, Qnil, Qwindow, errb); + return; + } + else + { + set_marker_restricted (w->start[CURRENT_DISP], make_int (startp), + w->buffer); + w->force_start = 1; + w->start_at_line_beg = beginning_of_line_p (b, startp); + MARK_WINDOWS_CHANGED (w); + + if (!point_would_be_visible (w, startp, XINT (point))) + { + if (selected) + BUF_SET_PT (b, startp); + else + set_marker_restricted (w->pointm[CURRENT_DISP], + make_int (startp), + w->buffer); + } } } } else if (value < 0) { - int vtarget; - Bufpos startp, old_start; - - old_start = marker_position (w->start[CURRENT_DISP]); - startp = vmotion (w, old_start, value, &vtarget); - - if (vtarget > value - && marker_position (w->start[CURRENT_DISP]) == BUF_BEGV (b)) + /* Go for partial display line scrolling. This just means bumping + the clip by a reasonable amount and redisplaying, everything else + remains unchanged. */ + if (!NILP (Vwindow_pixel_scroll_increment) + && + Dynarr_length (dla) >= (1 + modeline) + && + (dl->ascent - dl->top_clip) - fheight * value < + (dl->ascent + dl->descent - dl->clip) + && + WINDOW_TEXT_TOP_CLIP (w) + value * fheight > 0) { - maybe_signal_error (Qbeginning_of_buffer, Qnil, Qwindow, errb); - return; + WINDOW_TEXT_TOP_CLIP (w) += value * fheight; + MARK_WINDOWS_CHANGED (w); } else { - set_marker_restricted (w->start[CURRENT_DISP], make_int (startp), - w->buffer); - w->force_start = 1; - w->start_at_line_beg = beginning_of_line_p (b, startp); - MARK_WINDOWS_CHANGED (w); - - if (!point_would_be_visible (w, startp, XINT (point))) + int vtarget; + Bufpos startp, old_start; + + if (WINDOW_TEXT_TOP_CLIP (w)) { - Bufpos new_point; - - if (MINI_WINDOW_P (w)) - new_point = startp; - else - new_point = start_of_last_line (w, startp); - - if (selected) - BUF_SET_PT (b, new_point); - else - set_marker_restricted (w->pointm[CURRENT_DISP], - make_int (new_point), - w->buffer); + WINDOW_TEXT_TOP_CLIP (w) = 0; + MARK_WINDOWS_CHANGED (w); + } + + old_start = marker_position (w->start[CURRENT_DISP]); + startp = vmotion (w, old_start, value, &vtarget); + + if (vtarget > value + && marker_position (w->start[CURRENT_DISP]) == BUF_BEGV (b)) + { + maybe_signal_error (Qbeginning_of_buffer, Qnil, Qwindow, errb); + return; + } + else + { + set_marker_restricted (w->start[CURRENT_DISP], make_int (startp), + w->buffer); + w->force_start = 1; + w->start_at_line_beg = beginning_of_line_p (b, startp); + MARK_WINDOWS_CHANGED (w); + + if (!point_would_be_visible (w, startp, XINT (point))) + { + Bufpos new_point; + + if (MINI_WINDOW_P (w)) + new_point = startp; + else + new_point = start_of_last_line (w, startp); + + if (selected) + BUF_SET_PT (b, new_point); + else + set_marker_restricted (w->pointm[CURRENT_DISP], + make_int (new_point), + w->buffer); + } } } } else /* value == 0 && direction == -1 */ { + if (WINDOW_TEXT_TOP_CLIP (w)) + { + WINDOW_TEXT_TOP_CLIP (w) = 0; + MARK_WINDOWS_CHANGED (w); + } if (marker_position (w->start[CURRENT_DISP]) == BUF_BEGV (b)) { maybe_signal_error (Qbeginning_of_buffer, Qnil, Qwindow, errb); @@ -4105,7 +4219,6 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction, } } } - } DEFUN ("scroll-up", Fscroll_up, 0, 1, "_P", /* @@ -4622,32 +4735,32 @@ struct window_config #define CHECK_WINDOW_CONFIGURATION(x) CHECK_RECORD (x, window_configuration) static Lisp_Object -mark_window_config (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_window_config (Lisp_Object obj) { struct window_config *config = XWINDOW_CONFIGURATION (obj); int i; - markobj (config->current_window); - markobj (config->current_buffer); - markobj (config->minibuffer_scroll_window); - markobj (config->root_window); + mark_object (config->current_window); + mark_object (config->current_buffer); + mark_object (config->minibuffer_scroll_window); + mark_object (config->root_window); for (i = 0; i < config->saved_windows_count; i++) { struct saved_window *s = SAVED_WINDOW_N (config, i); - markobj (s->window); - markobj (s->buffer); - markobj (s->start); - markobj (s->pointm); - markobj (s->sb_point); - markobj (s->mark); + mark_object (s->window); + mark_object (s->buffer); + mark_object (s->start); + mark_object (s->pointm); + mark_object (s->sb_point); + mark_object (s->mark); #if 0 /* #### This looked like this. I do not see why specifier cached values should not be marked, as such specifiers as toolbars might have GC-able instances. Freed configs are not marked, aren't they? -- kkm */ - markobj (s->dedicated); + mark_object (s->dedicated); #else -#define WINDOW_SLOT(slot, compare) ((void) (markobj (s->slot))) +#define WINDOW_SLOT(slot, compare) mark_object (s->slot) #include "winslots.h" #endif } @@ -5050,7 +5163,7 @@ by `current-window-configuration' (which see). SET_LAST_FACECHANGE (w); w->config_mark = 0; -#define WINDOW_SLOT(slot, compare) w->slot = p->slot; +#define WINDOW_SLOT(slot, compare) w->slot = p->slot #include "winslots.h" /* Reinstall the saved buffer and pointers into it. */ @@ -5324,7 +5437,7 @@ save_window_save (Lisp_Object window, struct window_config *config, int i) p->hscroll = w->hscroll; p->modeline_hscroll = w->modeline_hscroll; -#define WINDOW_SLOT(slot, compare) p->slot = w->slot; +#define WINDOW_SLOT(slot, compare) p->slot = w->slot #include "winslots.h" if (!NILP (w->buffer)) @@ -5466,6 +5579,78 @@ Does not restore the value of point in current buffer. return unbind_to (speccount, val); } +DEFUN ("current-pixel-column", Fcurrent_pixel_column, 0, 2, 0, /* +Return the horizontal pixel position of POS in window. +Beginning of line is column 0. This is calculated using the redisplay +display tables. If WINDOW is nil, the current window is assumed. +If POS is nil, point is assumed. Note that POS must be visible for +a non-nil result to be returned. +*/ + (window, pos)) +{ + struct window* w = decode_window (window); + display_line_dynarr *dla = window_display_lines (w, CURRENT_DISP); + + struct display_line *dl = 0; + struct display_block *db = 0; + struct rune* rb = 0; + int y = w->last_point_y[CURRENT_DISP]; + int x = w->last_point_x[CURRENT_DISP]; + + if (MINI_WINDOW_P (w)) + return Qnil; + + if (y<0 || x<0 || y >= Dynarr_length (dla) || !NILP (pos)) + { + int first_line, i; + Bufpos point; + + if (NILP (pos)) + pos = Fwindow_point (window); + + CHECK_INT (pos); + point = XINT (pos); + + if (Dynarr_length (dla) && Dynarr_atp (dla, 0)->modeline) + first_line = 1; + else + first_line = 0; + + for (i = first_line; i < Dynarr_length (dla); i++) + { + dl = Dynarr_atp (dla, i); + /* find the vertical location first */ + if (point >= dl->bufpos && point <= dl->end_bufpos) + { + db = get_display_block_from_line (dl, TEXT); + for (i = 0; i < Dynarr_length (db->runes); i++) + { + rb = Dynarr_atp (db->runes, i); + if (point <= rb->bufpos) + goto found_bufpos; + } + return Qnil; + } + } + return Qnil; + found_bufpos: + ; + } + else + { + /* optimised case */ + dl = Dynarr_atp (dla, y); + db = get_display_block_from_line (dl, TEXT); + + if (x >= Dynarr_length (db->runes)) + return Qnil; + + rb = Dynarr_atp (db->runes, x); + } + + return make_int (rb->xpos - WINDOW_LEFT (w)); +} + #ifdef DEBUG_XEMACS /* This is short and simple in elisp, but... it was written to debug @@ -5518,8 +5703,6 @@ syms_of_window (void) defsymbol (&Qwindowp, "windowp"); defsymbol (&Qwindow_live_p, "window-live-p"); defsymbol (&Qwindow_configurationp, "window-configuration-p"); - defsymbol (&Qscroll_up, "scroll-up"); - defsymbol (&Qscroll_down, "scroll-down"); defsymbol (&Qtemp_buffer_show_hook, "temp-buffer-show-hook"); defsymbol (&Qdisplay_buffer, "display-buffer"); @@ -5535,6 +5718,7 @@ syms_of_window (void) #endif DEFSUBR (Fselected_window); + DEFSUBR (Flast_nonminibuf_window); DEFSUBR (Fminibuffer_window); DEFSUBR (Fwindow_minibuffer_p); DEFSUBR (Fwindowp); @@ -5545,6 +5729,7 @@ syms_of_window (void) DEFSUBR (Fwindow_previous_child); DEFSUBR (Fwindow_parent); DEFSUBR (Fwindow_lowest_p); + DEFSUBR (Fwindow_truncated_p); DEFSUBR (Fwindow_highest_p); DEFSUBR (Fwindow_leftmost_p); DEFSUBR (Fwindow_rightmost_p); @@ -5613,14 +5798,30 @@ syms_of_window (void) DEFSUBR (Fset_window_configuration); DEFSUBR (Fcurrent_window_configuration); DEFSUBR (Fsave_window_excursion); + DEFSUBR (Fcurrent_pixel_column); } void -vars_of_window (void) +reinit_vars_of_window (void) { + int i; /* Make sure all windows get marked */ minibuf_window = Qnil; - staticpro (&minibuf_window); + staticpro_nodump (&minibuf_window); + + for (i = 0; i < countof (Vwindow_configuration_free_list); i++) + { + Vwindow_configuration_free_list[i] = + make_lcrecord_list (sizeof_window_config_for_n_windows (i + 1), + &lrecord_window_configuration); + staticpro_nodump (&Vwindow_configuration_free_list[i]); + } +} + +void +vars_of_window (void) +{ + reinit_vars_of_window (); DEFVAR_BOOL ("scroll-on-clipped-lines", &scroll_on_clipped_lines /* *Non-nil means to scroll if point lands on a line which is clipped. @@ -5651,6 +5852,13 @@ If non-nil, this is a buffer and \\[scroll-other-window] should scroll its windo */ ); Vother_window_scroll_buffer = Qnil; + DEFVAR_LISP ("window-pixel-scroll-increment", &Vwindow_pixel_scroll_increment /* +*Number of pixels to scroll by per requested line. +If nil then normal line scrolling occurs regardless of line height. +If t then scrolling is done in increments equal to the height of the default face. +*/ ); + Vwindow_pixel_scroll_increment = Qt; + DEFVAR_INT ("next-screen-context-lines", &next_screen_context_lines /* *Number of lines of continuity when scrolling by screenfuls. */ ); @@ -5665,18 +5873,6 @@ If non-nil, this is a buffer and \\[scroll-other-window] should scroll its windo *Delete any window less than this wide. */ ); window_min_width = 10; - - { - int i; - - for (i = 0; i < countof (Vwindow_configuration_free_list); i++) - { - Vwindow_configuration_free_list[i] = - make_lcrecord_list (sizeof_window_config_for_n_windows (i + 1), - &lrecord_window_configuration); - staticpro (&Vwindow_configuration_free_list[i]); - } - } } void diff --git a/src/window.h b/src/window.h index 342ad44..043a9fc 100644 --- a/src/window.h +++ b/src/window.h @@ -130,6 +130,14 @@ struct window int hscroll; /* Idem for the window's modeline */ int modeline_hscroll; + /* Amount to clip off the top line for pixel-based scrolling. Point + will remain constant but this will be incremented to + incrementally shift lines up. */ + int top_yoffset; + /* Amount to clip off the left of the lines for pixel-based + scrolling. Hscroll will remain constant but this will be + incremented to incrementally shift lines left.*/ + int left_xoffset; /* Number saying how recently window was selected */ Lisp_Object use_time; /* text.modified of displayed buffer as of last time display completed */ @@ -254,7 +262,6 @@ DECLARE_LRECORD (window, struct window); #define XWINDOW(x) XRECORD (x, window, struct window) #define XSETWINDOW(x, p) XSETRECORD (x, p, window) #define WINDOWP(x) RECORDP (x, window) -#define GC_WINDOWP(x) GC_RECORDP (x, window) #define CHECK_WINDOW(x) CHECK_RECORD (x, window) #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window) @@ -382,6 +389,7 @@ int window_divider_width (struct window *w); /* XEmacs window size and positioning macros. */ #define WINDOW_TOP(w) ((w)->pixel_top) #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w)) +#define WINDOW_TEXT_TOP_CLIP(w) ((w)->top_yoffset) #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height) #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w)) #define WINDOW_LEFT(w) ((w)->pixel_left) diff --git a/src/xmu.h b/src/xmu.h index f2d42d1..715d2ee 100644 --- a/src/xmu.h +++ b/src/xmu.h @@ -9,6 +9,7 @@ # include # include # include +# include /* Do the EDITRES protocol if running X11R5 (or later) version */ #if (XtSpecificationRelease >= 5) @@ -27,5 +28,11 @@ int XmuReadBitmapDataFromFile (CONST char *filename, unsigned int *width, int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp); void XmuCopyISOLatin1Lowered (char *, CONST char *); +#define Max(x, y) (((x) > (y)) ? (x) : (y)) +#define Min(x, y) (((x) < (y)) ? (x) : (y)) +#define AssignMax(x, y) {if ((y) > (x)) x = (y);} +#define AssignMin(x, y) {if ((y) < (x)) x = (y);} +typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation; + #endif diff --git a/tests/ChangeLog b/tests/ChangeLog index e055147..d238bff 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,23 @@ +1999-12-14 Martin Buchholz + + * XEmacs 21.2.24 is released. + +1999-12-07 Martin Buchholz + + * XEmacs 21.2.23 is released. + +1999-11-29 XEmacs Build Bot + + * XEmacs 21.2.22 is released + +1999-11-28 Martin Buchholz + + * XEmacs 21.2.21 is released. + +1999-11-10 XEmacs Build Bot + + * XEmacs 21.2.20 is released + 1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released diff --git a/tests/Dnd/droptest.sh b/tests/Dnd/droptest.sh index eb1b92f..602c7fd 100644 --- a/tests/Dnd/droptest.sh +++ b/tests/Dnd/droptest.sh @@ -1,8 +1,10 @@ #!/bin/sh -cat README > /tmp/DropTest.txt +TEMPDIR=/tmp -cat > /tmp/DropTest.html < $TEMPDIR/DropTest.txt + +cat > $TEMPDIR/DropTest.html < DropTest Page @@ -14,7 +16,7 @@ Just a Test! EOF -cat > /tmp/DropTest.tex < $TEMPDIR/DropTest.tex < /tmp/DropTest.xpm < $TEMPDIR/DropTest.xpm < -;; Maintainer: Hrvoje Niksic +;; Author: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Created: 1998 ;; Keywords: tests diff --git a/tests/automated/symbol-tests.el b/tests/automated/symbol-tests.el index d8c680f..0159d5b 100644 --- a/tests/automated/symbol-tests.el +++ b/tests/automated/symbol-tests.el @@ -1,7 +1,7 @@ ;; Copyright (C) 1999 Free Software Foundation, Inc. -;; Author: Hrvoje Niksic -;; Maintainer: Hrvoje Niksic +;; Author: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic ;; Created: 1999 ;; Keywords: tests diff --git a/tests/glyph-test.el b/tests/glyph-test.el index 511bbc8..365322c 100644 --- a/tests/glyph-test.el +++ b/tests/glyph-test.el @@ -1,24 +1,28 @@ -(setq str "Hello There") (set-extent-begin-glyph - (make-extent 0 0 str) - (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) + (make-extent (point) (point)) + (setq im (make-glyph [xpm :file "xemacs-icon.xpm"]))) (defun foo () - (interactive) - (ding)) -; (setq ok-select (not ok-select))) + (interactive) + (setq ok-select (not ok-select))) + +(defun fee () (interactive) (message "hello")) ;; button in a group (setq ok-select nil) (set-extent-begin-glyph (make-extent (point) (point)) - (make-glyph [button :descriptor ["ok " (setq ok-select t) - :style radio :selected ok-select]])) + (setq radio-button1 + (make-glyph + [button :descriptor ["ok " (setq ok-select t) + :style radio :selected ok-select]]))) ;; button in a group (set-extent-begin-glyph (make-extent (point) (point)) - (make-glyph [button :descriptor ["ok" (setq ok-select nil) :style radio - :selected (not ok-select)]])) + (setq radio-button2 + (make-glyph + [button :descriptor ["ok" (setq ok-select nil) :style radio + :selected (not ok-select)]]))) ;; toggle button (set-extent-begin-glyph (make-extent (point) (point)) @@ -28,19 +32,20 @@ :selected (not ok-select)]]))) (set-extent-begin-glyph (make-extent (point) (point)) - (make-glyph [button :descriptor ["ok" :style toggle - :callback - (setq ok-select (not ok-select)) - :selected ok-select]])) + (setq toggle-button + (make-glyph [button :descriptor ["ok" :style toggle + :callback + (setq ok-select (not ok-select)) + :selected ok-select]]))) ;; normal pushbutton (set-extent-begin-glyph (make-extent (point) (point)) - (setq pbutton (make-glyph - [button :width 10 :height 2 - :face modeline-mousable - :descriptor "ok" :callback foo - :selected t]))) + (setq push-button + (make-glyph [button :width 10 :height 2 + :face modeline-mousable + :descriptor "ok" :callback foo + :selected t]))) ;; tree view (set-extent-begin-glyph (make-extent (point) (point)) @@ -58,9 +63,9 @@ (make-extent (point) (point)) (setq tab (make-glyph [tab-control :descriptor "My Tab" - :face default + :face highlight :properties (:items (["One" foo] - ["Two" foo] + ["Two" fee] ["Three" foo]))]))) ;; progress gauge @@ -94,8 +99,7 @@ (make-glyph [button :face modeline-mousable :descriptor "ok" :callback foo - :image (make-glyph - [xpm :file "../etc/xemacs-icon.xpm"])])) + :image [xpm :file "../etc/xemacs-icon.xpm"]])) ;; normal pushbutton (set-extent-begin-glyph @@ -105,20 +109,25 @@ ;; edit box (set-extent-begin-glyph (make-extent (point) (point)) - (setq hedit (make-glyph [edit-field :pixel-width 50 :pixel-height 30 - :face bold-italic - :descriptor ["Hello"]]))) + (setq edit-field (make-glyph [edit-field :pixel-width 50 :pixel-height 30 + :face bold-italic + :descriptor ["Hello"]]))) ;; combo box (set-extent-begin-glyph (make-extent (point) (point)) - (setq hcombo (make-glyph - [combo-box :width 10 :height 3 :descriptor ["Hello"] - :properties (:items ("One" "Two" "Three"))]))) + (setq combo-box (make-glyph + [combo-box :width 10 :descriptor ["Hello"] + :properties (:items ("One" "Two" "Three"))]))) + +;; label +(set-extent-begin-glyph + (make-extent (point) (point)) + (setq label (make-glyph [label :pixel-width 150 :descriptor "Hello"]))) -;; line +;; string (set-extent-begin-glyph (make-extent (point) (point)) - (make-glyph [label :pixel-width 150 :descriptor "Hello"])) + (setq str (make-glyph [string :data "Hello There"]))) ;; scrollbar ;(set-extent-begin-glyph @@ -129,3 +138,17 @@ (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70])) (set-extent-begin-glyph (make-extent (point) (point)) sw) +;; layout +(setq layout + (make-glyph + [layout :pixel-width 200 :pixel-height 250 + :orientation vertical + :justify left + :border [string :data "Hello There Mrs"] + :items ([layout :orientation horizontal + :items (radio-button1 radio-button2)] + edit-field toggle-button label str)])) +(set-glyph-face layout 'gui-element) +(set-extent-begin-glyph + (make-extent (point) (point)) layout) + diff --git a/version.sh b/version.sh index 761f565..d9dac41 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=19 -xemacs_codename="Shinjuku" +emacs_beta_version=24 +xemacs_codename="Hecate" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8