GNUmakefile
Makefile.in
so_locations
+xemacs-packages
+mule-packages
+site-packages
-*- 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
* configure.in: Add new option `--with-utf-2000'; define `UTF2000'
if it is specified.
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-13 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in:
+ * configure.usage:
+ - Autodetect NAS. Change Docs accordingly.
+
+ * configure.in: Warn if configure --with-xpm --without-x11.
+
+1999-12-09 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * configure.in (--with-sound): Variable with_esd was mispelled.
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-11-30 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <ysh@mindspring.com>
+
+ * Makefile.in.in: add and use TAR macro. Sometimes tar only copies
+ symlinks instead of the actual files
+
+1999-11-30 Martin Buchholz <martin@xemacs.org>
+
+ * aclocal.m4: Shared library support for hpux >= version 11
+
+1999-11-29 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in (beta): `make beta' should rebuild info.
+
+1999-11-29 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in:
+ Add configure support for Unix 98 type ssize_t.
+
+1999-11-27 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * INSTALL: Update configure option.
+
+1999-10-12 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * 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 <martin@xemacs.org>
+
+ * Makefile.in.in (install-arch-dep):
+ Fix `make install' if prefix != exec_prefix.
+
+1999-11-15 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <jason@mastaler.com>
+
+ * etc/FTP: Updated FTP mirrors list. Replaced GNU FTP document
+ with a URL.
+
+1999-11-13 Jason R Mastaler <jason@mastaler.com>
+
+ * etc/MAILINGLISTS: Updated mailing list subscription information.
+ Replaced GNU MAILINGLISTS document with a URL.
+
+1999-11-10 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-09-21 Martin Buchholz <martin@xemacs.org>
+ * configure.in: Autodetect Unix98 PTY
+
+1999-08-30 Robert Pluim <rpluim@bigfoot.com>
+
+ * README.packages: Add description of package-get-provider
+
+1999-10-22 Vin Shelton <acs@xemacs.org>
+
+ * INSTALL: Added more information about README.packages, and
+ re-numbered some bullets.
+
+1999-10-24 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * INSTALL: Update disk requirements. Refer to README.packages
+
+1999-10-21 Andy Piper <andy@xemacs.org>
+
+ * configure.in (all_widgets): Only use xaw3d if we really have it.
+
+1999-10-06 Andy Piper <andy@xemacs.org>
+
+ * Makefile.in.in: use WINDOWSNT for mingw install.
+
+1999-08-01 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * etc/DISTRIB: Update IP address of ftp.xemacs.org.
+ * etc/NEWS: Fix typo
+
+1999-09-25 Andy Piper <andy@xemacs.org>
+
+ * configure.in: check for Xaw3d and use in preference to Xaw
+
+1999-09-21 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in: All Makefiles should #include config.h
+
+1999-09-19 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de>
+
+ * 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 <andy@xemacs.org>
+
+ * Makefile.in.in: use __CYGWIN32__ and __MINGW32__ to predicate
+ installation linkage.
+
+1999-08-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * configure.in (machine): Recognize MIPS/Linux.
+
+1999-08-27 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <martin@xemacs.org>
+
+ * configure.in: Warn, but otherwise ignore, obsolete arguments.
+
+1999-08-20 Olivier Galibert <galibert@pobox.com>
+
+ * configure.in: Add --pdump option.
+ * configure.usage: Ditto.
+
+1999-08-04 Andy Piper <andy@xemacs.org>
+
+ * configure.in: report widget usage correctly. beef up setting.
+
+ * Makefile.in.in: fix install-arch-dep for mingw32.
+
+1999-07-28 Andy Piper <andy@xemacs.org>
+
+ * config.h.in: add new LWLIB defines.
+
+ * configure.in: fix definitions of widget defines with various
+ toolkit options.
+
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
1997-10-18 SL Baur <steve@altair.xemacs.org>
- * XEmacs 20.3-beta91 is released.
+ * XEmacs 20.3-beta91 is released.
1997-10-16 Hrvoje Niksic <hniksic@srce.hr>
Sat Mar 22 21:27:41 1997 Tomasz J. Cholewo <t.cholewo@ieee.org>
- * 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 <steve@altair.xemacs.org>
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.
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
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
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
<URL:http://www.letters.com/dmalloc/>.
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,
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
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
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
`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
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.
## 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
LANG = C
LC_ALL = C
RM = rm -f
+MAKEPATH=./lib-src/make-path
pwd = /bin/pwd
+TAR = tar
## ==================== Things `configure' Might Edit ====================
## 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
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@
.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
## - 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 ..."
@(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:
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 \
-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 \#* *~) ; \
@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
$(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'
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
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'.
Marcus Thiessel <marcus_thiessel@hp.com>
- 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)
*** 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
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
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").
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'
;;
solaris2* | solaris7*)
- ld_dynamic_link_flags="${wl}-Bdynamic"
+ ld_dynamic_link_flags=
;;
sco3.2v5* | unixware* | sysv5* | sysv4*)
with_tty=""
use_union_type="no"
with_dnet=""
+pdump="no"
const_is_losing | \
usage_tracking | \
use_union_type | \
+ pdump | \
debug | \
use_assertions | \
memory_usage_stats | \
"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."
;;
"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" )
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
;;
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
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/'`
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 ;;
# 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.
# 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.
# 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.
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'
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
{ 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 <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+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
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
# 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.
# 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.
# 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.
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'
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
{ 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 <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+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
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
# 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.
# 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.
# 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.
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'
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
{ 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 <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+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
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
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=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2192 "configure"
+#line 2217 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2209 "configure"
+#line 2234 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2226 "configure"
+#line 2251 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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
:
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 <<EOF
-#line 2259 "configure"
+#line 2284 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2286: checking for GNU libc" >&5
+echo "configure:2311: checking for GNU libc" >&5
cat > conftest.$ac_ext <<EOF
-#line 2288 "configure"
+#line 2313 "configure"
#include "confdefs.h"
#include <features.h>
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
cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2347 "configure"
#include "confdefs.h"
int main () {
#if defined __SUNPRO_C
#endif
}
EOF
-if { (eval echo configure:2334: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 2651 "configure"
+#line 2676 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
terminateAndUnload()
; return 0; }
EOF
-if { (eval echo configure:2662: \"$ac_link\") 1>&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
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 " ;;
done
fi
cat > conftest.$ac_ext <<EOF
-#line 2788 "configure"
+#line 2813 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2795: \"$ac_link\") 1>&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
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 <<EOF
-#line 2900 "configure"
+#line 2925 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_get_state(); below. */
; return 0; }
EOF
-if { (eval echo configure:2923: \"$ac_link\") 1>&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
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 <<EOF
-#line 2946 "configure"
+#line 2971 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_set_state(); below. */
; return 0; }
EOF
-if { (eval echo configure:2969: \"$ac_link\") 1>&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
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 <<EOF
-#line 2991 "configure"
+#line 3016 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
EOF
-if { (eval echo configure:2998: \"$ac_link\") 1>&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
# 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.
# 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=":"
# 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.
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
-#line 3201 "configure"
+#line 3226 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 3242 "configure"
+#line 3267 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 3283 "configure"
+#line 3308 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 <<EOF
-#line 3321 "configure"
+#line 3346 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure: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
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 <<EOF
-#line 3364 "configure"
+#line 3389 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3389 "configure"
+#line 3414 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3407 "configure"
+#line 3432 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
cat > conftest.$ac_ext <<EOF
-#line 3425 "configure"
+#line 3450 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
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 <<EOF
-#line 3465 "configure"
+#line 3490 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
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
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 <<EOF
-#line 3501 "configure"
+#line 3526 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
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
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 <<EOF
-#line 3540 "configure"
+#line 3565 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
static struct utimbuf x; x.actime = x.modtime;
; return 0; }
EOF
-if { (eval echo configure: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
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 <<EOF
-#line 3582 "configure"
+#line 3607 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
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
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 <<EOF
-#line 3624 "configure"
+#line 3649 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3655: checking for pid_t" >&5
+echo "configure:3680: checking for pid_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+#line 3683 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure: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
-#line 3692 "configure"
+#line 3717 "configure"
#include "confdefs.h"
#include <sys/types.h>
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 <<EOF
-#line 3731 "configure"
+#line 3756 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3762: checking for off_t" >&5
+echo "configure:3787: checking for off_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3765 "configure"
+#line 3790 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
+echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
+echo "configure:3821: checking for ssize_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3824 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#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 <<EOF
-#line 3799 "configure"
+#line 3858 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
static struct timeval x; x.tv_sec = x.tv_usec;
; return 0; }
EOF
-if { (eval echo configure: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
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 <<EOF
-#line 3840 "configure"
+#line 3899 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
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
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 <<EOF
-#line 3875 "configure"
+#line 3934 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure: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
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 <<EOF
-#line 3909 "configure"
+#line 3968 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
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
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 <<EOF
-#line 3948 "configure"
+#line 4007 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3997: \"$ac_compile\") 1>&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
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
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 <<EOF
-#line 4052 "configure"
+#line 4111 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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 <<EOF
-#line 4067 "configure"
+#line 4126 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
cat > conftest.$ac_ext <<EOF
-#line 4095 "configure"
+#line 4154 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:4108: \"$ac_link\") 1>&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
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 <<EOF
-#line 4138 "configure"
+#line 4197 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 4180 "configure"
+#line 4239 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 4216 "configure"
+#line 4275 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 4252 "configure"
+#line 4311 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 4288 "configure"
+#line 4347 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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:
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 <<EOF
-#line 4371 "configure"
+#line 4430 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
; return 0; }
EOF
-if { (eval echo configure:4394: \"$ac_link\") 1>&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
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 <<EOF
-#line 4417 "configure"
+#line 4476 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
sin()
; return 0; }
EOF
-if { (eval echo configure:4428: \"$ac_link\") 1>&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
cat > conftest.$ac_ext <<EOF
-#line 4472 "configure"
+#line 4531 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
return atanh(1.0) + asinh(1.0) + acosh(1.0);
; return 0; }
EOF
-if { (eval echo configure: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
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
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 <<EOF
-#line 4526 "configure"
+#line 4585 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
cma_open()
; return 0; }
EOF
-if { (eval echo configure:4537: \"$ac_link\") 1>&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
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;
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 ;;
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" && \
# 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
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4687 "configure"
+#line 4746 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4761 "configure"
+#line 4820 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4768: \"$ac_link\") 1>&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.
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 <<EOF
-#line 4880 "configure"
+#line 4939 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4887: \"$ac_link\") 1>&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
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 4903 "configure"
+#line 4962 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4910: \"$ac_link\") 1>&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
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 <<EOF
-#line 4951 "configure"
+#line 5010 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:4962: \"$ac_link\") 1>&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
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 <<EOF
-#line 4991 "configure"
+#line 5050 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:5002: \"$ac_link\") 1>&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
# 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 <<EOF
-#line 5034 "configure"
+#line 5093 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:5057: \"$ac_link\") 1>&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
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 <<EOF
-#line 5083 "configure"
+#line 5142 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:5094: \"$ac_link\") 1>&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
# -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 <<EOF
-#line 5127 "configure"
+#line 5186 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:5150: \"$ac_link\") 1>&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
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 <<EOF
-#line 5178 "configure"
+#line 5237 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# 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 <<EOF
-#line 5216 "configure"
+#line 5275 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure: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 <<EOF
-#line 5265 "configure"
+#line 5324 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
remove()
; return 0; }
EOF
-if { (eval echo configure:5276: \"$ac_link\") 1>&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
# 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 <<EOF
-#line 5303 "configure"
+#line 5362 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:5326: \"$ac_link\") 1>&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
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 <<EOF
-#line 5352 "configure"
+#line 5411 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shmat()
; return 0; }
EOF
-if { (eval echo configure:5363: \"$ac_link\") 1>&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
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 <<EOF
-#line 5404 "configure"
+#line 5463 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:5415: \"$ac_link\") 1>&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
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
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
-#line 5619 "configure"
+#line 5678 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
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*
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 <<EOF
-#line 5653 "configure"
+#line 5712 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:5664: \"$ac_link\") 1>&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
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 <<EOF
-#line 5694 "configure"
+#line 5753 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XGetFontProperty()
; return 0; }
EOF
-if { (eval echo configure:5705: \"$ac_link\") 1>&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
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 <<EOF
-#line 5737 "configure"
+#line 5796 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XShapeSelectInput()
; return 0; }
EOF
-if { (eval echo configure:5748: \"$ac_link\") 1>&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
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 <<EOF
-#line 5776 "configure"
+#line 5835 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XtOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:5787: \"$ac_link\") 1>&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
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 <<EOF
-#line 5812 "configure"
+#line 5871 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
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
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
-#line 5845 "configure"
+#line 5904 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 \
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 <<EOF
-#line 5906 "configure"
+#line 5965 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmuReadBitmapDataFromFile()
; return 0; }
EOF
-if { (eval echo configure:5917: \"$ac_link\") 1>&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
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 <<EOF
-#line 5961 "configure"
+#line 6020 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5968: \"$ac_link\") 1>&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
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 <<EOF
-#line 6013 "configure"
+#line 6072 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure: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
fi
fi
cat > conftest.$ac_ext <<EOF
-#line 6086 "configure"
+#line 6145 "configure"
#include "confdefs.h"
#include <fcntl.h>
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
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
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
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
-#line 6185 "configure"
+#line 6244 "configure"
#include "confdefs.h"
#include <X11/Xauth.h>
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*
}
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 <<EOF
-#line 6218 "configure"
+#line 6277 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XauGetAuthByAddr()
; return 0; }
EOF
-if { (eval echo configure:6229: \"$ac_link\") 1>&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
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
-#line 6277 "configure"
+#line 6336 "configure"
#include "confdefs.h"
#include <${dir}tt_c.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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*
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 <<EOF
-#line 6323 "configure"
+#line 6382 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tt_message_create()
; return 0; }
EOF
-if { (eval echo configure:6334: \"$ac_link\") 1>&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
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
-#line 6394 "configure"
+#line 6453 "configure"
#include "confdefs.h"
#include <Dt/Dt.h>
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*
}
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 <<EOF
-#line 6427 "configure"
+#line 6486 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
DtDndDragStart()
; return 0; }
EOF
-if { (eval echo configure:6438: \"$ac_link\") 1>&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
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
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
-#line 6534 "configure"
+#line 6593 "configure"
#include "confdefs.h"
#include <ldap.h>
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*
}
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
-#line 6565 "configure"
+#line 6624 "configure"
#include "confdefs.h"
#include <lber.h>
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*
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 <<EOF
-#line 6599 "configure"
+#line 6658 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_search()
; return 0; }
EOF
-if { (eval echo configure:6610: \"$ac_link\") 1>&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
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 <<EOF
-#line 6640 "configure"
+#line 6699 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:6651: \"$ac_link\") 1>&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
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 <<EOF
-#line 6681 "configure"
+#line 6740 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:6692: \"$ac_link\") 1>&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
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 <<EOF
-#line 6722 "configure"
+#line 6781 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:6733: \"$ac_link\") 1>&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
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 <<EOF
-#line 6787 "configure"
+#line 6846 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6810: \"$ac_link\") 1>&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
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 <<EOF
-#line 6850 "configure"
+#line 6909 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
int main(int c, char **v) {
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
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 <<EOF
-#line 6903 "configure"
+#line 6962 "configure"
#include "confdefs.h"
int main() {
XpmCreatePixmapFromData()
; return 0; }
EOF
-if { (eval echo configure:6910: \"$ac_link\") 1>&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
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
-#line 6939 "configure"
+#line 6998 "configure"
#include "confdefs.h"
#include <compface.h>
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*
}
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 <<EOF
-#line 6972 "configure"
+#line 7031 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
UnGenFace()
; return 0; }
EOF
-if { (eval echo configure:6983: \"$ac_link\") 1>&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
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 <<EOF
-#line 7040 "configure"
+#line 7099 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7051: \"$ac_link\") 1>&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
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 <<EOF
-#line 7075 "configure"
+#line 7134 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7086: \"$ac_link\") 1>&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
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 <<EOF
-#line 7110 "configure"
+#line 7169 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7121: \"$ac_link\") 1>&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
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
-#line 7154 "configure"
+#line 7213 "configure"
#include "confdefs.h"
#include <jpeglib.h>
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*
}
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 <<EOF
-#line 7187 "configure"
+#line 7246 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jpeg_destroy_decompress()
; return 0; }
EOF
-if { (eval echo configure:7198: \"$ac_link\") 1>&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
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 <<EOF
-#line 7237 "configure"
+#line 7296 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pow(); below. */
; return 0; }
EOF
-if { (eval echo configure:7260: \"$ac_link\") 1>&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
}
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
-#line 7284 "configure"
+#line 7343 "configure"
#include "confdefs.h"
#include <png.h>
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*
}
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 <<EOF
-#line 7317 "configure"
+#line 7376 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
png_read_image()
; return 0; }
EOF
-if { (eval echo configure:7328: \"$ac_link\") 1>&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
}
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 <<EOF
-#line 7354 "configure"
+#line 7413 "configure"
#include "confdefs.h"
#include <png.h>
int main(int c, char **v) {
if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
EOF
-if { (eval echo configure: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
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
-#line 7408 "configure"
+#line 7467 "configure"
#include "confdefs.h"
#include <tiffio.h>
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*
}
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 <<EOF
-#line 7441 "configure"
+#line 7500 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
TIFFClientOpen()
; return 0; }
EOF
-if { (eval echo configure:7452: \"$ac_link\") 1>&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
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 <<EOF
-#line 7500 "configure"
+#line 7559 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XawScrollbarSetThumb()
; return 0; }
EOF
-if { (eval echo configure:7511: \"$ac_link\") 1>&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
+
+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 <<EOF
+#line 7599 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawScrollbarSetThumb();
+
+int main() {
+XawScrollbarSetThumb()
+; return 0; }
+EOF
+if { (eval echo configure:7610: \"$ac_link\") 1>&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
-#line 7538 "configure"
+#line 7637 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
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*
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 <<EOF
-#line 7565 "configure"
+#line 7664 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmStringFree()
; return 0; }
EOF
-if { (eval echo configure:7576: \"$ac_link\") 1>&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
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 <<EOF
-#line 7607 "configure"
+#line 7706 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
#ifdef LESSTIF_VERSION
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 ;;
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
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
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
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
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\""
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
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
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
-#line 7919 "configure"
+#line 8077 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 <<EOF
-#line 7960 "configure"
+#line 8118 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strerror()
; return 0; }
EOF
-if { (eval echo configure:7971: \"$ac_link\") 1>&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
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 <<EOF
-#line 8034 "configure"
+#line 8192 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XOpenIM()
; return 0; }
EOF
-if { (eval echo configure:8045: \"$ac_link\") 1>&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
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 <<EOF
-#line 8074 "configure"
+#line 8232 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmImMbLookupString()
; return 0; }
EOF
-if { (eval echo configure:8085: \"$ac_link\") 1>&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
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 <<EOF
-#line 8158 "configure"
+#line 8316 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmbDrawString()
; return 0; }
EOF
-if { (eval echo configure:8169: \"$ac_link\") 1>&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
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
-#line 8212 "configure"
+#line 8370 "configure"
#include "confdefs.h"
#include <wnn/jllib.h>
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*
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 <<EOF
-#line 8245 "configure"
+#line 8403 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8268: \"$ac_link\") 1>&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
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 <<EOF
-#line 8302 "configure"
+#line 8460 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:8313: \"$ac_link\") 1>&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
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 <<EOF
-#line 8353 "configure"
+#line 8511 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:8364: \"$ac_link\") 1>&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
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 <<EOF
-#line 8387 "configure"
+#line 8545 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:8398: \"$ac_link\") 1>&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
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 <<EOF
-#line 8421 "configure"
+#line 8579 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:8432: \"$ac_link\") 1>&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
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 <<EOF
-#line 8455 "configure"
+#line 8613 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:8466: \"$ac_link\") 1>&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
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 <<EOF
-#line 8519 "configure"
+#line 8677 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_fi_dic_list()
; return 0; }
EOF
-if { (eval echo configure:8530: \"$ac_link\") 1>&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
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
-#line 8568 "configure"
+#line 8726 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
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*
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
-#line 8603 "configure"
+#line 8761 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
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*
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
-#line 8639 "configure"
+#line 8797 "configure"
#include "confdefs.h"
#include <canna/RK.h>
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*
}
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 <<EOF
-#line 8672 "configure"
+#line 8830 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
RkBgnBun()
; return 0; }
EOF
-if { (eval echo configure:8683: \"$ac_link\") 1>&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
}
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 <<EOF
-#line 8711 "configure"
+#line 8869 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jrKanjiControl()
; return 0; }
EOF
-if { (eval echo configure:8722: \"$ac_link\") 1>&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
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 <<EOF
-#line 8776 "configure"
+#line 8934 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
layout_object_getvalue()
; return 0; }
EOF
-if { (eval echo configure:8787: \"$ac_link\") 1>&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
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 <<EOF
-#line 8876 "configure"
+#line 9034 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8899: \"$ac_link\") 1>&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
* ) 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 <<EOF
-#line 8943 "configure"
+#line 9101 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8966: \"$ac_link\") 1>&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
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 <<EOF
-#line 9005 "configure"
+#line 9163 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:9028: \"$ac_link\") 1>&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
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 <<EOF
-#line 9069 "configure"
+#line 9227 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
kstat_open()
; return 0; }
EOF
-if { (eval echo configure:9080: \"$ac_link\") 1>&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
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 <<EOF
-#line 9119 "configure"
+#line 9277 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
kvm_read()
; return 0; }
EOF
-if { (eval echo configure:9130: \"$ac_link\") 1>&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
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 <<EOF
-#line 9166 "configure"
+#line 9324 "configure"
#include "confdefs.h"
#include <netdb.h>
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
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 <<EOF
-#line 9195 "configure"
+#line 9353 "configure"
#include "confdefs.h"
#include <setjmp.h>
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
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 <<EOF
-#line 9226 "configure"
+#line 9384 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
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
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 <<EOF
-#line 9293 "configure"
+#line 9451 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
; return 0; }
EOF
-if { (eval echo configure:9315: \"$ac_link\") 1>&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
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 <<EOF
-#line 9342 "configure"
+#line 9500 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:9349: \"$ac_compile\") 1>&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
# 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 <<EOF
-#line 9402 "configure"
+#line 9560 "configure"
#include "confdefs.h"
#include <alloca.h>
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
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 <<EOF
-#line 9436 "configure"
+#line 9594 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:9464: \"$ac_link\") 1>&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
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 <<EOF
-#line 9506 "configure"
+#line 9664 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9530: checking for $ac_func" >&5
+echo "configure:9688: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9533 "configure"
+#line 9691 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:9556: \"$ac_link\") 1>&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
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 <<EOF
-#line 9589 "configure"
+#line 9747 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:9608: \"$ac_link\") 1>&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
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
-#line 9640 "configure"
+#line 9798 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure: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*
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 <<EOF
-#line 9676 "configure"
+#line 9834 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
}
}
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
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 <<EOF
-#line 9800 "configure"
+#line 9958 "configure"
#include "confdefs.h"
#include <string.h>
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
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 <<EOF
-#line 9841 "configure"
+#line 9999 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:9864: \"$ac_link\") 1>&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
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 <<EOF
-#line 9895 "configure"
+#line 10053 "configure"
#include "confdefs.h"
/*
}
EOF
-if { (eval echo configure:9950: \"$ac_link\") 1>&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
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 <<EOF
-#line 9980 "configure"
+#line 10138 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <unistd.h>
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
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
-#line 10051 "configure"
+#line 10209 "configure"
#include "confdefs.h"
#include <termios.h>
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*
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
-#line 10102 "configure"
+#line 10260 "configure"
#include "confdefs.h"
#include <termio.h>
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*
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 <<EOF
-#line 10142 "configure"
+#line 10300 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char socket(); below. */
; return 0; }
EOF
-if { (eval echo configure:10165: \"$ac_link\") 1>&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
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
-#line 10183 "configure"
+#line 10341 "configure"
#include "confdefs.h"
#include <netinet/in.h>
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*
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
-#line 10208 "configure"
+#line 10366 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
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*
}
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 <<EOF
-#line 10240 "configure"
+#line 10398 "configure"
#include "confdefs.h"
#include <sys/types.h>
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
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 <<EOF
-#line 10271 "configure"
+#line 10429 "configure"
#include "confdefs.h"
#include <sys/types.h>
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
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 <<EOF
-#line 10315 "configure"
+#line 10473 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char msgget(); below. */
; return 0; }
EOF
-if { (eval echo configure:10338: \"$ac_link\") 1>&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
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
-#line 10356 "configure"
+#line 10514 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
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*
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
-#line 10381 "configure"
+#line 10539 "configure"
#include "confdefs.h"
#include <sys/msg.h>
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*
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
-#line 10427 "configure"
+#line 10585 "configure"
#include "confdefs.h"
#include <dirent.h>
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*
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
-#line 10462 "configure"
+#line 10620 "configure"
#include "confdefs.h"
#include <sys/dir.h>
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*
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
-#line 10503 "configure"
+#line 10661 "configure"
#include "confdefs.h"
#include <nlist.h>
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*
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
-#line 10552 "configure"
+#line 10706 "configure"
#include "confdefs.h"
#include <multimedia/audio_device.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure: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*
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 <<EOF
-#line 10610 "configure"
+#line 10764 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ALopenport()
; return 0; }
EOF
-if { (eval echo configure:10621: \"$ac_link\") 1>&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
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 <<EOF
-#line 10657 "configure"
+#line 10811 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
AOpenAudio()
; return 0; }
EOF
-if { (eval echo configure:10668: \"$ac_link\") 1>&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
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
-#line 10709 "configure"
+#line 10863 "configure"
#include "confdefs.h"
#include <${dir}/soundcard.h>
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*
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
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
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
+#line 10925 "configure"
+#include "confdefs.h"
+#include <audio/audiolib.h>
+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 <<EOF
+#line 10953 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char AuOpenServer();
+
+int main() {
+AuOpenServer()
+; return 0; }
+EOF
+if { (eval echo configure:10964: \"$ac_link\") 1>&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
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 <<EOF
-#line 10784 "configure"
+ libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi
+ cat > conftest.$ac_ext <<EOF
+#line 11003 "configure"
#include "confdefs.h"
#include <audio/Xtutil.h>
EOF
:
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
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 <<EOF
+#line 11066 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char esd_play_stream(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char 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
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 <<EOF
-#line 10832 "configure"
+#line 11161 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:10843: \"$ac_link\") 1>&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
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
-#line 10879 "configure"
+#line 11208 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
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*
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
-#line 10909 "configure"
+#line 11238 "configure"
#include "confdefs.h"
#include <ncurses/term.h>
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*
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
-#line 10947 "configure"
+#line 11276 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
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*
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 <<EOF
-#line 10992 "configure"
+#line 11321 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:11003: \"$ac_link\") 1>&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
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 <<EOF
-#line 11039 "configure"
+#line 11368 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:11050: \"$ac_link\") 1>&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
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 <<EOF
-#line 11073 "configure"
+#line 11402 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:11084: \"$ac_link\") 1>&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
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
-#line 11135 "configure"
+#line 11464 "configure"
#include "confdefs.h"
#include <gpm.h>
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*
}
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 <<EOF
-#line 11168 "configure"
+#line 11497 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
Gpm_Open()
; return 0; }
EOF
-if { (eval echo configure:11179: \"$ac_link\") 1>&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
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
-#line 11237 "configure"
+#line 11566 "configure"
#include "confdefs.h"
#include <ndbm.h>
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*
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 <<EOF
-#line 11277 "configure"
+#line 11606 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:11288: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 11319 "configure"
+#line 11648 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:11342: \"$ac_link\") 1>&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
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 <<EOF
-#line 11366 "configure"
+#line 11695 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:11377: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 11421 "configure"
+#line 11750 "configure"
#include "confdefs.h"
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
; return 0; }
EOF
-if { (eval echo configure:11439: \"$ac_compile\") 1>&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
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 <<EOF
-#line 11457 "configure"
+#line 11786 "configure"
#include "confdefs.h"
#include <$db_h_path>
#if DB_VERSION_MAJOR > 1
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 <<EOF
-#line 11479 "configure"
+#line 11808 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $dbfunc(); below. */
; return 0; }
EOF
-if { (eval echo configure:11502: \"$ac_link\") 1>&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
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 <<EOF
-#line 11526 "configure"
+#line 11855 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
$dbfunc()
; return 0; }
EOF
-if { (eval echo configure:11537: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 11606 "configure"
+#line 11935 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
SOCKSinit()
; return 0; }
EOF
-if { (eval echo configure:11617: \"$ac_link\") 1>&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
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 <<EOF
-#line 11677 "configure"
+#line 12008 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+#include <dlfcn.h>
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*
rm -f conftest*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_hdr
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-}
- have_dlfcn=yes
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_DLFCN_H
-EOF
-cat >> 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 <<EOF
-#line 11726 "configure"
+#line 12036 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:11737: \"$ac_link\") 1>&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
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 <<EOF
-#line 11771 "configure"
+#line 12071 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char _dlopen();
+char dlopen();
int main() {
-_dlopen()
+dlopen()
; return 0; }
EOF
-if { (eval echo configure:11782: \"$ac_link\") 1>&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
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 <<EOF
-#line 11816 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
+fi
+
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:11827: \"$ac_link\") 1>&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 <<EOF
-#line 11861 "configure"
+#line 12126 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shl_load()
; return 0; }
EOF
-if { (eval echo configure:11872: \"$ac_link\") 1>&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
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 <<EOF
-#line 11906 "configure"
+#line 12169 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dld_init()
; return 0; }
EOF
-if { (eval echo configure:11917: \"$ac_link\") 1>&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
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=
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*) ;;
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 <<EOF
-#line 11986 "configure"
+#line 12255 "configure"
#include "confdefs.h"
#ifdef __GNUC__
fi
echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&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
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'
# 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 <<EOF
-#line 12105 "configure"
+#line 12374 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:12112: \"$ac_compile\") 1>&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
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"
xe_libs=
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
cat > conftest.$ac_ext <<EOF
-#line 12194 "configure"
+#line 12463 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:12201: \"$ac_link\") 1>&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
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.
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
# 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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
xe_gnu_ld=yes
# OK - only NOW do we futz about with ld.
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
-echo "configure: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
;;
solaris2* | solaris7*)
- ld_dynamic_link_flags="${wl}-Bdynamic"
+ ld_dynamic_link_flags=
;;
sco3.2v5* | unixware* | sysv5* | sysv4*)
+ fi
+
if test "$can_build_shared" = "yes"; then
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_SHLIB
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 <<EOF
-#line 12535 "configure"
+#line 12803 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:12558: \"$ac_link\") 1>&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
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 <<EOF
-#line 12592 "configure"
+#line 12865 "configure"
#include "confdefs.h"
int main(int c,char *v[]){return 0;}
EOF
-if { (eval echo configure:12596: \"$ac_link\") 1>&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
ac_configure_args="$T"
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining EMACS_CONFIGURATION = "$canonical"
+ Defining EMACS_CONFIGURATION = "$configuration"
EOF
cat >> confdefs.h <<EOF
-#define EMACS_CONFIGURATION "$canonical"
+#define EMACS_CONFIGURATION "$configuration"
EOF
}
EOF
}
+test "$pdump" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining PDUMP
+EOF
+cat >> confdefs.h <<\EOF
+#define PDUMP 1
+EOF
+}
+
(
xemacs_betaname="-b${emacs_beta_version}"
fi
else
- xemacs_betaname=""
+ xemacs_betaname=""
fi
(
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."
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 )
;;
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."
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: ---------------------------------------------------------"
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
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
with_tty=""
use_union_type="no"
with_dnet=""
+pdump="no"
dnl ------------------
dnl Options Processing
const_is_losing | \
usage_tracking | \
use_union_type | \
+ pdump | \
debug | \
use_assertions | \
memory_usage_stats | \
"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
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?
;;
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.])
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 ;;
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
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])
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)],
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 ;;
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)
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) ;;
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)
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)
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 ----------------------
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
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
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)
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
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.
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.
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)
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
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")
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
xemacs_betaname="-b${emacs_beta_version}"
fi
else
- xemacs_betaname=""
+ xemacs_betaname=""
fi
dnl Start stdout redirection to '| tee -a Installation'
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."
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 )
;;
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."
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: ---------------------------------------------------------"
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
--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.
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:
* 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
* 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
* 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 */
* 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
* 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 */
* 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
/*
* 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 <libelf.h>
#include <string.h>
* 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
/*
* 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 <libelf.h>
#include <string.h>
-*- 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
- -*- 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 <staff@cis.ohio-state.edu> 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.
- 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 <LIST_NAME>-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
+<list-manager@xemacs.org>.
-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:
* 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
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.
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
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 <user> (which used to only work in unpredictable ways)
+is now equivalent to
+-user-init-file ~<user>/.emacs -user-init-directory ~<user>/.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.
+
\f
* 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.
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
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)
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)
(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
(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.
\f
* Changes in XEmacs 21.0
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.
*** 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
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.
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.
** Please keep the entries in this file alphabetical **
\1f
-Altrasoft <info@altrasoft.com>
+BeOpen <info@beopen.com>
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
# Shortcuts for sh-derived Unix shells (ksh, zsh, bash)
-# From Steve Baur <steve@altair.xemacs.org>
+# From Steve Baur <steve@xemacs.org>
# Run temacs as XEmacs
function runtemacs
{
#!/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 &
.\" 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
.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
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
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
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.
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.
.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.
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
.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
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).
author-version "10.38"
date "1999-05-18"
build-date "1999-07-30"
- maintainer "SL Baur <steve@altair.xemacs.org>"
+ maintainer "SL Baur <steve@xemacs.org>"
distribution mule
priority medium
category "mule"
author-version "21.1"
date "1999-06-30"
build-date "1999-07-30"
- maintainer "SL Baur <steve@altair.xemacs.org>"
+ maintainer "SL Baur <steve@xemacs.org>"
distribution mule
priority high
category "mule"
! 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
Steve Baur <steve@xemacs.org>,
Martin Buchholz <martin@xemacs.org>,
Richard Mlynarik <mly@adoc.xerox.com>,
-Hrvoje Niksic <hniksic@srce.hr>,
+Hrvoje Niksic <hniksic@xemacs.org>,
Chuck Thompson <cthomp@xemacs.org>,
-Ben Wing <wing@666.com>,
-Jamie Zawinski <jwz@netscape.com>,
+Ben Wing <ben@xemacs.org>,
+Jamie Zawinski <jwz@jwz.org>,
and many others.
It was based on an early version of
.I GNU Emacs Version
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f1190
-Node: Overview\7f2742
-Node: Usage\7f5021
-Node: Organization\7f5671
-Node: Installation\7f7494
-Node: Naming Conventions\7f8647
-Node: Program Structure\7f10786
-Node: Argument Lists\7f11254
-Node: Time of Evaluation\7f21039
-Node: Function Aliases\7f27019
-Node: Predicates\7f27603
-Node: Type Predicates\7f27923
-Node: Equality Predicates\7f32966
-Node: Control Structure\7f35742
-Node: Assignment\7f36546
-Node: Generalized Variables\7f37788
-Node: Basic Setf\7f39095
-Node: Modify Macros\7f46365
-Node: Customizing Setf\7f53575
-Node: Variable Bindings\7f60865
-Node: Dynamic Bindings\7f61446
-Node: Lexical Bindings\7f62336
-Node: Function Bindings\7f66440
-Node: Macro Bindings\7f68827
-Node: Conditionals\7f71751
-Node: Blocks and Exits\7f74834
-Node: Iteration\7f77890
-Node: Loop Facility\7f83364
-Node: Loop Basics\7f84291
-Node: Loop Examples\7f86891
-Node: For Clauses\7f89150
-Node: Iteration Clauses\7f101028
-Node: Accumulation Clauses\7f102869
-Node: Other Clauses\7f105213
-Node: Multiple Values\7f111282
-Node: Macros\7f113175
-Node: Declarations\7f116393
-Node: Symbols\7f124885
-Node: Property Lists\7f125185
-Node: Creating Symbols\7f128386
-Node: Numbers\7f130464
-Node: Predicates on Numbers\7f130944
-Node: Numerical Functions\7f131973
-Node: Random Numbers\7f136200
-Node: Implementation Parameters\7f138909
-Node: Sequences\7f142481
-Node: Sequence Basics\7f143154
-Node: Mapping over Sequences\7f146733
-Node: Sequence Functions\7f152587
-Node: Searching Sequences\7f158762
-Node: Sorting Sequences\7f161800
-Node: Lists\7f164348
-Node: List Functions\7f164773
-Node: Substitution of Expressions\7f169036
-Node: Lists as Sets\7f170922
-Node: Association Lists\7f174984
-Node: Hash Tables\7f176687
-Node: Structures\7f176907
-Node: Assertions\7f191690
-Node: Efficiency Concerns\7f194633
-Node: Common Lisp Compatibility\7f200960
-Node: Old CL Compatibility\7f204118
-Node: Porting Common Lisp\7f208501
-Node: Function Index\7f219515
-Node: Variable Index\7f230778
+Node: Top\7f1164
+Node: Overview\7f2716
+Node: Usage\7f4995
+Node: Organization\7f5645
+Node: Installation\7f7468
+Node: Naming Conventions\7f8621
+Node: Program Structure\7f10760
+Node: Argument Lists\7f11228
+Node: Time of Evaluation\7f21011
+Node: Function Aliases\7f26991
+Node: Predicates\7f27575
+Node: Type Predicates\7f27895
+Node: Equality Predicates\7f32937
+Node: Control Structure\7f35713
+Node: Assignment\7f36517
+Node: Generalized Variables\7f37758
+Node: Basic Setf\7f39065
+Node: Modify Macros\7f46335
+Node: Customizing Setf\7f53544
+Node: Variable Bindings\7f60833
+Node: Dynamic Bindings\7f61414
+Node: Lexical Bindings\7f62304
+Node: Function Bindings\7f66408
+Node: Macro Bindings\7f68795
+Node: Conditionals\7f71718
+Node: Blocks and Exits\7f74801
+Node: Iteration\7f77857
+Node: Loop Facility\7f83330
+Node: Loop Basics\7f84257
+Node: Loop Examples\7f86857
+Node: For Clauses\7f89116
+Node: Iteration Clauses\7f100993
+Node: Accumulation Clauses\7f102834
+Node: Other Clauses\7f105178
+Node: Multiple Values\7f111247
+Node: Macros\7f113140
+Node: Declarations\7f116358
+Node: Symbols\7f124850
+Node: Property Lists\7f125150
+Node: Creating Symbols\7f128351
+Node: Numbers\7f130429
+Node: Predicates on Numbers\7f130909
+Node: Numerical Functions\7f131938
+Node: Random Numbers\7f136165
+Node: Implementation Parameters\7f138874
+Node: Sequences\7f142446
+Node: Sequence Basics\7f143119
+Node: Mapping over Sequences\7f146697
+Node: Sequence Functions\7f152551
+Node: Searching Sequences\7f158726
+Node: Sorting Sequences\7f161763
+Node: Lists\7f164311
+Node: List Functions\7f164736
+Node: Substitution of Expressions\7f168999
+Node: Lists as Sets\7f170885
+Node: Association Lists\7f174947
+Node: Hash Tables\7f176650
+Node: Structures\7f176870
+Node: Assertions\7f191653
+Node: Efficiency Concerns\7f194596
+Node: Common Lisp Compatibility\7f200923
+Node: Old CL Compatibility\7f204079
+Node: Porting Common Lisp\7f208462
+Node: Function Index\7f219475
+Node: Variable Index\7f230738
\1f
End Tag Table
-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
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
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
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
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.
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.
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
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.
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,
`(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
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.
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
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)'.
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
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
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
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
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,
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'.
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
-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
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)
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!
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.
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
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,
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.
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::.
\1f
File: cl.info, Node: Customizing Setf, Prev: Modify Macros, Up: Generalized Variables
`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
`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,
(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
(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
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
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
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,
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
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*'.
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
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
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
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
=> (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
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,
(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:
(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,
((?\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
`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'.
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
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.
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
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
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'.
((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'.
(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.
`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
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
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.
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
-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
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
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'.
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
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'
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
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
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
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"
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
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
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.
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,
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
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,
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.
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'.
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.
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'.
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
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
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.
-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
- 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
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
===============
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
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
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.)
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
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:
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,
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
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
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
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
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.
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
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
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
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
===================
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
`: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
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
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
`: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.
\1f
File: cl.info, Node: Sorting Sequences, Prev: Searching Sequences, Up: Sequences
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
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.
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
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
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
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)
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
(*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
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'.
\1f
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
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
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,
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.
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
`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
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)'.
\1f
-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
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
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
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.
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
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
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
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
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,
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
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
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
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
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.
-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
* 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.
-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
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.
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.
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
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.
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.
\1f
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
Add colors.
+
\1f
Tag Table:
-Node: Top\7f230
-Node: Declaring Groups\7f1651
-Node: Declaring Variables\7f2752
-Node: Declaring Faces\7f5843
-Node: Usage for Package Authors\7f7541
-Node: Utilities\7f8320
-Node: The Init File\7f9404
-Node: Wishlist\7f9856
+Node: Top\7f206
+Node: Declaring Groups\7f1627
+Node: Declaring Variables\7f2728
+Node: Declaring Faces\7f5819
+Node: Usage for Package Authors\7f7517
+Node: Utilities\7f8296
+Node: The Init File\7f9380
+Node: Wishlist\7f9832
\1f
End Tag Table
-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.
* Defining Variables:: Creating new Lisp variables
* Index:: Concept Index
- -- The Detailed Node Listing --
+ --- The Detailed Node Listing ---
Annatomy of a Module
`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'
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.
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
* 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.
* 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.
\1f
Tag Table:
-Node: Top\7f1562
-Node: Introduction\7f2908
-Node: Annatomy of a Module\7f7417
-Node: Required Header File\7f8233
-Node: Required Functions\7f10154
-Node: Required Variables\7f12403
-Node: Loading other Modules\7f15090
-Node: Using ellcc\7f17148
-Node: Compile Mode\7f18943
-Node: Initialization Mode\7f20311
-Node: Link Mode\7f25343
-Node: Other ellcc options\7f26490
-Node: Environment Variables\7f29070
-Node: Defining Functions\7f30761
-Node: Using DEFUN\7f32772
-Node: Declaring Functions\7f34483
-Node: Defining Variables\7f35826
-Node: Index\7f38071
+Node: Top\7f1538
+Node: Introduction\7f2886
+Node: Annatomy of a Module\7f7395
+Node: Required Header File\7f8211
+Node: Required Functions\7f10132
+Node: Required Variables\7f12381
+Node: Loading other Modules\7f15068
+Node: Using ellcc\7f17126
+Node: Compile Mode\7f18921
+Node: Initialization Mode\7f20289
+Node: Link Mode\7f25321
+Node: Other ellcc options\7f26468
+Node: Environment Variables\7f29048
+Node: Defining Functions\7f30739
+Node: Using DEFUN\7f32750
+Node: Declaring Functions\7f34461
+Node: Defining Variables\7f35804
+Node: Index\7f38049
\1f
End Tag Table
-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
\1f
Tag Table:
-Node: Top\7f258
-Node: Using an External Client Widget\7f688
-Node: External Client Widget Resource Settings\7f2403
-Node: Motif-Specific Info About the External Client Widget\7f5146
+Node: Top\7f232
+Node: Using an External Client Widget\7f662
+Node: External Client Widget Resource Settings\7f2377
+Node: Motif-Specific Info About the External Client Widget\7f5120
\1f
End Tag Table
-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
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
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.
\1f
File: info.info, Node: Getting Started, Next: Advanced Info, Prev: Top, Up: Top
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.
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.
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
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.
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 <SPC>s.
>> Now type `u' to move back up 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').
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.
available.
\1f
-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.)
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
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.
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>
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
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
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:
when the function `Info-directory' is called.
\1f
-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.
+
\1f
Tag Table:
-Node: Top\7f1085
-Node: Getting Started\7f1770
-Node: Help-Small-Screen\7f2518
-Node: Help\7f4267
-Node: Help-P\7f5297
-Node: Help-^L\7f6159
-Node: Help-M\7f9037
-Node: Help-FOO\7f15047
-Node: Help-Adv\7f15785
-Node: Help-Cross\7f18460
-Node: Help-Q\7f19106
-Node: Advanced Info\7f19733
-Node: Expert\7f20709
-Node: Add\7f23222
-Node: Menus\7f26581
-Node: Cross-refs\7f29455
-Node: Tags\7f30157
-Node: Checking\7f31459
-Node: Emacs Info Variables\7f32412
-Node: Create an Info File\7f33401
+Node: Top\7f1069
+Node: Getting Started\7f1614
+Node: Help-Small-Screen\7f2362
+Node: Help\7f4111
+Node: Help-P\7f5141
+Node: Help-^L\7f6003
+Node: Help-M\7f8881
+Node: Help-FOO\7f14861
+Node: Help-Adv\7f15599
+Node: Help-Cross\7f18274
+Node: Help-Q\7f18920
+Node: Advanced Info\7f19547
+Node: Expert\7f20525
+Node: Add\7f23039
+Node: Menus\7f26399
+Node: Cross-refs\7f29273
+Node: Tags\7f29975
+Node: Checking\7f31277
+Node: Emacs Info Variables\7f32230
+Node: Creating an Info File\7f33219
\1f
End Tag Table
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f1789
-Node: A History of Emacs\7f6369
-Node: Through Version 18\7f7894
-Node: Lucid Emacs\7f11315
-Node: GNU Emacs 19\7f14333
-Node: GNU Emacs 20\7f16516
-Node: XEmacs\7f16943
-Node: XEmacs From the Outside\7f20122
-Node: The Lisp Language\7f21890
-Node: XEmacs From the Perspective of Building\7f31435
-Node: XEmacs From the Inside\7f37560
-Node: The XEmacs Object System (Abstractly Speaking)\7f45943
-Node: How Lisp Objects Are Represented in C\7f60031
-Node: Rules When Writing New C Code\7f68593
-Node: General Coding Rules\7f69397
-Node: Writing Lisp Primitives\7f74557
-Node: Adding Global Lisp Variables\7f85727
-Node: Coding for Mule\7f89365
-Node: Character-Related Data Types\7f90344
-Node: Working With Character and Byte Positions\7f93017
-Node: Conversion to and from External Data\7f96767
-Node: General Guidelines for Writing Mule-Aware Code\7f101648
-Node: An Example of Mule-Aware Code\7f103679
-Node: Techniques for XEmacs Developers\7f105666
-Node: A Summary of the Various XEmacs Modules\7f109437
-Node: Low-Level Modules\7f110257
-Node: Basic Lisp Modules\7f117779
-Node: Modules for Standard Editing Operations\7f126103
-Node: Editor-Level Control Flow Modules\7f131991
-Node: Modules for the Basic Displayable Lisp Objects\7f135438
-Node: Modules for other Display-Related Lisp Objects\7f137960
-Node: Modules for the Redisplay Mechanism\7f139038
-Node: Modules for Interfacing with the File System\7f141389
-Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f145087
-Node: Modules for Interfacing with the Operating System\7f150541
-Node: Modules for Interfacing with X Windows\7f158202
-Node: Modules for Internationalization\7f161638
-Node: Allocation of Objects in XEmacs Lisp\7f164275
-Node: Introduction to Allocation\7f164829
-Node: Garbage Collection\7f170292
-Node: GCPROing\7f173245
-Node: Garbage Collection - Step by Step\7f180056
-Node: Invocation\7f180448
-Node: garbage_collect_1\7f183420
-Node: mark_object\7f192900
-Node: gc_sweep\7f194712
-Node: sweep_lcrecords_1\7f199775
-Node: compact_string_chars\7f200770
-Node: sweep_strings\7f202950
-Node: sweep_bit_vectors_1\7f203915
-Node: Integers and Characters\7f204591
-Node: Allocation from Frob Blocks\7f205343
-Node: lrecords\7f206947
-Node: Low-level allocation\7f219409
-Node: Pure Space\7f223577
-Node: Cons\7f223752
-Node: Vector\7f224468
-Node: Bit Vector\7f225045
-Node: Symbol\7f225538
-Node: Marker\7f226107
-Node: String\7f226662
-Node: Compiled Function\7f230277
-Node: Events and the Event Loop\7f230446
-Node: Introduction to Events\7f230925
-Node: Main Loop\7f232841
-Node: Specifics of the Event Gathering Mechanism\7f236417
-Node: Specifics About the Emacs Event\7f248870
-Node: The Event Stream Callback Routines\7f249125
-Node: Other Event Loop Functions\7f249370
-Node: Converting Events\7f250510
-Node: Dispatching Events; The Command Builder\7f251119
-Node: Evaluation; Stack Frames; Bindings\7f251354
-Node: Evaluation\7f251696
-Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f258236
-Node: Simple Special Forms\7f260620
-Node: Catch and Throw\7f261402
-Node: Symbols and Variables\7f263977
-Node: Introduction to Symbols\7f264241
-Node: Obarrays\7f265279
-Node: Symbol Values\7f268812
-Node: Buffers and Textual Representation\7f271100
-Node: Introduction to Buffers\7f271758
-Node: The Text in a Buffer\7f274421
-Node: Buffer Lists\7f281571
-Node: Markers and Extents\7f283522
-Node: Bufbytes and Emchars\7f285787
-Node: The Buffer Object\7f286002
-Node: MULE Character Sets and Encodings\7f289482
-Node: Character Sets\7f290544
-Node: Encodings\7f293987
-Node: Japanese EUC (Extended Unix Code)\7f295054
-Node: JIS7\7f295868
-Node: Internal Mule Encodings\7f297218
-Node: Internal String Encoding\7f299048
-Node: Internal Character Encoding\7f301161
-Node: CCL\7f302885
-Node: The Lisp Reader and Compiler\7f309637
-Node: Lstreams\7f309850
-Node: Creating an Lstream\7f310881
-Node: Lstream Types\7f312091
-Node: Lstream Functions\7f312343
-Node: Lstream Methods\7f315865
-Node: Consoles; Devices; Frames; Windows\7f318994
-Node: Introduction to Consoles; Devices; Frames; Windows\7f319309
-Node: Point\7f321801
-Node: Window Hierarchy\7f323080
-Node: The Window Object\7f327530
-Node: The Redisplay Mechanism\7f330967
-Node: Critical Redisplay Sections\7f331759
-Node: Line Start Cache\7f332714
-Node: Redisplay Piece by Piece\7f335951
-Node: Extents\7f337987
-Node: Introduction to Extents\7f338525
-Node: Extent Ordering\7f339651
-Node: Format of the Extent Info\7f340892
-Node: Zero-Length Extents\7f342780
-Node: Mathematics of Extent Ordering\7f344178
-Node: Extent Fragments\7f348935
-Node: Faces\7f350022
-Node: Glyphs\7f350138
-Node: Specifiers\7f353156
-Node: Menus\7f353285
-Node: Subprocesses\7f355543
-Node: Interface to X Windows\7f357519
-Node: Index\7f357690
+Node: Top\7f1772
+Node: A History of Emacs\7f6354
+Node: Through Version 18\7f7879
+Node: Lucid Emacs\7f11300
+Node: GNU Emacs 19\7f14318
+Node: GNU Emacs 20\7f16501
+Node: XEmacs\7f16928
+Node: XEmacs From the Outside\7f20107
+Node: The Lisp Language\7f21875
+Node: XEmacs From the Perspective of Building\7f31420
+Node: XEmacs From the Inside\7f37545
+Node: The XEmacs Object System (Abstractly Speaking)\7f45928
+Node: How Lisp Objects Are Represented in C\7f60016
+Node: Rules When Writing New C Code\7f68578
+Node: General Coding Rules\7f69382
+Node: Writing Lisp Primitives\7f74542
+Node: Adding Global Lisp Variables\7f85711
+Node: Coding for Mule\7f89349
+Node: Character-Related Data Types\7f90328
+Node: Working With Character and Byte Positions\7f93001
+Node: Conversion to and from External Data\7f96751
+Node: General Guidelines for Writing Mule-Aware Code\7f101632
+Node: An Example of Mule-Aware Code\7f103663
+Node: Techniques for XEmacs Developers\7f105650
+Node: A Summary of the Various XEmacs Modules\7f109415
+Node: Low-Level Modules\7f110235
+Node: Basic Lisp Modules\7f117757
+Node: Modules for Standard Editing Operations\7f126081
+Node: Editor-Level Control Flow Modules\7f131969
+Node: Modules for the Basic Displayable Lisp Objects\7f135416
+Node: Modules for other Display-Related Lisp Objects\7f137938
+Node: Modules for the Redisplay Mechanism\7f139016
+Node: Modules for Interfacing with the File System\7f141367
+Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f145065
+Node: Modules for Interfacing with the Operating System\7f150519
+Node: Modules for Interfacing with X Windows\7f158180
+Node: Modules for Internationalization\7f161616
+Node: Allocation of Objects in XEmacs Lisp\7f164253
+Node: Introduction to Allocation\7f164807
+Node: Garbage Collection\7f170270
+Node: GCPROing\7f173223
+Node: Garbage Collection - Step by Step\7f180034
+Node: Invocation\7f180426
+Node: garbage_collect_1\7f183398
+Node: mark_object\7f192878
+Node: gc_sweep\7f194690
+Node: sweep_lcrecords_1\7f199753
+Node: compact_string_chars\7f200748
+Node: sweep_strings\7f202928
+Node: sweep_bit_vectors_1\7f203893
+Node: Integers and Characters\7f204569
+Node: Allocation from Frob Blocks\7f205321
+Node: lrecords\7f206925
+Node: Low-level allocation\7f219387
+Node: Pure Space\7f223555
+Node: Cons\7f223730
+Node: Vector\7f224446
+Node: Bit Vector\7f225023
+Node: Symbol\7f225516
+Node: Marker\7f226085
+Node: String\7f226640
+Node: Compiled Function\7f230255
+Node: Events and the Event Loop\7f230424
+Node: Introduction to Events\7f230903
+Node: Main Loop\7f232819
+Node: Specifics of the Event Gathering Mechanism\7f236395
+Node: Specifics About the Emacs Event\7f248848
+Node: The Event Stream Callback Routines\7f249103
+Node: Other Event Loop Functions\7f249348
+Node: Converting Events\7f250488
+Node: Dispatching Events; The Command Builder\7f251097
+Node: Evaluation; Stack Frames; Bindings\7f251332
+Node: Evaluation\7f251674
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f258214
+Node: Simple Special Forms\7f260598
+Node: Catch and Throw\7f261380
+Node: Symbols and Variables\7f263955
+Node: Introduction to Symbols\7f264219
+Node: Obarrays\7f265257
+Node: Symbol Values\7f268790
+Node: Buffers and Textual Representation\7f271078
+Node: Introduction to Buffers\7f271736
+Node: The Text in a Buffer\7f274399
+Node: Buffer Lists\7f281549
+Node: Markers and Extents\7f283500
+Node: Bufbytes and Emchars\7f285765
+Node: The Buffer Object\7f285980
+Node: MULE Character Sets and Encodings\7f289460
+Node: Character Sets\7f290522
+Node: Encodings\7f293965
+Node: Japanese EUC (Extended Unix Code)\7f295032
+Node: JIS7\7f295846
+Node: Internal Mule Encodings\7f297196
+Node: Internal String Encoding\7f299026
+Node: Internal Character Encoding\7f301139
+Node: CCL\7f302863
+Node: The Lisp Reader and Compiler\7f309615
+Node: Lstreams\7f309828
+Node: Creating an Lstream\7f310859
+Node: Lstream Types\7f312069
+Node: Lstream Functions\7f312321
+Node: Lstream Methods\7f315890
+Node: Consoles; Devices; Frames; Windows\7f319033
+Node: Introduction to Consoles; Devices; Frames; Windows\7f319348
+Node: Point\7f321840
+Node: Window Hierarchy\7f323119
+Node: The Window Object\7f327569
+Node: The Redisplay Mechanism\7f331006
+Node: Critical Redisplay Sections\7f331798
+Node: Line Start Cache\7f332753
+Node: Redisplay Piece by Piece\7f335990
+Node: Extents\7f338026
+Node: Introduction to Extents\7f338564
+Node: Extent Ordering\7f339690
+Node: Format of the Extent Info\7f340931
+Node: Zero-Length Extents\7f342819
+Node: Mathematics of Extent Ordering\7f344217
+Node: Extent Fragments\7f348974
+Node: Faces\7f350061
+Node: Glyphs\7f350177
+Node: Specifiers\7f353195
+Node: Menus\7f353324
+Node: Subprocesses\7f355582
+Node: Interface to X Windows\7f357558
+Node: Index\7f357729
\1f
End Tag Table
-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
* 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:
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
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
-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
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
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:
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
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:
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
-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
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
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.
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 `<config.h>' and `"lisp.h"'. It
+ * Header files should _not_ include `<config.h>' 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
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
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
`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.
\1f
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
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.
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
-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
* 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.
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.
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.
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.
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
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
-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
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.)
`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
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
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.
\1f
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.
-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
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.
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
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.
-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
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
- 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
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
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
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.
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
-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
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
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
* 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.
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f2387
-Node: Copying\7f48394
-Node: Introduction\7f67552
-Node: Caveats\7f69143
-Node: Lisp History\7f70872
-Node: Conventions\7f72128
-Node: Some Terms\7f72943
-Node: nil and t\7f73664
-Node: Evaluation Notation\7f75341
-Node: Printing Notation\7f76254
-Node: Error Messages\7f77128
-Node: Buffer Text Notation\7f77569
-Node: Format of Descriptions\7f78444
-Node: A Sample Function Description\7f79298
-Node: A Sample Variable Description\7f83284
-Node: Acknowledgements\7f84192
-Node: Lisp Data Types\7f86170
-Node: Printed Representation\7f88725
-Node: Comments\7f90768
-Node: Primitive Types\7f91666
-Node: Programming Types\7f93325
-Node: Integer Type\7f95277
-Node: Floating Point Type\7f96314
-Node: Character Type\7f96933
-Node: Symbol Type\7f104839
-Node: Sequence Type\7f107534
-Node: Cons Cell Type\7f109055
-Node: Dotted Pair Notation\7f113538
-Node: Association List Type\7f115659
-Node: Array Type\7f116542
-Node: String Type\7f118008
-Node: Vector Type\7f120689
-Node: Bit Vector Type\7f121461
-Node: Function Type\7f122323
-Node: Macro Type\7f123439
-Node: Primitive Function Type\7f124136
-Node: Compiled-Function Type\7f125663
-Node: Autoload Type\7f126217
-Node: Char Table Type\7f127231
-Node: Hash Table Type\7f127405
-Node: Range Table Type\7f128560
-Node: Weak List Type\7f129413
-Node: Editing Types\7f129563
-Node: Buffer Type\7f131190
-Node: Marker Type\7f133226
-Node: Extent Type\7f133950
-Node: Window Type\7f135218
-Node: Frame Type\7f136629
-Node: Device Type\7f137424
-Node: Console Type\7f138250
-Node: Window Configuration Type\7f139451
-Node: Event Type\7f140149
-Node: Process Type\7f140313
-Node: Stream Type\7f141348
-Node: Keymap Type\7f142473
-Node: Syntax Table Type\7f143011
-Node: Display Table Type\7f144035
-Node: Database Type\7f144474
-Node: Charset Type\7f144640
-Node: Coding System Type\7f144804
-Node: ToolTalk Message Type\7f144988
-Node: ToolTalk Pattern Type\7f145187
-Node: Window-System Types\7f145359
-Node: Face Type\7f146505
-Node: Glyph Type\7f146636
-Node: Specifier Type\7f146792
-Node: Font Instance Type\7f146965
-Node: Color Instance Type\7f147155
-Node: Image Instance Type\7f147352
-Node: Toolbar Button Type\7f147550
-Node: Subwindow Type\7f147743
-Node: X Resource Type\7f147922
-Node: Type Predicates\7f148075
-Node: Equality Predicates\7f157205
-Node: Numbers\7f162010
-Node: Integer Basics\7f163465
-Node: Float Basics\7f165815
-Node: Predicates on Numbers\7f167557
-Node: Comparison of Numbers\7f169190
-Node: Numeric Conversions\7f173011
-Node: Arithmetic Operations\7f174477
-Node: Rounding Operations\7f179942
-Node: Bitwise Operations\7f181047
-Node: Math Functions\7f189982
-Node: Random Numbers\7f192298
-Node: Strings and Characters\7f194064
-Node: String Basics\7f195517
-Node: Predicates for Strings\7f197939
-Node: Creating Strings\7f198702
-Node: Predicates for Characters\7f204030
-Node: Character Codes\7f205101
-Node: Text Comparison\7f206514
-Node: String Conversion\7f209876
-Node: Modifying Strings\7f213554
-Node: String Properties\7f214195
-Node: Formatting Strings\7f214838
-Node: Character Case\7f224446
-Node: Case Tables\7f227593
-Node: Char Tables\7f231492
-Node: Char Table Types\7f232884
-Node: Working With Char Tables\7f234459
-Node: Lists\7f236408
-Node: Cons Cells\7f237531
-Node: Lists as Boxes\7f238867
-Node: List-related Predicates\7f241509
-Node: List Elements\7f243211
-Node: Building Lists\7f248240
-Node: Modifying Lists\7f254235
-Node: Setcar\7f255047
-Node: Setcdr\7f257468
-Node: Rearrangement\7f259978
-Node: Sets And Lists\7f265537
-Node: Association Lists\7f269766
-Node: Property Lists\7f279267
-Node: Working With Normal Plists\7f280815
-Node: Working With Lax Plists\7f283083
-Node: Converting Plists To/From Alists\7f285323
-Node: Weak Lists\7f286671
-Node: Sequences Arrays Vectors\7f288836
-Node: Sequence Functions\7f291472
-Node: Arrays\7f295133
-Node: Array Functions\7f298198
-Node: Vectors\7f300731
-Node: Vector Functions\7f302229
-Node: Bit Vectors\7f304803
-Node: Bit Vector Functions\7f305648
-Node: Symbols\7f307899
-Node: Symbol Components\7f308948
-Node: Definitions\7f313127
-Node: Creating Symbols\7f315352
-Node: Symbol Properties\7f322390
-Node: Plists and Alists\7f323906
-Node: Symbol Plists\7f325656
-Node: Other Plists\7f327466
-Node: Evaluation\7f329244
-Node: Intro Eval\7f330049
-Node: Eval\7f333540
-Node: Forms\7f337960
-Node: Self-Evaluating Forms\7f339117
-Node: Symbol Forms\7f340630
-Node: Classifying Lists\7f341547
-Node: Function Indirection\7f342303
-Node: Function Forms\7f345418
-Node: Macro Forms\7f346417
-Node: Special Forms\7f348017
-Node: Autoloading\7f350351
-Node: Quoting\7f350849
-Node: Control Structures\7f352212
-Node: Sequencing\7f353834
-Node: Conditionals\7f356699
-Node: Combining Conditions\7f360122
-Node: Iteration\7f363392
-Node: Nonlocal Exits\7f365177
-Node: Catch and Throw\7f365879
-Node: Examples of Catch\7f369723
-Node: Errors\7f371742
-Node: Signaling Errors\7f373231
-Node: Processing of Errors\7f376299
-Node: Handling Errors\7f377629
-Node: Error Symbols\7f384535
-Node: Cleanups\7f387982
-Node: Variables\7f391762
-Node: Global Variables\7f393531
-Node: Constant Variables\7f394607
-Node: Local Variables\7f395233
-Node: Void Variables\7f400177
-Node: Defining Variables\7f403688
-Node: Accessing Variables\7f410853
-Node: Setting Variables\7f412279
-Node: Variable Scoping\7f416798
-Node: Scope\7f418397
-Node: Extent\7f419922
-Node: Impl of Scope\7f421401
-Node: Using Scoping\7f423364
-Node: Buffer-Local Variables\7f424886
-Node: Intro to Buffer-Local\7f425722
-Node: Creating Buffer-Local\7f428265
-Node: Default Value\7f433485
-Node: Variable Aliases\7f436629
-Node: Functions\7f438415
-Node: What Is a Function\7f439509
-Node: Lambda Expressions\7f443556
-Node: Lambda Components\7f444466
-Node: Simple Lambda\7f446298
-Node: Argument List\7f447957
-Node: Function Documentation\7f451685
-Node: Function Names\7f453627
-Node: Defining Functions\7f456201
-Node: Calling Functions\7f459243
-Node: Mapping Functions\7f463092
-Node: Anonymous Functions\7f465445
-Node: Function Cells\7f468690
-Node: Inline Functions\7f473500
-Node: Related Topics\7f475310
-Node: Macros\7f476363
-Node: Simple Macro\7f477647
-Node: Expansion\7f478382
-Node: Compiling Macros\7f481356
-Node: Defining Macros\7f483194
-Node: Backquote\7f484512
-Node: Problems with Macros\7f486910
-Node: Argument Evaluation\7f487605
-Node: Surprising Local Vars\7f490506
-Node: Eval During Expansion\7f492574
-Node: Repeated Expansion\7f494268
-Node: Customization\7f496179
-Node: Common Keywords\7f496648
-Node: Group Definitions\7f499493
-Node: Variable Definitions\7f501686
-Node: Customization Types\7f506669
-Node: Simple Types\7f508105
-Node: Composite Types\7f510262
-Node: Splicing into Lists\7f514952
-Node: Type Keywords\7f516787
-Node: Loading\7f520307
-Node: How Programs Do Loading\7f521980
-Node: Autoload\7f531109
-Node: Repeated Loading\7f537189
-Node: Named Features\7f539303
-Node: Unloading\7f545736
-Node: Hooks for Loading\7f547892
-Node: Byte Compilation\7f548609
-Node: Speed of Byte-Code\7f550526
-Node: Compilation Functions\7f551733
-Node: Docs and Compilation\7f558122
-Node: Dynamic Loading\7f560775
-Node: Eval During Compile\7f563139
-Node: Compiled-Function Objects\7f564404
-Node: Disassembly\7f569203
-Node: Debugging\7f576457
-Node: Debugger\7f577869
-Node: Error Debugging\7f579014
-Node: Infinite Loops\7f581767
-Node: Function Debugging\7f583011
-Node: Explicit Debug\7f585801
-Node: Using Debugger\7f586573
-Node: Debugger Commands\7f588437
-Node: Invoking the Debugger\7f592754
-Node: Internals of Debugger\7f596669
-Node: Syntax Errors\7f601546
-Node: Excess Open\7f602794
-Node: Excess Close\7f604669
-Node: Compilation Errors\7f606090
-Node: Edebug\7f607378
-Node: Using Edebug\7f609485
-Node: Instrumenting\7f612182
-Node: Edebug Execution Modes\7f615671
-Node: Jumping\7f618781
-Node: Edebug Misc\7f621124
-Node: Breakpoints\7f622513
-Node: Global Break Condition\7f625319
-Node: Embedded Breakpoints\7f626274
-Node: Trapping Errors\7f627229
-Node: Edebug Views\7f629305
-Node: Edebug Eval\7f631270
-Node: Eval List\7f632447
-Node: Reading in Edebug\7f635832
-Node: Printing in Edebug\7f636631
-Node: Tracing\7f638346
-Node: Coverage Testing\7f640232
-Node: The Outside Context\7f642273
-Node: Checking Whether to Stop\7f643222
-Node: Edebug Display Update\7f643868
-Node: Edebug Recursive Edit\7f645890
-Node: Instrumenting Macro Calls\7f647544
-Node: Specification List\7f650026
-Node: Backtracking\7f659437
-Node: Debugging Backquote\7f661375
-Node: Specification Examples\7f665081
-Node: Edebug Options\7f667148
-Node: Read and Print\7f672485
-Node: Streams Intro\7f673462
-Node: Input Streams\7f675480
-Node: Input Functions\7f680381
-Node: Output Streams\7f682441
-Node: Output Functions\7f686493
-Node: Output Variables\7f690793
-Node: Minibuffers\7f695592
-Node: Intro to Minibuffers\7f696677
-Node: Text from Minibuffer\7f699005
-Node: Object from Minibuffer\7f703668
-Node: Minibuffer History\7f706865
-Node: Completion\7f709775
-Node: Basic Completion\7f711750
-Node: Minibuffer Completion\7f716757
-Node: Completion Commands\7f719992
-Node: High-Level Completion\7f724640
-Node: Reading File Names\7f728664
-Node: Programmed Completion\7f732353
-Node: Yes-or-No Queries\7f734563
-Node: Multiple Queries\7f740259
-Node: Minibuffer Misc\7f744324
-Node: Command Loop\7f749193
-Node: Command Overview\7f750539
-Node: Defining Commands\7f753823
-Node: Using Interactive\7f754571
-Node: Interactive Codes\7f759345
-Node: Interactive Examples\7f765149
-Node: Interactive Call\7f766463
-Node: Command Loop Info\7f771866
-Node: Events\7f776845
-Node: Event Types\7f778305
-Node: Event Contents\7f780228
-Node: Event Predicates\7f784704
-Node: Accessing Mouse Event Positions\7f786029
-Node: Frame-Level Event Position Info\7f786728
-Node: Window-Level Event Position Info\7f787768
-Node: Event Text Position Info\7f789532
-Node: Event Glyph Position Info\7f792024
-Node: Event Toolbar Position Info\7f793347
-Node: Other Event Position Info\7f794018
-Node: Accessing Other Event Info\7f794427
-Node: Working With Events\7f796047
-Node: Converting Events\7f801975
-Node: Reading Input\7f804928
-Node: Key Sequence Input\7f805930
-Node: Reading One Event\7f807884
-Node: Dispatching an Event\7f810645
-Node: Quoted Character Input\7f811096
-Node: Peeking and Discarding\7f812444
-Node: Waiting\7f816348
-Node: Quitting\7f818656
-Node: Prefix Command Arguments\7f823064
-Node: Recursive Editing\7f828151
-Node: Disabling Commands\7f832948
-Node: Command History\7f835016
-Node: Keyboard Macros\7f836755
-Node: Keymaps\7f838973
-Node: Keymap Terminology\7f840550
-Node: Format of Keymaps\7f843480
-Node: Creating Keymaps\7f843891
-Node: Inheritance and Keymaps\7f845970
-Node: Key Sequences\7f848342
-Node: Prefix Keys\7f852912
-Node: Active Keymaps\7f856497
-Node: Key Lookup\7f865712
-Node: Functions for Key Lookup\7f870876
-Node: Changing Key Bindings\7f876579
-Node: Key Binding Commands\7f883466
-Node: Scanning Keymaps\7f885532
-Node: Other Keymap Functions\7f894044
-Node: Menus\7f894666
-Node: Menu Format\7f895208
-Node: Menubar Format\7f903793
-Node: Menubar\7f904418
-Node: Modifying Menus\7f907532
-Node: Menu Filters\7f912550
-Node: Pop-Up Menus\7f914446
-Node: Menu Accelerators\7f916652
-Node: Creating Menu Accelerators\7f917374
-Node: Keyboard Menu Traversal\7f918692
-Node: Menu Accelerator Functions\7f919419
-Node: Buffers Menu\7f922454
-Node: Dialog Boxes\7f923748
-Node: Dialog Box Format\7f923915
-Node: Dialog Box Functions\7f925285
-Node: Toolbar\7f925683
-Node: Toolbar Intro\7f926008
-Node: Toolbar Descriptor Format\7f928419
-Node: Specifying the Toolbar\7f932913
-Node: Other Toolbar Variables\7f936521
-Node: Scrollbars\7f940948
-Node: Drag and Drop\7f941084
-Node: Supported Protocols\7f942160
-Node: OffiX DND\7f942663
-Node: CDE dt\7f943670
-Node: MSWindows OLE\7f944261
-Node: Loose ends\7f944432
-Node: Drop Interface\7f944824
-Node: Drag Interface\7f945846
-Node: Modes\7f946020
-Node: Major Modes\7f946971
-Node: Major Mode Conventions\7f949887
-Node: Example Major Modes\7f955842
-Node: Auto Major Mode\7f963810
-Node: Mode Help\7f971260
-Node: Derived Modes\7f972361
-Node: Minor Modes\7f974552
-Node: Minor Mode Conventions\7f975854
-Node: Keymaps and Minor Modes\7f978718
-Node: Modeline Format\7f979553
-Node: Modeline Data\7f981322
-Node: Modeline Variables\7f985594
-Node: %-Constructs\7f990310
-Node: Hooks\7f993221
-Node: Documentation\7f999985
-Node: Documentation Basics\7f1001408
-Node: Accessing Documentation\7f1004460
-Node: Keys in Documentation\7f1010651
-Node: Describing Characters\7f1014114
-Node: Help Functions\7f1016468
-Node: Obsoleteness\7f1022911
-Node: Files\7f1025905
-Node: Visiting Files\7f1027830
-Node: Visiting Functions\7f1029335
-Node: Subroutines of Visiting\7f1034383
-Node: Saving Buffers\7f1036459
-Node: Reading from Files\7f1042552
-Node: Writing to Files\7f1044709
-Node: File Locks\7f1047426
-Node: Information about Files\7f1050479
-Node: Testing Accessibility\7f1051240
-Node: Kinds of Files\7f1054980
-Node: Truenames\7f1056661
-Node: File Attributes\7f1057664
-Node: Changing File Attributes\7f1062804
-Node: File Names\7f1068210
-Node: File Name Components\7f1069819
-Node: Directory Names\7f1072920
-Node: Relative File Names\7f1076373
-Node: File Name Expansion\7f1077451
-Node: Unique File Names\7f1081358
-Node: File Name Completion\7f1082973
-Node: User Name Completion\7f1085634
-Node: Contents of Directories\7f1086974
-Node: Create/Delete Dirs\7f1090287
-Node: Magic File Names\7f1091393
-Node: Partial Files\7f1097023
-Node: Intro to Partial Files\7f1097251
-Node: Creating a Partial File\7f1098491
-Node: Detached Partial Files\7f1099426
-Node: Format Conversion\7f1100548
-Node: Files and MS-DOS\7f1107066
-Node: Backups and Auto-Saving\7f1109130
-Node: Backup Files\7f1109805
-Node: Making Backups\7f1111202
-Node: Rename or Copy\7f1113951
-Node: Numbered Backups\7f1116444
-Node: Backup Names\7f1118689
-Node: Auto-Saving\7f1121972
-Node: Reverting\7f1130114
-Node: Buffers\7f1133272
-Node: Buffer Basics\7f1134687
-Node: Current Buffer\7f1136740
-Node: Buffer Names\7f1141430
-Node: Buffer File Name\7f1144635
-Node: Buffer Modification\7f1148755
-Node: Modification Time\7f1150951
-Node: Read Only Buffers\7f1154326
-Node: The Buffer List\7f1156744
-Node: Creating Buffers\7f1161574
-Node: Killing Buffers\7f1163723
-Node: Indirect Buffers\7f1167454
-Node: Windows\7f1170026
-Node: Basic Windows\7f1171504
-Node: Splitting Windows\7f1174602
-Node: Deleting Windows\7f1181473
-Node: Selecting Windows\7f1184154
-Node: Cyclic Window Ordering\7f1187283
-Node: Buffers and Windows\7f1191907
-Node: Displaying Buffers\7f1193748
-Node: Choosing Window\7f1198926
-Node: Window Point\7f1206642
-Node: Window Start\7f1208688
-Node: Vertical Scrolling\7f1213178
-Node: Horizontal Scrolling\7f1219315
-Node: Size of Window\7f1222824
-Node: Position of Window\7f1227542
-Node: Resizing Windows\7f1229782
-Node: Window Configurations\7f1235211
-Node: Frames\7f1238636
-Node: Creating Frames\7f1240405
-Node: Frame Properties\7f1241746
-Node: Property Access\7f1242562
-Node: Initial Properties\7f1243411
-Node: X Frame Properties\7f1245897
-Node: Size and Position\7f1250531
-Node: Frame Name\7f1252527
-Node: Frame Titles\7f1253441
-Node: Deleting Frames\7f1255265
-Node: Finding All Frames\7f1255865
-Node: Frames and Windows\7f1257859
-Node: Minibuffers and Frames\7f1259564
-Node: Input Focus\7f1260483
-Node: Visibility of Frames\7f1263561
-Node: Raising and Lowering\7f1265480
-Node: Frame Configurations\7f1267857
-Node: Frame Hooks\7f1268451
-Node: Consoles and Devices\7f1270258
-Node: Basic Console Functions\7f1273002
-Node: Basic Device Functions\7f1273425
-Node: Console Types and Device Classes\7f1274141
-Node: Connecting to a Console or Device\7f1276338
-Node: The Selected Console and Device\7f1278501
-Node: Console and Device I/O\7f1279527
-Node: Positions\7f1280291
-Node: Point\7f1281260
-Node: Motion\7f1284353
-Node: Character Motion\7f1285120
-Node: Word Motion\7f1287357
-Node: Buffer End Motion\7f1288858
-Node: Text Lines\7f1290355
-Node: Screen Lines\7f1294950
-Node: List Motion\7f1299013
-Node: Skipping Characters\7f1302421
-Node: Excursions\7f1304640
-Node: Narrowing\7f1307675
-Node: Markers\7f1313002
-Node: Overview of Markers\7f1313904
-Node: Predicates on Markers\7f1318597
-Node: Creating Markers\7f1319843
-Node: Information from Markers\7f1323880
-Node: Changing Markers\7f1324978
-Node: The Mark\7f1326356
-Node: The Region\7f1334850
-Node: Text\7f1340537
-Node: Near Point\7f1343239
-Node: Buffer Contents\7f1346961
-Node: Comparing Text\7f1348367
-Node: Insertion\7f1349775
-Node: Commands for Insertion\7f1353618
-Node: Deletion\7f1356576
-Node: User-Level Deletion\7f1360173
-Node: The Kill Ring\7f1364303
-Node: Kill Ring Concepts\7f1366477
-Node: Kill Functions\7f1367531
-Node: Yank Commands\7f1369436
-Node: Low-Level Kill Ring\7f1371307
-Node: Internals of Kill Ring\7f1374093
-Node: Undo\7f1376873
-Node: Maintaining Undo\7f1381202
-Node: Filling\7f1383822
-Node: Margins\7f1389818
-Node: Auto Filling\7f1393748
-Node: Sorting\7f1394929
-Node: Columns\7f1404230
-Node: Indentation\7f1406746
-Node: Primitive Indent\7f1407525
-Node: Mode-Specific Indent\7f1408769
-Node: Region Indent\7f1411280
-Node: Relative Indent\7f1414228
-Node: Indent Tabs\7f1416610
-Node: Motion by Indent\7f1417932
-Node: Case Changes\7f1418711
-Node: Text Properties\7f1421962
-Node: Examining Properties\7f1423777
-Node: Changing Properties\7f1425644
-Node: Property Search\7f1429239
-Node: Special Properties\7f1433950
-Node: Saving Properties\7f1434231
-Node: Substitution\7f1437373
-Node: Registers\7f1440644
-Node: Transposition\7f1443187
-Node: Change Hooks\7f1444081
-Node: Transformations\7f1446121
-Node: Searching and Matching\7f1450506
-Node: String Search\7f1451637
-Node: Regular Expressions\7f1456361
-Node: Syntax of Regexps\7f1457728
-Node: Regexp Example\7f1472108
-Node: Regexp Search\7f1474278
-Node: POSIX Regexps\7f1480366
-Node: Search and Replace\7f1482201
-Node: Match Data\7f1485566
-Node: Simple Match Data\7f1486696
-Node: Replacing Match\7f1490961
-Node: Entire Match Data\7f1493295
-Node: Saving Match Data\7f1495286
-Node: Searching and Case\7f1496669
-Node: Standard Regexps\7f1498703
-Node: Syntax Tables\7f1500901
-Node: Syntax Basics\7f1502017
-Node: Syntax Descriptors\7f1504992
-Node: Syntax Class Table\7f1506842
-Node: Syntax Flags\7f1512880
-Node: Syntax Table Functions\7f1516097
-Node: Motion and Syntax\7f1519961
-Node: Parsing Expressions\7f1521413
-Node: Standard Syntax Tables\7f1527482
-Node: Syntax Table Internals\7f1528326
-Node: Abbrevs\7f1529353
-Node: Abbrev Mode\7f1531157
-Node: Abbrev Tables\7f1531877
-Node: Defining Abbrevs\7f1533410
-Node: Abbrev Files\7f1535315
-Node: Abbrev Expansion\7f1537089
-Node: Standard Abbrev Tables\7f1541720
-Node: Extents\7f1542879
-Node: Intro to Extents\7f1544122
-Node: Creating and Modifying Extents\7f1548116
-Node: Extent Endpoints\7f1549625
-Node: Finding Extents\7f1552890
-Node: Mapping Over Extents\7f1556641
-Node: Extent Properties\7f1562759
-Node: Detached Extents\7f1572903
-Node: Extent Parents\7f1574762
-Node: Duplicable Extents\7f1576457
-Node: Extents and Events\7f1579680
-Node: Atomic Extents\7f1581588
-Node: Specifiers\7f1582035
-Node: Introduction to Specifiers\7f1583838
-Node: Specifiers In-Depth\7f1586148
-Node: Specifier Instancing\7f1591063
-Node: Specifier Types\7f1594325
-Node: Adding Specifications\7f1599399
-Node: Retrieving Specifications\7f1608762
-Node: Specifier Tag Functions\7f1612497
-Node: Specifier Instancing Functions\7f1615731
-Node: Specifier Example\7f1619138
-Node: Creating Specifiers\7f1622244
-Node: Specifier Validation Functions\7f1624493
-Node: Other Specification Functions\7f1626877
-Node: Faces and Window-System Objects\7f1630696
-Node: Faces\7f1631020
-Node: Merging Faces\7f1632639
-Node: Basic Face Functions\7f1634600
-Node: Face Properties\7f1636699
-Node: Face Convenience Functions\7f1646258
-Node: Other Face Display Functions\7f1649391
-Node: Fonts\7f1650204
-Node: Font Specifiers\7f1650905
-Node: Font Instances\7f1651146
-Node: Font Instance Names\7f1652113
-Node: Font Instance Size\7f1652954
-Node: Font Instance Characteristics\7f1654240
-Node: Font Convenience Functions\7f1655409
-Node: Colors\7f1656699
-Node: Color Specifiers\7f1657139
-Node: Color Instances\7f1657366
-Node: Color Instance Properties\7f1658110
-Node: Color Convenience Functions\7f1658736
-Node: Glyphs\7f1659789
-Node: Glyph Functions\7f1661381
-Node: Creating Glyphs\7f1661788
-Node: Glyph Properties\7f1663375
-Node: Glyph Convenience Functions\7f1672542
-Node: Glyph Dimensions\7f1676489
-Node: Images\7f1677569
-Node: Image Specifiers\7f1678018
-Node: Image Instantiator Conversion\7f1689442
-Node: Image Instances\7f1690807
-Node: Image Instance Types\7f1691558
-Node: Image Instance Functions\7f1694213
-Node: Glyph Types\7f1698783
-Node: Mouse Pointer\7f1700555
-Node: Redisplay Glyphs\7f1703558
-Node: Subwindows\7f1704591
-Node: Annotations\7f1704834
-Node: Annotation Basics\7f1705851
-Node: Annotation Primitives\7f1709789
-Node: Annotation Properties\7f1711118
-Node: Locating Annotations\7f1714158
-Node: Margin Primitives\7f1714995
-Node: Annotation Hooks\7f1716889
-Node: Display\7f1717549
-Node: Refresh Screen\7f1718527
-Node: Truncation\7f1720438
-Node: The Echo Area\7f1722965
-Node: Warnings\7f1729401
-Node: Invisible Text\7f1733837
-Node: Selective Display\7f1736417
-Node: Overlay Arrow\7f1740544
-Node: Temporary Displays\7f1741898
-Node: Blinking\7f1746019
-Node: Usual Display\7f1748203
-Node: Display Tables\7f1750753
-Node: Display Table Format\7f1751557
-Node: Active Display Table\7f1753001
-Node: Character Descriptors\7f1754193
-Node: Beeping\7f1754951
-Node: Hash Tables\7f1759717
-Node: Introduction to Hash Tables\7f1760325
-Node: Working With Hash Tables\7f1766350
-Node: Weak Hash Tables\7f1767467
-Node: Range Tables\7f1769266
-Node: Introduction to Range Tables\7f1769955
-Node: Working With Range Tables\7f1770386
-Node: Databases\7f1771271
-Node: Connecting to a Database\7f1771570
-Node: Working With a Database\7f1772661
-Node: Other Database Functions\7f1773519
-Node: Processes\7f1774093
-Node: Subprocess Creation\7f1776317
-Node: Synchronous Processes\7f1779610
-Node: MS-DOS Subprocesses\7f1786308
-Node: Asynchronous Processes\7f1787382
-Node: Deleting Processes\7f1791086
-Node: Process Information\7f1792957
-Node: Input to Processes\7f1796885
-Node: Signals to Processes\7f1799154
-Node: Output from Processes\7f1803574
-Node: Process Buffers\7f1804386
-Node: Filter Functions\7f1807255
-Node: Accepting Output\7f1812822
-Node: Sentinels\7f1814349
-Node: Process Window Size\7f1817842
-Node: Transaction Queues\7f1818191
-Node: Network\7f1819889
-Node: System Interface\7f1821723
-Node: Starting Up\7f1822993
-Node: Start-up Summary\7f1823587
-Node: Init File\7f1827141
-Node: Terminal-Specific\7f1829525
-Node: Command Line Arguments\7f1832684
-Node: Getting Out\7f1836173
-Node: Killing XEmacs\7f1836742
-Node: Suspending XEmacs\7f1838411
-Node: System Environment\7f1841727
-Node: User Identification\7f1848392
-Node: Time of Day\7f1851922
-Node: Time Conversion\7f1854711
-Node: Timers\7f1859753
-Node: Terminal Input\7f1861926
-Node: Input Modes\7f1862429
-Node: Translating Input\7f1864842
-Node: Recording Input\7f1869007
-Node: Terminal Output\7f1871108
-Node: Flow Control\7f1874731
-Node: Batch Mode\7f1878524
-Node: X-Windows\7f1879906
-Node: X Selections\7f1880718
-Node: X Server\7f1882928
-Node: Resources\7f1883329
-Node: Server Data\7f1888470
-Node: Grabs\7f1889677
-Node: X Miscellaneous\7f1891258
-Node: ToolTalk Support\7f1893643
-Node: XEmacs ToolTalk API Summary\7f1893860
-Node: Sending Messages\7f1895160
-Node: Example of Sending Messages\7f1895411
-Node: Elisp Interface for Sending Messages\7f1896473
-Node: Receiving Messages\7f1902866
-Node: Example of Receiving Messages\7f1903089
-Node: Elisp Interface for Receiving Messages\7f1903925
-Node: LDAP Support\7f1907750
-Node: Building XEmacs with LDAP support\7f1908246
-Node: XEmacs LDAP API\7f1909224
-Node: LDAP Variables\7f1909954
-Node: The High-Level LDAP API\7f1912431
-Node: The Low-Level LDAP API\7f1913544
-Node: The LDAP Lisp Object\7f1913818
-Node: Opening and Closing a LDAP Connection\7f1914371
-Node: Searching on a LDAP Server (Low-level)\7f1916154
-Node: Syntax of Search Filters\7f1917549
-Node: Internationalization\7f1918847
-Node: I18N Levels 1 and 2\7f1919184
-Node: I18N Level 3\7f1919890
-Node: Level 3 Basics\7f1920171
-Node: Level 3 Primitives\7f1921004
-Node: Dynamic Messaging\7f1922610
-Node: Domain Specification\7f1923073
-Node: Documentation String Extraction\7f1924976
-Node: I18N Level 4\7f1925894
-Node: MULE\7f1926086
-Node: Internationalization Terminology\7f1927197
-Node: Charsets\7f1935736
-Node: Charset Properties\7f1936432
-Node: Basic Charset Functions\7f1941118
-Node: Charset Property Functions\7f1943299
-Node: Predefined Charsets\7f1945342
-Node: MULE Characters\7f1948262
-Node: Composite Characters\7f1949109
-Node: ISO 2022\7f1950363
-Node: Coding Systems\7f1956085
-Node: Coding System Types\7f1958007
-Node: EOL Conversion\7f1959826
-Node: Coding System Properties\7f1961009
-Node: Basic Coding System Functions\7f1964861
-Node: Coding System Property Functions\7f1966765
-Node: Encoding and Decoding Text\7f1967323
-Node: Detection of Textual Encoding\7f1968459
-Node: Big5 and Shift-JIS Functions\7f1969995
-Node: CCL\7f1971083
-Node: CCL Syntax\7f1974187
-Node: CCL Statements\7f1975775
-Node: CCL Expressions\7f1980423
-Node: Calling CCL\7f1983575
-Node: CCL Examples\7f1986565
-Node: Category Tables\7f1986702
-Node: Tips\7f1989061
-Node: Style Tips\7f1989702
-Node: Compilation Tips\7f1999222
-Node: Documentation Tips\7f2001138
-Node: Comment Tips\7f2006647
-Node: Library Headers\7f2009649
-Node: Building XEmacs and Object Allocation\7f2013621
-Node: Building XEmacs\7f2014504
-Node: Pure Storage\7f2020839
-Node: Garbage Collection\7f2023627
-Node: Standard Errors\7f2034766
-Node: Standard Buffer-Local Variables\7f2038975
-Node: Standard Keymaps\7f2041651
-Node: Standard Hooks\7f2045383
-Node: Index\7f2052883
+Node: Top\7f2368
+Node: Copying\7f48387
+Node: Introduction\7f67545
+Node: Caveats\7f69136
+Node: Lisp History\7f70867
+Node: Conventions\7f72123
+Node: Some Terms\7f72938
+Node: nil and t\7f73659
+Node: Evaluation Notation\7f75336
+Node: Printing Notation\7f76249
+Node: Error Messages\7f77123
+Node: Buffer Text Notation\7f77564
+Node: Format of Descriptions\7f78439
+Node: A Sample Function Description\7f79293
+Node: A Sample Variable Description\7f83279
+Node: Acknowledgements\7f84187
+Node: Lisp Data Types\7f86165
+Node: Printed Representation\7f88720
+Node: Comments\7f90762
+Node: Primitive Types\7f91659
+Node: Programming Types\7f93318
+Node: Integer Type\7f95270
+Node: Floating Point Type\7f96307
+Node: Character Type\7f96926
+Node: Symbol Type\7f104832
+Node: Sequence Type\7f107527
+Node: Cons Cell Type\7f109046
+Node: Dotted Pair Notation\7f113530
+Node: Association List Type\7f115651
+Node: Array Type\7f116534
+Node: String Type\7f118000
+Node: Vector Type\7f120681
+Node: Bit Vector Type\7f121453
+Node: Function Type\7f122315
+Node: Macro Type\7f123428
+Node: Primitive Function Type\7f124125
+Node: Compiled-Function Type\7f125651
+Node: Autoload Type\7f126205
+Node: Char Table Type\7f127219
+Node: Hash Table Type\7f127393
+Node: Range Table Type\7f128548
+Node: Weak List Type\7f129401
+Node: Editing Types\7f129551
+Node: Buffer Type\7f131178
+Node: Marker Type\7f133205
+Node: Extent Type\7f133929
+Node: Window Type\7f135197
+Node: Frame Type\7f136608
+Node: Device Type\7f137403
+Node: Console Type\7f138229
+Node: Window Configuration Type\7f139430
+Node: Event Type\7f140128
+Node: Process Type\7f140292
+Node: Stream Type\7f141327
+Node: Keymap Type\7f142450
+Node: Syntax Table Type\7f142988
+Node: Display Table Type\7f144011
+Node: Database Type\7f144450
+Node: Charset Type\7f144616
+Node: Coding System Type\7f144780
+Node: ToolTalk Message Type\7f144964
+Node: ToolTalk Pattern Type\7f145163
+Node: Window-System Types\7f145335
+Node: Face Type\7f146481
+Node: Glyph Type\7f146612
+Node: Specifier Type\7f146768
+Node: Font Instance Type\7f146941
+Node: Color Instance Type\7f147131
+Node: Image Instance Type\7f147328
+Node: Toolbar Button Type\7f147526
+Node: Subwindow Type\7f147719
+Node: X Resource Type\7f147898
+Node: Type Predicates\7f148051
+Node: Equality Predicates\7f157180
+Node: Numbers\7f161985
+Node: Integer Basics\7f163440
+Node: Float Basics\7f165789
+Node: Predicates on Numbers\7f167531
+Node: Comparison of Numbers\7f169164
+Node: Numeric Conversions\7f172985
+Node: Arithmetic Operations\7f174451
+Node: Rounding Operations\7f179916
+Node: Bitwise Operations\7f181021
+Node: Math Functions\7f190067
+Node: Random Numbers\7f192383
+Node: Strings and Characters\7f194149
+Node: String Basics\7f195602
+Node: Predicates for Strings\7f198020
+Node: Creating Strings\7f198783
+Node: Predicates for Characters\7f204100
+Node: Character Codes\7f205171
+Node: Text Comparison\7f206584
+Node: String Conversion\7f209946
+Node: Modifying Strings\7f213622
+Node: String Properties\7f214263
+Node: Formatting Strings\7f214906
+Node: Character Case\7f224524
+Node: Case Tables\7f227670
+Node: Char Tables\7f231568
+Node: Char Table Types\7f232960
+Node: Working With Char Tables\7f234535
+Node: Lists\7f236484
+Node: Cons Cells\7f237607
+Node: Lists as Boxes\7f238943
+Node: List-related Predicates\7f241585
+Node: List Elements\7f243287
+Node: Building Lists\7f248316
+Node: Modifying Lists\7f254308
+Node: Setcar\7f255120
+Node: Setcdr\7f257541
+Node: Rearrangement\7f260052
+Node: Sets And Lists\7f265638
+Node: Association Lists\7f269866
+Ref: Association Lists-Footnote-1\7f279161
+Node: Property Lists\7f279366
+Node: Working With Normal Plists\7f280914
+Node: Working With Lax Plists\7f283182
+Node: Converting Plists To/From Alists\7f285422
+Node: Weak Lists\7f286770
+Node: Sequences Arrays Vectors\7f288934
+Node: Sequence Functions\7f291570
+Node: Arrays\7f295229
+Node: Array Functions\7f298293
+Node: Vectors\7f300826
+Node: Vector Functions\7f302324
+Node: Bit Vectors\7f304895
+Node: Bit Vector Functions\7f305740
+Node: Symbols\7f307990
+Node: Symbol Components\7f309039
+Node: Definitions\7f313212
+Node: Creating Symbols\7f315437
+Node: Symbol Properties\7f322471
+Node: Plists and Alists\7f323987
+Node: Symbol Plists\7f325736
+Node: Other Plists\7f327545
+Node: Evaluation\7f329323
+Node: Intro Eval\7f330128
+Ref: Intro Eval-Footnote-1\7f333481
+Node: Eval\7f333616
+Node: Forms\7f338034
+Node: Self-Evaluating Forms\7f339193
+Node: Symbol Forms\7f340706
+Node: Classifying Lists\7f341623
+Node: Function Indirection\7f342379
+Node: Function Forms\7f345490
+Node: Macro Forms\7f346487
+Node: Special Forms\7f348087
+Node: Autoloading\7f350396
+Node: Quoting\7f350894
+Node: Control Structures\7f352255
+Node: Sequencing\7f353875
+Node: Conditionals\7f356740
+Node: Combining Conditions\7f360163
+Node: Iteration\7f363433
+Node: Nonlocal Exits\7f365212
+Node: Catch and Throw\7f365914
+Node: Examples of Catch\7f369753
+Node: Errors\7f371772
+Node: Signaling Errors\7f373261
+Node: Processing of Errors\7f376337
+Node: Handling Errors\7f377666
+Node: Error Symbols\7f384582
+Node: Cleanups\7f388028
+Node: Variables\7f391806
+Node: Global Variables\7f393575
+Node: Constant Variables\7f394651
+Node: Local Variables\7f395277
+Node: Void Variables\7f400214
+Node: Defining Variables\7f403730
+Node: Accessing Variables\7f410894
+Node: Setting Variables\7f412319
+Node: Variable Scoping\7f416838
+Node: Scope\7f418437
+Node: Extent\7f419962
+Node: Impl of Scope\7f421441
+Node: Using Scoping\7f423404
+Node: Buffer-Local Variables\7f424926
+Node: Intro to Buffer-Local\7f425762
+Node: Creating Buffer-Local\7f428305
+Node: Default Value\7f433524
+Node: Variable Aliases\7f436667
+Node: Functions\7f438452
+Node: What Is a Function\7f439546
+Node: Lambda Expressions\7f443592
+Node: Lambda Components\7f444502
+Node: Simple Lambda\7f446334
+Node: Argument List\7f447991
+Node: Function Documentation\7f451719
+Node: Function Names\7f453661
+Node: Defining Functions\7f456234
+Node: Calling Functions\7f459274
+Node: Mapping Functions\7f463123
+Node: Anonymous Functions\7f465516
+Node: Function Cells\7f468761
+Node: Inline Functions\7f473571
+Node: Related Topics\7f475381
+Node: Macros\7f476434
+Node: Simple Macro\7f477718
+Node: Expansion\7f478453
+Node: Compiling Macros\7f481457
+Node: Defining Macros\7f483293
+Node: Backquote\7f484610
+Node: Problems with Macros\7f487007
+Node: Argument Evaluation\7f487702
+Node: Surprising Local Vars\7f490617
+Node: Eval During Expansion\7f492685
+Node: Repeated Expansion\7f494378
+Node: Customization\7f496294
+Node: Common Keywords\7f496763
+Node: Group Definitions\7f499608
+Node: Variable Definitions\7f501800
+Node: Customization Types\7f506783
+Node: Simple Types\7f508218
+Node: Composite Types\7f510375
+Node: Splicing into Lists\7f515065
+Node: Type Keywords\7f516900
+Node: Loading\7f520420
+Node: How Programs Do Loading\7f522095
+Node: Autoload\7f531222
+Node: Repeated Loading\7f537301
+Node: Named Features\7f539414
+Node: Unloading\7f545846
+Node: Hooks for Loading\7f548002
+Node: Byte Compilation\7f548719
+Node: Speed of Byte-Code\7f550636
+Node: Compilation Functions\7f551843
+Node: Docs and Compilation\7f558230
+Node: Dynamic Loading\7f560883
+Node: Eval During Compile\7f563247
+Node: Compiled-Function Objects\7f564512
+Node: Disassembly\7f569310
+Node: Debugging\7f576564
+Node: Debugger\7f577976
+Node: Error Debugging\7f579121
+Node: Infinite Loops\7f581874
+Node: Function Debugging\7f583118
+Node: Explicit Debug\7f585908
+Node: Using Debugger\7f586679
+Node: Debugger Commands\7f588541
+Node: Invoking the Debugger\7f592858
+Node: Internals of Debugger\7f596773
+Node: Syntax Errors\7f601660
+Node: Excess Open\7f602908
+Node: Excess Close\7f604783
+Node: Compilation Errors\7f606204
+Node: Edebug\7f607492
+Node: Using Edebug\7f609600
+Node: Instrumenting\7f612297
+Node: Edebug Execution Modes\7f615786
+Node: Jumping\7f618896
+Node: Edebug Misc\7f621239
+Node: Breakpoints\7f622628
+Node: Global Break Condition\7f625434
+Node: Embedded Breakpoints\7f626389
+Node: Trapping Errors\7f627344
+Node: Edebug Views\7f629420
+Node: Edebug Eval\7f631385
+Node: Eval List\7f632562
+Node: Reading in Edebug\7f635947
+Node: Printing in Edebug\7f636746
+Node: Tracing\7f638461
+Node: Coverage Testing\7f640347
+Node: The Outside Context\7f642388
+Node: Checking Whether to Stop\7f643337
+Node: Edebug Display Update\7f643984
+Node: Edebug Recursive Edit\7f646007
+Node: Instrumenting Macro Calls\7f647662
+Node: Specification List\7f650144
+Node: Backtracking\7f659555
+Node: Debugging Backquote\7f661493
+Node: Specification Examples\7f665199
+Node: Edebug Options\7f667266
+Node: Read and Print\7f672603
+Node: Streams Intro\7f673580
+Node: Input Streams\7f675598
+Node: Input Functions\7f680499
+Node: Output Streams\7f682559
+Node: Output Functions\7f686610
+Node: Output Variables\7f690910
+Node: Minibuffers\7f695709
+Node: Intro to Minibuffers\7f696794
+Node: Text from Minibuffer\7f699120
+Node: Object from Minibuffer\7f703782
+Node: Minibuffer History\7f706999
+Node: Completion\7f709909
+Node: Basic Completion\7f711884
+Node: Minibuffer Completion\7f716908
+Node: Completion Commands\7f720153
+Node: High-Level Completion\7f724800
+Node: Reading File Names\7f728824
+Node: Programmed Completion\7f732513
+Node: Yes-or-No Queries\7f734723
+Node: Multiple Queries\7f740460
+Node: Minibuffer Misc\7f744524
+Node: Command Loop\7f749390
+Node: Command Overview\7f750734
+Node: Defining Commands\7f754012
+Node: Using Interactive\7f754760
+Node: Interactive Codes\7f759533
+Node: Interactive Examples\7f765325
+Node: Interactive Call\7f766639
+Node: Command Loop Info\7f772040
+Node: Events\7f777019
+Node: Event Types\7f778479
+Node: Event Contents\7f780402
+Node: Event Predicates\7f784878
+Node: Accessing Mouse Event Positions\7f786203
+Node: Frame-Level Event Position Info\7f786902
+Node: Window-Level Event Position Info\7f787942
+Node: Event Text Position Info\7f789706
+Node: Event Glyph Position Info\7f792198
+Node: Event Toolbar Position Info\7f793521
+Node: Other Event Position Info\7f794192
+Node: Accessing Other Event Info\7f794601
+Node: Working With Events\7f796221
+Node: Converting Events\7f802209
+Node: Reading Input\7f805162
+Node: Key Sequence Input\7f806164
+Node: Reading One Event\7f808118
+Node: Dispatching an Event\7f810879
+Node: Quoted Character Input\7f811330
+Node: Peeking and Discarding\7f812678
+Node: Waiting\7f816582
+Node: Quitting\7f818890
+Node: Prefix Command Arguments\7f823298
+Node: Recursive Editing\7f828385
+Node: Disabling Commands\7f833181
+Node: Command History\7f835249
+Node: Keyboard Macros\7f836986
+Node: Keymaps\7f839203
+Node: Keymap Terminology\7f840780
+Node: Format of Keymaps\7f843709
+Node: Creating Keymaps\7f844120
+Node: Inheritance and Keymaps\7f846199
+Node: Key Sequences\7f848571
+Node: Prefix Keys\7f853141
+Node: Active Keymaps\7f856726
+Node: Key Lookup\7f865941
+Node: Functions for Key Lookup\7f871104
+Node: Changing Key Bindings\7f876801
+Node: Key Binding Commands\7f883698
+Node: Scanning Keymaps\7f885763
+Node: Other Keymap Functions\7f894274
+Node: Menus\7f894896
+Node: Menu Format\7f895438
+Node: Menubar Format\7f904023
+Node: Menubar\7f904648
+Node: Modifying Menus\7f907761
+Node: Menu Filters\7f912775
+Node: Pop-Up Menus\7f914671
+Node: Menu Accelerators\7f916876
+Node: Creating Menu Accelerators\7f917598
+Node: Keyboard Menu Traversal\7f918916
+Node: Menu Accelerator Functions\7f919643
+Node: Buffers Menu\7f922678
+Node: Dialog Boxes\7f923972
+Node: Dialog Box Format\7f924139
+Node: Dialog Box Functions\7f925509
+Node: Toolbar\7f925906
+Node: Toolbar Intro\7f926231
+Node: Toolbar Descriptor Format\7f928641
+Node: Specifying the Toolbar\7f933135
+Node: Other Toolbar Variables\7f936740
+Node: Scrollbars\7f941167
+Node: Drag and Drop\7f941303
+Node: Supported Protocols\7f942379
+Node: OffiX DND\7f942882
+Node: CDE dt\7f943889
+Node: MSWindows OLE\7f944480
+Node: Loose ends\7f944651
+Node: Drop Interface\7f945043
+Node: Drag Interface\7f946065
+Node: Modes\7f946239
+Node: Major Modes\7f947190
+Node: Major Mode Conventions\7f950105
+Node: Example Major Modes\7f956060
+Node: Auto Major Mode\7f964093
+Node: Mode Help\7f971541
+Node: Derived Modes\7f972642
+Node: Minor Modes\7f974833
+Node: Minor Mode Conventions\7f976135
+Node: Keymaps and Minor Modes\7f978998
+Node: Modeline Format\7f979833
+Node: Modeline Data\7f981601
+Node: Modeline Variables\7f985871
+Node: %-Constructs\7f990587
+Node: Hooks\7f993498
+Node: Documentation\7f1000260
+Node: Documentation Basics\7f1001683
+Node: Accessing Documentation\7f1004733
+Node: Keys in Documentation\7f1011012
+Node: Describing Characters\7f1014491
+Node: Help Functions\7f1016840
+Node: Obsoleteness\7f1023291
+Node: Files\7f1026285
+Node: Visiting Files\7f1028210
+Node: Visiting Functions\7f1029715
+Node: Subroutines of Visiting\7f1034762
+Node: Saving Buffers\7f1036835
+Node: Reading from Files\7f1042928
+Node: Writing to Files\7f1045085
+Node: File Locks\7f1047802
+Node: Information about Files\7f1050855
+Node: Testing Accessibility\7f1051616
+Node: Kinds of Files\7f1055356
+Node: Truenames\7f1057037
+Node: File Attributes\7f1058039
+Node: Changing File Attributes\7f1063178
+Node: File Names\7f1068584
+Node: File Name Components\7f1070193
+Node: Directory Names\7f1073294
+Node: Relative File Names\7f1076747
+Node: File Name Expansion\7f1077825
+Node: Unique File Names\7f1081732
+Node: File Name Completion\7f1083347
+Node: User Name Completion\7f1086008
+Node: Contents of Directories\7f1087348
+Node: Create/Delete Dirs\7f1090661
+Node: Magic File Names\7f1091767
+Node: Partial Files\7f1097397
+Node: Intro to Partial Files\7f1097625
+Node: Creating a Partial File\7f1098865
+Node: Detached Partial Files\7f1099800
+Node: Format Conversion\7f1100922
+Node: Files and MS-DOS\7f1107438
+Node: Backups and Auto-Saving\7f1109502
+Node: Backup Files\7f1110177
+Node: Making Backups\7f1111574
+Node: Rename or Copy\7f1114323
+Node: Numbered Backups\7f1116816
+Node: Backup Names\7f1119060
+Node: Auto-Saving\7f1122352
+Node: Reverting\7f1130494
+Node: Buffers\7f1133652
+Node: Buffer Basics\7f1135069
+Node: Current Buffer\7f1137122
+Node: Buffer Names\7f1141810
+Node: Buffer File Name\7f1145015
+Node: Buffer Modification\7f1149134
+Node: Modification Time\7f1151327
+Node: Read Only Buffers\7f1154702
+Node: The Buffer List\7f1157120
+Node: Creating Buffers\7f1161950
+Node: Killing Buffers\7f1164096
+Node: Indirect Buffers\7f1167827
+Node: Windows\7f1170399
+Node: Basic Windows\7f1171877
+Node: Splitting Windows\7f1174975
+Node: Deleting Windows\7f1181864
+Node: Selecting Windows\7f1184544
+Node: Cyclic Window Ordering\7f1187673
+Node: Buffers and Windows\7f1192297
+Node: Displaying Buffers\7f1194138
+Node: Choosing Window\7f1199314
+Node: Window Point\7f1207030
+Node: Window Start\7f1209076
+Node: Vertical Scrolling\7f1213566
+Node: Horizontal Scrolling\7f1219703
+Node: Size of Window\7f1223212
+Node: Position of Window\7f1227930
+Node: Resizing Windows\7f1230170
+Node: Window Configurations\7f1235599
+Node: Frames\7f1239024
+Node: Creating Frames\7f1240793
+Node: Frame Properties\7f1242134
+Node: Property Access\7f1242950
+Node: Initial Properties\7f1243799
+Node: X Frame Properties\7f1246285
+Node: Size and Position\7f1250919
+Node: Frame Name\7f1252915
+Node: Frame Titles\7f1253829
+Node: Deleting Frames\7f1255653
+Node: Finding All Frames\7f1256253
+Node: Frames and Windows\7f1258247
+Node: Minibuffers and Frames\7f1259952
+Node: Input Focus\7f1260870
+Node: Visibility of Frames\7f1263947
+Node: Raising and Lowering\7f1265866
+Node: Frame Configurations\7f1268242
+Node: Frame Hooks\7f1268836
+Node: Consoles and Devices\7f1270641
+Node: Basic Console Functions\7f1273385
+Node: Basic Device Functions\7f1273808
+Node: Console Types and Device Classes\7f1274524
+Node: Connecting to a Console or Device\7f1276721
+Node: The Selected Console and Device\7f1278884
+Node: Console and Device I/O\7f1279910
+Node: Positions\7f1280674
+Node: Point\7f1281643
+Node: Motion\7f1284733
+Node: Character Motion\7f1285500
+Node: Word Motion\7f1287737
+Node: Buffer End Motion\7f1289238
+Node: Text Lines\7f1290735
+Node: Screen Lines\7f1295330
+Node: List Motion\7f1299393
+Node: Skipping Characters\7f1302801
+Node: Excursions\7f1305020
+Node: Narrowing\7f1308052
+Node: Markers\7f1313377
+Node: Overview of Markers\7f1314283
+Node: Predicates on Markers\7f1318975
+Node: Creating Markers\7f1320221
+Node: Information from Markers\7f1324258
+Node: Changing Markers\7f1325356
+Node: The Mark\7f1326734
+Node: The Region\7f1335228
+Node: Text\7f1340915
+Node: Near Point\7f1343614
+Node: Buffer Contents\7f1347336
+Node: Comparing Text\7f1348742
+Node: Insertion\7f1350150
+Node: Commands for Insertion\7f1353992
+Node: Deletion\7f1356948
+Node: User-Level Deletion\7f1360543
+Node: The Kill Ring\7f1364704
+Node: Kill Ring Concepts\7f1366878
+Node: Kill Functions\7f1367932
+Node: Yank Commands\7f1369837
+Node: Low-Level Kill Ring\7f1371708
+Node: Internals of Kill Ring\7f1374494
+Node: Undo\7f1377274
+Node: Maintaining Undo\7f1381603
+Node: Filling\7f1384223
+Node: Margins\7f1390217
+Node: Auto Filling\7f1394146
+Node: Sorting\7f1395327
+Node: Columns\7f1404627
+Node: Indentation\7f1407143
+Node: Primitive Indent\7f1407922
+Node: Mode-Specific Indent\7f1409166
+Node: Region Indent\7f1411677
+Node: Relative Indent\7f1414625
+Node: Indent Tabs\7f1417007
+Node: Motion by Indent\7f1418328
+Node: Case Changes\7f1419107
+Node: Text Properties\7f1422358
+Node: Examining Properties\7f1424171
+Node: Changing Properties\7f1426038
+Node: Property Search\7f1429629
+Node: Special Properties\7f1434340
+Node: Saving Properties\7f1434621
+Node: Substitution\7f1437763
+Node: Registers\7f1441033
+Node: Transposition\7f1443576
+Node: Change Hooks\7f1444470
+Node: Transformations\7f1446510
+Node: Searching and Matching\7f1450895
+Node: String Search\7f1452026
+Node: Regular Expressions\7f1456750
+Node: Syntax of Regexps\7f1458117
+Node: Regexp Example\7f1472496
+Node: Regexp Search\7f1474666
+Node: POSIX Regexps\7f1480754
+Node: Search and Replace\7f1482589
+Node: Match Data\7f1485954
+Node: Simple Match Data\7f1487084
+Node: Replacing Match\7f1491349
+Node: Entire Match Data\7f1493683
+Node: Saving Match Data\7f1495674
+Node: Searching and Case\7f1497055
+Node: Standard Regexps\7f1499089
+Node: Syntax Tables\7f1501287
+Node: Syntax Basics\7f1502401
+Node: Syntax Descriptors\7f1505373
+Node: Syntax Class Table\7f1507223
+Node: Syntax Flags\7f1513261
+Node: Syntax Table Functions\7f1516478
+Node: Motion and Syntax\7f1520342
+Node: Parsing Expressions\7f1521794
+Node: Standard Syntax Tables\7f1527863
+Node: Syntax Table Internals\7f1528707
+Node: Abbrevs\7f1529733
+Node: Abbrev Mode\7f1531536
+Node: Abbrev Tables\7f1532256
+Node: Defining Abbrevs\7f1533789
+Node: Abbrev Files\7f1535694
+Node: Abbrev Expansion\7f1537467
+Node: Standard Abbrev Tables\7f1542098
+Node: Extents\7f1543257
+Node: Intro to Extents\7f1544500
+Node: Creating and Modifying Extents\7f1548494
+Node: Extent Endpoints\7f1550001
+Node: Finding Extents\7f1553264
+Node: Mapping Over Extents\7f1557013
+Node: Extent Properties\7f1563130
+Node: Detached Extents\7f1573274
+Node: Extent Parents\7f1575133
+Node: Duplicable Extents\7f1576828
+Node: Extents and Events\7f1580049
+Node: Atomic Extents\7f1581956
+Node: Specifiers\7f1582403
+Node: Introduction to Specifiers\7f1584210
+Node: Specifiers In-Depth\7f1586520
+Node: Specifier Instancing\7f1591434
+Node: Specifier Types\7f1594696
+Node: Adding Specifications\7f1599770
+Node: Retrieving Specifications\7f1609132
+Node: Specifier Tag Functions\7f1612867
+Node: Specifier Instancing Functions\7f1616101
+Node: Specifier Example\7f1619508
+Node: Creating Specifiers\7f1622614
+Node: Specifier Validation Functions\7f1624863
+Node: Other Specification Functions\7f1627247
+Node: Faces and Window-System Objects\7f1631066
+Node: Faces\7f1631390
+Node: Merging Faces\7f1633007
+Node: Basic Face Functions\7f1634968
+Node: Face Properties\7f1637066
+Node: Face Convenience Functions\7f1646625
+Node: Other Face Display Functions\7f1649755
+Node: Fonts\7f1650568
+Node: Font Specifiers\7f1651269
+Node: Font Instances\7f1651510
+Node: Font Instance Names\7f1652477
+Node: Font Instance Size\7f1653318
+Node: Font Instance Characteristics\7f1654604
+Node: Font Convenience Functions\7f1655773
+Node: Colors\7f1657063
+Node: Color Specifiers\7f1657503
+Node: Color Instances\7f1657730
+Node: Color Instance Properties\7f1658474
+Node: Color Convenience Functions\7f1659100
+Node: Glyphs\7f1660153
+Node: Glyph Functions\7f1661745
+Node: Creating Glyphs\7f1662152
+Node: Glyph Properties\7f1663739
+Node: Glyph Convenience Functions\7f1672906
+Node: Glyph Dimensions\7f1676853
+Node: Images\7f1677933
+Node: Image Specifiers\7f1678382
+Node: Image Instantiator Conversion\7f1689804
+Node: Image Instances\7f1691169
+Node: Image Instance Types\7f1691920
+Node: Image Instance Functions\7f1694575
+Node: Glyph Types\7f1699144
+Node: Mouse Pointer\7f1700916
+Node: Redisplay Glyphs\7f1703919
+Node: Subwindows\7f1704952
+Node: Annotations\7f1705195
+Node: Annotation Basics\7f1706211
+Node: Annotation Primitives\7f1710149
+Node: Annotation Properties\7f1711478
+Node: Locating Annotations\7f1714518
+Node: Margin Primitives\7f1715355
+Node: Annotation Hooks\7f1717249
+Node: Display\7f1717909
+Node: Refresh Screen\7f1718887
+Node: Truncation\7f1720798
+Node: The Echo Area\7f1723323
+Node: Warnings\7f1729758
+Node: Invisible Text\7f1734194
+Node: Selective Display\7f1736773
+Node: Overlay Arrow\7f1740899
+Node: Temporary Displays\7f1742252
+Node: Blinking\7f1746373
+Node: Usual Display\7f1748558
+Node: Display Tables\7f1751107
+Node: Display Table Format\7f1751911
+Node: Active Display Table\7f1753353
+Node: Character Descriptors\7f1754545
+Node: Beeping\7f1755302
+Node: Hash Tables\7f1760068
+Node: Introduction to Hash Tables\7f1760676
+Node: Working With Hash Tables\7f1766699
+Node: Weak Hash Tables\7f1767816
+Node: Range Tables\7f1769615
+Node: Introduction to Range Tables\7f1770304
+Node: Working With Range Tables\7f1770735
+Node: Databases\7f1771620
+Node: Connecting to a Database\7f1771919
+Node: Working With a Database\7f1773010
+Node: Other Database Functions\7f1773868
+Node: Processes\7f1774442
+Node: Subprocess Creation\7f1776666
+Node: Synchronous Processes\7f1779955
+Node: MS-DOS Subprocesses\7f1786673
+Node: Asynchronous Processes\7f1787747
+Node: Deleting Processes\7f1791460
+Node: Process Information\7f1793331
+Node: Input to Processes\7f1797257
+Node: Signals to Processes\7f1799547
+Node: Output from Processes\7f1803967
+Node: Process Buffers\7f1804779
+Node: Filter Functions\7f1807646
+Node: Accepting Output\7f1813216
+Node: Sentinels\7f1814743
+Node: Process Window Size\7f1818233
+Node: Transaction Queues\7f1818582
+Node: Network\7f1820280
+Node: System Interface\7f1822114
+Node: Starting Up\7f1823384
+Node: Start-up Summary\7f1823978
+Node: Init File\7f1827532
+Node: Terminal-Specific\7f1829913
+Node: Command Line Arguments\7f1833072
+Node: Getting Out\7f1836561
+Node: Killing XEmacs\7f1837130
+Node: Suspending XEmacs\7f1838799
+Node: System Environment\7f1842141
+Node: User Identification\7f1848808
+Node: Time of Day\7f1852337
+Node: Time Conversion\7f1855124
+Node: Timers\7f1860164
+Node: Terminal Input\7f1862337
+Node: Input Modes\7f1862840
+Node: Translating Input\7f1865253
+Node: Recording Input\7f1869418
+Node: Terminal Output\7f1871518
+Node: Flow Control\7f1875141
+Node: Batch Mode\7f1878933
+Node: X-Windows\7f1880315
+Node: X Selections\7f1881127
+Node: X Server\7f1883337
+Node: Resources\7f1883738
+Node: Server Data\7f1888879
+Node: Grabs\7f1890086
+Node: X Miscellaneous\7f1891667
+Node: ToolTalk Support\7f1894052
+Node: XEmacs ToolTalk API Summary\7f1894269
+Node: Sending Messages\7f1895569
+Node: Example of Sending Messages\7f1895820
+Node: Elisp Interface for Sending Messages\7f1896882
+Node: Receiving Messages\7f1903275
+Node: Example of Receiving Messages\7f1903498
+Node: Elisp Interface for Receiving Messages\7f1904334
+Node: LDAP Support\7f1908159
+Node: Building XEmacs with LDAP support\7f1908655
+Node: XEmacs LDAP API\7f1909633
+Node: LDAP Variables\7f1910363
+Node: The High-Level LDAP API\7f1912839
+Node: The Low-Level LDAP API\7f1913944
+Node: The LDAP Lisp Object\7f1914218
+Node: Opening and Closing a LDAP Connection\7f1914771
+Node: Searching on a LDAP Server (Low-level)\7f1916554
+Node: Syntax of Search Filters\7f1917947
+Node: Internationalization\7f1919245
+Node: I18N Levels 1 and 2\7f1919582
+Node: I18N Level 3\7f1920288
+Node: Level 3 Basics\7f1920569
+Node: Level 3 Primitives\7f1921402
+Node: Dynamic Messaging\7f1923008
+Node: Domain Specification\7f1923471
+Node: Documentation String Extraction\7f1925374
+Node: I18N Level 4\7f1926292
+Node: MULE\7f1926484
+Node: Internationalization Terminology\7f1927595
+Node: Charsets\7f1936134
+Node: Charset Properties\7f1936830
+Node: Basic Charset Functions\7f1941516
+Node: Charset Property Functions\7f1943697
+Node: Predefined Charsets\7f1945740
+Node: MULE Characters\7f1948660
+Node: Composite Characters\7f1949507
+Node: ISO 2022\7f1950761
+Node: Coding Systems\7f1956483
+Node: Coding System Types\7f1958405
+Node: EOL Conversion\7f1960224
+Node: Coding System Properties\7f1961407
+Node: Basic Coding System Functions\7f1965259
+Node: Coding System Property Functions\7f1967163
+Node: Encoding and Decoding Text\7f1967721
+Node: Detection of Textual Encoding\7f1968857
+Node: Big5 and Shift-JIS Functions\7f1970393
+Node: CCL\7f1971481
+Node: CCL Syntax\7f1974585
+Node: CCL Statements\7f1976173
+Node: CCL Expressions\7f1980821
+Node: Calling CCL\7f1983360
+Node: CCL Examples\7f1986349
+Node: Category Tables\7f1986486
+Node: Tips\7f1988845
+Node: Style Tips\7f1989486
+Node: Compilation Tips\7f1999005
+Node: Documentation Tips\7f2000919
+Node: Comment Tips\7f2006428
+Node: Library Headers\7f2009430
+Node: Building XEmacs and Object Allocation\7f2013402
+Node: Building XEmacs\7f2014285
+Node: Pure Storage\7f2020620
+Node: Garbage Collection\7f2023408
+Node: Standard Errors\7f2034547
+Node: Standard Buffer-Local Variables\7f2038756
+Node: Standard Keymaps\7f2041389
+Node: Standard Hooks\7f2045121
+Node: Index\7f2052621
\1f
End Tag Table
-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
* 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:
* 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.
* 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.
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.
* 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
(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.
-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
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.
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
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.
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).
(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:
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
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.
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
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.
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:
`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
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).
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
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.
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.
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
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'.
\1f
`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.
=> (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."
(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.
'(The cat in the hat)
" ")
=> "The cat in the hat"
-
+
(mapconcat (function (lambda (x) (format "%c" (1+ x))))
"HAL-8000"
"")
=> (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
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
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.
`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::.)
(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.
(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'.
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
(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.
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::).
\1f
File: lispref.info, Node: Defining Macros, Next: Backquote, Prev: Compiling Macros, Up: Macros
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)
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.
-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
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)
(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
(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
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
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
(defmacro empty-object ()
(list 'quote (cons nil nil)))
-
+
(defun initialize (condition)
(let ((object (empty-object)))
(if condition
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.
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'
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.
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
* 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.
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.
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
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:
-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
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.
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
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',
(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
'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.
`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
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
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.
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',
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
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
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.
-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.
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.
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
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).
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.
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
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
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::.
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
-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
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.
(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
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::).
\1f
File: lispref.info, Node: Using Debugger, Next: Debugger Commands, Prev: Explicit Debug, Up: Debugger
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.
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
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
(list 'testing (backtrace))))))))
=> nil
-
+
----------- Buffer: backtrace-output ------------
backtrace()
(list ...computing arguments...)
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
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.
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.
* 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.
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.
-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
-------
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*'.
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:
Edebug is active, `executing-macro' is bound to
`edebug-continue-kbd-macro'.
+
\1f
File: lispref.info, Node: Edebug Display Update, Next: Edebug Recursive Edit, Prev: Checking Whether to Stop, Up: The Outside Context
* 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.
* `cursor-in-echo-area' is locally bound to `nil' so that the cursor
shows up in the window.
+
\1f
File: lispref.info, Node: Edebug Recursive Edit, Prev: Edebug Display Update, Up: The Outside Context
While Edebug is active, `defining-kbd-macro' is bound to
`edebug-continue-kbd-macro'.
+
\1f
File: lispref.info, Node: Instrumenting Macro Calls, Next: Edebug Options, Prev: The Outside Context, Up: Edebug
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
-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
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
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.
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
-|
=> " 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
-| 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.
-| 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.
objects will be written in `#[...]' form instead of in
`#<compiled-function [...]>' 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
===========================
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
`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).
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
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'.
`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
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)
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'.
"Enter an expression: " (format "%s" '(testing)))
;; Here is how the minibuffer is displayed:
-
+
---------- Buffer: Minibuffer ----------
Enter an expression: (testing)-!-
---------- Buffer: Minibuffer ----------
The user can type <RET> 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'.
==
(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
;; After evaluation of the preceding expression,
;; the following appears in the minibuffer:
-
+
---------- Buffer: Minibuffer ----------
Please edit: (forward-word 1)-!-
---------- Buffer: Minibuffer ----------
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
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.
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
"foo"
'(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)))
=> "fooba"
-
+
(try-completion "foo" '(("barfoo" 2) ("foo" 3)))
=> t
(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'.
(defun test (s)
(> (length (car s)) 6))
=> test
-
+
(all-completions
"foo"
'(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))
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',
"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:
`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
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.
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
-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
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
;; The user types `minibuffer.t <RET>'.
=> "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
(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.
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 <RET>.
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 <SPC> to mean yes and <DEL>
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.
;; 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 ----------
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 <RET> to finalize the
;; 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 ----------
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.
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.
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.
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
- 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).
- 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
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.
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
* 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.
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
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.
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
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)
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: ")
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
Completion
Provide completion. <TAB>, <SPC>, and <RET> 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
`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'
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
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.
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.
`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
<LFD> or <RET>. (`C-q' may be used to include either of these
characters in the input.) Prompt.
`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'.
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
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.
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'.
-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
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
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:
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
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
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
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
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.
\1f
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
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
`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
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
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
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.
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.
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.
\1f
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',
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
;; Create an empty event.
(make-event)
=> #<empty-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))
=> #<keypress-event home>
-
+
;; Create a key-press event of dubious fame.
(make-event 'key-press '(key escape modifiers (meta alt control shift)))
=> #<keypress-event control-meta-alt-shift-escape>
-
+
;; 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))
=> #<buttondown-event meta-button1>
-
+
;; Create a similar button-release event.
(make-event 'button-release `(button 1 modifiers (meta) x ,x y ,x))
=> #<buttonup-event meta-button1up>
-
+
;; Create a mouse-motion event.
(make-event 'motion '(x 20 y 30))
=> #<motion-event 20, 30>
(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
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
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'.
ambiguous, as both use the high bit; <M-x> and <oslash> 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.
`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
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
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
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.
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
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
- 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
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
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'.
-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
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
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
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.
`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
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.
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")
(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
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.
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
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.
\1f
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".
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
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
`(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.
`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.
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.
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.
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
* `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 <META>
- 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
(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
* 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";
*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
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
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
-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
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
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
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
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.
(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
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 <ESC> key.
+ a prefix event (*note Prefix Keys::). The default value is `?\^['
+ (integer 27), which is the ASCII character usually produced by the
+ <ESC> key.
As long as the value of `meta-prefix-char' remains `?\^[', key
lookup translates `<ESC> b' into `M-b', which is normally defined
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'.
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
(setq map (make-sparse-keymap))
=> #<keymap 0 entries 0xbee>
-
(define-key map "\C-f" 'forward-char)
=> forward-char
-
map
=> #<keymap 1 entry 0xbee>
(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
=> #<keymap 2 entries 0xbee>
(describe-bindings-internal map)
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'
=> #<keymap Control-X-prefix 77 entries 0x3bf>
-
+
;; Bind `C-f' to `foo' in the `ctl-x-map'.
(define-key map "\C-p\C-f" 'foo)
=> foo
-
map
=> #<keymap 3 entries 0xbee>
(describe-bindings-internal map)
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'.
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
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
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)
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.
==
(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.
(global-unset-key "\C-l")
=> nil
-
(global-set-key "\C-l\C-l" 'redraw-display)
=> nil
==
(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.
==
(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.
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
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
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 <META> characters since they are not really
two-character sequences.
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.
(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"
`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.
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.
`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.
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.
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.
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.
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
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.
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.
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
`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:
`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:
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.
-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
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
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.
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.
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
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.
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
-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
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
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.
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.
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.
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
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
`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
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
- 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::).
\1f
File: lispref.info, Node: Other Toolbar Variables, Prev: Specifying the Toolbar, Up: Toolbar
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.
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.
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.
;; 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
(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.
(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.
;; 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 ?\| "\" "
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)
...)
`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.
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.
-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
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
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).
- 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
(("^/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.
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.
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.
(> (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)
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.
`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
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.
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'
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:
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
(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,
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
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.
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
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
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'
(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
(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
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))))
---------- 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
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
-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
*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
(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}")
RET minibuffer-complete-and-exit
C-g abort-recursive-edit
"
+
(substitute-command-keys
"To abort a recursive edit from the minibuffer, type\
\\<minibuffer-local-must-match-map>\\[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.
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
(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
(text-char-description ?\C-c)
=> "^C"
-
(text-char-description ?\M-m)
=> "M-m"
-
(text-char-description ?\C-\M-m)
=> "M-^M"
`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
=> (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)
(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
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
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
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
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
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.
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
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
(find-file-noselect "/etc/fstab")
=> #<buffer 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
`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.
=> #<buffer foo<3>>
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'
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.
`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
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>'
- 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
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
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
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.
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
(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
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:
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
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.
(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
(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
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'.
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
=> "/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.
(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).
---------
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.
-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
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
% 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
(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'.
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.
* 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.
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
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.
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.
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'.
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
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
(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")
(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.
(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,
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.
(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,
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.
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.
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
`~/' 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.
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
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
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
(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.
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.
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.
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
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.
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.
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
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.
- 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.
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.
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
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.
`nil', no conversion takes place. Interactively, typing just
<RET> 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
`nil', no conversion takes place. Interactively, typing just
<RET> 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.
`nil', no conversion takes place. Interactively, typing just
<RET> 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
-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
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.
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.
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
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
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.
(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
(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.
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
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.
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.
* 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.
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.
\1f
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.
(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)
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)))
(current-buffer)
=> #<buffer buffers.texi>
- - 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
`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.
foo
=> #<killed buffer>
- - 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'.
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
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
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
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")
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
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
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'.
(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.
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.
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
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
-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
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
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
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
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
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
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.)
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.
(make-indirect-buffer "*scratch*" "indirect")
=> #<buffer "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
(buffer-base-buffer (get-buffer "indirect"))
=> #<buffer "*scratch*">
- - 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
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::.)
*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.
\1f
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
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
=> #<window 8 on windows.texi>
(window-edges) ; Edges in order:
=> (0 0 80 50) ; left-top-right-bottom
-
+
;; Returns window created
(setq w2 (split-window w 15))
=> #<window 28 on windows.texi>
-
(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 |
|__________|
(setq w3 (split-window w 35 t))
=> #<window 32 on windows.texi>
-
(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 |
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.
(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.
(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
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.
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.
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
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.
(select-window w)
=> #<window 65 on windows.texi>
- - 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
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.
* 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
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
(next-window (next-window (selected-window)))
=> #<window 56 on windows.texi>
- - 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'.
* 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.
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.
(window-buffer)
=> #<buffer windows.texi>
- - 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
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
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
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
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
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
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
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
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.
-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
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.
"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.
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,
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.
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.
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
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.
`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.
`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'.
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.
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
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.
(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.
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
(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
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.
(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
(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
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.
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
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
`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
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
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
...)
(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
=> 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,
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.
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.
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.
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.
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
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::.
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
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.
-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
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
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.
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.
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
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.
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
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.
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,
`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
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
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'.
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
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
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.
- 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
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
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:
- 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.
- 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.
\1f
`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.
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
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.
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.
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
- 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
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.
\1f
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,
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.
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
`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
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
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
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.
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',
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
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.
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
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
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
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
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
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
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
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
(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
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
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.
-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
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
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.
(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.
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.
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:
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
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
* 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''.
\1f
File: lispref.info, Node: Overview of Markers, Next: Predicates on Markers, Up: Markers
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
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.
(make-marker)
=> #<marker in no buffer>
- - 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.
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
(point-max-marker)
=> #<marker at 200 in markers.texi>
- - 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,
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.
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.
(set-marker m 0 b)
=> #<marker at 1 in foo>
- - Function: move-marker MARKER POSITION &optional BUFFER
+ - Function: move-marker marker position &optional buffer
This is another name for `set-marker'.
\1f
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.
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
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
(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
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'.
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
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
- 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
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
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
(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.
(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.
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
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.
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
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
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
-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
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'
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.
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.
=============
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
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.
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.
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
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',
(delete-indentation)
=> nil
+
---------- Buffer: foo ----------
When in the course of human-!- events, it becomes necessary
---------- Buffer: foo ----------
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)
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
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'.
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
"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.
`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.
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
`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
`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
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
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
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
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
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
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'.
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
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.
`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',
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
-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
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.)
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
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
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.
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 <META> key set, thus the `M'; however, it conflicts with the
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.
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 |
| | | | | | | | |
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
"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
-----------
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
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.
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.
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 `+'.
-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
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.
(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.
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.
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
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
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
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
`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.
`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.
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
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 <TAB> character as input uses this tab stop
+Display::). Note that the <TAB> character as input uses this tab stop
feature only in a few major modes, such as Text mode.
- Command: tab-to-tab-stop
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'.
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
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
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
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
===============
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
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.
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.
(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
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.
(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.
\1f
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
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
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.
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
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.
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'.
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.
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.
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.
-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
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.
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.
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.
(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.
;; 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.
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,
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.
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
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
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
`[^ ... ]'
`[^' 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
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 `\'.
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.
`\<'
`\'. 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
(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
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.
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
(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
(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
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
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.
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;
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
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.
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.
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.
-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
#<marker at 13 in foo>
#<marker at 17 in foo>)
- - 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'.
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.
(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::).
\1f
File: lispref.info, Node: Searching and Case, Next: Standard Regexps, Prev: Match Data, Up: Searching and Matching
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
- 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).
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:
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).
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
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:
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
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
(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.
(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.
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
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'
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
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.
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.
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
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.
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,
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
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'.
`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,
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.
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
- 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.
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'.
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
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
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
-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
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:
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,
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.
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
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'.
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
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
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.
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
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',
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
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.
(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.
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.
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'.
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'.
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.
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.
(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
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.
* 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
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
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.
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:
(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.
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
-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
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.
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.
\1f
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')
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
* 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
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
(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
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
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).
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
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).
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.
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
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
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
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.
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.
\1f
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.
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.
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
`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
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.
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'.
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,
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.
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.
\1f
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:
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
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::).
-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
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
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
`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.
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::.
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'.
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.
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
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
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
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'.
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
Color Specifiers
----------------
- - Function: color-specifier-p OBJECT
+ - Function: color-specifier-p object
This function returns non-`nil' if OBJECT is a color specifier.
\1f
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.
\1f
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.
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
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:
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
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'.
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
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
`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.
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,
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
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
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.
\1f
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
-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
----------------
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
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
`(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.
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
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.
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:
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'.
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
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
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
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.)
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'.
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
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
Subwindows are not currently implemented.
- - Function: subwindowp OBJECT
+ - Function: subwindowp object
This function returns non-`nil' if OBJECT is a subwindow.
\1f
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:
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
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.
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.
\1f
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.
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.
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.
- 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.)
-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
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
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.
(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.
;; 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.
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.
`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.
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
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
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
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
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
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.
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.
(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)))
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.
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."
`nil'
Display according to the standard interpretation (*note Usual
- Display::.).
+ Display::).
\1f
File: lispref.info, Node: Beeping, Prev: Display Tables, Up: Display
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
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
- 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.
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:
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".
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'.
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.
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:
- 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.
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.
Databases
*********
- - Function: databasep OBJECT
+ - Function: databasep object
This function returns non-`nil' if OBJECT is a database.
* Menu:
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
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'.
-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
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.
\1f
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.
\1f
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:
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
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
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
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.
---------- Buffer: foo ----------
/usr/user/lewis/manual
---------- Buffer: foo ----------
-
+
(call-process "grep" nil "bar" nil "lewis" "/etc/passwd")
=> nil
(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
---------- Buffer: foo ----------
input-!-
---------- Buffer: foo ----------
-
+
(call-process-region 1 6 "cat" nil t)
=> nil
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
(start-process "my-process" "foo" "sleep" "100")
=> #<process my-process>
-
+
(start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin")
=> #<process my-process<1>>
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
To determine whether a given subprocess actually got a pipe or a
PTY, use the function `process-tty-name' (*note Process
- Information::.).
+ Information::).
\1f
File: lispref.info, Node: Deleting Processes, Next: Process Information, Prev: Asynchronous Processes, Up: Processes
`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.
(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"))
(process-list)
=> (#<process display-time> #<process shell>)
- - 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")
=> #<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
(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).
(process-status "shell")
=> run
-
(process-status (get-buffer "*shell*"))
=> run
-
x
=> #<process xx<1>>
(process-status x)
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
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
(process-send-string "shell<1>" "ls\n")
=> nil
-
+
+
---------- Buffer: *shell* ----------
...
introduction.texi syntax-tables.texi~
...
---------- 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
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.
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)
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.
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.
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"))
=> #<buffer *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.
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
=> #<process shell>
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::).
\1f
File: lispref.info, Node: Filter Functions, Next: Accepting Output, Prev: Process Buffers, Up: Output from Processes
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.
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
(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)
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
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.
(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~
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
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
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
(format "Process: %s had the event `%s'" process event)))
(set-process-sentinel (get-process "shell") 'msg-me)
=> msg-me
-
(kill-process (get-process "shell"))
-| Process: #<process shell> had the event `killed'
=> #<process shell>
- - Function: process-sentinel PROCESS
+ - Function: process-sentinel process
This function returns the sentinel of PROCESS, or `nil' if it has
none.
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.
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.
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.
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.
-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
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
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
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'
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
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.
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
=> (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!
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'
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'.
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
=> ("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")
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
- 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
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
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.
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.
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
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"
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.
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::).
\1f
File: lispref.info, Node: Time Conversion, Next: Timers, Prev: Time of Day, Up: System Interface
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
`%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:
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'.
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
(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
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
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 `<ESC> O P' when the keypad PF1
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.
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'.
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
(open-dribble-file "~/dribble")
=> nil
- See also the `open-termscript' function (*note Terminal Output::.).
+ See also the `open-termscript' function (*note Terminal Output::).
-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
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',
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.
=> 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
(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
-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:
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.
`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.
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
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.
(= 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.
(/= 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.
(< 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.
(<= 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)
(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)
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.
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).
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
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)
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.
(+ 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
(-)
=> 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.
(* 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
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.
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
`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.
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
;; 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.
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
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.
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.
\1f
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.
-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
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.
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.
(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
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:
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.
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.
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
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.
`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.
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'.
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
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
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.
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
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,
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.
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_<attribute>' function that
`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
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
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
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
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
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
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.
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 (<http://www.openldap.org/>)
* University of Michigan's LDAP 3.3
- (`http://www.umich.edu/~dirsvcs/ldap/')
+ (<http://www.umich.edu/~dirsvcs/ldap/>)
- * LDAP SDK 1.0 from Netscape Corp. (`http://developer.netscape.com/')
+ * LDAP SDK 1.0 from Netscape Corp. (<http://developer.netscape.com/>)
Other libraries conforming to RFC 1823 will probably work also but
may require some minor tweaking at C level.
- 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
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'.
\1f
File: lispref.info, Node: The Low-Level LDAP API, Prev: The High-Level LDAP API, Up: XEmacs LDAP API
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
\1f
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:
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
\1f
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
-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
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:
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:
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'.
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")
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")
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
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:
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'.
- 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
`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.
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.
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.
\1f
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
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:
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
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'.
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
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.
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.
\1f
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
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!<!+^[(B' if you use the JIS
- Function: coding-category-list
This function returns a list of all recognized coding categories.
- - Function: set-coding-priority-list LIST
+ - Function: set-coding-priority-list list
This function changes the priority order of the coding categories.
LIST should be a list of coding categories, in descending order of
priority. Unspecified coding categories will be lower in priority
This function returns a list of coding categories in descending
order of priority.
- - Function: set-coding-category-system CODING-CATEGORY CODING-SYSTEM
+ - Function: set-coding-category-system coding-category coding-system
This function changes the coding system associated with a coding
category.
- - Function: coding-category-system CODING-CATEGORY
+ - Function: coding-category-system coding-category
This function returns the coding system associated with a coding
category.
- - Function: detect-coding-region START END &optional BUFFER
+ - Function: detect-coding-region start end &optional buffer
This function detects coding system of the text in the region
between START and END. Returned value is a list of possible coding
systems ordered by priority. If only ASCII characters are found,
-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
These are special functions for working with the non-standard
Shift-JIS and Big5 encodings.
- - Function: decode-shift-jis-char CODE
+ - Function: decode-shift-jis-char code
This function decodes a JISX0208 character of Shift-JIS
coding-system. CODE is the character code in Shift-JIS as a cons
of type bytes. The corresponding character is returned.
- - Function: encode-shift-jis-char CH
+ - Function: encode-shift-jis-char ch
This function encodes a JISX0208 character CH to SHIFT-JIS
coding-system. The corresponding character code in SHIFT-JIS is
returned as a cons of two bytes.
- - Function: decode-big5-char CODE
+ - Function: decode-big5-char code
This function decodes a Big5 character CODE of BIG5 coding-system.
CODE is the character code in BIG5. The corresponding character
is returned.
- - Function: encode-big5-char CH
+ - Function: encode-big5-char ch
This function encodes the Big5 character CHAR to BIG5
coding-system. The corresponding character code in Big5 is
returned.
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
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
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
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.
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'.
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.
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::.
* 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.
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
-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
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
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
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').
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
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
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::
\1f
File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top
-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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
-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
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
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
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.
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)
=> ""
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.
=> ""
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
=> "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
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
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"
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
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.
\1f
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:
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.
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'.
(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.
(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.
=> 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
(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
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
(`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.
(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
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
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
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'.
\1f
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
(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."
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
=> ?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
=> ?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
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'.
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:
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.
- 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
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
* 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:
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.
\1f
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
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.
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.
`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'.
(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
-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
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.
(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.
(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
(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
(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'.
(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.
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,
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.
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
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.
(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
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))
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:
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.
Here is this result in box notation:
- -------------- ------------- -------------
+ -------------- ------------- -------------
| car | cdr | | car | cdr | | car | cdr |
| a | o | -->| b | o------->| c | nil |
| | | | | | | | | | |
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:
(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
| | | |
------------- ------------
- - 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
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'
(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'.
(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))
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
(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
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))
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.
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)))
(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.
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
(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.
(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.
`(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.
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.
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.
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.
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.
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
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.
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.
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.
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
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
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.
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:
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.
\1f
-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
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.
(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.
(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
(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::).
\1f
File: lispref.info, Node: Arrays, Next: Array Functions, Prev: Sequence Functions, Up: Sequences Arrays Vectors
* 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
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).
(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.
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.
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.
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])
(vectorp "asdf")
=> nil
- - Function: vector &rest OBJECTS
+ - Function: vector &rest objects
This function creates and returns a vector whose elements are the
arguments, OBJECTS.
(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.
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'
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]]
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)
(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.
(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
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
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:
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
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.
\1f
File: lispref.info, Node: Definitions, Next: Creating Symbols, Prev: Symbol Components, Up: Symbols
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::.
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.
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:
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
(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
(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
=> 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
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.
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.
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.
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.
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'
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.
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
(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'.
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
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 ----------
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
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
`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.
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.
-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
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.
\1f
File: lispref.info, Node: Function Indirection, Next: Function Forms, Prev: Classifying Lists, Up: Forms
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'.
(symbol-function 'car)
=> #<subr car>
-
(fset 'first 'car)
=> car
-
(fset 'erste 'first)
=> first
-
(erste '(1 2 3)) ; Call the function referenced by `erste'.
=> 1
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,
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.
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
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
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
=> [(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.
\1f
File: lispref.info, Node: Control Structures, Next: Variables, Prev: Evaluation, Up: Top
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
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:
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.
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.
(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.
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
'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,
`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.
==
(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.
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
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'.
`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
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
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
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':
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.
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."
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.
\1f
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
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.
(princ (format "Arithmetic error: %s" err))
1000000)))
=> safe-divide
-
+
(safe-divide 5 0)
-| Arithmetic error: (arith-error)
=> 1000000
(setq baz 34)
=> 34
-
+
(condition-case err
(if (eq baz 35)
t
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))
-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
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
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:
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
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
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.
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.
(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
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
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.
(makunbound 'x) ; Void the local binding.
x)
error--> Symbol's value as variable is void: x
-
x ; The global binding is unchanged.
=> 1
(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.
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
`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
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
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
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
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
=========================
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.
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
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.
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
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.
(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))
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.
*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.
(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
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.
`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.
(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.
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f648
-Node: Intro\7f4626
-Node: Entering\7f7209
-Node: Enter\7f8723
-Node: Frame\7f9405
-Node: Exiting\7f11074
-Node: Mode Line\7f12274
-Node: Echo Area\7f14421
-Node: Windows and Menus\7f15776
-Node: XEmacs Window\7f16229
-Node: Pull-down Menus\7f19850
-Node: File menu\7f20729
-Node: Edit menu\7f23988
-Node: Options Menu\7f26515
-Node: Buffers Menu\7f31297
-Node: Help menu\7f31683
-Node: Edit\7f32181
-Node: Insert\7f33775
-Node: Cursor Position\7f35103
-Node: Erase\7f37174
-Node: Numeric Argument\7f38328
-Node: Undo\7f39512
-Node: Customization Basics\7f40275
-Node: Customizing key Bindings\7f41504
-Node: Customizing Menus\7f44994
-Node: Help\7f50484
-Node: The Help Menu\7f51172
-Node: Modes\7f56097
-Node: Major Modes\7f57013
-Node: Minor Modes\7f60962
-Node: Files\7f65048
-Node: File Names\7f65770
-Node: Visiting\7f67573
-Node: Saving Files\7f69697
-Node: Other Customizations\7f73075
-Node: Setting Variables\7f75544
-Node: Init File\7f78753
-Node: Select and Move\7f84222
-Node: Selecting Text\7f85176
-Node: Mouse\7f86689
-Node: Region Operation\7f88014
-Node: Moving Text\7f89274
-Node: Accumulating text\7f90514
-Node: Search and Replace\7f92834
-Node: Key Index\7f96698
-Node: Command Index\7f99987
-Node: Variable Index\7f104089
-Node: Concept Index\7f104666
+Node: Top\7f637
+Node: Intro\7f4617
+Node: Entering\7f7200
+Node: Enter\7f8714
+Node: Frame\7f9396
+Node: Exiting\7f11065
+Node: Mode Line\7f12265
+Node: Echo Area\7f14412
+Node: Windows and Menus\7f15767
+Node: XEmacs Window\7f16220
+Node: Pull-down Menus\7f19841
+Node: File menu\7f20720
+Node: Edit menu\7f23979
+Node: Options Menu\7f26505
+Node: Buffers Menu\7f31287
+Node: Help menu\7f31673
+Node: Edit\7f32171
+Node: Insert\7f33765
+Node: Cursor Position\7f35093
+Node: Erase\7f37164
+Node: Numeric Argument\7f38318
+Node: Undo\7f39502
+Node: Customization Basics\7f40265
+Node: Customizing key Bindings\7f41494
+Node: Customizing Menus\7f44984
+Node: Help\7f50473
+Node: The Help Menu\7f51161
+Node: Modes\7f56086
+Node: Major Modes\7f57002
+Node: Minor Modes\7f60951
+Node: Files\7f65037
+Node: File Names\7f65759
+Node: Visiting\7f67562
+Node: Saving Files\7f69686
+Node: Other Customizations\7f73063
+Node: Setting Variables\7f75531
+Node: Init File\7f78740
+Node: Select and Move\7f84210
+Node: Selecting Text\7f85164
+Node: Mouse\7f86677
+Node: Region Operation\7f88002
+Node: Moving Text\7f89262
+Node: Accumulating text\7f90502
+Node: Search and Replace\7f92822
+Node: Key Index\7f96686
+Node: Command Index\7f99975
+Node: Variable Index\7f104077
+Node: Concept Index\7f104654
\1f
End Tag Table
-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
- -- The Detailed Node Listing --
+ --- The Detailed Node Listing ---
Entering and Exiting Emacs
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::.
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")
-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
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.
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)
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
* 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.
-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
* 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.
* 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.
* 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.
* 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.
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f982
-Node: Preface\7f1491
-Node: Intellectual Property\7f2529
-Node: Reading Non-Free Code\7f2885
-Node: Contributions\7f4617
-Node: Design Advice\7f6215
-Node: Compatibility\7f6698
-Node: Using Extensions\7f8342
-Node: ANSI C\7f9844
-Node: Source Language\7f11080
-Node: Program Behavior\7f12214
-Node: Semantics\7f12806
-Node: Libraries\7f16560
-Node: Errors\7f17795
-Node: User Interfaces\7f19018
-Node: Memory Usage\7f36043
-Node: Writing C\7f37040
-Node: Formatting\7f37750
-Node: Comments\7f41022
-Node: Syntactic Conventions\7f43815
-Node: Names\7f46753
-Node: System Portability\7f48065
-Node: CPU Portability\7f49841
-Node: System Functions\7f52002
-Node: Internationalization\7f56903
-Node: Documentation\7f59104
-Node: GNU Manuals\7f59648
-Node: Manual Structure Details\7f61690
-Node: NEWS File\7f63095
-Node: Change Logs\7f63776
-Node: Man Pages\7f67978
-Node: Reading other Manuals\7f69597
-Node: Managing Releases\7f70381
-Node: Configuration\7f71087
-Node: Makefile Conventions\7f78027
-Node: Makefile Basics\7f78551
-Node: Utilities in Makefiles\7f81022
-Node: Command Variables\7f82896
-Node: Directory Variables\7f85732
-Node: Standard Targets\7f95838
-Node: Releases\7f105580
+Node: Top\7f976
+Node: Preface\7f1567
+Node: Legal Issues\7f2584
+Node: Reading Non-Free Code\7f2950
+Node: Contributions\7f4673
+Node: Design Advice\7f6803
+Node: Compatibility\7f7311
+Node: Using Extensions\7f8822
+Node: ANSI C\7f10324
+Node: Source Language\7f12447
+Node: Program Behavior\7f13940
+Node: Semantics\7f14649
+Node: Libraries\7f18966
+Node: Errors\7f20201
+Node: User Interfaces\7f21977
+Node: Option Table\7f28854
+Node: Memory Usage\7f43664
+Node: Writing C\7f44658
+Node: Formatting\7f45499
+Node: Comments\7f48771
+Node: Syntactic Conventions\7f52069
+Node: Names\7f55007
+Node: System Portability\7f56941
+Node: CPU Portability\7f58538
+Node: System Functions\7f60795
+Node: Internationalization\7f65899
+Node: Mmap\7f69047
+Node: Documentation\7f69752
+Node: GNU Manuals\7f70387
+Node: Manual Structure Details\7f74635
+Node: License for Manuals\7f75968
+Node: NEWS File\7f76552
+Node: Change Logs\7f77228
+Node: Change Log Concepts\7f77945
+Node: Style of Change Logs\7f79800
+Node: Simple Changes\7f81354
+Node: Conditional Changes\7f82545
+Node: Man Pages\7f83922
+Node: Reading other Manuals\7f85541
+Node: Managing Releases\7f86325
+Node: Configuration\7f87080
+Node: Makefile Conventions\7f94020
+Node: Makefile Basics\7f94779
+Node: Utilities in Makefiles\7f97948
+Node: Command Variables\7f100084
+Node: Directory Variables\7f103585
+Node: Standard Targets\7f114462
+Ref: Standard Targets-Footnote-1\7f124901
+Node: Install Command Categories\7f125001
+Node: Releases\7f129574
+Node: References\7f133657
\1f
End Tag Table
-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
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
\1f
-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
******************************
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
+<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 `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.
\1f
-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
**************************
* Menu:
-* Reading Non-Free Code:: Referring to Proprietary Programs
-* Contributions:: Accepting Contributions
+* Reading Non-Free Code:: Referring to Proprietary Programs
+* Contributions:: Accepting Contributions
\1f
-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
=================================
obstacks.
\1f
-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.
+
\1f
-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
**********************
* 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
\1f
File: standards.info, Node: Compatibility, Next: Using Extensions, Up: Design Advice
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.
\1f
File: standards.info, Node: Using Extensions, Next: ANSI C, Prev: Compatibility, Up: Design Advice
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)
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.
\1f
File: standards.info, Node: Source Language, Prev: ANSI C, Up: Design Advice
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
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.
+
\1f
File: standards.info, Node: Program Behavior, Next: Writing C, Prev: Design Advice, Up: Top
* 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
\1f
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.
(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
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.
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:
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
end with a period.
\1f
-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
=====================================
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
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.
+\1f
+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 <gnu@gnu.org> a list of them, with their meanings, so we
+can update the table.
`after-date'
`-N' in `tar'.
`avoid-wraps'
`-n' in `wdiff'.
+`background'
+ For server programs, run in the background.
+
`backward-search'
`-B' in `ctags'.
`dereference-args'
`-D' in `du'.
+`device'
+ Specify an I/O device (special file name).
+
`diacritics'
`-d' in `recode'.
`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'.
`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 <gnu@gnu.org>.
`macro-name'
`-M' in `ptx'.
`no-validate'
Used in `makeinfo'.
+`no-wait'
+ Used in `emacsclient'.
+
`no-warn'
Used in various programs to inhibit warnings.
`only-time'
`-F' in `gprof'.
+`options'
+ `-o' in `getopt', `fdlist', `fdmount', `fdmountd', and `fdumount'.
+
`output'
In various programs, specify the output file name.
`prompt'
`-p' in `ed'.
+`proxy'
+ Specify an HTTP proxy.
+
`query-user'
`-X' in `shar'.
`-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'
`-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'.
`time'
Used in `ls' and `touch'.
+`timeout'
+ Specify how long to wait before giving up on some operation.
+
`to-stdout'
`-O' in `tar'.
`-z' in `gprof'.
\1f
-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
============
* 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'.
\1f
File: standards.info, Node: Formatting, Next: Comments, Up: Writing C
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.
-\1f
-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 */
-
-\1f
-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.
-
-\1f
-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.
-
-\1f
-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.
-
-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
translation approved by the Free Software Foundation.
\1f
+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 */
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
File: standards.info, Node: CPU Portability, Next: System Functions, Prev: System Portability, Up: Writing C
Portability between CPUs
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.
\1f
File: standards.info, Node: System Functions, Next: Internationalization, Prev: CPU Portability, Up: Writing C
* 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
get them properly defined is to use Autoconf.
\1f
-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
====================
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."
+\1f
+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.
\1f
File: standards.info, Node: Documentation, Next: Managing Releases, Prev: Writing C, Up: Top
* 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.
===========
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
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.
\1f
-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
for each program described.
\1f
-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.
+
+\1f
+File: standards.info, Node: NEWS File, Next: Change Logs, Prev: License for Manuals, Up: Documentation
The NEWS File
=============
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::
+
+\1f
+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,
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.
+\1f
+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.
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.
+\1f
+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.
+
+\1f
+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.
\1f
File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: Change Logs, Up: Documentation
with the FSF about the individual case.
\1f
-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
*******************
* Menu:
-* Configuration:: How Configuration Should Work
+* Configuration:: How Configuration Should Work
* Makefile Conventions:: Makefile Conventions
-* Releases:: Making Releases
+* Releases:: Making Releases
\1f
File: standards.info, Node: Configuration, Next: Makefile Conventions, Up: Managing Releases
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.
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'
====================
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:
* 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.
\1f
File: standards.info, Node: Makefile Basics, Next: Utilities in Makefiles, Up: Makefile Conventions
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
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'.
-
-\1f
-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.
-
-\1f
-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.
-
-\1f
-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'.
-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
translation approved by the Free Software Foundation.
\1f
-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.
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
+File: standards.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions
Standard Targets for Users
--------------------------
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.
# 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' \
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:
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
not distributed with Texinfo.
\1f
+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.
+
+\1f
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
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
smaller at the expense of possible inconvenience to a user who doesn't
know what other files to get.
+\1f
+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.
+
-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
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
"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
\1f
Tag Table:
-Node: Top\7f227
-Node: term mode\7f393
-Node: Overview\7f1216
-Node: Output from the inferior\7f1966
-Node: subbuffer\7f3546
-Node: altsubbuffer\7f4869
-Node: Input to the inferior\7f5894
-Node: Connecting to remote computers\7f7414
-Node: Paging\7f9319
-Node: Terminal escapes\7f9989
-Node: Cursor motion\7f10857
-Node: Erasing\7f11517
-Node: Inserting and deleting\7f12312
-Node: Scrolling\7f12702
-Node: Command hook\7f13148
-Node: Miscellaneous escapes\7f14184
+Node: Top\7f201
+Node: term mode\7f367
+Node: Overview\7f1190
+Node: Output from the inferior\7f1940
+Node: subbuffer\7f3520
+Node: altsubbuffer\7f4843
+Node: Input to the inferior\7f5868
+Node: Connecting to remote computers\7f7388
+Node: Paging\7f9293
+Node: Terminal escapes\7f9962
+Node: Cursor motion\7f10830
+Node: Erasing\7f11490
+Node: Inserting and deleting\7f12285
+Node: Scrolling\7f12675
+Node: Command hook\7f13121
+Node: Miscellaneous escapes\7f14157
\1f
End Tag Table
-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.
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f985
-Node: Introduction\7f1630
-Node: Library\7f3357
-Node: Preparation\7f4374
-Node: Find\7f5573
-Node: Interrogate\7f9121
-Node: Initialize\7f14429
-Node: Padding\7f16069
-Node: Why Pad\7f16730
-Node: Describe Padding\7f18374
-Node: Output Padding\7f19849
-Node: Parameters\7f23464
-Node: Encode Parameters\7f25123
-Node: Using Parameters\7f31228
-Node: tparam\7f31817
-Node: tgoto\7f33882
-Node: Data Base\7f36437
-Node: Format\7f37315
-Node: Capability Format\7f39406
-Node: Naming\7f42459
-Node: Inheriting\7f47028
-Node: Capabilities\7f49255
-Node: Basic\7f52097
-Node: Screen Size\7f55941
-Node: Cursor Motion\7f57681
-Node: Wrapping\7f67338
-Node: Scrolling\7f70163
-Node: Windows\7f75183
-Node: Clearing\7f75917
-Node: Insdel Line\7f77681
-Node: Insdel Char\7f82593
-Node: Standout\7f92578
-Node: Underlining\7f101637
-Node: Cursor Visibility\7f104056
-Node: Bell\7f104804
-Node: Keypad\7f105353
-Node: Meta Key\7f110074
-Node: Initialization\7f111028
-Node: Pad Specs\7f113392
-Node: Status Line\7f115445
-Node: Half-Line\7f117329
-Node: Printer\7f118131
-Node: Summary\7f119810
-Node: Var Index\7f130016
-Node: Cap Index\7f130740
-Node: Index\7f137931
+Node: Top\7f959
+Node: Introduction\7f1604
+Node: Library\7f3331
+Node: Preparation\7f4348
+Node: Find\7f5547
+Node: Interrogate\7f9094
+Node: Initialize\7f14401
+Node: Padding\7f16039
+Node: Why Pad\7f16700
+Node: Describe Padding\7f18344
+Node: Output Padding\7f19819
+Node: Parameters\7f23432
+Node: Encode Parameters\7f25090
+Node: Using Parameters\7f31195
+Node: tparam\7f31784
+Node: tgoto\7f33849
+Node: Data Base\7f36404
+Node: Format\7f37281
+Node: Capability Format\7f39372
+Node: Naming\7f42422
+Node: Inheriting\7f46990
+Node: Capabilities\7f49216
+Node: Basic\7f52059
+Node: Screen Size\7f55903
+Node: Cursor Motion\7f57643
+Node: Wrapping\7f67293
+Node: Scrolling\7f70117
+Node: Windows\7f75137
+Node: Clearing\7f75871
+Node: Insdel Line\7f77635
+Node: Insdel Char\7f82541
+Node: Standout\7f92525
+Node: Underlining\7f101582
+Node: Cursor Visibility\7f104001
+Node: Bell\7f104749
+Node: Keypad\7f105298
+Node: Meta Key\7f110019
+Node: Initialization\7f110973
+Node: Pad Specs\7f113337
+Node: Status Line\7f115390
+Node: Half-Line\7f117274
+Node: Printer\7f118076
+Node: Summary\7f119755
+Node: Var Index\7f129960
+Node: Cap Index\7f130684
+Node: Index\7f137875
\1f
End Tag Table
-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.
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
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.
* 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.
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:
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
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:
`%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
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:
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:
`bs' and `pt', and many string-valued capabilities. Most of the
strings start with <ESC> 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::).
\1f
File: termcap.info, Node: Naming, Next: Inheriting, Prev: Capability Format, Up: Data Base
`-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;
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.
-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.
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
* Meta Key:: <META> 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.
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
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.
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.
\1f
File: termcap.info, Node: Wrapping, Next: Scrolling, Prev: Cursor Motion, Up: Capabilities
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
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.
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'.
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
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
-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.
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
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.
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.
* ce: Clearing.
* ch: Cursor Motion.
* cl: Clearing.
-* cm: Cursor Motion.
* CM: Cursor Motion.
+* cm: Cursor Motion.
* co: Screen Size.
* cr: Cursor Motion.
* cS: Scrolling.
* 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.
* 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.
* 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.
* ue: Underlining.
* ug: Underlining.
* ul: Underlining.
-* up: Cursor Motion.
* UP: Cursor Motion.
+* up: Cursor Motion.
* us: Underlining.
* vb: Bell.
* ve: Cursor Visibility.
* xb: Basic.
* xn: Wrapping.
* xs: Standout.
-* xt <1>: Cursor Motion.
-* xt: Standout.
+* xt <1>: Standout.
+* xt: Cursor Motion.
\1f
File: termcap.info, Node: Index, Prev: Cap Index, Up: Top
* 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.
* visibility: Cursor Visibility.
* visible bell: Bell.
* window: Windows.
-* wrapping <1>: Naming.
-* wrapping: Wrapping.
+* wrapping <1>: Wrapping.
+* wrapping: Naming.
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f1510
-Node: Copying\7f23823
-Node: Overview\7f25828
-Node: Overview-Footnotes\7f27256
-Node: Using Texinfo\7f27792
-Node: Info Files\7f30275
-Node: Info Files-Footnotes\7f34310
-Node: Printed Books\7f34557
-Node: Printed Books-Footnotes\7f37228
-Node: Formatting Commands\7f37512
-Node: Formatting Commands-Footnotes\7f40338
-Node: Conventions\7f41040
-Node: Comments\7f43602
-Node: Minimum\7f45025
-Node: Six Parts\7f47211
-Node: Short Sample\7f48723
-Node: Acknowledgements\7f52858
-Node: Texinfo Mode\7f53693
-Node: Texinfo Mode Overview\7f55065
-Node: Emacs Editing\7f55841
-Node: Inserting\7f57971
-Node: Showing the Structure\7f62252
-Node: Updating Nodes and Menus\7f64779
-Node: Updating Commands\7f65852
-Node: Updating Requirements\7f71913
-Node: Other Updating Commands\7f74210
-Node: Info Formatting\7f77478
-Node: Printing\7f78736
-Node: Texinfo Mode Summary\7f81082
-Node: Beginning a File\7f85836
-Node: Four Parts\7f86727
-Node: Sample Beginning\7f88197
-Node: Header\7f89817
-Node: First Line\7f91169
-Node: Start of Header\7f92158
-Node: setfilename\7f92872
-Node: settitle\7f94808
-Node: setchapternewpage\7f96698
-Node: paragraphindent\7f99459
-Node: End of Header\7f100941
-Node: Info Summary and Permissions\7f101780
-Node: Titlepage & Copyright Page\7f102799
-Node: titlepage\7f104405
-Node: titlepage-Footnotes\7f106686
-Node: titlefont center sp\7f107026
-Node: title subtitle author\7f108252
-Node: Copyright & Permissions\7f110524
-Node: end titlepage\7f112525
-Node: headings on off\7f114231
-Node: The Top Node\7f116276
-Node: Title of Top Node\7f117431
-Node: Master Menu Parts\7f118684
-Node: Software Copying Permissions\7f120921
-Node: Ending a File\7f122089
-Node: Printing Indices & Menus\7f122937
-Node: Contents\7f125239
-Node: File End\7f127579
-Node: Structuring\7f128252
-Node: Tree Structuring\7f129910
-Node: Structuring Command Types\7f131353
-Node: makeinfo top\7f133679
-Node: chapter\7f134212
-Node: unnumbered & appendix\7f135236
-Node: majorheading & chapheading\7f136075
-Node: section\7f136896
-Node: unnumberedsec appendixsec heading\7f137660
-Node: subsection\7f138649
-Node: unnumberedsubsec appendixsubsec subheading\7f139221
-Node: subsubsection\7f140174
-Node: Raise/lower sections\7f141724
-Node: Nodes\7f143859
-Node: Two Paths\7f144796
-Node: Node Menu Illustration\7f146082
-Node: node\7f149777
-Node: Node Names\7f152473
-Node: Writing a Node\7f153549
-Node: Node Line Tips\7f155567
-Node: Node Line Requirements\7f156361
-Node: First Node\7f157962
-Node: makeinfo top command\7f159408
-Node: Top Node Summary\7f160587
-Node: makeinfo Pointer Creation\7f162037
-Node: Menus\7f163284
-Node: Menus-Footnotes\7f164222
-Node: Menu Location\7f164573
-Node: Writing a Menu\7f166250
-Node: Menu Parts\7f167216
-Node: Less Cluttered Menu Entry\7f168374
-Node: Menu Example\7f168999
-Node: Other Info Files\7f170520
-Node: Cross References\7f172376
-Node: References\7f173333
-Node: Cross Reference Commands\7f175080
-Node: Cross Reference Parts\7f176139
-Node: xref\7f178975
-Node: Reference Syntax\7f179774
-Node: One Argument\7f181429
-Node: Two Arguments\7f182441
-Node: Three Arguments\7f183556
-Node: Four and Five Arguments\7f185947
-Node: Top Node Naming\7f188359
-Node: ref\7f189369
-Node: pxref\7f190759
-Node: inforef\7f193141
-Node: uref\7f194434
-Node: Marking Text\7f195433
-Node: Indicating\7f196057
-Node: Useful Highlighting\7f197962
-Node: code\7f199351
-Node: kbd\7f202389
-Node: key\7f204259
-Node: samp\7f205592
-Node: var\7f207179
-Node: file\7f208972
-Node: dfn\7f209579
-Node: cite\7f210489
-Node: url\7f210943
-Node: email\7f211507
-Node: Emphasis\7f212319
-Node: emph & strong\7f213219
-Node: Smallcaps\7f214205
-Node: Fonts\7f215532
-Node: Customized Highlighting\7f216620
-Node: Customized Highlighting-Footnotes\7f219434
-Node: Quotations and Examples\7f219654
-Node: Block Enclosing Commands\7f221276
-Node: quotation\7f223301
-Node: example\7f224391
-Node: noindent\7f226446
-Node: Lisp Example\7f227911
-Node: Lisp Example-Footnotes\7f228612
-Node: smallexample & smalllisp\7f228802
-Node: display\7f230827
-Node: format\7f231459
-Node: exdent\7f231920
-Node: flushleft & flushright\7f233000
-Node: cartouche\7f234266
-Node: Lists and Tables\7f235033
-Node: Introducing Lists\7f235709
-Node: itemize\7f237371
-Node: enumerate\7f239518
-Node: Two-column Tables\7f242017
-Node: table\7f242706
-Node: ftable vtable\7f245140
-Node: itemx\7f246241
-Node: Multi-column Tables\7f247252
-Node: Multitable Column Widths\7f247923
-Node: Multitable Rows\7f249377
-Node: Indices\7f251250
-Node: Index Entries\7f252401
-Node: Predefined Indices\7f253534
-Node: Indexing Commands\7f254531
-Node: Combining Indices\7f259072
-Node: syncodeindex\7f260435
-Node: synindex\7f262097
-Node: New Indices\7f262622
-Node: Insertions\7f264448
-Node: Braces Atsigns\7f265632
-Node: Inserting An Atsign\7f266184
-Node: Inserting Braces\7f266458
-Node: Inserting Space\7f266821
-Node: Not Ending a Sentence\7f267325
-Node: Ending a Sentence\7f268679
-Node: Multiple Spaces\7f269808
-Node: dmn\7f271028
-Node: Inserting Accents\7f272236
-Node: Dots Bullets\7f274212
-Node: dots\7f275035
-Node: bullet\7f275559
-Node: TeX and copyright\7f275956
-Node: tex\7f276523
-Node: copyright symbol\7f276939
-Node: pounds\7f277199
-Node: minus\7f277563
-Node: math\7f278485
-Node: Glyphs\7f279214
-Node: Glyphs Summary\7f280327
-Node: result\7f280955
-Node: expansion\7f281440
-Node: Print Glyph\7f282396
-Node: Error Glyph\7f283273
-Node: Equivalence\7f284106
-Node: Point Glyph\7f284794
-Node: Images\7f286351
-Node: Breaks\7f288018
-Node: Break Commands\7f289449
-Node: Line Breaks\7f290290
-Node: - and hyphenation\7f291308
-Node: w\7f292559
-Node: sp\7f293272
-Node: page\7f293681
-Node: group\7f294058
-Node: need\7f295801
-Node: Definition Commands\7f296531
-Node: Def Cmd Template\7f298102
-Node: Optional Arguments\7f301099
-Node: deffnx\7f302687
-Node: Def Cmds in Detail\7f303642
-Node: Functions Commands\7f304752
-Node: Variables Commands\7f307757
-Node: Typed Functions\7f309843
-Node: Typed Variables\7f313385
-Node: Abstract Objects\7f315368
-Node: Data Types\7f320593
-Node: Def Cmd Conventions\7f321848
-Node: Sample Function Definition\7f322411
-Node: Footnotes\7f325295
-Node: Footnotes-Footnotes\7f325682
-Node: Footnote Commands\7f326028
-Node: Footnote Commands-Footnotes\7f327524
-Node: Footnote Styles\7f327642
-Node: Conditionals\7f330228
-Node: Conditional Commands\7f331039
-Node: Conditional Not Commands\7f332532
-Node: Raw Formatter Commands\7f333277
-Node: set clear value\7f335107
-Node: ifset ifclear\7f335908
-Node: value\7f339087
-Node: value Example\7f340499
-Node: Macros\7f342077
-Node: Defining Macros\7f342783
-Node: Invoking Macros\7f343872
-Node: Format/Print Hardcopy\7f344978
-Node: Use TeX\7f346815
-Node: Format with tex/texindex\7f347443
-Node: Format with texi2dvi\7f351086
-Node: Print with lpr\7f351677
-Node: Within Emacs\7f352531
-Node: Texinfo Mode Printing\7f353450
-Node: Compile-Command\7f356860
-Node: Requirements Summary\7f357748
-Node: Preparing for TeX\7f359061
-Node: Overfull hboxes\7f361850
-Node: smallbook\7f363409
-Node: A4 Paper\7f364929
-Node: Cropmarks and Magnification\7f366155
-Node: Create an Info File\7f368097
-Node: makeinfo advantages\7f369400
-Node: Invoking makeinfo\7f370316
-Node: makeinfo options\7f371004
-Node: Pointer Validation\7f376493
-Node: makeinfo in Emacs\7f377837
-Node: texinfo-format commands\7f380395
-Node: Batch Formatting\7f381667
-Node: Tag and Split Files\7f382883
-Node: Install an Info File\7f386237
-Node: Directory file\7f387055
-Node: New Info File\7f388923
-Node: Other Info Directories\7f389984
-Node: Installing Dir Entries\7f393199
-Node: Invoking install-info\7f395192
-Node: Command List\7f397607
-Node: Tips\7f435577
-Node: Sample Texinfo File\7f446987
-Node: Sample Permissions\7f449105
-Node: Inserting Permissions\7f450148
-Node: ifinfo Permissions\7f452454
-Node: Titlepage Permissions\7f454075
-Node: Include Files\7f455337
-Node: Using Include Files\7f456424
-Node: texinfo-multiple-files-update\7f458379
-Node: Include File Requirements\7f460740
-Node: Sample Include File\7f461985
-Node: Include Files Evolution\7f463504
-Node: Headings\7f465475
-Node: Headings Introduced\7f466112
-Node: Heading Format\7f468000
-Node: Heading Choice\7f470452
-Node: Custom Headings\7f471824
-Node: Catching Mistakes\7f476152
-Node: makeinfo Preferred\7f477441
-Node: Debugging with Info\7f478346
-Node: Debugging with TeX\7f481692
-Node: Using texinfo-show-structure\7f485973
-Node: Using occur\7f489072
-Node: Running Info-Validate\7f490609
-Node: Using Info-validate\7f491670
-Node: Unsplit\7f493512
-Node: Tagifying\7f494558
-Node: Splitting\7f495410
-Node: Refilling Paragraphs\7f497026
-Node: Refilling Paragraphs-Footnotes\7f498679
-Node: Command Syntax\7f498930
-Node: Obtaining TeX\7f501887
-Node: Command and Variable Index\7f503999
-Node: Concept Index\7f519851
+Node: Top\7f1486
+Node: Copying\7f23801
+Node: Overview\7f25806
+Node: Overview-Footnotes\7f27235
+Ref: Overview-Footnote-1\7f27299
+Node: Using Texinfo\7f27771
+Node: Info Files\7f30254
+Node: Info Files-Footnotes\7f34290
+Ref: Info Files-Footnote-1\7f34358
+Node: Printed Books\7f34537
+Node: Printed Books-Footnotes\7f37209
+Ref: Printed Books-Footnote-1\7f37283
+Node: Formatting Commands\7f37493
+Node: Formatting Commands-Footnotes\7f40320
+Ref: Formatting Commands-Footnote-1\7f40406
+Node: Conventions\7f41022
+Node: Comments\7f43584
+Node: Minimum\7f45007
+Node: Six Parts\7f47193
+Node: Short Sample\7f48705
+Node: Acknowledgements\7f52841
+Node: Texinfo Mode\7f53676
+Node: Texinfo Mode Overview\7f55048
+Node: Emacs Editing\7f55824
+Node: Inserting\7f57954
+Node: Showing the Structure\7f62235
+Node: Updating Nodes and Menus\7f64762
+Node: Updating Commands\7f65835
+Node: Updating Requirements\7f71896
+Node: Other Updating Commands\7f74193
+Node: Info Formatting\7f77461
+Node: Printing\7f78719
+Node: Texinfo Mode Summary\7f81064
+Node: Beginning a File\7f85818
+Node: Four Parts\7f86709
+Node: Sample Beginning\7f88179
+Node: Header\7f89799
+Node: First Line\7f91151
+Node: Start of Header\7f92140
+Node: setfilename\7f92853
+Node: settitle\7f94789
+Node: setchapternewpage\7f96679
+Node: paragraphindent\7f99440
+Node: End of Header\7f100922
+Node: Info Summary and Permissions\7f101761
+Node: Titlepage & Copyright Page\7f102780
+Node: titlepage\7f104386
+Node: titlepage-Footnotes\7f106668
+Ref: titlepage-Footnote-1\7f106734
+Node: titlefont center sp\7f107008
+Node: title subtitle author\7f108234
+Node: Copyright & Permissions\7f110506
+Node: end titlepage\7f112507
+Node: headings on off\7f114213
+Node: The Top Node\7f116258
+Node: Title of Top Node\7f117413
+Node: Master Menu Parts\7f118666
+Node: Software Copying Permissions\7f120903
+Node: Ending a File\7f122071
+Node: Printing Indices & Menus\7f122919
+Node: Contents\7f125228
+Node: File End\7f127568
+Node: Structuring\7f128241
+Node: Tree Structuring\7f129898
+Node: Structuring Command Types\7f131341
+Node: makeinfo top\7f133668
+Node: chapter\7f134201
+Node: unnumbered & appendix\7f135225
+Node: majorheading & chapheading\7f136064
+Node: section\7f136885
+Node: unnumberedsec appendixsec heading\7f137649
+Node: subsection\7f138638
+Node: unnumberedsubsec appendixsubsec subheading\7f139210
+Node: subsubsection\7f140163
+Node: Raise/lower sections\7f141713
+Node: Nodes\7f143848
+Node: Two Paths\7f144785
+Node: Node Menu Illustration\7f146071
+Node: node\7f149766
+Node: Node Names\7f152462
+Node: Writing a Node\7f153538
+Node: Node Line Tips\7f155556
+Node: Node Line Requirements\7f156350
+Node: First Node\7f157951
+Node: makeinfo top command\7f159395
+Node: Top Node Summary\7f160574
+Node: makeinfo Pointer Creation\7f162024
+Node: Menus\7f163271
+Node: Menus-Footnotes\7f164210
+Ref: Menus-Footnote-1\7f164268
+Node: Menu Location\7f164561
+Node: Writing a Menu\7f166238
+Node: Menu Parts\7f167204
+Node: Less Cluttered Menu Entry\7f168362
+Node: Menu Example\7f168987
+Node: Other Info Files\7f170508
+Node: Cross References\7f172364
+Node: References\7f173321
+Node: Cross Reference Commands\7f175068
+Node: Cross Reference Parts\7f176127
+Node: xref\7f178963
+Node: Reference Syntax\7f179762
+Node: One Argument\7f181416
+Node: Two Arguments\7f182428
+Node: Three Arguments\7f183543
+Node: Four and Five Arguments\7f185934
+Node: Top Node Naming\7f188346
+Node: ref\7f189356
+Node: pxref\7f190746
+Node: inforef\7f193128
+Node: uref\7f194421
+Node: Marking Text\7f195420
+Node: Indicating\7f196044
+Node: Useful Highlighting\7f197949
+Node: code\7f199338
+Node: kbd\7f202376
+Node: key\7f204246
+Node: samp\7f205579
+Node: var\7f207166
+Node: file\7f208959
+Node: dfn\7f209566
+Node: cite\7f210476
+Node: url\7f210930
+Node: email\7f211494
+Node: Emphasis\7f212306
+Node: emph & strong\7f213206
+Node: Smallcaps\7f214192
+Node: Fonts\7f215519
+Node: Customized Highlighting\7f216607
+Node: Customized Highlighting-Footnotes\7f219422
+Ref: Customized Highlighting-Footnote-1\7f219516
+Node: Quotations and Examples\7f219642
+Node: Block Enclosing Commands\7f221264
+Node: quotation\7f223289
+Node: example\7f224379
+Node: noindent\7f226434
+Node: Lisp Example\7f227898
+Node: Lisp Example-Footnotes\7f228600
+Ref: Lisp Example-Footnote-1\7f228672
+Node: smallexample & smalllisp\7f228790
+Node: display\7f230815
+Node: format\7f231447
+Node: exdent\7f231908
+Node: flushleft & flushright\7f232988
+Node: cartouche\7f234254
+Node: Lists and Tables\7f235021
+Node: Introducing Lists\7f235697
+Node: itemize\7f237362
+Node: enumerate\7f239509
+Node: Two-column Tables\7f242014
+Node: table\7f242703
+Node: ftable vtable\7f245136
+Node: itemx\7f246237
+Node: Multi-column Tables\7f247248
+Node: Multitable Column Widths\7f247919
+Node: Multitable Rows\7f249373
+Node: Indices\7f251150
+Node: Index Entries\7f252300
+Node: Predefined Indices\7f253433
+Node: Indexing Commands\7f254430
+Node: Combining Indices\7f258970
+Node: syncodeindex\7f260333
+Node: synindex\7f261995
+Node: New Indices\7f262520
+Node: Insertions\7f264345
+Node: Braces Atsigns\7f265529
+Node: Inserting An Atsign\7f266081
+Node: Inserting Braces\7f266355
+Node: Inserting Space\7f266718
+Node: Not Ending a Sentence\7f267222
+Node: Ending a Sentence\7f268576
+Node: Multiple Spaces\7f269705
+Node: dmn\7f270924
+Node: Inserting Accents\7f272131
+Node: Dots Bullets\7f273888
+Node: dots\7f274710
+Node: bullet\7f275234
+Node: TeX and copyright\7f275631
+Node: tex\7f276198
+Node: copyright symbol\7f276614
+Node: pounds\7f276874
+Node: minus\7f277238
+Node: math\7f278160
+Node: Glyphs\7f278888
+Node: Glyphs Summary\7f280001
+Node: result\7f280629
+Node: expansion\7f281114
+Node: Print Glyph\7f282070
+Node: Error Glyph\7f282947
+Node: Equivalence\7f283780
+Node: Point Glyph\7f284468
+Node: Images\7f286025
+Node: Breaks\7f287692
+Node: Break Commands\7f289123
+Node: Line Breaks\7f289964
+Node: - and hyphenation\7f290982
+Node: w\7f292232
+Node: sp\7f292945
+Node: page\7f293354
+Node: group\7f293731
+Node: need\7f295474
+Node: Definition Commands\7f296204
+Node: Def Cmd Template\7f297775
+Node: Optional Arguments\7f300772
+Node: deffnx\7f302360
+Node: Def Cmds in Detail\7f303315
+Node: Functions Commands\7f304425
+Node: Variables Commands\7f307430
+Node: Typed Functions\7f309516
+Node: Typed Variables\7f313058
+Node: Abstract Objects\7f315041
+Node: Data Types\7f320266
+Node: Def Cmd Conventions\7f321521
+Node: Sample Function Definition\7f322084
+Node: Footnotes\7f324968
+Node: Footnotes-Footnotes\7f325356
+Ref: Footnotes-Footnote-1\7f325422
+Node: Footnote Commands\7f325702
+Node: Footnote Commands-Footnotes\7f327199
+Ref: Footnote Commands-Footnote-1\7f327281
+Node: Footnote Styles\7f327317
+Node: Conditionals\7f329903
+Node: Conditional Commands\7f330714
+Node: Conditional Not Commands\7f332207
+Node: Raw Formatter Commands\7f332952
+Node: set clear value\7f334782
+Node: ifset ifclear\7f335583
+Node: value\7f338762
+Node: value Example\7f340174
+Node: Macros\7f341752
+Node: Defining Macros\7f342457
+Node: Invoking Macros\7f343546
+Node: Format/Print Hardcopy\7f344652
+Node: Use TeX\7f346489
+Node: Format with tex/texindex\7f347117
+Node: Format with texi2dvi\7f350758
+Node: Print with lpr\7f351349
+Node: Within Emacs\7f352203
+Node: Texinfo Mode Printing\7f353122
+Node: Compile-Command\7f356532
+Node: Requirements Summary\7f357420
+Node: Preparing for TeX\7f358733
+Node: Overfull hboxes\7f361520
+Node: smallbook\7f363079
+Node: A4 Paper\7f364597
+Node: Cropmarks and Magnification\7f365822
+Node: Create an Info File\7f367763
+Node: makeinfo advantages\7f369066
+Node: Invoking makeinfo\7f369982
+Node: makeinfo options\7f370670
+Node: Pointer Validation\7f376154
+Node: makeinfo in Emacs\7f377498
+Node: texinfo-format commands\7f380056
+Node: Batch Formatting\7f381327
+Node: Tag and Split Files\7f382543
+Node: Install an Info File\7f385897
+Node: Directory file\7f386715
+Node: New Info File\7f388583
+Node: Other Info Directories\7f389644
+Node: Installing Dir Entries\7f392859
+Node: Invoking install-info\7f394852
+Node: Command List\7f397267
+Node: Tips\7f435237
+Node: Sample Texinfo File\7f446647
+Node: Sample Permissions\7f448766
+Node: Inserting Permissions\7f449809
+Node: ifinfo Permissions\7f452115
+Node: Titlepage Permissions\7f453736
+Node: Include Files\7f454998
+Node: Using Include Files\7f456085
+Node: texinfo-multiple-files-update\7f458040
+Node: Include File Requirements\7f460401
+Node: Sample Include File\7f461646
+Node: Include Files Evolution\7f463165
+Node: Headings\7f465136
+Node: Headings Introduced\7f465773
+Node: Heading Format\7f467661
+Node: Heading Choice\7f470113
+Node: Custom Headings\7f471485
+Node: Catching Mistakes\7f475813
+Node: makeinfo Preferred\7f477102
+Node: Debugging with Info\7f478007
+Node: Debugging with TeX\7f481353
+Node: Using texinfo-show-structure\7f485633
+Node: Using occur\7f488732
+Node: Running Info-Validate\7f490269
+Node: Using Info-validate\7f491330
+Node: Unsplit\7f493172
+Node: Tagifying\7f494218
+Node: Splitting\7f495070
+Node: Refilling Paragraphs\7f496686
+Node: Refilling Paragraphs-Footnotes\7f498340
+Ref: Refilling Paragraphs-Footnote-1\7f498428
+Node: Command Syntax\7f498591
+Node: Obtaining TeX\7f501548
+Node: Command and Variable Index\7f503661
+Node: Concept Index\7f519513
\1f
End Tag Table
-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
* Concept Index:: A menu covering many topics.
- -- The Detailed Node Listing --
+ --- The Detailed Node Listing ---
Overview of Texinfo
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
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
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,
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
-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
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
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
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
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.
\1f
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.)
-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
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
********************
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.
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.
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.
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/'.
\1f
* @ (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.
* 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.
* 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.
* 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.
* 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.
-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
* !: 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.
* @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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
-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
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::.
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.
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
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
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.
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
`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.)
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.
-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
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 *'.
\1f
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.)
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
@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
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
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.
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
-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
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.)
--------------
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
*****
"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.
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.
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
========
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:
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'.
-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
`@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
---------------------------------
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,
`@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
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::).
\1f
File: texinfo.info, Node: Lisp Example, Next: smallexample & smalllisp, Prev: noindent, Up: Quotations and Examples
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.
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.
* Two-column tables with highlighting.
+
Here is an enumerated list with the same items:
1. Itemized lists with and without bullets.
3. Two-column tables with highlighting.
+
And here is a two-column table with the same items and their @-commands:
`@itemize'
2. Proximate causes.
+
+
Here is an example with an argument of `3':
+
@enumerate 3
@item
Predisposing causes.
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
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
-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
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.
\1f
File: texinfo.info, Node: Indices, Next: Insertions, Prev: Lists and Tables, Up: Top
====================
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,
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:
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::).
\1f
File: texinfo.info, Node: Insertions, Next: Breaks, Prev: Indices, Up: Top
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.
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::.
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} <o hacek or check accent
+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} o< hacek or check accent
This table lists the Texinfo commands for inserting other characters
commonly used in languages other than English.
-@exclamdown{} ! upside-down !
-@questiondown{} ? upside-down ?
-@aa{},@AA{} aa,AA A,a with circle
-@ae{},@AE{} ae,AE ae,AE ligatures
-@dotless{i} i dotless i
-@dotless{j} j dotless j
-@l{},@L{} l/,L/ suppressed-L,l
-@o{},@O{} o/,O/ O,o with slash
-@oe{},@OE{} oe,OE OE,oe ligatures
-@ss{} ss es-zet or sharp S
+@exclamdown{} ! upside-down !
+@questiondown{} ? upside-down ?
+@aa{},@AA{} aa,AA A,a with circle
+@ae{},@AE{} ae,AE ae,AE ligatures
+@dotless{i} i dotless i
+@dotless{j} j dotless j
+@l{},@L{} /l,/L suppressed-L,l
+@o{},@O{} /o,/O O,o with slash
+@oe{},@OE{} oe,OE OE,oe ligatures
+@ss{} ss es-zet or sharp S
\1f
File: texinfo.info, Node: Dots Bullets, Next: TeX and copyright, Prev: Inserting Accents, Up: Insertions
Thus, the `@math' command has no effect on the Info output.
For complex mathematical expressions, you can also use TeX directly
-(*note Raw Formatter Commands::.). When you use TeX directly, remember
+(*note Raw Formatter Commands::). When you use TeX directly, remember
to write the mathematical expression between one or two `$'
(dollar-signs) as appropriate.
You can use the `@point{}' command to show the location of point in
the text in the buffer. (The symbol for point, of course, is not part
-of the text in the buffer; it indicates the place *between* two
+of the text in the buffer; it indicates the place _between_ two
characters where point is located.)
The `@point{}' command is displayed as `-!-' in Info and as a small
millimeter (10mm = 1cm)
dd
- did^ot point (1157dd = 1238pt)
+ dido^t point (1157dd = 1238pt)
cc
cicero (1cc = 12dd)
Insert a discretionary hyphen, i.e., a place where TeX can (but
does not have to) hyphenate. This is especially useful when you
notice an overfull hbox is due to TeX missing a hyphenation (*note
- Overfull hboxes::.). TeX will not insert any hyphenation points
- in a word containing `@-'.
+ Overfull hboxes::). TeX will not insert any hyphenation points in
+ a word containing `@-'.
`@hyphenation{HY-PHEN-A-TED WORDS}'
Tell TeX how to hyphenate HY-PHEN-A-TED WORDS. As shown, you put
-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
produces
- - Command: forward-word COUNT
+ - Command: forward-word count
This function moves point forward COUNT words (or backward if
COUNT is negative). ...
produces
- - Function: buffer-end FLAG
+ - Function: buffer-end flag
This function returns `(point-min)' if FLAG is less than 1,
`(point-max)' otherwise. ...
Here is a definition from *Note Calling Functions: (lispref)Calling
Functions.
- - 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.
*********
A "footnote" is for a reference that documents or elucidates the
-primary text.(1) (*note Footnotes-Footnotes::)
+primary text.(1) (*note Footnotes-Footnote-1::)
* Menu:
formatters the footnote mark might end up starting up a line.
For example, this clause is followed by a sample footnote(1) (*note
-Footnote Commands-Footnotes::); in the Texinfo source, it looks like
+Footnote Commands-Footnote-1::); in the Texinfo source, it looks like
this:
...a sample footnote@footnote{Here is the sample
Conditional Not Commands
========================
- You can specify text to be included in any output format *other* than
+ You can specify text to be included in any output format _other_ than
some given one with the `@ifnot...' commands:
@ifnothtml ... @end ifnothtml
@ifnotinfo ... @end ifnotinfo
When a FLAG is set, the Texinfo formatting commands format text
between subsequent pairs of `@ifset FLAG' and `@end ifset' commands.
-When the FLAG is cleared, the Texinfo formatting commands do *not*
+When the FLAG is cleared, the Texinfo formatting commands do _not_
format the text.
Use the `@set FLAG' command to turn on, or "set", a FLAG; a "flag"
Write the command on a line of its own.
- When FLAG is cleared, the Texinfo formatting commands do *not* format
+ When FLAG is cleared, the Texinfo formatting commands do _not_ format
the text between `@ifset FLAG' and `@end ifset'; that text is ignored
and does not appear in either printed or Info output.
If a flag is cleared with an `@clear FLAG' command, then the
formatting commands format text between subsequent pairs of `@ifclear'
and `@end ifclear' commands. But if the flag is set with `@set FLAG',
-then the formatting commands do *not* format text between an `@ifclear'
+then the formatting commands do _not_ format text between an `@ifclear'
and an `@end ifclear' command; rather, they ignore that text. An
`@ifclear' command looks like this:
macro can have any number of "parameters"--text you supply each time
you use the macro. (This has nothing to do with the `@defmac' command,
which is for documenting macros in the subject of the manual; *note Def
-Cmd Template::..)
+Cmd Template::.)
* Menu:
-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
This command will run `texindex' on all the unsorted index files,
including any that you have defined yourself using `@defindex' or
-`@defcodeindex'. (You may execute `texindex foo.??' even if there are
+`@defcodeindex'. (You may execute `texindex foo.??' even if there are
similarly named files with two letter extensions that are not index
files, such as `foo.el'. The `texindex' command reports but otherwise
ignores such files.)
For each file specified, `texindex' generates a sorted index file
whose name is made by appending `s' to the input file name. The
`@printindex' command knows to look for a file of that name (*note
-Printing Indices & Menus::.). `texindex' does not alter the raw index
+Printing Indices & Menus::). `texindex' does not alter the raw index
output file.
After you have sorted the indices, you need to rerun the `tex'
Also, you should install `epsf.tex' in the same place as
`texinfo.tex', if it is not already installed from another
distribution. This file is needed to support the `@image' command
-(*note Images::.).
+(*note Images::).
Optionally, you may create an additional `texinfo.cnf', and install
it as well. This file is read by TeX at the `@setfilename' command
like there according to local site-wide conventions, and they will be
read by TeX when processing any Texinfo document. For example, if
`texinfo.cnf' contains the a single line `@afourpaper' (*note A4
-Paper::.), then all Texinfo documents will be processed with that page
+Paper::), then all Texinfo documents will be processed with that page
size in effect. If you have nothing to put in `texinfo.cnf', you do
not need to create it.
If you write the `@smallbook' command between the start-of-header and
end-of-header lines, the Texinfo mode TeX region formatting command,
`texinfo-tex-region', will format the region in "small" book size
-(*note Start of Header::.).
+(*note Start of Header::).
The Free Software Foundation distributes printed copies of `The GNU
Emacs Manual' and other manuals in the "small" book size. *Note
Alternatively, to avoid embedding this physical paper size in your
document, use `texi2dvi' to format your document (*note Format with
-texi2dvi::.), and supply `-t @smallbook' as an argument. Then other
+texi2dvi::), and supply `-t @smallbook' as an argument. Then other
people do not have to change the document source file to format it
differently.
Alternatively, to avoid embedding this physical paper size in your
document, use `texi2dvi' to format your document (*note Format with
-texi2dvi::.), and supply `-t @afourpaper' as an argument. Then other
+texi2dvi::), and supply `-t @afourpaper' as an argument. Then other
people do not have to change the document source file to format it
differently.
You can attempt to direct TeX to typeset pages larger or smaller than
usual with the `\mag' TeX command. Everything that is typeset is
scaled proportionally larger or smaller. (`\mag' stands for
-"magnification".) This is *not* a Texinfo @-command, but is a plain
+"magnification".) This is _not_ a Texinfo @-command, but is a plain
TeX command that is prefixed with a backslash. You have to write this
-command between `@tex' and `@end tex' (*note Raw Formatter Commands::.).
+command between `@tex' and `@end tex' (*note Raw Formatter Commands::).
Follow the `\mag' command with an `=' and then a number that is 1000
times the magnification you desire. For example, to print pages at 1.2
`-D VAR'
Cause the variable VAR to be defined. This is equivalent to `@set
- VAR' in the Texinfo file (*note set clear value::.).
+ VAR' in the Texinfo file (*note set clear value::).
`--error-limit=LIMIT'
Set the maximum number of errors that `makeinfo' will report
Set the footnote style to STYLE, either `end' for the end node
style (the default) or `separate' for the separate node style.
The value set by this option overrides the value set in a Texinfo
- file by an `@footnotestyle' command (*note Footnotes::.). When the
+ file by an `@footnotestyle' command (*note Footnotes::). When the
footnote style is `separate', `makeinfo' makes a new node
containing the footnotes found in the current node. When the
footnote style is `end', `makeinfo' places the footnote references
Pointer Validation::.
`--no-warn'
- Suppress warning messages (but *not* error messages). You might
+ Suppress warning messages (but _not_ error messages). You might
want this if the file you are creating has examples of Texinfo
cross references within it, and the nodes that are referenced do
not actually exist.
`-o FILE'
Specify that the output should be directed to FILE and not to the
file name specified in the `@setfilename' command found in the
- Texinfo source (*note setfilename::.). If FILE is `-', output
- goes to standard output and `--no-split' is implied.
+ Texinfo source (*note setfilename::). If FILE is `-', output goes
+ to standard output and `--no-split' is implied.
`-P DIR'
Prepend `dir' to the directory search list for `@include'. See
`--paragraph-indent=INDENT'
Set the paragraph indentation style to INDENT. The value set by
this option overrides the value set in a Texinfo file by an
- `@paragraphindent' command (*note paragraphindent::.). The value
+ `@paragraphindent' command (*note paragraphindent::). The value
of INDENT is interpreted as follows:
`asis'
`-U VAR'
Cause VAR to be undefined. This is equivalent to `@clear VAR' in
- the Texinfo file (*note set clear value::.).
+ the Texinfo file (*note set clear value::).
`--verbose'
Cause `makeinfo' to display messages saying what it is doing.
you with further help in finding formatting errors. These procedures
are described in an appendix; see *Note Catching Mistakes::. However,
the `makeinfo' program is often faster and provides better error
-checking (*note makeinfo in Emacs::.).
+checking (*note makeinfo in Emacs::).
\1f
File: texinfo.info, Node: Batch Formatting, Next: Tag and Split Files, Prev: texinfo-format commands, Up: Create an Info File
-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
brackets, [ ], indicate optional arguments; an ellipsis, `...',
indicates repeated text.
+
`@WHITESPACE'
An `@' followed by a space, tab, or newline produces a normal,
stretchable, interword space. *Note Multiple Spaces::.
`@"'
`@''
Generate an umlaut or acute accent, respectively, over the next
- character, as in "o and 'o. *Note Inserting Accents::.
+ character, as in o" and o'. *Note Inserting Accents::.
`@*'
Force a line break. Do not end a paragraph that uses `@*' with an
*Note Not Ending a Sentence::.
`@='
- Generate a macro (bar) accent over the next character, as in =o.
+ Generate a macro (bar) accent over the next character, as in o=.
*Note Inserting Accents::.
`@?'
`@^'
`@`'
Generate a circumflex (hat) or grave accent, respectively, over
- the next character, as in ^o. *Note Inserting Accents::.
+ the next character, as in o^. *Note Inserting Accents::.
`@{'
Stands for a left brace, `{'. *Note Inserting @ and braces:
*Note Inserting @ and braces: Braces Atsigns.
`@='
- Generate a tilde accent over the next character, as in ~N. *Note
+ Generate a tilde accent over the next character, as in N~. *Note
Inserting Accents::.
`@AA{}'
space before DIMENSION. No effect in Info. *Note `@dmn': dmn.
`@dotaccent{C}'
- Generate a dot accent over the character C, as in .oo. *Note
+ Generate a dot accent over the character C, as in oo.. *Note
Inserting Accents::.
`@dots{}'
Indicate an electronic mail address. *Note `@email': email.
`@emph{TEXT}'
- Highlight TEXT; text is displayed in *italics* in printed output,
+ Highlight TEXT; text is displayed in _italics_ in printed output,
and surrounded by asterisks in Info. *Note Emphasizing Text:
Emphasis.
`@end group'. Not relevant to Info. *Note `@group': group.
`@H{C}'
- Generate the long Hungarian umlaut accent over C, as in ''o.
+ Generate the long Hungarian umlaut accent over C, as in o''.
`@heading TITLE'
Print an unnumbered section-like heading in the text, but not in
`@L{}'
`@l{}'
Generate the uppercase and lowercase Polish suppressed-L letters,
- respectively: L/, l/.
+ respectively: /L, /l.
`@lisp'
Begin an example of Lisp code. Indent text, do not fill, and
`@O{}'
`@o{}'
Generate the uppercase and lowercase O-with-slash letters,
- respectively: O/, o/.
+ respectively: /O, /o.
`@oddfooting [LEFT] @| [CENTER] @| [RIGHT]'
`@oddheading [LEFT] @| [CENTER] @| [RIGHT]'
glyph: `=>'. *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}'
`@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
`@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'
Web. *Note `@url': url.
`@v{C}'
- Generate check accent over the character C, as in <o. *Note
+ Generate check accent over the character C, as in o<. *Note
Inserting Accents::.
`@value{FLAG}'
-This is Info file ../info/widget.info, produced by Makeinfo version
-1.68 from the input file widget.texi.
+This is ../info/widget.info, produced by makeinfo version 3.12s from
+widget.texi.
INFO-DIR-SECTION XEmacs Editor
START-INFO-DIR-ENTRY
There are several different kind of buttons, all of which are
present in the example:
-*The Option Field Tags.*
+_The Option Field Tags._
When you invoke one of these buttons, you will be asked to choose
between a number of different options. This is how you edit an
option field. Option fields are created by the `menu-choice'
widget. In the example, `Choose' is an option field tag.
-*The `[INS]' and `[DEL]' buttons.*
+_The `[INS]' and `[DEL]' buttons._
Activating these will insert or delete elements from a editable
list. The list is created by the `editable-list' widget.
-*Embedded Buttons.*
+_Embedded Buttons._
The `_other work_' is an example of an embedded button. Embedded
buttons are not associated with a fields, but can serve any
purpose, such as implementing hypertext references. They are
usually created by the `link' widget.
-*The `[ ]' and `[X]' buttons.*
+_The `[ ]' and `[X]' buttons._
Activating one of these will convert it to the other. This is
useful for implementing multiple-choice fields. You can create it
wit
-*The `( )' and `(*)' buttons.*
+_The `( )' and `(*)' buttons._
Only one radio button in a `radio-button-choice' widget can be
selected at any time. When you invoke one of the unselected radio
buttons, it will be selected and the previous selected radio
button will become unselected.
-*The `[Apply Form]' `[Reset Form]' buttons.*
+_The `[Apply Form]' `[Reset Form]' buttons._
These are explicit buttons made with the `push-button' widget.
The main difference from the `link' widget is that the buttons are
will be displayed as GUI buttons when possible. enough.
buffer, plus you will have these additional commands:
`<TAB>'
- - Command: widget-forward &optional COUNT
+ - Command: widget-forward &optional count
Move point COUNT buttons or editing fields forward.
`<M-TAB>'
- - Command: widget-backward &optional COUNT
+ - Command: widget-backward &optional count
Move point COUNT buttons or editing fields backward.
\1f
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
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'
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'
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.
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
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
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
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'
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'
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'
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.
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.
symbol, it should pop up a menu.
+
\1f
Tag Table:
-Node: Top\7f227
-Node: Introduction\7f607
-Node: User Interface\7f4090
-Node: Programming Example\7f8985
-Node: Setting Up the Buffer\7f12302
-Node: Basic Types\7f14019
-Node: link\7f20064
-Node: url-link\7f20578
-Node: info-link\7f20890
-Node: push-button\7f21181
-Node: editable-field\7f21754
-Node: text\7f23093
-Node: menu-choice\7f23391
-Node: radio-button-choice\7f24256
-Node: item\7f25835
-Node: choice-item\7f26223
-Node: toggle\7f26721
-Node: checkbox\7f27446
-Node: checklist\7f27752
-Node: editable-list\7f29196
-Node: group\7f30378
-Node: Sexp Types\7f30665
-Node: constants\7f30978
-Node: generic\7f32057
-Node: atoms\7f32590
-Node: composite\7f34537
-Node: Widget Properties\7f37003
-Node: Defining New Widgets\7f40066
-Node: Widget Browser\7f45366
-Node: Widget Minor Mode\7f46224
-Node: Utilities\7f46781
-Node: Widget Wishlist\7f47262
+Node: Top\7f203
+Node: Introduction\7f583
+Node: User Interface\7f4066
+Node: Programming Example\7f8961
+Node: Setting Up the Buffer\7f12278
+Node: Basic Types\7f13995
+Node: link\7f20040
+Node: url-link\7f20554
+Node: info-link\7f20866
+Node: push-button\7f21157
+Node: editable-field\7f21730
+Node: text\7f23069
+Node: menu-choice\7f23367
+Node: radio-button-choice\7f24232
+Node: item\7f25811
+Node: choice-item\7f26199
+Node: toggle\7f26697
+Node: checkbox\7f27422
+Node: checklist\7f27728
+Node: editable-list\7f29172
+Node: group\7f30354
+Node: Sexp Types\7f30641
+Node: constants\7f30954
+Node: generic\7f32033
+Node: atoms\7f32566
+Node: composite\7f34513
+Node: Widget Properties\7f36979
+Node: Defining New Widgets\7f40042
+Node: Widget Browser\7f45342
+Node: Widget Minor Mode\7f46200
+Node: Utilities\7f46757
+Node: Widget Wishlist\7f47238
\1f
End Tag Table
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f221
-Node: Introduction\7f15614
-Node: Q1.0.1\7f19134
-Node: Q1.0.2\7f19670
-Node: Q1.0.3\7f20106
-Node: Q1.0.4\7f20364
-Node: Q1.0.5\7f21796
-Node: Q1.0.6\7f22485
-Node: Q1.0.7\7f23616
-Node: Q1.0.8\7f24015
-Node: Q1.0.9\7f24211
-Node: Q1.0.10\7f24489
-Node: Q1.0.11\7f25938
-Node: Q1.0.12\7f26395
-Node: Q1.0.13\7f26763
-Node: Q1.0.14\7f26998
-Node: Q1.1.1\7f27542
-Node: Q1.1.2\7f28737
-Node: Q1.1.3\7f29112
-Node: Q1.2.1\7f30060
-Node: Q1.2.2\7f31120
-Node: Q1.2.3\7f31550
-Node: Q1.3.1\7f32501
-Node: Q1.3.2\7f36419
-Node: Q1.3.3\7f37128
-Node: Q1.3.4\7f37370
-Node: Q1.3.5\7f38134
-Node: Q1.3.6\7f40549
-Node: Q1.3.7\7f42044
-Node: Q1.4.1\7f42979
-Node: Q1.4.2\7f43849
-Node: Q1.4.3\7f44190
-Node: Q1.4.4\7f44832
-Node: Q1.4.5\7f46372
-Node: Q1.4.6\7f46676
-Node: Q1.4.7\7f47684
-Node: Installation\7f48809
-Node: Q2.0.1\7f51217
-Node: Q2.0.2\7f52090
-Node: Q2.0.3\7f59300
-Node: Q2.0.4\7f60598
-Node: Q2.0.5\7f61187
-Node: Q2.0.6\7f61555
-Node: Q2.0.7\7f61936
-Node: Q2.0.8\7f62317
-Node: Q2.0.9\7f63892
-Node: Q2.0.10\7f65330
-Node: Q2.0.11\7f66174
-Node: Q2.0.12\7f67115
-Node: Q2.0.13\7f68638
-Node: Q2.0.14\7f69296
-Node: Q2.1.1\7f69864
-Node: Q2.1.2\7f72606
-Node: Q2.1.3\7f73783
-Node: Q2.1.4\7f75076
-Node: Q2.1.5\7f75875
-Node: Q2.1.6\7f76237
-Node: Q2.1.7\7f76714
-Node: Q2.1.8\7f77067
-Node: Q2.1.9\7f78583
-Node: Q2.1.10\7f79005
-Node: Q2.1.11\7f79762
-Node: Q2.1.12\7f80627
-Node: Q2.1.13\7f81582
-Node: Q2.1.14\7f82613
-Node: Q2.1.15\7f83721
-Node: Q2.1.16\7f89678
-Node: Q2.1.17\7f90356
-Node: Q2.1.18\7f90953
-Node: Q2.1.19\7f92750
-Node: Q2.1.20\7f93280
-Node: Q2.1.21\7f93662
-Node: Q2.1.22\7f93952
-Node: Q2.1.23\7f95249
-Node: Customization\7f95901
-Node: Q3.0.1\7f100795
-Node: Q3.0.2\7f101501
-Node: Q3.0.3\7f102065
-Node: Q3.0.4\7f102482
-Node: Q3.0.5\7f103315
-Node: Q3.0.6\7f104096
-Node: Q3.0.7\7f104676
-Node: Q3.0.8\7f105340
-Node: Q3.0.9\7f106186
-Node: Q3.1.1\7f106747
-Node: Q3.1.2\7f107484
-Node: Q3.1.3\7f107915
-Node: Q3.1.4\7f108500
-Node: Q3.1.5\7f109036
-Node: Q3.1.6\7f109420
-Node: Q3.1.7\7f110101
-Node: Q3.1.8\7f112325
-Node: Q3.2.1\7f112864
-Node: Q3.2.2\7f114272
-Node: Q3.2.3\7f115071
-Node: Q3.2.4\7f115673
-Node: Q3.2.5\7f116707
-Node: Q3.2.6\7f117174
-Node: Q3.3.1\7f118136
-Node: Q3.3.2\7f118529
-Node: Q3.3.3\7f119160
-Node: Q3.3.4\7f119541
-Node: Q3.3.5\7f120635
-Node: Q3.4.1\7f122129
-Node: Q3.4.2\7f122772
-Node: Q3.5.1\7f123284
-Node: Q3.5.2\7f124739
-Node: Q3.5.3\7f125157
-Node: Q3.5.4\7f125998
-Node: Q3.5.5\7f126830
-Node: Q3.5.6\7f127970
-Node: Q3.5.7\7f128960
-Node: Q3.5.8\7f130312
-Node: Q3.5.9\7f131059
-Node: Q3.5.10\7f131839
-Node: Q3.5.11\7f132472
-Node: Q3.6.1\7f133025
-Node: Q3.6.2\7f133765
-Node: Q3.6.3\7f134193
-Node: Q3.7.1\7f134693
-Node: Q3.7.2\7f135581
-Node: Q3.7.3\7f136240
-Node: Q3.7.4\7f136662
-Node: Q3.7.5\7f137005
-Node: Q3.7.6\7f137473
-Node: Q3.7.7\7f138188
-Node: Q3.7.8\7f139208
-Node: Q3.8.1\7f139627
-Node: Q3.8.2\7f140087
-Node: Q3.8.3\7f140550
-Node: Q3.8.4\7f141156
-Node: Q3.8.5\7f141875
-Node: Q3.9.1\7f142660
-Node: Q3.9.2\7f143600
-Node: Q3.9.3\7f144198
-Node: Q3.9.4\7f144860
-Node: Q3.10.1\7f145739
-Node: Q3.10.2\7f146557
-Node: Q3.10.3\7f147338
-Node: Q3.10.4\7f148066
-Node: Q3.10.5\7f148449
-Node: Subsystems\7f149459
-Node: Q4.0.1\7f151874
-Node: Q4.0.2\7f152399
-Node: Q4.0.3\7f152957
-Node: Q4.0.4\7f153278
-Node: Q4.0.5\7f153520
-Node: Q4.0.6\7f153751
-Node: Q4.0.7\7f154329
-Node: Q4.0.8\7f154654
-Node: Q4.0.9\7f155881
-Node: Q4.0.10\7f157919
-Node: Q4.0.11\7f158373
-Node: Q4.0.12\7f159223
-Node: Q4.1.1\7f160196
-Node: Q4.1.2\7f160599
-Node: Q4.1.3\7f160926
-Node: Q4.2.1\7f161235
-Node: Q4.2.2\7f161865
-Node: Q4.2.3\7f162105
-Node: Q4.2.4\7f162649
-Node: Q4.3.1\7f163302
-Node: Q4.3.2\7f163886
-Node: Q4.3.3\7f165602
-Node: Q4.3.4\7f165871
-Node: Q4.3.5\7f166560
-Node: Q4.4.1\7f167188
-Node: Q4.5.1\7f168695
-Node: Q4.6.1\7f169464
-Node: Q4.7.1\7f174724
-Node: Q4.7.2\7f175679
-Node: Q4.7.3\7f175976
-Node: Q4.7.4\7f176322
-Node: Q4.7.5\7f177206
-Node: Q4.7.6\7f178848
-Node: Miscellaneous\7f179397
-Node: Q5.0.1\7f182823
-Node: Q5.0.2\7f183557
-Node: Q5.0.3\7f184411
-Node: Q5.0.4\7f185113
-Node: Q5.0.5\7f186053
-Node: Q5.0.6\7f188033
-Node: Q5.0.7\7f188690
-Node: Q5.0.8\7f189295
-Node: Q5.0.9\7f189814
-Node: Q5.0.10\7f190328
-Node: Q5.0.11\7f190576
-Node: Q5.0.12\7f191137
-Node: Q5.0.13\7f192054
-Node: Q5.0.14\7f192738
-Node: Q5.0.15\7f193503
-Node: Q5.0.16\7f193804
-Node: Q5.0.17\7f194316
-Node: Q5.0.18\7f194581
-Node: Q5.0.19\7f195107
-Node: Q5.0.20\7f195532
-Node: Q5.1.1\7f196447
-Node: Q5.1.2\7f198516
-Node: Q5.1.3\7f199252
-Node: Q5.1.4\7f202646
-Node: Q5.1.5\7f203181
-Node: Q5.1.6\7f205275
-Node: Q5.1.7\7f206664
-Node: Q5.1.8\7f208265
-Node: Q5.1.9\7f208817
-Node: Q5.1.10\7f209702
-Node: Q5.1.11\7f210833
-Node: Q5.2.1\7f211379
-Node: Q5.2.2\7f211950
-Node: Q5.2.3\7f212367
-Node: Q5.2.4\7f212602
-Node: Q5.3.1\7f213512
-Node: Q5.3.2\7f214733
-Node: Q5.3.3\7f215509
-Node: Q5.3.4\7f215993
-Node: Q5.3.5\7f216660
-Node: Q5.3.6\7f217529
-Node: Q5.3.7\7f217774
-Node: Q5.3.8\7f219964
-Node: Q5.3.9\7f220211
-Node: Q5.3.10\7f221164
+Node: Top\7f197
+Node: Introduction\7f16713
+Node: Q1.0.1\7f20232
+Node: Q1.0.2\7f20768
+Node: Q1.0.3\7f21263
+Node: Q1.0.4\7f21525
+Node: Q1.0.5\7f22975
+Node: Q1.0.6\7f23664
+Node: Q1.0.7\7f24670
+Node: Q1.0.8\7f24919
+Node: Q1.0.9\7f25134
+Node: Q1.0.10\7f25412
+Node: Q1.0.11\7f25655
+Node: Q1.0.12\7f26112
+Node: Q1.0.13\7f26480
+Node: Q1.0.14\7f26715
+Node: Q1.1.1\7f27189
+Node: Q1.1.2\7f28151
+Node: Q1.1.3\7f28544
+Node: Q1.2.1\7f29495
+Node: Q1.2.2\7f30551
+Node: Q1.2.3\7f30985
+Node: Q1.3.1\7f31936
+Node: Q1.3.2\7f35854
+Node: Q1.3.3\7f36409
+Node: Q1.3.4\7f36650
+Node: Q1.3.5\7f37414
+Node: Q1.3.6\7f39829
+Node: Q1.3.7\7f41324
+Node: Q1.4.1\7f42259
+Node: Q1.4.2\7f43121
+Node: Q1.4.3\7f43462
+Node: Q1.4.4\7f43881
+Node: Q1.4.5\7f45421
+Node: Q1.4.6\7f45725
+Node: Q1.4.7\7f46733
+Node: Installation\7f47858
+Node: Q2.0.1\7f50264
+Node: Q2.0.2\7f51137
+Node: Q2.0.3\7f58340
+Node: Q2.0.4\7f59638
+Node: Q2.0.5\7f60230
+Node: Q2.0.6\7f60598
+Node: Q2.0.7\7f60979
+Node: Q2.0.8\7f61360
+Node: Q2.0.9\7f62938
+Node: Q2.0.10\7f64376
+Node: Q2.0.11\7f65220
+Node: Q2.0.12\7f66161
+Node: Q2.0.13\7f67684
+Node: Q2.0.14\7f68342
+Node: Q2.1.1\7f68910
+Node: Q2.1.2\7f71652
+Node: Q2.1.3\7f72829
+Node: Q2.1.4\7f74122
+Node: Q2.1.5\7f74921
+Node: Q2.1.6\7f75283
+Node: Q2.1.7\7f75760
+Node: Q2.1.8\7f76113
+Node: Q2.1.9\7f77629
+Node: Q2.1.10\7f78051
+Node: Q2.1.11\7f78808
+Node: Q2.1.12\7f79673
+Node: Q2.1.13\7f80628
+Node: Q2.1.14\7f81659
+Node: Q2.1.15\7f82770
+Node: Q2.1.16\7f88728
+Node: Q2.1.17\7f89422
+Node: Q2.1.18\7f90019
+Node: Q2.1.19\7f91816
+Node: Q2.1.20\7f92346
+Node: Q2.1.21\7f92728
+Node: Q2.1.22\7f93018
+Node: Q2.1.23\7f94315
+Node: Customization\7f94967
+Node: Q3.0.1\7f99854
+Node: Q3.0.2\7f100560
+Node: Q3.0.3\7f101124
+Node: Q3.0.4\7f101541
+Node: Q3.0.5\7f102374
+Node: Q3.0.6\7f103155
+Node: Q3.0.7\7f103735
+Node: Q3.0.8\7f104399
+Node: Q3.0.9\7f105245
+Node: Q3.1.1\7f105806
+Node: Q3.1.2\7f106543
+Node: Q3.1.3\7f106974
+Node: Q3.1.4\7f107559
+Node: Q3.1.5\7f108095
+Node: Q3.1.6\7f108479
+Node: Q3.1.7\7f109160
+Node: Q3.1.8\7f111384
+Node: Q3.2.1\7f111926
+Node: Q3.2.2\7f113334
+Node: Q3.2.3\7f114133
+Node: Q3.2.4\7f114735
+Node: Q3.2.5\7f115769
+Node: Q3.2.6\7f116236
+Node: Q3.3.1\7f117198
+Node: Q3.3.2\7f117591
+Node: Q3.3.3\7f118222
+Node: Q3.3.4\7f118603
+Node: Q3.3.5\7f119697
+Node: Q3.4.1\7f121191
+Node: Q3.4.2\7f121834
+Node: Q3.5.1\7f122346
+Node: Q3.5.2\7f123800
+Node: Q3.5.3\7f124218
+Node: Q3.5.4\7f125058
+Node: Q3.5.5\7f125890
+Node: Q3.5.6\7f127030
+Node: Q3.5.7\7f128020
+Node: Q3.5.8\7f129372
+Node: Q3.5.9\7f130119
+Node: Q3.5.10\7f130899
+Node: Q3.5.11\7f131535
+Node: Q3.6.1\7f132088
+Node: Q3.6.2\7f132828
+Node: Q3.6.3\7f133256
+Node: Q3.7.1\7f133756
+Node: Q3.7.2\7f134644
+Node: Q3.7.3\7f135303
+Node: Q3.7.4\7f135725
+Node: Q3.7.5\7f136068
+Node: Q3.7.6\7f136536
+Node: Q3.7.7\7f137251
+Node: Q3.7.8\7f138271
+Node: Q3.8.1\7f138690
+Node: Q3.8.2\7f139150
+Node: Q3.8.3\7f139613
+Node: Q3.8.4\7f140219
+Node: Q3.8.5\7f140938
+Node: Q3.9.1\7f141723
+Node: Q3.9.2\7f142663
+Node: Q3.9.3\7f143261
+Node: Q3.9.4\7f143923
+Node: Q3.10.1\7f144802
+Node: Q3.10.2\7f145620
+Node: Q3.10.3\7f146401
+Node: Q3.10.4\7f147129
+Node: Q3.10.5\7f147512
+Node: Subsystems\7f148522
+Node: Q4.0.1\7f151007
+Node: Q4.0.2\7f151532
+Node: Q4.0.3\7f152090
+Node: Q4.0.4\7f152411
+Node: Q4.0.5\7f152653
+Node: Q4.0.6\7f152884
+Node: Q4.0.7\7f153465
+Node: Q4.0.8\7f153790
+Node: Q4.0.9\7f155017
+Node: Q4.0.10\7f157055
+Node: Q4.0.11\7f157509
+Node: Q4.0.12\7f158359
+Node: Q4.1.1\7f159332
+Node: Q4.1.2\7f159735
+Node: Q4.1.3\7f160062
+Node: Q4.2.1\7f160371
+Node: Q4.2.2\7f161001
+Node: Q4.2.3\7f161241
+Node: Q4.2.4\7f161785
+Node: Q4.3.1\7f162438
+Node: Q4.3.2\7f163022
+Node: Q4.3.3\7f164503
+Node: Q4.3.4\7f164775
+Node: Q4.3.5\7f165452
+Node: Q4.4.1\7f166080
+Node: Q4.4.2\7f167566
+Node: Q4.5.1\7f168770
+Node: Q4.6.1\7f169539
+Node: Q4.7.1\7f174799
+Node: Q4.7.2\7f175754
+Node: Q4.7.3\7f176051
+Node: Q4.7.4\7f176397
+Node: Q4.7.5\7f177281
+Node: Q4.7.6\7f178923
+Node: Miscellaneous\7f179517
+Node: Q5.0.1\7f182937
+Node: Q5.0.2\7f183671
+Node: Q5.0.3\7f184525
+Node: Q5.0.4\7f185227
+Node: Q5.0.5\7f186166
+Node: Q5.0.6\7f188146
+Node: Q5.0.7\7f188803
+Node: Q5.0.8\7f189408
+Node: Q5.0.9\7f189927
+Node: Q5.0.10\7f190441
+Node: Q5.0.11\7f190689
+Node: Q5.0.12\7f191250
+Node: Q5.0.13\7f192167
+Node: Q5.0.14\7f192851
+Node: Q5.0.15\7f193616
+Node: Q5.0.16\7f193913
+Node: Q5.0.17\7f194425
+Node: Q5.0.18\7f194690
+Node: Q5.0.19\7f195216
+Node: Q5.0.20\7f195640
+Node: Q5.1.1\7f196555
+Node: Q5.1.2\7f198624
+Node: Q5.1.3\7f199360
+Node: Q5.1.4\7f202754
+Node: Q5.1.5\7f203289
+Node: Q5.1.6\7f205383
+Node: Q5.1.7\7f206772
+Node: Q5.1.8\7f208373
+Node: Q5.1.9\7f208925
+Node: Q5.1.10\7f209810
+Node: Q5.1.11\7f210941
+Node: Q5.2.1\7f211490
+Node: Q5.2.2\7f212061
+Node: Q5.2.3\7f212478
+Node: Q5.2.4\7f212713
+Node: Q5.3.1\7f213623
+Node: Q5.3.2\7f214844
+Node: Q5.3.3\7f215620
+Node: Q5.3.4\7f216104
+Node: Q5.3.5\7f216771
+Node: Q5.3.6\7f217640
+Node: Q5.3.7\7f217885
+Node: Q5.3.8\7f220075
+Node: Q5.3.9\7f220322
+Node: Q5.3.10\7f221275
Node: Q5.3.11\7f223359
Node: Q5.3.12\7f224908
-Node: Current Events\7f226182
-Node: Q6.0.1\7f226839
-Node: Q6.0.2\7f227478
-Node: Q6.0.3\7f228552
-Node: Q6.0.4\7f228780
+Node: MS Windows\7f226182
+Node: Q6.0.1\7f227513
+Node: Q6.0.2\7f228260
+Node: Q6.0.3\7f228725
+Node: Q6.0.4\7f229005
+Node: Q6.1.1\7f231286
+Node: Q6.1.2\7f232157
+Node: Q6.1.3\7f232438
+Node: Q6.1.4\7f232720
+Node: Q6.1.5\7f233098
+Node: Q6.1.6\7f233930
+Node: Q6.2.1\7f234514
+Node: Q6.2.2\7f235415
+Node: Q6.2.3\7f235816
+Node: Q6.3.1\7f236105
+Node: Q6.3.2\7f237199
+Node: Q6.3.3\7f240380
+Node: Current Events\7f240634
+Node: Q7.0.1\7f241288
+Node: Q7.0.2\7f241927
+Node: Q7.0.3\7f243001
+Node: Q7.0.4\7f243229
\1f
End Tag Table
-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
* 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
* 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'.
* 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?
* 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)?
* 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
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?
* 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?
* 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.
\1f
File: xemacs-faq.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top
wondering what to do next. It is also useful as a reference to
available resources.
- The previous maintainer of the FAQ was Anthony Rossini <rossini@stat.sc.edu>, who started it, after getting tired of hearing JWZ complain
-about repeatedly having to answer questions. Ben Wing <ben@666.com>
-and Chuck Thompson <cthomp@xemacs.org>, 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
+<rossini@stat.sc.edu>, who started it, after getting tired of hearing
+JWZ complain about repeatedly having to answer questions. Ben Wing
+<ben@xemacs.org> and Chuck Thompson <cthomp@xemacs.org>, 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 <steve@altair.xemacs.org>. It was converted back to
-texinfo by Hrvoje Niksic <hniksic@srce.hr>.
+Steven L. Baur <steve@xemacs.org>. It was converted back to texinfo by
+Hrvoje Niksic <hniksic@xemacs.org>.
The FAQ was then maintained by Andreas Kaempf <andreas@sccon.com>,
-who passed it on to Christian Nybo/ <faq@xemacs.org>, the current FAQ
+who passed it on to Christian Nyb/o <faq@xemacs.org>, 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/ <faq@xemacs.org>. Include
+this FAQ please send email to Christian Nyb/o <faq@xemacs.org>. Include
`XEmacs FAQ' on the Subject: line.
* Menu:
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.
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/'
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:
-----------------------------
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 <xemacs-request@xemacs.org>
-for subscription information and <xemacs@xemacs.org> 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 <xemacs-request@xemacs.org> with `subscribe' in the body of
+the message. Send to the list at <xemacs@xemacs.org>. list. To
+cancel a subscription, you *must* use the xemacs-request address. Send
+a message with a subject of `unsubscribe' to be removed.
\1f
File: xemacs-faq.info, Node: Q1.0.7, Next: Q1.0.8, Prev: Q1.0.6, Up: Introduction
Q1.0.7: Where is the mailing list archived?
-------------------------------------------
- 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'
\1f
File: xemacs-faq.info, Node: Q1.0.8, Next: Q1.0.9, Prev: Q1.0.7, Up: Introduction
Q1.0.8: How do you pronounce XEmacs?
------------------------------------
- I pronounce it `Eks eemax'.
+ The most common pronounciation is `Eks eemax'.
\1f
File: xemacs-faq.info, Node: Q1.0.9, Next: Q1.0.10, Prev: Q1.0.8, Up: Introduction
Q1.0.10: Is there a port of XEmacs to Microsoft ('95 or NT)?
------------------------------------------------------------
- Thanks to efforts of many people, coordinated by David Hobley <davidh@wr.com.au> and Marc Paquette <marcpa@cam.org>, 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 <jhar@tardis.ed.ac.uk>.
-
- Although some features are still unimplemented, XEmacs 21.0 will
-support MS-Windows.
-
- The NT development is now coordinated by a mailing list at
-<xemacs-nt@xemacs.org>.
-
- If you are willing to contribute or want to follow the progress,
-mail to <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 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::.
\1f
File: xemacs-faq.info, Node: Q1.0.11, Next: Q1.0.12, Prev: Q1.0.10, Up: Introduction
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/).
\1f
File: xemacs-faq.info, Node: Q1.0.12, Next: Q1.0.13, Prev: Q1.0.11, Up: Introduction
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: <info@xemacs.com>
- Tel: +1 408 243 3300
+ HTML and Postscript versions of XEmacs manuals may be available from
+the XEmacs web site in the future.
\1f
File: xemacs-faq.info, Node: Q1.1.1, Next: Q1.1.2, Prev: Q1.0.14, Up: Introduction
-----------------------------------------
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/ <faq@xemacs.org>.
+should be up to date. All submissions are welcome. E-mail submissions
+to XEmacs FAQ maintainers <faq@xemacs.org>.
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
Q1.1.2: How do I become a Beta Tester?
--------------------------------------
- Send an email message to <xemacs-beta-request@xemacs.org> with a
-subject line of `subscribe'.
+ Send an email message to <xemacs-beta-request@xemacs.org> 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.
Q1.1.3: How do I contribute to XEmacs itself?
---------------------------------------------
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> 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
* Martin Buchholz <martin@xemacs.org>
- * Steve Baur <steve@altair.xemacs.org>
+ * Steve Baur <steve@xemacs.org>
+
+ * Hrvoje Niksic <hniksic@xemacs.org>
- * Hrvoje Niksic <hniksic@srce.hr>
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.
- * Ben Wing <ben@666.com>
+ * Ben Wing <ben@xemacs.org>
+
- * Jamie Zawinski <jwz@netscape.com>
+ * Jamie Zawinski <jwz@jwz.org>
Jamie Zawinski was Mr. Lucid Emacs from 19.0 through 19.10, the
last release actually named Lucid Emacs. Richard Mlynarik was
* SL Baur <steve@xemacs.org>
- * Hrvoje Niksic <hniksic@srce.hr>
+ * Hrvoje Niksic <hniksic@xemacs.org>
* Aki Vehtari <Aki.Vehtari@hut.fi>
+
\1f
File: xemacs-faq.info, Node: Q1.2.3, Next: Q1.3.1, Prev: Q1.2.2, Up: Introduction
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.
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.)
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.
\1f
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
-<xemacs-beta@xemacs.org>.
+ If you would like to help, you may want to join the
+<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.
*Note Q1.1.2::.
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.
\1f
File: xemacs-faq.info, Node: Q1.3.4, Next: Q1.3.5, Prev: Q1.3.3, Up: Introduction
-------------------------------------------------------------
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
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 <RET>'.
+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 <RET>'.
\1f
File: xemacs-faq.info, Node: Q1.4.2, Next: Q1.4.3, Prev: Q1.4.1, Up: Introduction
available in a non-english language, type `C-u C-h t TAB', type the
first letters of your preferred language, then type <RET>.
- There's an Emacs Lisp tutorial at
-
- `ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz'.
-
- Erik Sundermann <erik@petaxp.rug.ac.be> has made a tutorial web page
-at `http://petaxp.rug.ac.be/~erik/xemacs/'.
-
\1f
File: xemacs-faq.info, Node: Q1.4.4, Next: Q1.4.5, Prev: Q1.4.3, Up: Introduction
-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
* 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'.
Although this entry has been written for XEmacs 19.13, most of it
still stands true.
- Steve Baur <steve@altair.xemacs.org> writes:
+ Steve Baur <steve@xemacs.org> writes:
The 45MB of space required by the installation directories can be
reduced dramatically if desired. Gzip all the .el files. Remove
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
Initialization error:
Terminal type `xterm' undefined (or can't access database?)
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> writes:
Your ncurses configuration is messed up. Your /usr/lib/terminfo
is a bad pointer, perhaps to a CD-ROM that is not inserted.
3. Rebuild XEmacs yourself - any working ELF version of libc should be
O.K.
- Hrvoje Niksic <hniksic@srce.hr> writes:
+ Hrvoje Niksic <hniksic@xemacs.org> 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.
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
<stig@hackvan.com>, which may be useful when generating your own
xface.
Q2.1.14: `C-g' doesn't work for me. Is it broken?
--------------------------------------------------
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> writes:
`C-g' does work for most people in most circumstances. If it
doesn't, there are only two explanations:
Morten Welinder <terra@diku.dk> 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 <pid>'. This is a hack, of course, not a solution.
This technique works on a Sun4 running 4.1.3_U1. To see if it
works for you, start another XEmacs and test with that first. If
`gdbinit' files provided in the `src' directory. Use the one
corresponding to the configure options used when building XEmacs.
+
\1f
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
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 <af@biomath.jussieu.fr> 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.
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...
\1f
-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
* 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.
* 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?
* 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)?
* 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.
\1f
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:
`-unmapped' on the command line, and setting the `initiallyUnmapped' X
Resource don't seem to help much either...
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> writes:
Ugh, this stuff is such an incredible mess that I've about given up
getting it to work. The principal problem is numerous
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::).
\1f
File: xemacs-faq.info, Node: Q3.5.2, Next: Q3.5.3, Prev: Q3.5.1, Up: Customization
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).
\1f
File: xemacs-faq.info, Node: Q3.5.4, Next: Q3.5.5, Prev: Q3.5.3, Up: Customization
(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
character typed come out in upper case. This will affect all the other
modifier keys like Control and Meta as well.
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> 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"
-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
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?
(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.
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
--------------------------------------------------------------------------------
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/'
* 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/'
Q4.3.3: Why isn't this `movemail' program working?
--------------------------------------------------
- Ben Wing <ben@666.com> writes:
+ Ben Wing <ben@xemacs.org> writes:
It wasn't chown'ed/chmod'd correctly.
Q4.3.4: Movemail is also distributed by Netscape? Can that cause problems?
---------------------------------------------------------------------------
- Steve Baur <steve@altair.xemacs.org> writes:
+ Steve Baur <steve@xemacs.org> 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 <jwz@netscape.com> notes at
+ Please refer to Jamie Zawinski's <jwz@jwz.org> 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
`ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/'.
\1f
-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
==================================
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'.
+\1f
+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))
\1f
-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
=============
Can I "teach" emacs what words are MatLab commands, comments, etc. ?
Ulrich Elsner <elsner@mathematik.tu-chemnitz.de> 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 <faq@xemacs.org>.
Instructions on how to install this mode are included in this file.
\1f
-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
*************************
* 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?
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
<RET> fill <RET>'.
Note that well-behaving text-lookalike modes will run
Barry A. Warsaw <bwarsaw@cnri.reston.va.us> writes:
- This can be had from `http://www.python.org/ftp/emacs/'.
+ This can be had from `http://www.python.org/emacs/'.
\1f
File: xemacs-faq.info, Node: Q5.0.16, Next: Q5.0.17, Prev: Q5.0.15, Up: Miscellaneous
You can't. The `info' package does not provide for multiple info
buffers.
-\1f
-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 <daku@nortel.ca> 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'?
-
-\1f
-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 <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> 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::.).
-
-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
END-INFO-DIR-ENTRY
\1f
+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 <daku@nortel.ca> 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'?
+
+\1f
+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 <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> 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::).
+
+\1f
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?
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
an easy way to find out where it spends time?
- zHrvoje Niksic <hniksic@srce.hr> writes:
+ zHrvoje Niksic <hniksic@xemacs.org> writes:
Under XEmacs 20.4 and later you can use `M-x
profile-key-sequence', press a key (say <RET> in the Gnus Group
buffer), and get the results using `M-x profile-results'. It
It might also be helpful to use Stig's <stig@hackvan.com> 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:
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
system environment. It cannot be used outside of X11.
\1f
-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?
+
+\1f
+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 <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.
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
+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).
+
+\1f
+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).
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
+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.
+
+\1f
+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.
+
+
+\1f
+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/'.
+
+\1f
+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.
+
+\1f
+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")
+
+\1f
+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:\'.
+
+\1f
+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.
+
+\1f
+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.
+
+
+
+\1f
+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.
+
+\1f
+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
* 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.
\1f
-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
longer considered unstable.
\1f
-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,
for all further development.
\1f
-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.
\1f
-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
XEmacs 19.16 was the last 19 release, basically consisting of
19.15 plus the collected bugfixes.
- 3. As of December 1996, Steve Baur <steve@altair.xemacs.org> has
- become the lead maintainer of XEmacs.
+ 3. As of December 1996, Steve Baur <steve@xemacs.org> has become the
+ lead maintainer of XEmacs.
-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
\1f
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
\1f
Tag Table:
(Indirect)
-Node: Top\7f1372
-Node: License\7f22524
-Node: Distrib\7f35806
-Node: Intro\7f37470
-Node: Frame\7f40341
-Node: Point\7f43613
-Node: Echo Area\7f45580
-Node: Mode Line\7f47958
-Node: XEmacs under X\7f52389
-Node: Keystrokes\7f55567
-Node: Intro to Keystrokes\7f56411
-Node: Representing Keystrokes\7f58514
-Node: Key Sequences\7f59871
-Node: String Key Sequences\7f63211
-Node: Meta Key\7f63594
-Node: Super and Hyper Keys\7f65067
-Node: Character Representation\7f71291
-Node: Commands\7f72311
-Node: Pull-down Menus\7f75160
-Node: File Menu\7f78509
-Node: Edit Menu\7f82331
-Node: Apps Menu\7f84716
-Node: Options Menu\7f85206
-Node: Buffers Menu\7f89186
-Node: Tools Menu\7f89493
-Node: Help Menu\7f89984
-Node: Menu Customization\7f90385
-Node: Entering Emacs\7f94615
-Node: Exiting\7f95918
-Node: Command Switches\7f99010
-Node: Startup Paths\7f108199
-Node: Basic\7f115775
-Node: Blank Lines\7f125258
-Node: Continuation Lines\7f126684
-Node: Position Info\7f128118
-Node: Arguments\7f131252
-Node: Undo\7f134389
-Node: Minibuffer\7f137336
-Node: Minibuffer File\7f139820
-Node: Minibuffer Edit\7f141457
-Node: Completion\7f144030
-Node: Repetition\7f150905
-Node: M-x\7f153697
-Node: Help\7f158791
-Node: Mark\7f168713
-Node: Setting Mark\7f170567
-Node: Using Region\7f173689
-Node: Marking Objects\7f174434
-Node: Mark Ring\7f176275
-Node: Mouse Selection\7f177991
-Node: Additional Mouse Operations\7f179999
-Node: Killing\7f184203
-Node: Yanking\7f189843
-Node: Kill Ring\7f190646
-Node: Appending Kills\7f192248
-Node: Earlier Kills\7f194285
-Node: Using X Selections\7f196898
-Node: X Clipboard Selection\7f198148
-Node: X Selection Commands\7f200325
-Node: X Cut Buffers\7f201411
-Node: Active Regions\7f202770
-Node: Accumulating Text\7f207350
-Node: Rectangles\7f210423
-Node: Registers\7f213942
-Node: RegPos\7f214977
-Node: RegText\7f215880
-Node: RegRect\7f216964
-Node: Display\7f217704
-Node: Scrolling\7f219199
-Node: Horizontal Scrolling\7f223342
-Node: Selective Display\7f224538
-Node: Display Vars\7f225757
-Node: Search\7f228435
-Node: Incremental Search\7f229628
-Node: Non-Incremental Search\7f238555
-Node: Word Search\7f239997
-Node: Regexp Search\7f241615
-Node: Regexps\7f243151
-Node: Search Case\7f253452
-Node: Replace\7f254233
-Node: Unconditional Replace\7f255181
-Node: Regexp Replace\7f256317
-Node: Replacement and Case\7f257252
-Node: Query Replace\7f258232
-Node: Other Repeating Search\7f261465
-Node: Fixit\7f262720
-Node: Kill Errors\7f263300
-Node: Transpose\7f264633
-Node: Fixing Case\7f267038
-Node: Spelling\7f267684
-Node: Files\7f269145
-Node: File Names\7f270453
-Node: Visiting\7f274791
-Node: Saving\7f281481
-Node: Backup\7f286404
-Node: Backup Names\7f287800
-Node: Backup Deletion\7f289283
-Node: Backup Copying\7f290442
-Node: Interlocking\7f292149
-Node: Reverting\7f296277
-Node: Auto Save\7f298190
-Node: Auto Save Files\7f299157
-Node: Auto Save Control\7f300998
-Node: Recover\7f302837
-Node: Version Control\7f303992
-Node: Concepts of VC\7f306030
-Node: Editing with VC\7f307640
-Node: Variables for Check-in/out\7f312896
-Node: Log Entries\7f314795
-Node: Change Logs and VC\7f315975
-Node: Old Versions\7f319243
-Node: VC Status\7f321247
-Node: Renaming and VC\7f322961
-Node: Snapshots\7f323642
-Node: Making Snapshots\7f324143
-Node: Snapshot Caveats\7f325437
-Node: Version Headers\7f327246
-Node: ListDir\7f329945
-Node: Comparing Files\7f331994
-Node: Dired\7f333527
-Node: Dired Enter\7f334198
-Node: Dired Edit\7f335023
-Node: Dired Deletion\7f336770
-Node: Dired Immed\7f339995
-Node: Misc File Ops\7f341271
-Node: Buffers\7f343760
-Node: Select Buffer\7f345920
-Node: List Buffers\7f347717
-Node: Misc Buffer\7f349463
-Node: Kill Buffer\7f351107
-Node: Several Buffers\7f352237
-Node: Windows\7f356103
-Node: Basic Window\7f356814
-Node: Split Window\7f358533
-Node: Other Window\7f360666
-Node: Pop Up Window\7f363096
-Node: Change Window\7f364603
-Node: Mule\7f367511
-Node: Mule Intro\7f368774
-Node: Language Environments\7f369790
-Node: Input Methods\7f371898
-Node: Select Input Method\7f375618
-Node: Coding Systems\7f377773
-Node: Recognize Coding\7f381961
-Node: Specify Coding\7f385290
-Node: Major Modes\7f390221
-Node: Choosing Modes\7f392443
-Node: Indentation\7f394833
-Node: Indentation Commands\7f396928
-Node: Tab Stops\7f399657
-Node: Just Spaces\7f401506
-Node: Text\7f402321
-Node: Text Mode\7f404304
-Node: Nroff Mode\7f406385
-Node: TeX Mode\7f408029
-Node: TeX Editing\7f410281
-Node: TeX Print\7f413716
-Node: Outline Mode\7f416936
-Node: Outline Format\7f418417
-Node: Outline Motion\7f421217
-Node: Outline Visibility\7f422770
-Node: Words\7f425691
-Node: Sentences\7f428638
-Node: Paragraphs\7f430834
-Node: Pages\7f433122
-Node: Filling\7f435722
-Node: Auto Fill\7f436293
-Node: Fill Commands\7f438441
-Node: Fill Prefix\7f440607
-Node: Case\7f442795
-Node: Programs\7f444823
-Node: Program Modes\7f447381
-Node: Lists\7f449613
-Node: Defuns\7f455453
-Node: Grinding\7f458106
-Node: Basic Indent\7f458734
-Node: Multi-line Indent\7f460755
-Node: Lisp Indent\7f462371
-Node: C Indent\7f465821
-Node: Matching\7f471061
-Node: Comments\7f472583
-Node: Balanced Editing\7f479035
-Node: Lisp Completion\7f480049
-Node: Documentation\7f481064
-Node: Change Log\7f482303
-Node: Tags\7f484881
-Node: Tag Syntax\7f486458
-Node: Create Tags Table\7f489832
-Node: Select Tags Table\7f495930
-Node: Find Tag\7f499672
-Node: Tags Search\7f502636
-Node: List Tags\7f506093
-Node: Fortran\7f507122
-Node: Fortran Motion\7f508198
-Node: Fortran Indent\7f509018
-Node: ForIndent Commands\7f509703
-Node: ForIndent Num\7f510848
-Node: ForIndent Conv\7f512122
-Node: ForIndent Vars\7f512898
-Node: Fortran Comments\7f514066
-Node: Fortran Columns\7f517665
-Node: Fortran Abbrev\7f519088
-Node: Asm Mode\7f519998
-Node: Running\7f520550
-Node: Compilation\7f521520
-Node: Lisp Modes\7f526371
-Node: Lisp Libraries\7f527645
-Node: Loading\7f528200
-Node: Compiling Libraries\7f532660
-Node: Mocklisp\7f535551
-Node: Lisp Eval\7f536228
-Node: Lisp Debug\7f539868
-Node: Lisp Interaction\7f545294
-Node: External Lisp\7f546649
-Node: Packages\7f548724
-Node: Package Terminology\7f549465
-Node: Using Packages\7f550823
-Node: Building Packages\7f559612
-Node: Abbrevs\7f562134
-Node: Defining Abbrevs\7f564334
-Node: Expanding Abbrevs\7f566781
-Node: Editing Abbrevs\7f569483
-Node: Saving Abbrevs\7f571351
-Node: Dynamic Abbrevs\7f573291
-Node: Picture\7f574593
-Node: Basic Picture\7f577026
-Node: Insert in Picture\7f579313
-Node: Tabs in Picture\7f580735
-Node: Rectangles in Picture\7f582256
-Node: Sending Mail\7f584165
-Node: Mail Format\7f585876
-Node: Mail Headers\7f587226
-Node: Mail Mode\7f593636
-Node: Reading Mail\7f597249
-Node: Calendar/Diary\7f598824
-Node: Calendar Motion\7f600496
-Node: Calendar Unit Motion\7f601379
-Node: Move to Beginning or End\7f603702
-Node: Specified Dates\7f604835
-Node: Scroll Calendar\7f605724
-Node: Mark and Region\7f607515
-Node: General Calendar\7f609422
-Node: LaTeX Calendar\7f611030
-Node: Holidays\7f613044
-Node: Sunrise/Sunset\7f616147
-Node: Lunar Phases\7f619190
-Node: Other Calendars\7f620575
-Node: Calendar Systems\7f622062
-Node: To Other Calendar\7f625173
-Node: From Other Calendar\7f627164
-Node: Mayan Calendar\7f629470
-Node: Diary\7f632666
-Node: Diary Commands\7f634416
-Node: Format of Diary File\7f637725
-Node: Date Formats\7f640595
-Node: Adding to Diary\7f643169
-Node: Special Diary Entries\7f644800
-Node: Calendar Customization\7f650140
-Node: Calendar Customizing\7f651002
-Node: Holiday Customizing\7f654222
-Node: Date Display Format\7f660690
-Node: Time Display Format\7f661648
-Node: Daylight Savings\7f662786
-Node: Diary Customizing\7f665974
-Node: Hebrew/Islamic Entries\7f670596
-Node: Fancy Diary Display\7f673936
-Node: Included Diary Files\7f675833
-Node: Sexp Diary Entries\7f676814
-Node: Appt Customizing\7f681904
-Node: Sorting\7f682950
-Node: Shell\7f687756
-Node: Single Shell\7f689049
-Node: Interactive Shell\7f690648
-Node: Shell Mode\7f694413
-Node: Terminal emulator\7f696904
-Node: Term Mode\7f699214
-Node: Paging in Term\7f700128
-Node: Narrowing\7f700926
-Node: Hardcopy\7f702876
-Node: Recursive Edit\7f703848
-Node: Dissociated Press\7f706835
-Node: CONX\7f709398
-Node: Amusements\7f710422
-Node: Emulation\7f710902
-Node: Customization\7f712746
-Node: Minor Modes\7f714470
-Node: Variables\7f716102
-Node: Examining\7f718060
-Node: Easy Customization\7f719521
-Node: Customization Groups\7f720535
-Node: Changing an Option\7f723464
-Node: Face Customization\7f729720
-Node: Specific Customization\7f731485
-Node: Edit Options\7f734092
-Node: Locals\7f735676
-Node: File Variables\7f738855
-Node: Keyboard Macros\7f743382
-Node: Basic Kbd Macro\7f745553
-Node: Save Kbd Macro\7f747485
-Node: Kbd Macro Query\7f749157
-Node: Key Bindings\7f751099
-Node: Keymaps\7f751973
-Node: Rebinding\7f755823
-Node: Interactive Rebinding\7f756519
-Node: Programmatic Rebinding\7f758711
-Node: Key Bindings Using Strings\7f761518
-Node: Disabling\7f763124
-Node: Syntax\7f764896
-Node: Syntax Entry\7f765777
-Node: Syntax Change\7f769861
-Node: Init File\7f772031
-Node: Init Syntax\7f773539
-Node: Init Examples\7f775892
-Node: Terminal Init\7f780083
-Node: Audible Bell\7f781793
-Node: Faces\7f785224
-Node: X Resources\7f790061
-Node: Geometry Resources\7f791682
-Node: Iconic Resources\7f794130
-Node: Resource List\7f794602
-Node: Face Resources\7f801109
-Node: Widgets\7f804786
-Node: Menubar Resources\7f805725
-Node: Quitting\7f806658
-Node: Lossage\7f809637
-Node: Stuck Recursive\7f810280
-Node: Screen Garbled\7f810986
-Node: Text Garbled\7f812120
-Node: Unasked-for Search\7f812759
-Node: Emergency Escape\7f813544
-Node: Total Frustration\7f815323
-Node: Bugs\7f815954
-Node: Glossary\7f825489
-Node: Manifesto\7f857130
-Node: Key Index\7f880606
-Node: Command Index\7f905126
-Node: Variable Index\7f945846
-Node: Concept Index\7f961797
+Node: Top\7f1352
+Node: License\7f22511
+Node: Distrib\7f35793
+Node: Intro\7f37457
+Node: Frame\7f40328
+Node: Point\7f43596
+Node: Echo Area\7f45563
+Node: Mode Line\7f47940
+Node: XEmacs under X\7f52371
+Node: Keystrokes\7f55548
+Node: Intro to Keystrokes\7f56392
+Node: Representing Keystrokes\7f58495
+Node: Key Sequences\7f59852
+Node: String Key Sequences\7f63192
+Node: Meta Key\7f63575
+Node: Super and Hyper Keys\7f65048
+Node: Character Representation\7f71272
+Node: Commands\7f72292
+Node: Pull-down Menus\7f75141
+Node: File Menu\7f78490
+Node: Edit Menu\7f82312
+Node: Apps Menu\7f84695
+Node: Options Menu\7f85185
+Node: Buffers Menu\7f89165
+Node: Tools Menu\7f89472
+Node: Help Menu\7f89963
+Node: Menu Customization\7f90364
+Node: Entering Emacs\7f94594
+Node: Exiting\7f95897
+Node: Command Switches\7f98988
+Node: Startup Paths\7f108175
+Node: Basic\7f115755
+Node: Blank Lines\7f125233
+Node: Continuation Lines\7f126659
+Node: Position Info\7f128091
+Node: Arguments\7f131224
+Node: Undo\7f134361
+Node: Minibuffer\7f137308
+Node: Minibuffer File\7f139792
+Node: Minibuffer Edit\7f141428
+Node: Completion\7f144001
+Node: Repetition\7f150876
+Node: M-x\7f153668
+Node: Help\7f158762
+Node: Mark\7f168681
+Node: Setting Mark\7f170535
+Node: Using Region\7f173657
+Node: Marking Objects\7f174394
+Node: Mark Ring\7f176232
+Node: Mouse Selection\7f177948
+Node: Additional Mouse Operations\7f179955
+Node: Killing\7f184159
+Node: Yanking\7f189795
+Node: Kill Ring\7f190598
+Node: Appending Kills\7f192200
+Node: Earlier Kills\7f194237
+Node: Using X Selections\7f196850
+Node: X Clipboard Selection\7f198100
+Node: X Selection Commands\7f200277
+Node: X Cut Buffers\7f201363
+Node: Active Regions\7f202722
+Node: Accumulating Text\7f207302
+Node: Rectangles\7f210375
+Node: Registers\7f213894
+Node: RegPos\7f214928
+Node: RegText\7f215831
+Node: RegRect\7f216915
+Node: Display\7f217655
+Node: Scrolling\7f219150
+Node: Horizontal Scrolling\7f223293
+Node: Selective Display\7f224488
+Node: Display Vars\7f225707
+Node: Search\7f228385
+Node: Incremental Search\7f229578
+Node: Non-Incremental Search\7f238505
+Node: Word Search\7f239947
+Node: Regexp Search\7f241565
+Node: Regexps\7f243101
+Node: Search Case\7f253402
+Node: Replace\7f254183
+Node: Unconditional Replace\7f255131
+Node: Regexp Replace\7f256266
+Node: Replacement and Case\7f257201
+Node: Query Replace\7f258181
+Node: Other Repeating Search\7f261408
+Node: Fixit\7f262663
+Node: Kill Errors\7f263243
+Node: Transpose\7f264576
+Node: Fixing Case\7f266980
+Node: Spelling\7f267626
+Node: Files\7f269087
+Node: File Names\7f270397
+Node: Visiting\7f274734
+Node: Saving\7f281420
+Node: Backup\7f286343
+Node: Backup Names\7f287739
+Node: Backup Deletion\7f289222
+Node: Backup Copying\7f290381
+Node: Interlocking\7f292087
+Node: Reverting\7f296215
+Node: Auto Save\7f298127
+Node: Auto Save Files\7f299094
+Node: Auto Save Control\7f300935
+Node: Recover\7f302773
+Node: Version Control\7f303928
+Node: Concepts of VC\7f305966
+Node: Editing with VC\7f307576
+Node: Variables for Check-in/out\7f312832
+Node: Log Entries\7f314731
+Node: Change Logs and VC\7f315911
+Node: Old Versions\7f319178
+Node: VC Status\7f321181
+Node: Renaming and VC\7f322895
+Node: Snapshots\7f323574
+Node: Making Snapshots\7f324075
+Node: Snapshot Caveats\7f325368
+Node: Version Headers\7f327177
+Node: ListDir\7f329876
+Node: Comparing Files\7f331925
+Node: Dired\7f333458
+Node: Dired Enter\7f334129
+Node: Dired Edit\7f334954
+Node: Dired Deletion\7f336701
+Node: Dired Immed\7f339924
+Node: Misc File Ops\7f341200
+Node: Buffers\7f343688
+Node: Select Buffer\7f345846
+Node: List Buffers\7f347641
+Node: Misc Buffer\7f349386
+Node: Kill Buffer\7f351029
+Node: Several Buffers\7f352159
+Node: Windows\7f356025
+Node: Basic Window\7f356736
+Node: Split Window\7f358455
+Node: Other Window\7f360588
+Node: Pop Up Window\7f363017
+Node: Change Window\7f364522
+Node: Mule\7f367430
+Node: Mule Intro\7f368693
+Node: Language Environments\7f369709
+Node: Input Methods\7f371816
+Node: Select Input Method\7f375536
+Node: Coding Systems\7f377691
+Node: Recognize Coding\7f381877
+Node: Specify Coding\7f385203
+Node: Major Modes\7f390134
+Node: Choosing Modes\7f392353
+Node: Indentation\7f394743
+Node: Indentation Commands\7f396838
+Node: Tab Stops\7f399567
+Node: Just Spaces\7f401416
+Node: Text\7f402231
+Node: Text Mode\7f404214
+Node: Nroff Mode\7f406293
+Node: TeX Mode\7f407936
+Node: TeX Editing\7f410188
+Node: TeX Print\7f413622
+Node: Outline Mode\7f416841
+Node: Outline Format\7f418322
+Node: Outline Motion\7f421122
+Node: Outline Visibility\7f422675
+Node: Words\7f425596
+Node: Sentences\7f428543
+Node: Paragraphs\7f430739
+Node: Pages\7f433027
+Node: Filling\7f435627
+Node: Auto Fill\7f436198
+Node: Fill Commands\7f438345
+Node: Fill Prefix\7f440510
+Node: Case\7f442698
+Node: Programs\7f444726
+Node: Program Modes\7f447275
+Node: Lists\7f449507
+Node: Defuns\7f455347
+Node: Grinding\7f458000
+Node: Basic Indent\7f458628
+Node: Multi-line Indent\7f460649
+Node: Lisp Indent\7f462265
+Node: C Indent\7f465715
+Node: Matching\7f470955
+Node: Comments\7f472477
+Node: Balanced Editing\7f478929
+Node: Lisp Completion\7f479943
+Node: Documentation\7f480958
+Node: Change Log\7f482197
+Node: Tags\7f484775
+Node: Tag Syntax\7f486424
+Node: Create Tags Table\7f490368
+Node: Etags Regexps\7f494428
+Node: Select Tags Table\7f499086
+Node: Find Tag\7f502824
+Node: Tags Search\7f505788
+Node: List Tags\7f509244
+Node: Fortran\7f510273
+Node: Fortran Motion\7f511349
+Node: Fortran Indent\7f512169
+Node: ForIndent Commands\7f512854
+Node: ForIndent Num\7f513999
+Node: ForIndent Conv\7f515273
+Node: ForIndent Vars\7f516049
+Node: Fortran Comments\7f517217
+Node: Fortran Columns\7f520815
+Node: Fortran Abbrev\7f522238
+Node: Asm Mode\7f523147
+Node: Running\7f523699
+Node: Compilation\7f524669
+Node: Lisp Modes\7f529519
+Node: Lisp Libraries\7f530792
+Node: Loading\7f531346
+Node: Compiling Libraries\7f535806
+Node: Mocklisp\7f538697
+Node: Lisp Eval\7f539374
+Node: Lisp Debug\7f543014
+Node: Lisp Interaction\7f548439
+Node: External Lisp\7f549794
+Node: Packages\7f551868
+Node: Package Terminology\7f552609
+Node: Using Packages\7f553967
+Node: Building Packages\7f562756
+Node: Abbrevs\7f565278
+Node: Defining Abbrevs\7f567478
+Node: Expanding Abbrevs\7f569925
+Node: Editing Abbrevs\7f572627
+Node: Saving Abbrevs\7f574495
+Node: Dynamic Abbrevs\7f576435
+Node: Picture\7f577737
+Node: Basic Picture\7f580170
+Node: Insert in Picture\7f582455
+Node: Tabs in Picture\7f583877
+Node: Rectangles in Picture\7f585398
+Node: Sending Mail\7f587306
+Node: Mail Format\7f589017
+Node: Mail Headers\7f590367
+Node: Mail Mode\7f596777
+Node: Reading Mail\7f600390
+Node: Calendar/Diary\7f601965
+Node: Calendar Motion\7f603637
+Node: Calendar Unit Motion\7f604520
+Node: Move to Beginning or End\7f606843
+Node: Specified Dates\7f607976
+Node: Scroll Calendar\7f608864
+Node: Mark and Region\7f610655
+Node: General Calendar\7f612561
+Node: LaTeX Calendar\7f614169
+Node: Holidays\7f616183
+Node: Sunrise/Sunset\7f619285
+Node: Lunar Phases\7f622328
+Node: Other Calendars\7f623713
+Node: Calendar Systems\7f625200
+Node: To Other Calendar\7f628311
+Node: From Other Calendar\7f630302
+Node: Mayan Calendar\7f632607
+Node: Diary\7f635802
+Node: Diary Commands\7f637551
+Node: Format of Diary File\7f640857
+Node: Date Formats\7f643727
+Node: Adding to Diary\7f646301
+Node: Special Diary Entries\7f647932
+Node: Calendar Customization\7f653271
+Node: Calendar Customizing\7f654133
+Node: Holiday Customizing\7f657352
+Node: Date Display Format\7f663820
+Node: Time Display Format\7f664778
+Node: Daylight Savings\7f665916
+Node: Diary Customizing\7f669104
+Node: Hebrew/Islamic Entries\7f673725
+Node: Fancy Diary Display\7f677065
+Node: Included Diary Files\7f678962
+Node: Sexp Diary Entries\7f679943
+Node: Appt Customizing\7f685033
+Node: Sorting\7f686079
+Node: Shell\7f690885
+Node: Single Shell\7f692178
+Node: Interactive Shell\7f693777
+Node: Shell Mode\7f697542
+Node: Terminal emulator\7f700033
+Node: Term Mode\7f702342
+Node: Paging in Term\7f703256
+Node: Narrowing\7f704054
+Node: Hardcopy\7f706004
+Node: Recursive Edit\7f706976
+Node: Dissociated Press\7f709963
+Node: CONX\7f712526
+Node: Amusements\7f713550
+Node: Emulation\7f714030
+Node: Customization\7f715874
+Node: Minor Modes\7f717598
+Node: Variables\7f719230
+Node: Examining\7f721186
+Node: Easy Customization\7f722647
+Node: Customization Groups\7f723661
+Node: Changing an Option\7f726590
+Node: Face Customization\7f732846
+Node: Specific Customization\7f734610
+Node: Edit Options\7f737217
+Node: Locals\7f738801
+Node: File Variables\7f741980
+Node: Keyboard Macros\7f746506
+Node: Basic Kbd Macro\7f748677
+Node: Save Kbd Macro\7f750609
+Node: Kbd Macro Query\7f752278
+Node: Key Bindings\7f754220
+Node: Keymaps\7f755094
+Node: Rebinding\7f758944
+Node: Interactive Rebinding\7f759640
+Node: Programmatic Rebinding\7f761832
+Node: Key Bindings Using Strings\7f764639
+Node: Disabling\7f766245
+Node: Syntax\7f768017
+Node: Syntax Entry\7f768898
+Node: Syntax Change\7f772982
+Node: Init File\7f775151
+Node: Init Syntax\7f776656
+Node: Init Examples\7f779008
+Node: Terminal Init\7f783198
+Node: Audible Bell\7f784908
+Node: Faces\7f788339
+Node: X Resources\7f793176
+Node: Geometry Resources\7f794797
+Node: Iconic Resources\7f797245
+Node: Resource List\7f797717
+Node: Face Resources\7f804224
+Node: Widgets\7f807901
+Node: Menubar Resources\7f808840
+Node: Quitting\7f809773
+Node: Lossage\7f812751
+Node: Stuck Recursive\7f813395
+Node: Screen Garbled\7f814101
+Node: Text Garbled\7f815235
+Node: Unasked-for Search\7f815874
+Node: Emergency Escape\7f816659
+Node: Total Frustration\7f818438
+Node: Bugs\7f819069
+Node: Glossary\7f828603
+Node: Manifesto\7f860232
+Node: Key Index\7f883708
+Node: Command Index\7f908228
+Node: Variable Index\7f948948
+Node: Concept Index\7f964899
\1f
End Tag Table
-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
* 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::
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
* 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.
* 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.
"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::.
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
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
-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
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
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.
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.
-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
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
* 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.
\1f
-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
----------------------
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',
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
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.
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.
\1f
-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
--------------------
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
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
`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.
+
+\1f
+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.
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
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 <script-name>' 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/'
\1f
-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
----------------------
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 <RET> REGEXP <RET>'
Search for REGEXP through the files in the selected tags table.
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').
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
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
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.
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:
-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
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.
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 <RET>. 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
-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
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. <RET> runs
`picture-newline', which just moves to the beginning of the following
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::).
\1f
File: xemacs.info, Node: Insert in Picture, Next: Tabs in Picture, Prev: Basic Picture, Up: Picture
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
`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').
\1f
File: xemacs.info, Node: Scroll Calendar, Next: Mark and Region, Prev: Calendar Motion, Up: Calendar/Diary
-----------------------
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).
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
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
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
`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
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
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
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
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.
-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
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.
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.
\1f
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:
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.
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.
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
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
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.
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
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.
\1f
File: xemacs.info, Node: Calendar Customization, Prev: Diary, Up: Calendar/Diary
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.
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.
\1f
File: xemacs.info, Node: Holiday Customizing, Next: Date Display Format, Prev: Calendar Customizing, Up: Calendar Customization
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.
(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
-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
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
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)'
`%%(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.)
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
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:
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.
-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
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
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,
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
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.
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
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
-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
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
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:
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
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.
`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.
`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.
`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.
* 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.
-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
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
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.).
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
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,
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,
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
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
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
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
-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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
-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
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
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
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.
-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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
-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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
-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
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::).
\1f
File: xemacs.info, Node: Command Switches, Next: Startup Paths, Prev: Exiting, Up: Top
`-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
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
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'
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'
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'.
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
==============================
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. <LEFT> or <END>) and one that doesn't. The
The file name is given as an "argument" to the command `C-x C-f'
(`find-file'). The command uses the "minibuffer" to read the argument.
-You have to type <RET> to terminate the argument (*note Minibuffer::.).
+You have to type <RET> to terminate the argument (*note Minibuffer::).
You can also use the Open... menu item from the File menu, then type
the name of the file to the prompt.
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
====
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
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::.
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
`..'; 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-<DEL>' 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
-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
kill-backwards <RET>' 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
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
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 <TAB>' or `C-M-\' (*note Indentation::.).
+ * Indent it with `C-x <TAB>' or `C-M-\' (*note Indentation::).
\1f
File: xemacs.info, Node: Marking Objects, Next: Mark Ring, Prev: Using Region, Up: Mark
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
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.
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 <DEL>
+Undo::). The delete commands include `C-d' (`delete-char') and <DEL>
(`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.
search backward and kill text before point.
Other syntactic units can be killed: words, with `M-<DEL>' and `M-d'
-(*note Words::.); sexps, with `C-M-k' (*note Lists::.); and sentences,
-with `C-x <DEL>' and `M-k' (*note Sentences::.).
+(*note Words::); sexps, with `C-M-k' (*note Lists::); and sentences,
+with `C-x <DEL>' and `M-k' (*note Sentences::).
\1f
File: xemacs.info, Node: Yanking, Next: Using X Selections, Prev: Killing, Up: Top
-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
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
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.
-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
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
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::).
`<ESC>'
to exit without doing any more replacements.
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.
* 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.
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
<RET>. 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
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.
-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
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
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
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
------------------
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'
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
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.
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.
`#'
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
-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
`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
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
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::.
To select a buffer named BUFNAME, type `C-x b BUFNAME <RET>'. 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
`C-x b BUFNAME <RET>', 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
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:
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.
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.
`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
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.
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
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.
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:
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::).
-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
the file. First use the command `C-x <RET> 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
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
edit files of text in a human language. Invoke `M-x text-mode' to
enter Text mode. In Text mode, <TAB> 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 <TAB> 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
<LFD>, is normally indented just like the previous line. Use `M-x
indented-text-mode' to select this 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 <RET> 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
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.
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
* update-elc.sh (ignore_dirs): Ignore lisp/utf-2000 subdirectory.
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-13 Martin Buchholz <martin@xemacs.org>
+
+ * etags.c: Fix warning: `_GNU_SOURCE' redefined.
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-11-29 Andreas Jaeger <aj@suse.de>
+
+ * Makefile.in.in (INSTALLABLE_SCRIPTS): Removed pstogif.
+ pstogif: Moved to package tm.
+
+1999-11-29 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-20 Martin Buchholz <martin@xemacs.org>
+
+ * process-gnu-depends.sh: Deleted. Obsolete.
+ * process-depends.sh: Deleted. Obsolete.
+
+1999-11-20 Jan Vroonhof <jan@xemacs.org>
+
+ * Makefile.in.in (instvardir): Added. From
+ Jeff Miller <jmiller@smart.net>
+
+1999-11-19 Martin Buchholz <martin@xemacs.org>
+
+ * etags.c: Upgrade to pot etags version 13.33.
+ Make `etags --version' print out `XEmacs', not `GNU Emacs'
+
+1999-11-17 Martin Buchholz <martin@xemacs.org>
+
+ * etags.c (canonicalize_filename): Typo fix
+
+1999-11-05 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * gnuserv.c (ipc_spawn_watchdog): Use pid_t instead of int.
+
+1999-11-10 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-11-04 Martin Buchholz <martin@xemacs.org>
+
+ * gnuserv.c (handle_response): Warning suppression
+
+1999-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <gleb@cs.stanford.edu>
+
+ * 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 <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
* Makefile.in.in (cppflags): Add -I$(top_srcdir)/src.
1999-04-29 Andy Piper <andy@xemacs.org>
-
- * 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
* pop.c: mess with includes so that it builds under native NT.
From Fabrice Popineau <popineau@ese-metz.fr>
-
+
1998-12-16 Andy Piper <andy@xemacs.org>
* XEmacs 21.2.6 is released
1998-04-19 Jan Vroonhof <vroonhof@math.ethz.ch>
* gnuclient.c (main): Read eval from from stdin if just "-batch"
- is given.
+ is given.
* gnudoit: Support this.
* gnuserv.1: Document this behavior.
1998-01-13 Martin Buchholz <martin@xemacs.org>
- * 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 <andyp@parallax.co.uk>
-
+
* gnuserv.h: only set UNIX_DOMAIN_SOCKETS if HAVE_SYS_UN_H is
set.
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 <vroonhof@math.ethz.ch>
* Makefile.in.in (INSTALLABLE_SCRIPTS): Readd Gnuattach.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
1997-06-13 Steven L Baur <steve@altair.xemacs.org>
* update-elc.sh (mule_p): Ignore lisp/language when building
libdir=@libdir@
srcdir=@srcdir@
datadir=@datadir@
+instvardir=@instvardir@
top_srcdir=@top_srcdir@
archlibdir=@archlibdir@
configuration=@configuration@
#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
# add-big-package.sh --- Add multiple file package to Package Lisp Hierarchy
# Copyright (C) 1997 Free Software Foundation, Inc.
-# Author: SL Baur <steve@altair.xemacs.org>
-# Maintainer: SL Baur <steve@altair.xemacs.org>
+# Author: SL Baur <steve@xemacs.org>
+# Maintainer: SL Baur <steve@xemacs.org>
# Keywords: packages internal
# This file is part of XEmacs.
;;; 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.
;;;
etcdir "@etcdir@"
exec_prefix "@exec_prefix@"
extra_objs "@extra_objs@"
+have_esd_config "@have_esd_config@"
includedir "@includedir@"
infodir "@infodir@"
infopath "@infopath@"
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.
;;;
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;
#include <stdio.h>
int
-main ()
+main (int argc, char *argv[])
{
register int ch;
register int notfirst = 0;
/*
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.
See the samples for more details.
*/
+#include <../src/config.h>
#include <stdio.h>
#include <stdlib.h>
-
-#ifdef MSDOS
-# include <fcntl.h>
-# include <sys/param.h>
-# include <io.h>
-# ifndef HAVE_CONFIG_H
-# define DOS_NT
-# include <sys/config.h>
-# endif
-#endif /* MSDOS */
-
-#ifdef WINDOWSNT
-# include <stdlib.h>
-# include <fcntl.h>
-# include <string.h>
-# include <io.h>
-# 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 <config.h>
- /* 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 <stdlib.h>
#include <string.h>
-#endif
+#include <ctype.h>
+#include <errno.h>
+#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
-#else
-# ifdef HAVE_GETCWD
- extern char *getcwd ();
-# endif
#endif /* HAVE_UNISTD_H */
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#ifndef errno
- extern int errno;
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-
#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
# 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):"")
STR = DFLT
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
char *tmp;
int i, done_mode = 0;
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
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++;
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
{
#endif
if (exec_argc < 2)
- fatal ("too few arguments");
+ fatal ("too few arguments", (char *) 0);
/*
* Get the over-rides from the environment
}
/* 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);
}
/*
* 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;
* 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 */
* 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 */
* 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 */
/* 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.
* 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
# define DEBUG FALSE
#endif
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+ /* 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 <fcntl.h>
# include <sys/param.h>
# 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 <config.h>
- /* 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 <stdlib.h>
#include <string.h>
typedef struct
{
char *suffix;
- int sufflen;
char *command; /* Takes one arg and decompresses to stdout */
} compressor;
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 ();
-
-\f
-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 */
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
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);
+
+\f
+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
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 */
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 */
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 }
};
/* 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 */
NULL };
char *Postscript_suffixes [] =
- { "ps", NULL };
+ { "ps", "psw", NULL }; /* .psw is for PSWrap */
char *Prolog_suffixes [] =
{ "prolog", NULL };
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 },
{ NULL, NULL } /* end of list */
};
\f
-void
+static void
print_language_names ()
{
language *lang;
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\
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\
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.");
#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 */
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.");
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);
}
{
at_language,
at_regexp,
- at_filename
+ at_filename,
+ at_icregexp
};
/* This structure helps us allow mixing of --lang and file names. */
#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)
{
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 */
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;
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 ();
if (nincluded_files == 0 && file_count == 0)
{
- error ("no input files specified.", 0);
+ error ("no input files specified.", (char *)NULL);
suggest_asking_for_help ();
}
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:
/*
- * 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 <vladimir@cs.ualberta.ca>
*/
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;
}
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, "-"))
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);
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. */
{
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;
inf = popen (cmd, "r");
free (cmd);
}
- else
+ else
inf = fopen (real_name, "r");
if (inf == NULL)
{
named = FALSE; /* use unnamed tag */
}
}
-
+
if (named)
name = savenstr (name, namelen);
else
}
/* Length of a number's decimal representation. */
-int
+static int
number_len (num)
long num;
{
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:
%[
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
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
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
%]
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)
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];
}
}
}
/*%>*/
-enum sym_type
+static enum sym_type
C_symtype (str, len, c_ext)
char *str;
int len;
vignore /* var-like: ignore until ';' */
} fvdef;
+bool fvextern; /* func or var: extern keyword seen; */
/*
* typedefs are recognized using a simple finite automaton.
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 */
* 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 */
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. */
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;
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
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;
/* 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:
*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)
*is_func_or_var = TRUE;
return TRUE;
}
+ break;
}
return FALSE;
* 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)
} while (0)
-void
+static void
make_C_tag (isfun)
bool isfun;
{
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 */
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)
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 == '*')
{
/* 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;
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)
{
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);
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;
}
} /* if (endtoken (c)) */
else if (intoken (c))
+ intok:
{
toklen++;
continue;
}
break;
case fstartlist:
+ fvextern = FALSE;
fvdef = fvnone;
break;
}
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
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:
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:
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:
fvdef = flistseen;
break;
}
- if (cblev == 0 && typdef == tend)
+ if (cblev == 0 && (typdef == tend))
{
typdef = tignore;
make_C_tag (FALSE); /* a typedef */
case '{':
if (definedef != dnone)
break;
- if (typdef == ttypedseen)
+ if (typdef == ttypeseen)
typdef = tinbody;
switch (structdef)
{
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:
C_entries (YACC, inf);
}
\f
-/* 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 */ \
\f
/* 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;
while (isdigit (*dbp));
}
-void
+static void
getit (inf)
FILE *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);
if (tail ("entry"))
getit (inf);
continue;
- case 'p':
- if (tail ("program") || tail ("procedure"))
- getit (inf);
- continue;
case 'b':
if (tail ("blockdata") || tail ("block data"))
{
}
\f
/*
+ * Philippe Waroquiers <philippe.waroquiers@eurocontrol.be>, 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 */
+}
+\f
+/*
* Bob Weiner, Motorola Inc., 4/3/94
* Unix and microcontroller assembly tag handling
* look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]'
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);
}
}
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,
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,
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 */
* lisp tag functions
* look for (def or (DEF, quote or QUOTE
*/
-int
+static int
L_isdef (strp)
register char *strp;
{
&& (strp[3] == 'f' || strp[3] == 'F'));
}
-int
+static int
L_isquote (strp)
register char *strp;
{
&& isspace (*++strp));
}
-void
+static void
L_getit ()
{
register char *cp;
}
for (cp = dbp /*+1*/;
- *cp != '\0' && *cp != '(' && *cp != ' ' && *cp != ')';
+ *cp != '\0' && *cp != '(' && !isspace(*cp) && *cp != ')';
cp++)
continue;
if (cp == dbp)
* Postscript tag functions
* Just look for lines where the first character is '/'
* Richard Mlynarik <mly@adoc.xerox.com>
+ * Also look at "defineps" for PSWrap
+ * suggested by Masatake YAMATO <masata-y@is.aist-nara.ac.jp>
*/
-void
+void
Postscript_functions (inf)
FILE *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);
+ }
}
}
* 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);
-}
\f
/* Find tags in TeX and LaTeX input files. */
: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 = '{';
* 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)
|| 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;
}
}
{
pos++;
- while (1)
+ while (1)
{
if (s[pos] == '\'')
{
return -1;
}
\f
-/*
+/*
* 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)
}
else if ((len = erlang_func (cp, last)) > 0)
{
- /*
+ /*
* Function. Store the function name so that we only
* generates a tag for the first clause.
*/
|| 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;
}
/*
- * Handle attributes. Currently, tags are generated for defines
+ * Handle attributes. Currently, tags are generated for defines
* and records.
*
* They are on the form:
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);
}
}
{
pos++;
- while (1)
+ while (1)
{
if (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;
{
/* 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 */
}
initbuffer (®exbuf);
while (readline_internal (®exbuf, regexfp) > 0)
- analyse_regex (regexbuf.buffer);
+ analyse_regex (regexbuf.buffer, ignore_case);
free (regexbuf.buffer);
fclose (regexfp);
}
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;
}
}
/* 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;
(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;
* Do the substitutions indicated by the regular expression and
* arguments.
*/
-char *
+static char *
substitute (in, out, regs)
char *in, *out;
struct re_registers *regs;
return;
}
\f
+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
}
}
#endif /* ETAGS_REGEXPS */
-
+
return result;
}
\f
/* 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);
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 != '/');
slashp = etags_strchr (slashp + 1, '/');
}
-
+
if (res[0] == '\0')
return savestr ("/");
else
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 = '/';
#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 */
/*
{
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 */
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) */
### gzip-el.sh --- compress superfluous installed source lisp
# Author: Jeff Miller <jmiller@smart.net>
-# Author: Hrvoje Niksic <hniksic@srce.hr>
-# Maintainer: Steve Baur <steve@altair.xemacs.org>
+# Author: Hrvoje Niksic <hniksic@xemacs.org>
+# Maintainer: Steve Baur <steve@xemacs.org>
# Created: 13 Feb 1997
# Version: 1.0
# Keywords: internal
void usage (void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
register long address;
char string[18];
#include <stdio.h>
#include <errno.h>
-extern int errno;
-
char *prog_name;
static int touchy_mkdir (char *path)
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include <errno.h>
static void
output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
static int InNewline=0;
static int
-nextcharin(infile, PortableNewlines)
-FILE *infile;
-int PortableNewlines;
+nextcharin (FILE *infile, int PortableNewlines)
{
int c;
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 *);
}
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;
ret = -1;
}
- close (server->file);
+ CLOSESOCKET (server->file);
}
if (server->buffer)
+++ /dev/null
-## 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
+++ /dev/null
-#!/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
+++ /dev/null
-: # -*-Perl-*-
-eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge
- if 0;
-#
-# pstogif.pl v1.0, July 1994, by Nikos Drakos <nikos@cbl.leeds.ac.uk>
-# 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 <dprhws.edp.Arco.com> 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 $<name>
- }
- }
-}
-
-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 <output file>] [-depth <color depth 1, 8 or 24>] [-flip <Flip_code>] [-density <pixel density>] <file>.ps\n\n";
-}
-
-
Report bugs to <bug-gnu-emacs@prep.ai.mit.edu>.'
-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.
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)
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) ||
echo "Rebuilding autoloads in $CANON_PWD"
echo " with $REAL..."
+#### echon really sucks!
if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
echon()
{
echo " (using $EMACS)"
# fuckin' sysv, man...
+# Nuke this function...
if [ "`uname -r | sed 's/[^0-9]*\([0-9]*\).*/\1/'`" -gt 4 ]; then
echon()
{
+ChangeLog.font-menu
finder-inf.el
+2000-01-12 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * mule/mule-charset.el (default-coded-charset-priority-list): Add
+ `mojikyo-pj-[1 .. 21]' in UTF-2000.
+
2000-01-14 MORIOKA Tomohiko <tomo@etl.go.jp>
* mule/mule-charset.el (default-coded-charset-priority-list): Add
* 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 <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-12 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * about.el (about-hackers): Update my email address.
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-11-06 Jason R Mastaler <jason@mastaler.com>
+
+ * 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 <ge204@eng.cam.ac.uk>
+
+ * finder.el (finder-commentary): add DOC string and fix
+ interactive spec
+
+1999-12-04 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * help.el (describe-function): Don't forget to intern the string
+ completing-read returns.
+ (describe-variable): Ditto.
+
+1999-11-16 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <burt@dfki.de>
+
+ * help.el: (describe-bindings-1): Added handling of keymaps for
+ the extents at point.
+
+1999-12-02 Mark Thomas <mthomas@jprc.com>
+
+ * gutter-items.el (buffers-tab-items): Wrap the function in a
+ save-match-data
+
+1999-12-04 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * help.el (describe-function): Use the DEFAULT argument to
+ completing-read.
+ (describe-variable): Ditto.
+
+1999-11-26 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <hniksic@iskon.hr>
+
+ * font-lock.el (font-lock-doc-string-face): Document the
+ `font-lock-lisp-like' property.
+
+1999-11-29 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-18 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * minibuf.el (read-coding-system): Accept symbol and
+ coding-system object as a default-coding-system.
+
+1999-11-16 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * minibuf.el (read-coding-system): Accept symbol as
+ a default-coding-system.
+
+1999-10-06 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * apropos.el (apropos-documentation): Use insert instead
+ of princ.
+
+1999-11-07 William M. Perry <wmperry@aventail.com>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-11-06 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * setup-paths.el (paths-default-info-directories): Add
+ /usr/share/info and /usr/local/share/info.
+
+1999-10-30 Hrvoje Niksic <hniksic@srce.hr>
+
+ * about.el: Updated Vladimir Ivanovic's info.
+
+11999-08-28 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <ge204@eng.cam.ac.uk>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * mule/mule-cmds.el (read-input-method-name): Accept symbols
+ correctly. Patch from Mikio Nakajima <minakaji@osaka.email.ne.jp>
+
+ * package-get.el (package-get-package-provider): Be verbose when
+ interactive. Patch from Robert Pluim
+
+1999-08-23 Mike McEwan <mike@lotusland.demon.co.uk>
+
+ * info.el (Info-suffix-list): Add ".info.bz2" to the recognised
+ info file suffixes.
+
+1999-08-19 Stephen Tse <stephent@sfu.ca>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * info.el (Info-page-prev): Don't do (sit-for 0).
+
+1999-10-13 Andy Piper <andy@xemacs.org>
+
+ * 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 <galibert@pobox.com>
+
+ * faces.el (init-device-faces): Don't initialize the random faces
+ on the stream device.
+
+1999-10-06 Andy Piper <andy@xemacs.org>
+
+ * files.el (recover-file): Don't use ls under windows for revert buffer.
+
+1999-09-25 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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] <sperber@informatik.uni-tuebingen.de>
+
+ * setup-paths.el (paths-find-module-directory): Ditto.
+
+1999-09-29 Werner Fink <werner@suse.de>
+
+ * setup-paths.el (paths-find-exec-directory): Add missing nil
+ parameter for environment.
+
+1999-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * modeline.el (modeline-format):
+ Only purecopy the strings. Else
+ (nsublis '(("%p" . "%P")) (default-value 'modeline-format) :test 'equal)
+ barfs.
+
+1999-08-28 Mike Woolley <mike@bulsara.com>
+
+ * 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 <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-in-gutter): use
+ last-nonminibuf-window instead of selected-window.
+
+1999-09-18 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <hniksic@srce.hr>
+
+ * simple.el (do-auto-fill): Commented out part of Kinsoku
+ processing.
+
+1999-09-14 Hrvoje Niksic <hniksic@srce.hr>
+
+ * 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] <sperber@informatik.uni-tuebingen.de>
+
+ * packages.el (packages-compute-package-locations): Fix typo from
+ -u rationalization.
+
+1999-09-11 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de>
+
+ * 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] <sperber@informatik.uni-tuebingen.de>
+
+ * 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] <sperber@informatik.uni-tuebingen.de>
+
+ * 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 <hniksic@srce.hr>
+
+ * subr.el (copy-symbol): New function.
+
+1999-09-08 Hrvoje Niksic <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * cmdloop.el (execute-extended-command): Update zmacs region
+ before the delay.
+ (execute-extended-command): Make the message gettext-friendly.
+
+1999-09-07 Andy Piper <andy@xemacs.org>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <martin@xemacs.org>
+
+ * cl-extra.el: Obsolete hash-table-type in favor of hash-table-weakness.
+
+1999-09-02 Hrvoje Niksic <hniksic@srce.hr>
+
+ * cl-macs.el (extent-start-position): Fix setf method.
+ (extent-end-position): Ditto.
+
+1999-09-02 Hrvoje Niksic <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * faces.el (isearch-secondary): Make isearch-secondary look
+ different than default.
+
+1999-08-30 Hrvoje Niksic <hniksic@srce.hr>
+
+ * 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 <jan@xemacs.org>
+
+ * xpm-button.el:
+ xbm-button.el: Need to exist in core because gui.el depends on
+ them.
+
+1999-08-31 Andy Piper <andy@xemacs.org>
+
+ * 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 <hniksic@srce.hr>
+
+ * 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 <hniksic@srce.hr>
+
+ * faces.el (isearch-secondary): Create face here.
+
+ * isearch-mode.el: Rewrote the "lazy highlighting" code not to use
+ timers.
+
+1999-08-27 Hrvoje Niksic <hniksic@srce.hr>
+
+ * subr.el (buffer-string): More robust backward compatibility
+ check, courtesy William Perry.
+
+1999-08-26 Hrvoje Niksic <hniksic@srce.hr>
+
+ * replace.el (perform-replace): Stop the search after the search
+ limit has been reached.
+
+1999-08-23 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-in-gutter): call add-tab-to-gutter
+ here if we don't have one.
+
+1999-08-15 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+
+ * 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 <verna@inf.enst.fr>
+
+ * rect.el: Cosmetics suggested by Dave Love <d.love@dl.ac.uk>.
+ Some doc strings improvements, and add a star to the `interactive'
+ calls.
+
+1999-08-18 Stef Epardaud <stef@lunatech.com>
+
+ * font-lock.el (java-font-lock-keywords-3): introduced new
+ keywords and regexpes for javadoc syntax 1.2.
+
+1999-08-17 Andy Piper <andy@xemacs.org>
+
+ * 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 <cgw@fnal.gov>
+
+ * cus-start.el: Customize the variable `bell-inhibit-time'.
+
+1999-08-16 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * gutter-items.el (remove-buffer-from-gutter-tab): fix *scratch*
+ deletion problem.
+
+1999-07-30 Didier Verna <verna@inf.enst.fr>
+
+ * 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 <verna@inf.enst.fr>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <jan@xemacs.org>
+
+ * faces.el (frob-face-property): Merge the fall-back specifier
+ with the target, not replace it.
+
+1999-08-05 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-in-gutter): make sure this will work
+ as an argument to create-frame-hook.
+
+1999-07-30 Hrvoje Niksic <hniksic@srce.hr>
+
+ * isearch-mode.el: Modified Bob and Darryl's code to use itimers
+ instead of timer emulation.
+
+1999-07-30 Darryl Okahata <darrylo@sonic.net>
+
+ * isearch-mode.el: Merged Bob Glickstein's <bobg@zanshin.com> GNU
+ Emacs isearch enhancements.
+
+1999-07-28 Andy Piper <andy@xemacs.org>
+
+ * 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 <seanm@storm.ca>
+
+ * auto-show.el (auto-show-truncationp): changed to match
+ `window_translation_on'
+
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
1999-07-23 Jan Vroonhof <jan@xemacs.org>
- * custom.el:
- * cus-face.el:
+ * custom.el:
+ * cus-face.el:
* cus-edit.el:
Massive custom Theme API changes.
1999-06-25 Karl M. Hegbloom <karlheg@debian.org>
- * 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.)
* 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 <tomo@etl.go.jp>
* minibuf.el (completing-read): Add new optional argument
;; Keywords: extensions
;; Version: 2.4
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; This file is part of XEmacs.
;;; Synched up with: Not in FSF.
-;; Original code: Jamie Zawinski <jwz@netscape.com>
-;; Text: Ben Wing <ben@xemacs.org>, Jamie Zawinski <jwz@netscape.com>
+;; Original code: Jamie Zawinski <jwz@jwz.org>
+;; Text: Ben Wing <ben@xemacs.org>, Jamie Zawinski <jwz@jwz.org>
;; 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 <pelegri@eng.sun.com>
;; 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 <hniksic@srce.hr>.
+;; Completely rewritten for 20.3 by Hrvoje Niksic <hniksic@xemacs.org>.
;; 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
(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")
(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.")
;; 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)
(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
(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,
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
(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")
(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")
;; Author: Joe Wells <jbw@bigbird.bu.edu>
;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
-;; Maintainer: SL Baur <steve@altair.xemacs.org>
+;; Maintainer: SL Baur <steve@xemacs.org>
;; Keywords: help
;; This file is part of XEmacs.
(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)
(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)
(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
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"
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.
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.
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.
;;;***
\f
-;;;### (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)
(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)
+
;;;***
\f
;;;### (autoloads (disassemble) "disass" "lisp/disass.el")
;;;***
\f
-;;;### (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)
(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)
;;;***
\f
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)))
;;;***
\f
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)
;;;***
\f
-;;;### (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)
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)
;;;***
\f
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)))
;;;***
\f
;;; Acknowledgement:
;; This code is loosely derived from autosave-in-tmp.el by Jamie
-;; Zawinski <jwz@netscape.com> (the version I had was last modified 22
+;; Zawinski <jwz@jwz.org> (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
: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.
;; 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))))
;; (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.
;;; 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.
(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)
;;; Copyright (c) 1991, 1994 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
;; Keywords: internal
;; Copyright (C) 1992, 1997 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Author: Hallvard Furuseth <hbf@ulrik.uio.no>
;; Maintainer: XEmacs Development Team
;; Keywords: internal, dumped
;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc.
;;; Copyright (C) 1996 Ben Wing.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
;; Keywords: internal
;; Copyright (C) 1998 by Free Software Foundation, Inc.
-;; Author: SL Baur <steve@altair.xemacs.org>
+;; Author: SL Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
(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."
;; 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)
(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))
(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))
;(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))
;; Copyright (C) 1997 by Free Software Foundation, Inc.
-;; Author: Steven L Baur <steve@altair.xemacs.org>
+;; Author: Steven L Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
(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)))
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.
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
(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
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>, then
;; Richard Stallman <rms@gnu.ai.mit.edu>, then
-;; Hrvoje Niksic <hniksic@srce.hr> (rewritten for XEmacs)
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Hrvoje Niksic <hniksic@xemacs.org> (rewritten for XEmacs)
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: help, faces
;; Version: 1.9960-x
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
(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)) ????
(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)
(princ "(")
(princ (quote ,setter))
(princ "\n '(")
- (princ object)
+ (prin1 object)
(princ " ")
(prin1 (third spec))
(princ ")")))))))
;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: help, faces
;; Version: 1.9960-x
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;; Copyright (C) 1997 by Free Software Foundation, Inc.
-;; Author: Steven L Baur <steve@altair.xemacs.org>
+;; Author: Steven L Baur <steve@xemacs.org>
;; Keywords: internal, help, faces
;; This file is part of XEmacs.
;; 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)
(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"))
(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"))
(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
;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: help, faces, dumped
;; Version: 1.9960-x
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Copyright (C) 1986, 1991-1994 Free Software Foundation, Inc.
;; Author: Doug Cutting <doug@csli.stanford.edu>
-;; Jamie Zawinski <jwz@netscape.com>
-;; Maintainer: Jamie Zawinski <jwz@netscape.com>
+;; Jamie Zawinski <jwz@jwz.org>
+;; Maintainer: XEmacs Development Team
;; Keywords: internal
;; This file is part of XEmacs.
(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))
+
(setq preloaded-file-list
(assemble-list
"backquote" ; needed for defsubst etc.
;; Kyle Jones <kyle_jones@wonderworks.com>
;; added "Exact match, then inexact" code
;; added support for include directive.
-;; Hrvoje Niksic <hniksic@srce.hr>
+;; Hrvoje Niksic <hniksic@xemacs.org>
;; various changes.
\f
;; This file is dumped with XEmacs.
;; face implementation #1 (used Lisp vectors and parallel C vectors;
-;; FSFmacs still uses this) authored by Jamie Zawinski <jwz@netscape.com>
+;; FSFmacs still uses this) authored by Jamie Zawinski <jwz@jwz.org>
;; pre Lucid-Emacs 19.0.
;; face implementation #2 (used one face object per frame per face)
;; 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))
(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
(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.")
((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
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)
(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))
;; 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:
;; 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."
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*")
;; Copyright (C) 1995 Amdahl Corporation.
;; Copyright (C) 1996 Ben Wing.
-;; Author: Jamie Zawinski <jwz@netscape.com>, for the LISPM Preservation Society.
+;; Author: Jamie Zawinski <jwz@jwz.org>, for the LISPM Preservation Society.
;; Minimally merged with FSF 19.34 by Barry Warsaw <bwarsaw@python.org>
;; Then (partially) synched with FSF 19.30, leading to:
;; Next Author: RMS
'((((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
; ;; 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."
(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
; (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)
+ )))
\f
;;; Additional text property functions.
(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
("\\<protected\\>" 0 font-lock-preprocessor-face)
("\\<public\\>" 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
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)
;; 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)
+
)))
)
;; Version: 3.11
;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el
-;; Hrvoje Niksic <hniksic@srce.hr>
+;; Hrvoje Niksic <hniksic@xemacs.org>
;; Maintainer: Jan Vroonhof <vroonhof@math.ethz.ch>,
-;; Hrvoje Niksic <hniksic@srce.hr>
+;; Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: environment, processes, terminals
;; This file is part of XEmacs.
;; Jan Vroonhof
;; Customized.
;;
-;; Hrvoje Niksic <hniksic@srce.hr> May/1997
+;; Hrvoje Niksic <hniksic@xemacs.org> May/1997
;; Completely rewritten. Now uses `defstruct' and other CL stuff
;; to define clients cleanly. Many thanks to Dave Gillespie!
;;
(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)))
"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))
"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
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
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)
(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."
(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.
"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
(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))))
(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)
(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)
;; ### 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 <hniksic@srce.hr>.
+;; Niksic <hniksic@xemacs.org>.
;;; Code:
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_")
(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
(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))))
;; ---------------------------------------------------------------------- ;;
(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
(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)))
(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))
;; 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")
"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."
(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)
;;; 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 <liberte@cs.uiuc.edu>
;; Maintainer: XEmacs Development Team
;; 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
;; 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
;; 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.
;;; 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)
-
\f
;;;=========================================================================
;;; 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.
: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.
: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)))
(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.
;;
(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)
(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))
(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)
;;;========================================================
;; 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.
(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)
(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.
;; 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
(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.
\\<isearch-mode-map>
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.
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\
;; 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)))
;; 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))
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
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)
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)
isearch-mode-map)
isearch-selected-frame (selected-frame)
- isearch-mode (gettext " Isearch")
)
;; XEmacs change: without clearing the match data, sometimes old values
(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
(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)
(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
(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.
;; 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))))))
\f
;;;====================================================
(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)))
"Edit the search string in the minibuffer.
The following additional command keys are active while editing.
\\<minibuffer-local-isearch-map>
-\\[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.
+\\<isearch-mode-map>
+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)
(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))
;; 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
(forward-char (if isearch-forward 1 -1))
(isearch-search))
(isearch-search)))
+
(isearch-push-state)
(isearch-update))
(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))
(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.
(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
isearch-yank-flag t))
(isearch-search-and-update))
-
(defun isearch-yank-word ()
"Pull next word from buffer into search string."
(interactive)
(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.
(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)
))
;; *, ?, 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 ()
(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)
;;===========================================================
;; 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))
()
(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."
(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
((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))))
\f
;;;==============================================================
-;; 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)))
\f
;; 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")
(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)
;;; (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")))))
(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)
(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)
;;
(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
;;;========================================================
;;; 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))))
;; 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)))
\f
;;;========================================================
(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
(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.
(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
(put 'with-caps-disable-folding 'lisp-indent-function 1)
(put 'with-caps-disable-folding 'edebug-form-spec '(form body))
+\f
+;;;========================================================
+;;; 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
;; Copyright (C) 1992, 1997 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Created: 19-aug-92
;; Maintainer: XEmacs Development Team
;; Keywords: internal, dumped
(provide 'itimer)
+(require 'lisp-float-type)
+
;; `itimer' feature means Emacs-Lisp programmers get:
;; itimerp
;; itimer-live-p
;;
;; See the doc strings of these functions for more information.
\f
-(defvar itimer-version "1.07"
+(defvar itimer-version "1.08"
"Version number of the itimer package.")
(defvar itimer-list nil
(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.")
;; 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)
(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))
(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))
(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))
(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)))
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)
(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))
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
;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Created: Jan 1998
-;; Version: $Revision: 1.7.2.3 $
+;; Version: $Revision: 1.7.2.6 $
;; Keywords: help comm
;; This file is part of XEmacs
: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."
(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
;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
;; Created: 14 Jul 1992
;; Keywords: docs, maint
-;; X-Modified-by: Bob Weiner <weiner@altrasoft.com>, 4/14/95, to support
+;; X-Modified-by: Bob Weiner <weiner@beopen.com>, 4/14/95, to support
;; InfoDock headers.
;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
(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.")
;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc.
;; Author: Unknown
-;; Maintainer: Steven L Baur <steve@altair.xemacs.org>
+;; Maintainer: Steven L Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
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"
'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)
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.
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."
(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
minibuffer-local-completion-map
minibuffer-local-must-match-map)
nil
- history))
+ history
+ nil
+ default))
(if (and (string= ret "")
default)
default
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)
(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.
(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
"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)
(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
;; type of char table. Some function names / arguments should be
;; parallel with syntax tables.
-;; Written by Ben Wing <wing@666.com>. The initialization code
+;; Written by Ben Wing <ben@xemacs.org>. The initialization code
;; at the end of this file comes from Mule.
;; Some bugfixes by Jareth Hein <jhod@po.iijnet.or.jp>
;;;###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)
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
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
(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
;; Copyright (C) 1997 by Free Software Foundation, Inc.
-;; Author: SL Baur <steve@altair.xemacs.org>
+;; Author: SL Baur <steve@xemacs.org>
;; Keywords: help, internal, mule
;; This file is part of XEmacs.
;;; mule-x-init.el --- initialization code for X Windows under MULE
;; Copyright (C) 1994 Free Software Foundation, Inc.
-;; Copyright (C) 1996 Ben Wing <wing@666.com>
+;; Copyright (C) 1996 Ben Wing <ben@xemacs.org>
;; Author: various
;; Keywords: mule X11
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)
(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...
;; Copyright (C) 1997 by Free Software Foundation, Inc.
-;; Author: SL Baur <steve@altair.xemacs.org>
+;; Author: SL Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
(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).
: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)
: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'."
(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)
"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))))))
(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))
;;
;; Copyright (C) 1998 by Free Software Foundation, Inc.
-;; Author: SL Baur <steve@altair.xemacs.org>
+;; Author: SL Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
;; Copyright (C) 1997 Free Software Foundation, Inc.
-;; Author: Steven L Baur <steve@altair.xemacs.org>
-;; Maintainer: Steven L Baur <steve@altair.xemacs.org>
+;; Author: Steven L Baur <steve@xemacs.org>
+;; Maintainer: Steven L Baur <steve@xemacs.org>
;; Keywords: internal, lisp, dumped
;; This file is part of XEmacs.
(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
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."
(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
(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)
(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
(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))
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.
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."
;;; 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
;; 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)
;;;###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))
;;;###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)
;;;###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
;;;###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))
;;;###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)
;;;###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)
;; 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
(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.
(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.
(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
"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)
(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
(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."
(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)
;; 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:
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
(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)))
;;; site-load.el --- Template file for site-wide XEmacs customization
;; Copyright (C) 1997 Free Software Foundation, Inc.
-;; Author: Steven L. Baur <steve@altair.xemacs.org>
+;; Author: Steven L. Baur <steve@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
(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
startup. Also implies `-vanilla'.
-vanilla Equivalent to -q -no-site-file -no-early-packages.
-q Same as -no-init-file.
+ -user-init-file <file> Use <file> as init file.
+ -user-init-directory <directory> use <directory> as init directory.
-user <user> Load user's init file instead of your own.
+ Equivalent to -user-init-file ~<user>/.emacs
+ -user-init-directory ~<user>/.xemacs/
-u <user> Same as -user.\n")
(let ((l command-switch-alist)
(insert (lambda (&rest x)
(if (null emacs-roots)
(startup-find-roots-warning)
(startup-setup-paths emacs-roots
+ user-init-directory
inhibit-early-packages
inhibit-site-lisp
debug-paths))
;; (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)
(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")
;; 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")
(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 "\
(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 ()
(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))
;; 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.
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))
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,
(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
(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)
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
(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)))
;; Copyright (C) 1995 Amdahl Corporation.
;; Copyright (C) 1995 Ben Wing.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, wp, faces, dumped
;; Copyright (C) 1998 by Free Software Foundation, Inc.
-;; Author: SL Baur <steve@altair.xemacs.org>
+;; Author: SL Baur <steve@xemacs.org>
;; Michael Sperber [Mr. Preprocessor] <sperber@Informatik.Uni-Tuebingen.De>
;; Keywords: internal, dumped
;;; 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:
"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)
;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: extensions
;; Version: 1.9960-x
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
(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)))))
;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: help, extensions, faces, hypermedia, dumped
;; Version: 1.9960-x
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;; #### 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 ";")
;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Maintainer: XEmacs Development Team
;; Rewritten by Martin Buchholz far too many times.
;;
;; 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
-;; <URL:http://people.netscape.com/jwz/xkeycaps/>,
+;; <URL:http://www.jwz.org/xkeycaps/>,
;; which is a graphical front end to xmodmap
;; that hides xmodmap's arcane syntax from you.
;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996 Ben Wing.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, internal, dumped
;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
;; Copyright (C) 1997 Sun Microsystems
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Restructured by: Jonathan Stigelman <Stig@hackvan.com>
;; Mule-ized by: Martin Buchholz
;; More restructuring for MS-Windows by Andy Piper <andy@xemacs.org>
;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
-;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Jamie Zawinski <jwz@jwz.org>
;; Created: 15-jun-92
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, internal, dumped
'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)
"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
(x-store-cutbuffer-internal 'CUT_BUFFER0 string))))
\f
-;;; 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)))
-\f
-
;FSFmacs (provide 'select)
;;; x-select.el ends here.
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-14 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c (TabsResize): reset need_layout so that we don't go
+ into infloop death.
+
+1999-12-14 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c (TabsSetValues): re-allocate GCs if font has changed.
+
+1999-12-13 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c (TabsResize): We need to expose the tabs after
+ clearing the window they are in.
+
+1999-12-08 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c: sync with Tabs 2.1.
+
+1999-12-07 Andy Piper <andy@xemacs.org>
+
+ * lwlib-Xlw.c (lw_lucid_widget_p): make sure we pick up the
+ clip-window as well.
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-12-05 Andy Piper <andy@xemacs.org>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * xlwtabs.c: Remove unused variables. Fix warnings.
+
+1999-11-10 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-09-09 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c: updated tabs widget from Ed Falk.
+ * xlwtabs.h: ditto.
+ * xlwtabsP.h: ditto.
+
+1999-09-22 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * lwlib-Xm.c (xm_update_label): don't clobber pixmap type labels
+ with text.
+
+1999-09-22 Martin Buchholz <martin@xemacs.org>
+
+ * xlwtabs.c: Fix C++ compilability.
+
+1999-09-18 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c: Put in tabs sync because clipping should fix useability
+ problems.
+
+1999-09-13 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c: Back out tabs sync because of reported useability
+ problems.
+
+1999-09-09 Andy Piper <andy@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * xlwgauge.c: Ansify.
+ Include <stdlib.h> 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 <martin@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * xlwgcs.c: include xmu.h
+
+1999-09-01 Andy Piper <andy@xemacs.org>
+
+ * xlwgauge.c: rearrange headers yet again.
+ * xlwcheckbox.c: ditto.
+ * xlwradio.c: ditto.
+ * xlwtabs.c: ditto.
+
+1999-09-01 Andy Piper <andy@xemacs.org>
+
+ * xlwgauge.c: use xmu.h
+ * xlwcheckbox.c: ditto.
+ * xlwradio.c: ditto.
+
+1999-08-31 Andy Piper <andy@xemacs.org>
+
+ * xlwtabs.c:
+ * xlwgcs.c:
+ * xlwradio.c:
+ * xlwcheckbox.c:
+ * xlwgauge.c: Fix for losing systems without Xmu.
+
+1999-08-31 Andy Piper <andy@xemacs.org>
+
+ * lwlib-Xm.c (xm_update_one_widget): fix for AIX compiler lossage.
+
+1999-08-30 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
## 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
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Label.h>
#endif
-
+#ifdef LWLIB_WIDGETS_ATHENA
+#include <X11/Xaw/Toggle.h>
+#include "xlwradio.h"
+#include "xlwcheckbox.h"
+#include "xlwgauge.h"
+#ifndef NEED_MOTIF
+#include <X11/Xaw/AsciiText.h>
+#endif
+#endif
#include <X11/Xatom.h>
static void xaw_generic_callback (Widget, XtPointer, XtPointer);
#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
);
}
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
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;
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 */
}
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
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)
#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
}
#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}
};
+
Widget
xaw_create_dialog (widget_instance* instance);
+Widget
+xaw_create_label (Widget parent, widget_value* val);
+
Boolean
lw_xaw_widget_p (Widget widget);
#include <config.h>
#include <stdlib.h> /* for abort () */
+#include <stdio.h> /* for abort () */
#include <limits.h>
#include "lwlib-Xlw.h"
+#include "lwlib-utils.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
#include <X11/ObjectP.h>
#include <X11/CompositeP.h>
#include <X11/Shell.h>
+#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
\f
#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 [] =
{
{"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}
};
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;
}
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)
;
xlw_update_scrollbar (instance, widget, val);
}
#endif
+#ifdef LWLIB_TABS_LUCID
+ else if (class == tabsWidgetClass)
+ {
+ xlw_update_tab_control (instance, widget, val);
+ }
+#endif
}
void
#include <Xm/Separator.h>
#include <Xm/DialogS.h>
#include <Xm/Form.h>
+#ifdef LWLIB_WIDGETS_MOTIF
#include <Xm/Scale.h>
#if XmVERSION > 1
-#include <Xm/ComboBox.h>
+#include <Xm/ComboBoxP.h>
+#endif
#endif
#ifdef LWLIB_MENUBARS_MOTIF
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
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 */
-
\f
#ifdef LWLIB_DIALOGS_MOTIF
#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
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)
{
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++;
if (name_string)
XmStringFree (name_string);
+
+ if (val_string)
+ XmStringFree (val_string);
}
#endif /* defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) */
instance);
XtSetArg (al [0], XmNset, val->selected);
XtSetArg (al [1], XmNalignment, XmALIGNMENT_BEGINNING);
- XtSetValues (widget, al, 2);
+ XtSetValues (widget, al, 1);
}
static void
}
}
+#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
\f/* update a popup menu, pulldown menu or a menubar */
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 ||
{
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)
{
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;
}
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);
#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;
}
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++;
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);
}
static Widget
-make_text_field (widget_instance *instance)
+xm_create_text_field (widget_instance *instance)
{
Arg al[20];
int ac = 0;
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;
/* 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);
return combo;
}
#endif
+#endif /* LWLIB_WIDGETS_MOTIF */
\f
/* Table of functions to create widgets */
{"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}
};
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 */
XtDestroyWidget (instance->widget);
}
-#endif /* LWLIB_DIALOGS_MOTIF */
+#endif /* LWLIB_DIALOGS_MOTIF || LWLIB_WIDGETS_MOTIF */
}
\f/* popup utility */
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
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
}
#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
+
\f
/* set the keyboard focus */
void
Widget
xm_create_dialog (widget_instance* instance);
+Widget
+xm_create_label (Widget parent, widget_value* val);
+
Boolean
lw_motif_widget_p (Widget widget);
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
#include <X11/ObjectP.h>
#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)
#ifndef _LWLIB_UTILS_H_
#define _LWLIB_UTILS_H_
+void destroy_all_children (Widget widget);
void XtNoClearRefreshWidget (Widget);
typedef void (*XtApplyToWidgetsProc) (Widget, XtPointer);
widget_value_free_list = wv;
}
-static void free_widget_value_tree (widget_value *wv);
-
static void
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)
{
}
}
-static void
+void
free_widget_value_tree (widget_value *wv)
{
if (!wv)
*offset += wv->nargs;
}
}
+
/* 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,
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 *);
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;
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
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 ;
/* 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) ;
* 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 ;
}
else
tw->tabs.needs_layout = True ;
+ }
return needRedraw ;
}
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. */
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 )
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 */
case 'h':
case 'H':
+ default:
newtop = tw->composite.children[0] ;
break ;
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 )
else
{
+ /* find index of currently highlit child */
for(idx=0, childP=tw->composite.children; idx < nc; ++idx, ++childP )
if( tw->tabs.hilight == *childP )
break ;
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 */
case 'E':
newhl = tw->composite.children[nc-1] ;
break ;
+
+ default:
+ newhl = tw->tabs.hilight ;
+ break ;
}
}
XawTabsSetHighlight(Widget t, Widget w)
{
TabsWidget tw = (TabsWidget)t ;
- TabsConstraints tab ;
- Widget oldtop = tw->tabs.topWidget ;
if( !XtIsSubclass(t, tabsWidgetClass) )
return ;
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-07 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH
+ instead of PACKAGEPATH
+ From Marcus Harnisch <harnisch@mikrom.de>
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-12-06 Sandra Wambold <wambold@pobox.com>
+
+ * xemacs-faq.texi: Added MS-Windows questions; some other changes
+
+1999-11-29 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <wambold@cygnus.com>
+
+ * xemacs-faq.texi: fixed and commented out bad URL links
+
+1999-11-29 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * internals.texi (Lstream Functions):
+ * internals.texi (Lstream Methods):
+ Types have changed to size_t and ssize_t. Document them.
+
+1999-08-12 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * xemacs-faq.texi (Q4.4.2): added FAQ about Sun Workshop on
+ XEmacs 21
+
+1999-11-15 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-08-30 Robert Pluim <rpluim@bigfoot.com>
+
+ * xemacs/packages.texi (Using Packages): Added description of
+ package-get-package-provider.
+
+1999-07-27 Charles G Waldman <cgw@fnal.gov>
+
+ * xemacs-faq.texi (Q5.0.6): Describe `shell-multiple-shells'
+
+1999-08-01 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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 <stephane@lunatech.com>
+
+ * internals/internals.texi (Garbage Collection - Step by Step):
+ just added some dots to shut up compile warnings.
+
+1999-08-19 Matthias Neubauer <neubauer@informatik.uni-tuebingen.de>
+
+ * internals/internals.texi (Garbage Collection - Step by Step):
+ new section in chapter Allocation of Objects in XEmacs Lisp.
+
+1999-07-28 Andy Piper <andy@xemacs.org>
+
+ * internals.texi (Glyphs): add some glyph documentation.
+
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
# 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
RECURSIVE_MAKE = $(MAKE) $(MFLAGS) MAKEINFO='$(MAKEINFO)' TEXI2DVI='$(TEXI2DVI)'
+all : info
+
# Ughhh! The things we do to have portable makefiles...
INFODIR = ../info
$(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 = \
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 *~ \#* */*~ */\#*
@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
+++ /dev/null
-\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
\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
@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
@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.
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
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
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:
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
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:
@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.
@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.
@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}, ...
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
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
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
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
@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.
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
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
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
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
+++ /dev/null
-# 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 *~ \#*
+++ /dev/null
-@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
+++ /dev/null
-@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
@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
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
* Consoles; Devices; Frames; Windows::
* The Redisplay Mechanism::
* Extents::
-* Faces and Glyphs::
+* Faces::
+* Glyphs::
* Specifiers::
* Menus::
* Subprocesses::
* Introduction to Allocation::
* Garbage Collection::
* GCPROing::
+* Garbage Collection - Step by Step::
* Integers and Characters::
* Allocation from Frob Blocks::
* lrecords::
* Mathematics of Extent Ordering:: A rigorous foundation.
* Extent Fragments:: Cached information useful for redisplay.
-Faces and Glyphs
+Faces
+
+Glyphs
Specifiers
* Introduction to Allocation::
* Garbage Collection::
* GCPROing::
+* Garbage Collection - Step by Step::
* Integers and Characters::
* Allocation from Frob Blocks::
* lrecords::
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
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
@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
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
@menu
* Critical Redisplay Sections::
* Line Start Cache::
+* Redisplay Piece by Piece::
@end menu
@node Critical Redisplay Sections
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
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.
+++ /dev/null
-# 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 *~ \#*
@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''
@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
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
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;
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
@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
@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
@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
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
@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
@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
@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
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.}
(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
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
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}
@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
processed by @var{function}.
@end defun
+
@node Weak Hash Tables
@section Weak Hash Tables
@cindex hash table, weak
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}.
+++ /dev/null
-@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
+++ /dev/null
-@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
@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
@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
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}.
@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
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
@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
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}.
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
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}.
-\input ../texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename ../../info/lispref.info
@c @smallbook
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
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
@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)))
@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
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
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
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
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
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
(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
@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
+++ /dev/null
-#!/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}/</' \
- -e 's/}{/"/g' \
- | awk -F\" '{print $2, $1}' >! permuted.raw
-
-2:
-# Build break file for ptx.
-cat <<EOF > 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 <<EOF > 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/</{\\tt\\less}/' \
- -e '/"and /d' \
- -e '/"for /d' \
- | awk -F\" 'NF>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
@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
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
@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.
@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.
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")
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.
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:
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.)
@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}.
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
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
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,
@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
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
@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
* 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
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
@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,
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}.
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.
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.
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}.
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.
$(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
@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
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.
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
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
@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
@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.
# 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:
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:
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
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.
+++ /dev/null
-# 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 *~ \#*
@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
@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.
@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
@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
@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}.
-\input ../texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@setfilename ../../info/new-users-guide.info
@comment node-name, next, previous, up
@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
@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
@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
@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
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.
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
@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
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
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.
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
@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
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
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
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
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
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
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
@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
@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
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
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
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.
@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}.
@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}.
@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}.
@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}.
@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}.
@item no-validate
Used in @code{makeinfo}.
+@item no-wait
+Used in @code{emacsclient}.
+
@item no-warn
Used in various programs to inhibit warnings.
@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.
@item prompt
@samp{-p} in @code{ed}.
+@item proxy
+Specify an HTTP proxy.
+
@item query-user
@samp{-X} in @code{shar}.
@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}
@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}.
@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}.
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
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
@dots{}
#endif /* not foo */
@end group
+@group
+#ifdef foo
+ @dots{}
+#endif /* foo */
+@end group
@end example
@noindent
@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
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
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
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
@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);
@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
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.
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
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
`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
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
@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.
@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
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
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
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
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.
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
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
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.
@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}
@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
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
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.
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
% 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
%
% 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
\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
% 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.
%
% 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
\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.
\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
%% 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 <Return> to continue.}
+\newhelp\EMsimple{Press RETURN to continue.}
\outer\def\begin{\parsearg\beginxxx}
% @@ 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.
%\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
\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 }
%% 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
% 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.%
% @page forces the start of a new page
-
+%
\def\page{\par\vfill\supereject}
% @exdent text....
% @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}
\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}
\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.
%
% \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
}
\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}}%
%\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.
% 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{-}
\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
\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}
% 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\$}}
\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}%
% 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
}
\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
% 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
\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
\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
}
\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{%
\def\itemize{\parsearg\itemizezzz}
\def\itemizezzz #1{%
- \begingroup % ended by the @end itemsize
+ \begingroup % ended by the @end itemize
\itemizey {#1}{\Eitemize}
}
\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
% 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
% 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
\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
% 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}
% 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.
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
\def\indexdummies{%
+\def\ { }%
% Take care of the plain tex accent commands.
\def\"{\realbackslash "}%
\def\`{\realbackslash `}%
% (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 }%
\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}%
\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}}%
\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
%\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
% 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}}%
\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
\def\doprintindex#1{\begingroup
\dobreak \chapheadingskip{10000}%
%
- \indexfonts \rm
+ \smallfonts \rm
\tolerance = 9500
\indexbreaks
%
% 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
% 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
% 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.
%
% \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
% 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}
\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}%
%
% 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
}
\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
% 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
\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
% 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<toks register> to achieve this: TeX expands \the<toks> only once,
-% simply yielding the contents of the <toks register>.
+% simply yielding the contents of <toks register>. (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.
% 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
\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
\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
\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{
}
-\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 <tege@matematik.su.se>
\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
%\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
\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.
% 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.
% 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}%
}
\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}}
\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
\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.
\let\!=\ptexexclam
\let\i=\ptexi
\let\{=\ptexlbrace
+ \let\+=\tabalign
\let\}=\ptexrbrace
\let\*=\ptexstar
\let\t=\ptext
% \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
\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
\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
\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
\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.
\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
%% 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".
% 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
\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
\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}}}
\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 %
\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
}
\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}}}
% 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{%
\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.
\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
}
% #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
}
\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
}
\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
\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
\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 %
}
\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 %
}
% 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}}}
\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.
\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
+% <parameter list> 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}%
\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
% 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...}
\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
}
% 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
\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
\xspaceskip\z@skip
\parindent\defaultparindent
%
+ \smallfonts \rm
+ %
% Hang the footnote text off the number.
\hang
\textindent{\thisfootno}%
\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
% @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
% #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
% 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
\catcode`\<=\other
\catcode`\>=\other
\catcode`\+=\other
+\catcode`\$=\other
\def\normaldoublequote{"}
\def\normaltilde{~}
\def\normalcaret{^}
\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,
% 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).
% 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}}
\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}}
\def>{{\tt \gtr}}
\catcode`\+=\active
\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}
%\catcode 27=\active
%\def^^[{$\diamondsuit$}
% \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
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
-@let+=@normalplus}
+@let+=@normalplus
+@let$=@normaldollar}
@def@normalturnoffactive{@let"=@normaldoublequote
@let\=@normalbackslash
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
-@let+=@normalplus}
+@let+=@normalplus
+@let$=@normaldollar}
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
% 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:
\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.
@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
(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
@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 <arossini@@stat.sc.edu>
-@author Ben Wing <wing@@666.com>
+@author Ben Wing <ben@@xemacs.org>
@author Chuck Thompson <cthomp@@xemacs.org>
@author Steve Baur <steve@@xemacs.org>
@author Andreas Kaempf <andreas@@sccon.com>
@author Christian Nyb@o{} <chr@@mediascience.no>
+@author Sandra Wambold <wambold@@pobox.com>
@page
@end titlepage
* Customization:: Customization and Options.
* Subsystems:: Major Subsystems.
* Miscellaneous:: The Miscellaneous Stuff.
+* MS Windows:: XEmacs on Microsoft Windows.
* Current Events:: What the Future Holds.
@detailmenu
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?
* 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
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
@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.
@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/}
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
@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?
@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?
@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
@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.
@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
@end ifhtml
-@item @email{steve@@altair.xemacs.org, Steve Baur}
+@item @email{steve@@xemacs.org, Steve Baur}
@ifhtml
<br><img src="steve.gif" alt="Portrait of Steve Baur"><br>
@end ifhtml
-@item @email{hniksic@@srce.hr, Hrvoje Niksic}
+@item @email{hniksic@@xemacs.org, Hrvoje Niksic}
@ifhtml
<br><img src="hniksic.jpeg" alt="Portrait of Hrvoje Niksic"><br>
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
<br><img src="wing.gif" alt="Portrait of Ben Wing"><br>
@end ifhtml
@itemize @bullet
-@item @email{jwz@@netscape.com, Jamie Zawinski}
+@item @email{jwz@@jwz.org, Jamie Zawinski}
@ifhtml
<br><img src="jwz.gif" alt="Portrait of Jamie Zawinski"><br>
@end ifhtml
@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}
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
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
@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}.
@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?
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
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
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
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?
@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
@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
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
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
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?
@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.
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).
@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.
@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
@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?
@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?
@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
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
@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
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
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:
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
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,
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
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
+++ /dev/null
-# 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 *~ \#*
@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
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
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.
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}.
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
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.
@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
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
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:
@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},
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"
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.
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
@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
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
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
@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
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
@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 <script-name>' 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
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
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
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
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
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
-
-\input ../texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@setfilename ../../info/xemacs.info
@comment node-name, next, previous, up
all: $(MODNAME).ell
+distclean: clean
+
clean:
rm -f $(MODNAME).ell $(OBJS) base64_i.o base64_i.c
all: $(MODNAME).ell
+distclean: clean
+
clean:
rm -f $(MODNAME).ell $(OBJS) eldap_i.o eldap_i.c
all: $(MODNAME).ell
+distclean: clean
+
clean:
rm -f $(MODNAME).ell $(OBJS) sample_i.o sample_i.c
all: $(MODNAME).ell
+distclean: clean
+
clean:
rm -f $(MODNAME).ell $(OBJS) zlib_i.o zlib_i.c
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-11-28 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * xemacs.mak (depend): Only update `depend' if there were changes.
+ Use "perl ./make-src-depend" instead of "mkdepend".
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-11-27 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-10 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-10-07 Norbert Koch <n.koch@eai-delta.de>
+
+ * xemacs.mak: Ignore return code of 'del' calls. Use a make
+ variable for 'del'.
+
+1999-09-26 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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 <andy@xemacs.org>
+
+ * xemacs.mak (HAVE_WIDGETS): add define to appropriate places.
+
+1999-07-26 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * xemacs.mak ($(MANDIR)\lispref\lispref.texi): Replace bad
+ dependency.
+
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
NT=$(XEMACS)\nt
OUTDIR=$(NT)\obj
+# Define a variable for the 'del' command to use
+DEL=-del
+
# Program name and version
!include "..\version.sh"
!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
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
# 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 \
# Rules
.SUFFIXES:
-.SUFFIXES: .c .texi
+.SUFFIXES: .c .obj .texi .info
# nmake rule
!if $(DEBUG_XEMACS)
!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)
# 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
# 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
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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:
+ @<<makeinfo_test.bat
+@echo off
+if exist "$(MAKEINFO)" goto test_done
+@"$(PROGNAME)" -batch -vanilla -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
+@if not errorlevel 1 goto suggest_makeinfo
+@echo XEmacs `info' cannot be built!
+@echo Install XEmacs package `texinfo' (see README.packages).
+:suggest_makeinfo
+@echo Consider specifying path to makeinfo program: MAKEINFO=path
+@echo as this will build info docs faster than XEmacs using `texinfo'.
+@if errorlevel 1 exit 1
+:test_done
+<<NOKEEP
# Section handling info ends here
LOADPATH=$(LISP)
$(DOC): $(LIB_SRC)\make-docfile.exe
- -del $(DOC)
+ $(DEL) $(DOC)
$(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages
$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1)
$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2)
cd $(TEMACS_DIR)
set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
-1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump
- @cd $(NT)
+ cd $(NT)
@if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@
#------------------------------------------------------------------------------
# use this rule to build the complete system
-all: $(XEMACS)\Installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) $(LIB_SRC_TOOLS) $(RUNEMACS) \
- $(TEMACS) update-elc $(DOC) dump-xemacs info
+all: $(XEMACS)\Installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \
+ $(LIB_SRC_TOOLS) $(RUNEMACS) $(TEMACS) update-elc $(DOC) dump-xemacs \
+ $(LISP)/auto-autoloads.el $(LISP)/custom-load.el info
temacs: $(TEMACS)
# use this rule to install the system
install: all
+ cd $(NT)
@echo Installing in $(INSTALL_DIR) ...
@echo PlaceHolder > 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)"
@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 <<
!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
@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.
xemacs
SATISFIED
update-elc.stamp
+*.so.*
\ No newline at end of file
+2000-01-11 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * mule-charset.c (split_builtin_char): Use `MAX_CHAR_BMP'.
+
+ * char-ucs.h (MAX_CHAR_BMP): New macro.
+
+2000-01-10 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * text-coding.c: Sync with r21-2-24.
+
+2000-01-08 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * file-coding.c: Modify for UTF-2000.
+
2000-01-18 MORIOKA Tomohiko <tomo@etl.go.jp>
* mule-charset.c (vars_of_mule_charset): Update `utf-2000-version'
(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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * character.h (LEADING_BYTE_COMPOSITE): Deleted.
+
+1999-08-29 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * character.h (REP_BYTES_BY_FIRST_BYTE): Change order of
+ condition.
+
+1999-08-28 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * mule-charset.h (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE'
+ and `NUM_LEADING_BYTES' in assert.
+
+1999-08-27 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * mule-charset.c (syms_of_mule_charset): Update to
+ 0.4 (Shin-Imamiya).
+
+1999-07-13 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * file-coding.c (encode_coding_sjis): New implementation for
+ UTF2000. (decode_coding_sjis): Ditto.
+
+1999-06-17 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * mule-canna.c (c2mu): New implementation for UTF2000.
+ (m2c): Likewise.
+
+1999-06-15 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * file-coding.c (encode_coding_no_conversion): Modify for UTF2000.
+
+1999-06-15 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <tomo@etl.go.jp>
+
+ * 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 <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-13 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <ienaga@jsys.co.jp>
+
+ * input-method-xlib.c: Make sure src/ does not use Athena, except
+ indirectly through lwlib.
+
+1999-12-13 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * dbxrc (pobj): Add opaque_ptr, remove opaque_list.
+
+1999-12-10 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * file-coding.c (add_coding_system_to_list_mapper):
+ - (coding-system-list) should list aliases correctly.
+
+1999-12-07 Andy Piper <andy@xemacs.org>
+
+ * fileio.c (vars_of_fileio): directory separator fix from Mike Alexander.
+ * windowsnt.h (ditto):
+
+1999-11-27 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * 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 <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-12-06 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * lstream.c (Lstream_adding):
+ - Never compare a size_t and a possibly negative number.
+ - Optimize.
+
+1999-12-05 Kyle Jones <kyle_jones@wonderworks.com>
+
+ * lisp/itimer.el: (require 'lisp-float-type). Use
+ floats directly in itimer-time-difference.
+
+1999-12-05 Andy Piper <andy@xemacs.org>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * src/callproc.c (Fcall_process_internal): Be careful in writing
+ terminating null when copying args. nargs can be < 4.
+ Idea from Klaus Frank <klausf@i3.informatik.rwth-aachen.de>
+
+1999-11-29 Kyle Jones <kyle_jones@wonderworks.com>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * glyphs-x.c (convert_EImage_to_XImage): Guard against other
+ visual classes. From Rasmus Borup Hansen <rbh@math.ku.dk>
+
+1999-12-04 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <stdlib.h> for exit().
+ * unexhp9k800.x: #include <stdlib.h> for malloc().
+ Use proper prototype for Save_Shared_Data(void).
+
+1999-12-04 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * src/redisplay.c (point_would_be_visible): Correct for topclip.
+
+1999-12-02 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * Makefile.in.in (depend): Only update `depend' if there were changes.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * editfns.c (get_system_name): Remove.
+
+1999-11-26 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <kazz@imasy.or.jp>
+
+ * 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 <kazz@imasy.or.jp>
+
+ * 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 <rpluim@bigfoot.com>
+
+ * emacs.c (shut_down_emacs): Point users to PROBLEMS file
+
+1999-11-16 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <darve@crocco.stanford.edu>
+
+ * abbrev.c (abbrev_oblookup): Check whether wordend <= wordstart
+ if Vabbrev_start_location is used too.
+
+1999-10-27 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <wmperry@aventail.com>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * mule-ccl.c (CCL_WRITE_STRING): Fix compiler warnings.
+
+1999-11-12 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * mule-charset.c (non_ascii_valid_charptr_p): Check if
+ private charset is defined.
+
+1999-11-09 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * 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 <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
+1999-11-04 Martin Buchholz <martin@xemacs.org>
+
+ * mule-ccl.c (ccl_driver): Warning suppression
+
+1999-11-01 SL Baur <steve@miho.m17n.org>
+
+ * emacs.c (main_1): Guard call to reinit_vars_of_debug when not
+ building a debugged XEmacs.
+
+1999-10-28 Andreas Jaeger <aj@suse.de>
+
+ * src/emacs.c (main_1): Don't set the malloc hooks if using
+ DOUG_LEA_MALLOC.
+
+1999-10-30 Olivier Galibert <galibert@pobox.com>
+
+ * alloc.c (pdump_dump_rtables): Don't forget to dump the last
+ registered type.
+ (pdump): Ditto.
+
+1999-10-25 Olivier Galibert <galibert@pobox.com>
+
+ * emacs.c (main_1): Call reinit_vars_of_scrollbar_x.
+
+ * symsinit.h: Declare reinit_vars_of_scrollbar_x.
+
+1999-10-25 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <robbe@orcus.priv.at>
+
+ * 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 <aichner@ecf.teradyne.com>
+
+ * lisp.h (Dynarr_declare): Fix boo-boo.
+
+1999-10-24 Olivier Galibert <galibert@pobox.com>
+
+ * process-unix.c (allocate_pty): Fix HAVE_GETPT.
+ * process.h: Ditto.
+
+1999-10-24 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * redisplay.c (start_with_line_at_pixpos): Remove assert(cur_elt
+ >=0). Handle the cur_elt == 0 case.
+
+1999-10-24 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * unexelf.c: Merge Martin's c++ fixes back in
+
+1999-10-20 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * unexelf.c (unexec): Only copy the global offset
+ table from memory on sgi machines.
+
+1999-08-13 Alexandre Oliva <oliva@dcc.unicamp.br>, Vin Shelton <acs@xemacs.org>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * unexelf.c: Revert to 21.1 version
+
+1999-08-28 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * window.c (Fwindow_truncated_p): New function.
+
+1999-08-25 Jonathan Marten <jonathan.marten@uk.sun.com>
+
+ * window.c (window_truncation_on): Always return 0 for minibuffer
+ windows, to enable auto scrolling.
+
+1999-10-24 Neal Becker <nbecker@fred.net>
+ * process.h: Unix98 PTY support
+
+1999-10-17 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * fileio.c (Ffile_truename): Do proper mule decoding on
+ the argument to xrealpath()
+
+1999-08-19 Stephen Tse <stephent@sfu.ca>
+
+ * 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 <galibert@pobox.com>
+
+ * alloc.c (pdump_make_hash): Divide pointers by 8 for a better hash.
+
+1999-10-23 Olivier Galibert <galibert@pobox.com>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <jhar@tardis.ed.ac.uk>
+
+ * event-msw.c (mswindows_key_to_emacs_keysym):
+ Recognise keypad keys as different from normal keys.
+
+1999-10-14 Didier Verna <didier@xemacs.org>
+
+ * glyphs-x.c (x_finalize_image_instance): avoid freeing null pixmaps.
+
+1999-10-10 Olivier Galibert <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * elhash.c (resize_hash_table): Correct reference to lrecord_header.
+
+1999-10-06 Damon Lipparelli <lipp@primus.com>
+
+ * elhash.h: forward declare Lisp_Hash_Table.
+
+1999-10-06 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (Fset_image_instance_property): mark glyphs as dirty
+ after setting an image instance property.
+
+1999-10-05 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <lkindness@csl.co.uk>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * alloc.c: Further with the portable dumping.
+
+1999-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * redisplay-output.c (output_display_line): only clear the borders
+ if we are not displaying the gutter.
+
+1999-09-24 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <andy@xemacs.org>
+
+ * scrollbar-x.c (x_window_is_scrollbar): deleted.
+ * scrollbar-x.h: ditto.
+
+1999-09-23 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <rpluim@nortelnetworks.com>
+
+ * glyphs-x.c (update_widget_face): Guard fontList declaration for
+ non-motif uses.
+
+1999-09-20 Andy Piper <andy@xemacs.org>
+
+ * glyphs-msw.c (mswindows_update_subwindow): update faces.
+
+1999-09-19 Andy Piper <andy@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <aj@arthur.rhein-neckar.de>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * general.c:
+ * eldap.c:
+ Move symbols used only by eldap.c into eldap.c as statics.
+
+1999-09-09 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * 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 <mike@lotusland.demon.co.uk>
+
+ * redisplay-x.c (x_output_vertical_divider): make sure
+ shadow_thickness is positive.
+
+1999-09-10 Julian Back <jback@rudd.compulink.co.uk>
+
+ * process-nt.c (nt_create_process): fixup to cope with
+ Vprocess_environment.
+
+1999-09-02 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <hniksic@srce.hr>
+
+ * fns.c (Fmapc): Rename back to Fmapc_internal.
+
+1999-07-30 Gleb Arshinov <gleb@cs.stanford.edu>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <hniksic@srce.hr>
+
+ * extents.c (extent_remprop): Get extent's plist address
+ correctly.
+
+1999-08-31 Andy Piper <andy@xemacs.org>
+
+ * xmu.h: define Xmu/Converters.h things.
+
+1999-08-31 Andy Piper <andy@xemacs.org>
+
+ * opaque.c (equal_opaque_ptr): define.
+ (hash_opaque_ptr): define.
+
+ * xmu.h: define Xmu/Misc.h things.
+
+1999-08-17 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * file-coding.c (determine_real_coding_system): Treat `coding:'
+ cookie.
+
+1999-08-16 MORIOKA Tomohiko <tomo@etl.go.jp>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <turnbull@sk.tsukuba.ac.jp>
+
+1999-08-30 Andy Piper <andy@xemacs.org>
+
+ * 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
+ <cognot@ensg.u-nancy.fr>
+
+1999-08-29 Andy Piper <andy@xemacs.org>
+
+ * 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 <lipp@primus.com>
+
+ * events.h (XTIMEOUT): must preface Lisp_Timeout with ``struct''
+ (XSETTIMEOUT): fixup typo
+
+1999-08-11 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <galibert@pobox.com>
+
+ * 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 <andy@xemacs.org>
+
+ * console-x.h: declare new pixmap signatures.
+
+1999-08-23 Andy Piper <andy@xemacs.org>
+
+ * 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 <tomo@etl.go.jp>
+ * 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 <verna@inf.enst.fr>
- * 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 <tomo@etl.go.jp>
+1999-08-18 Andy Piper <andy@xemacs.org>
- * character.h (LEADING_BYTE_COMPOSITE): Deleted.
+ * redisplay-output.c (redisplay_output_subwindow): disable
+ clipping attempt.
-1999-08-29 MORIOKA Tomohiko <tomo@etl.go.jp>
+1999-08-17 Andy Piper <andy@xemacs.org>
- * 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 <cgw@fnal.gov>
- * 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 <cgw@fnal.gov>
- * 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 <tomo@etl.go.jp>
+1999-08-17 Andy Piper <andy@xemacs.org>
- * 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 <tomo@etl.go.jp>
+1999-08-16 Jeff Miller <jmiller@smart.net>
- * 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 <andy@xemacs.org>
-1999-08-28 MORIOKA Tomohiko <tomo@etl.go.jp>
+ * 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 <tomo@etl.go.jp>
+1999-08-15 Andy Piper <andy@xemacs.org>
- * 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 <tomo@etl.go.jp>
+ * 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 <tomo@etl.go.jp>
+1999-08-12 Jan Vroonhof <vroonhof@math.ethz.ch>
- * 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 <tomo@etl.go.jp>
+1999-08-14 Andy Piper <andy@xemacs.org>
- * 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 <mike@bulsara.com>
- * 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 <tomo@etl.go.jp>
+1999-08-08 Andy Piper <andyp@beasys.com>
- * 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 <ueno@ueda.info.waseda.ac.jp>
+ * 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 <tomo@etl.go.jp>
+ * 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 <tomo@etl.go.jp>
+ * 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 <andyp@beasys.com>
- * 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 <tomo@etl.go.jp>
+ * 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 <andyp@beasys.com>
-1999-06-15 MORIOKA Tomohiko <tomo@etl.go.jp>
+ * 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 <andy@xemacs.org>
-1999-06-15 MORIOKA Tomohiko <tomo@etl.go.jp>
+ * 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 <tomo@etl.go.jp>
+ * 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 <mike@bulsara.com>
-1999-06-15 MORIOKA Tomohiko <tomo@etl.go.jp>
+ * 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 <andy@xemacs.org>
- * 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 <andy@xemacs.org>
- * 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 <andy@xemacs.org>
- * 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 <tomo@etl.go.jp>
+ * 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 <andy@xemacs.org>
- * 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 <tomo@etl.go.jp>
+ * 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 <tomo@etl.go.jp>
+ * 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 <steve@xemacs.org>
+
+ * scrollbar-x.c: should include EmacsFrame.h.
+ From Jeff Miller <jmiller@smart.net>
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
1999-07-27 Jeff Miller <jmiller@smart.net>
- * 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 <steve@miho>
* 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.
* 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
1999-07-03 Gunnar Evermann <ge204@eng.cam.ac.uk>
- * 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 <steve@xemacs.org>
1998-12-11 Martin Buchholz <martin@xemacs.org>
- * 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 <hniksic@srce.hr>
1998-08-07 Matt Stupple <matts@tibco.com>
- * 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
1998-05-14 Damon Lipparelli <lipp@primus.com>
- * winslots.h: close comment
+ * winslots.h: close comment
1998-05-16 Kirill M. Katsnelson <kkm@kis.ru>
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
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++)
{
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 <config.h>
#include "specifier.h"
#include "sysfile.h"
#include "window.h"
+#include "console-stream.h"
#ifdef DOUG_LEA_MALLOC
#include <malloc.h>
#endif
+#ifdef HAVE_MMAP
+#include <unistd.h>
+#include <sys/mman.h>
+#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. */
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);
}
\f
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
static void *
allocate_lisp_storage (size_t size)
{
- void *p = xmalloc (size);
- return p;
+ return xmalloc (size);
}
}
}
-
-/* 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;
-}
-
\f
/************************************************************************/
/* Debugger support */
#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);
}
{
Lisp_Object val = Qnil;
- int size = XINT (length);
+ size_t size = XINT (length);
- while (size-- > 0)
+ while (size--)
val = Fcons (init, val);
return val;
}
/************************************************************************/
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;
}
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,
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))
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;
}
#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;
}
}
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 }
};
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
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--)
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()
*/
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;
/* 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
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;
+}
+
\f
/* 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)
#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;
}
}
}
/* 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
/* 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)
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; i<rt->count; i++)
+ {
+ UNMARK_RECORD_HEADER ((struct lrecord_header *)(*(EMACS_INT *)p));
+ p += sizeof (EMACS_INT);
+ }
+ } else
+ break;
+ }
+ }
+#endif
}
\f
/* Clearing for disksave. */
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() */
}
}
- 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).
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 ();
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
\f
/* 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);
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 */
#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
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.
{
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; i<pdump_struct_table.count; i++)
+ if (pdump_struct_table.list[i].sdesc == sdesc)
+ return &pdump_struct_table.list[i].list;
+
+ if (pdump_struct_table.size <= pdump_struct_table.count)
+ {
+ if (pdump_struct_table.size == -1)
+ pdump_struct_table.size = 10;
+ else
+ pdump_struct_table.size = pdump_struct_table.size * 2;
+ pdump_struct_table.list = xrealloc (pdump_struct_table.list,
+ pdump_struct_table.size*sizeof (pdump_struct_list_elmt));
+ }
+ pdump_struct_table.list[pdump_struct_table.count].list.first = 0;
+ pdump_struct_table.list[pdump_struct_table.count].list.align = 8;
+ pdump_struct_table.list[pdump_struct_table.count].list.count = 0;
+ pdump_struct_table.list[pdump_struct_table.count].sdesc = sdesc;
+
+ return &pdump_struct_table.list[pdump_struct_table.count++].list;
+}
+
+static struct {
+ Lisp_Object obj;
+ int position;
+ int offset;
+} backtrace[65536];
+
+static int depth;
+
+static void pdump_backtrace (void)
+{
+ int i;
+ fprintf (stderr, "pdump backtrace :\n");
+ for (i=0;i<depth;i++)
+ {
+ if (!backtrace[i].obj)
+ fprintf (stderr, " - ind. (%d, %d)\n", backtrace[i].position, backtrace[i].offset);
+ else
+ {
+ fprintf (stderr, " - %s (%d, %d)\n",
+ XRECORD_LHEADER_IMPLEMENTATION (backtrace[i].obj)->name,
+ 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;i<count;i++) {
+ const Lisp_Object *pobj = ((const Lisp_Object *)rdata) + i;
+ Lisp_Object dobj = *pobj;
+
+ backtrace[me].offset = (const char *)pobj - (const char *)data;
+ pdump_register_object (dobj);
+ }
+ break;
+ }
+ case XD_STRUCT_PTR:
+ {
+ EMACS_INT count = desc[pos].data1;
+ const struct struct_description *sdesc = desc[pos].data2;
+ const char *dobj = *(const char **)rdata;
+ if (dobj) {
+ if (XD_IS_INDIRECT (count))
+ count = pdump_get_indirect_count (count, desc, data);
+
+ pdump_register_struct (dobj, sdesc, count);
+ }
+ break;
+ }
+ default:
+ fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type);
+ pdump_backtrace ();
+ abort ();
+ };
+ }
+}
+
+static void
+pdump_register_object (Lisp_Object obj)
+{
+ if (!obj ||
+ !POINTER_TYPE_P (XTYPE (obj)) ||
+ pdump_get_entry (XRECORD_LHEADER (obj)))
+ return;
+
+ if (XRECORD_LHEADER_IMPLEMENTATION (obj)->description)
+ {
+ 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; i<count; i++)
+ {
+ pdump_register_sub (((char *)data) + sdesc->size*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; i<count; i++)
+ {
+ char *cur = ((char *)pdump_buf) + i*size;
+ restart:
+ for (pos = 0; desc[pos].type != XD_END; pos++)
+ {
+ rdata = cur + desc[pos].offset;
+ switch (desc[pos].type)
+ {
+ case XD_SPECIFIER_END:
+ pos = 0;
+ desc = ((const struct Lisp_Specifier *)(elmt->obj))->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; i<count; i++)
+ ((EMACS_INT *)rdata)[i] = pdump_qnil->save_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; i<count; i++)
+ {
+ Lisp_Object *pobj = ((Lisp_Object *)rdata) + i;
+ Lisp_Object dobj = *pobj;
+ if (dobj && POINTER_TYPE_P (XTYPE (dobj)))
+ *pobj = pdump_get_entry (XRECORD_LHEADER (dobj))->save_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<count; i++)
+ {
+ Lisp_Object *pobj = ((Lisp_Object *)rdata) + i;
+ Lisp_Object dobj = *pobj;
+ if (dobj && POINTER_TYPE_P (XTYPE (dobj)))
+ *pobj = dobj + delta;
+ }
+ break;
+ }
+ case XD_DOC_STRING:
+ {
+ EMACS_INT str = *(EMACS_INT *)rdata;
+ if (str > 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; i<pdump_struct_table.count; i++)
+ if (pdump_struct_table.list[i].list.align == align) {
+ elmt = pdump_struct_table.list[i].list.first;
+ idesc = pdump_struct_table.list[i].sdesc->description;
+ 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; i<staticidx; i++)
+ {
+ Lisp_Object obj = *staticvec[i];
+ if (obj && POINTER_TYPE_P (XTYPE (obj)))
+ reloc[i] = pdump_get_entry (XRECORD_LHEADER (obj))->save_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; i<dumpstructidx; i++)
+ {
+ EMACS_INT adr;
+ write (pdump_fd, &(dumpstructvec[i].data), sizeof (void *));
+ adr = pdump_get_entry (*(void **)(dumpstructvec[i].data))->save_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; i<pdump_struct_table.count; i++)
+ {
+ elmt = pdump_struct_table.list[i].list.first;
+ rt.desc = pdump_struct_table.list[i].sdesc->description;
+ 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; j<elmt->count; 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; i<pdump_wireidx; i++)
+ {
+ Lisp_Object obj = pdump_get_entry (XRECORD_LHEADER (*(pdump_wirevec[i])))->save_offset;
+ write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i]));
+ write (pdump_fd, &obj, sizeof (obj));
+ }
+
+ for (i=0; i<pdump_wireidx_list; i++)
+ {
+ Lisp_Object obj = *(pdump_wirevec_list[i]);
+ pdump_entry_list_elmt *elmt;
+ EMACS_INT res;
+
+ for(;;)
+ {
+ const struct lrecord_description *desc;
+ int pos;
+ elmt = pdump_get_entry (XRECORD_LHEADER (obj));
+ if (elmt)
+ break;
+ desc = XRECORD_LHEADER_IMPLEMENTATION (obj)->description;
+ 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; i<staticidx; i++)
+ pdump_register_object (*staticvec[i]);
+ for (i=0; i<pdump_wireidx; i++)
+ pdump_register_object (*pdump_wirevec[i]);
+
+ none = 1;
+ for(i=0;i<=last_lrecord_type_index_assigned;i++)
+ if (pdump_alert_undump_object[i])
+ {
+ if (none)
+ printf ("Undumpable types list :\n");
+ none = 0;
+ printf (" - %s (%d)\n", lrecord_implementations_table[i]->name, pdump_alert_undump_object[i]);
+ }
+ if (!none)
+ return;
+
+ for (i=0; i<dumpstructidx; i++)
+ pdump_register_struct (*(void **)(dumpstructvec[i].data), dumpstructvec[i].desc, 1);
+
+ memcpy (hd.signature, "XEmacsDP", 8);
+ hd.reloc_address = 0;
+ hd.nb_staticpro = staticidx;
+ hd.nb_structdmp = dumpstructidx;
+ hd.last_type = last_lrecord_type_index_assigned;
+
+ cur_offset = 256;
+ max_size = 0;
+
+ pdump_scan_by_alignement (pdump_allocate_offset);
+ pdump_qnil = pdump_get_entry (XRECORD_LHEADER (Qnil));
+
+ pdump_buf = malloc (max_size);
+ pdump_fd = open ("xemacs.dmp", O_WRONLY|O_CREAT|O_TRUNC, 0666);
+ hd.stab_offset = (cur_offset + 3) & ~3;
+
+ write (pdump_fd, &hd, sizeof (hd));
+ lseek (pdump_fd, 256, SEEK_SET);
+
+ pdump_scan_by_alignement (pdump_dump_data);
+
+ lseek (pdump_fd, hd.stab_offset, SEEK_SET);
+
+ pdump_dump_staticvec ();
+ pdump_dump_structvec ();
+ pdump_dump_itable ();
+ pdump_dump_rtables ();
+ pdump_dump_wired ();
+
+ close (pdump_fd);
+ free (pdump_buf);
+
+ free (pdump_hash);
+
+ Vterminal_console = t_console;
+ Vterminal_frame = t_frame;
+ Vterminal_device = t_device;
+}
+
+int
+pdump_load (void)
+{
+ size_t length;
+ int i;
+ char *p;
+ EMACS_INT delta;
+ EMACS_INT count;
+
+ pdump_start = pdump_end = 0;
+
+ pdump_fd = open ("xemacs.dmp", O_RDONLY);
+ if (pdump_fd<0)
+ return 0;
+
+ length = lseek (pdump_fd, 0, SEEK_END);
+ lseek (pdump_fd, 0, SEEK_SET);
+
+#ifdef HAVE_MMAP
+ pdump_start = mmap (0, length, PROT_READ|PROT_WRITE, MAP_PRIVATE, pdump_fd, 0);
+ if (pdump_start == MAP_FAILED)
+ pdump_start = 0;
+#endif
+
+ if (!pdump_start)
+ {
+ pdump_start = (void *)((((unsigned long)(malloc(length+255))) + 255) & ~255);
+ read(pdump_fd, pdump_start, length);
+ }
+
+ close (pdump_fd);
+
+ pdump_end = pdump_start + length;
+
+ staticidx = ((dump_header *)(pdump_start))->nb_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; i<staticidx; i++)
+ {
+ Lisp_Object obj = *(Lisp_Object *)p;
+ p += sizeof (Lisp_Object);
+ if (obj && POINTER_TYPE_P (XTYPE (obj)))
+ obj += delta;
+ *staticvec[i] = obj;
+ }
+
+ /* Put back the dumpstructs */
+ for (i=0; i<((dump_header *)pdump_start)->nb_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; i<sizeof(lrecord_implementations_table)/sizeof(lrecord_implementations_table[0]); i++)
+ if (lrecord_implementations_table[i])
+ {
+ *(lrecord_implementations_table[i]->lrecord_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; i<rt->count; 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; i<count; i++)
+ {
+ Lisp_Object *var, obj;
+ var = *(Lisp_Object **)p;
+ p += sizeof (Lisp_Object *);
+
+ obj = *(Lisp_Object *)p;
+ p += sizeof (Lisp_Object);
+
+ if (obj && POINTER_TYPE_P (XTYPE (obj)))
+ obj += delta;
+ *var = obj;
+ }
+
+ /* Final cleanups */
+ /* reorganize hash tables */
+ p = pdump_rt_list;
+ for(;;)
+ {
+ pdump_reloc_table *rt = (pdump_reloc_table *)p;
+ p += sizeof (pdump_reloc_table);
+ if (!rt->desc)
+ break;
+ if (rt->desc == hash_table_description)
+ {
+ for (i=0; i<rt->count; 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
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.
/* 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,
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;
}
static Lisp_Object
-mark_buffer (Lisp_Object obj, void (*markobj) (Lisp_Object))
+mark_buffer (Lisp_Object obj)
{
struct buffer *buf = XBUFFER (obj);
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.) */
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;
}
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");
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");
"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.
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);
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).
#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)
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) \
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));
}
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));
}
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);
}
#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);
}
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);
/* 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
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
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<<VALBITS)-1)) \
- METER_1 (this_code)++; \
- if (last_code \
- && METER_2 (last_code, this_code) != ((1<<VALBITS)-1)) \
- METER_2 (last_code, this_code)++; \
- } \
-} while (0)
+static void
+meter_code (Opcode prev_opcode, Opcode this_opcode)
+{
+ if (byte_metering_on)
+ {
+ Lisp_Object *p = XVECTOR_DATA (XVECTOR_DATA (Vbyte_code_meter)[this_opcode]);
+ p[0] = INT_PLUS1 (p[0]);
+ if (prev_opcode)
+ p[prev_opcode] = INT_PLUS1 (p[prev_opcode]);
+ }
+}
#endif /* BYTE_CODE_METER */
{
retry:
+ if (INTP (obj)) return make_int (- XINT (obj));
#ifdef LISP_FLOAT_TYPE
if (FLOATP (obj)) return make_float (- XFLOAT_DATA (obj));
#endif
if (CHARP (obj)) return make_int (- ((int) XCHAR (obj)));
if (MARKERP (obj)) return make_int (- ((int) marker_position (obj)));
- if (INTP (obj)) return make_int (- XINT (obj));
obj = wrong_type_argument (Qnumber_char_or_marker_p, obj);
goto retry;
#ifdef LISP_FLOAT_TYPE
{
- int ival1, ival2;
+ EMACS_INT ival1, ival2;
if (INTP (obj1)) ival1 = XINT (obj1);
else if (CHARP (obj1)) ival1 = XCHAR (obj1);
}
#else /* !LISP_FLOAT_TYPE */
{
- int ival1, ival2;
+ EMACS_INT ival1, ival2;
if (INTP (obj1)) ival1 = XINT (obj1);
else if (CHARP (obj1)) ival1 = XCHAR (obj1);
bytecode_arithop (Lisp_Object obj1, Lisp_Object obj2, Opcode opcode)
{
#ifdef LISP_FLOAT_TYPE
- int ival1, ival2;
+ EMACS_INT ival1, ival2;
int float_p;
retry:
return make_float (dval1);
}
#else /* !LISP_FLOAT_TYPE */
- int ival1, ival2;
+ EMACS_INT ival1, ival2;
retry:
#ifdef BYTE_CODE_METER
prev_opcode = this_opcode;
this_opcode = opcode;
- METER_CODE (prev_opcode, this_opcode);
+ meter_code (prev_opcode, this_opcode);
#endif
switch (opcode)
opcode == Bunbind+6 ? READ_UINT_1 : READ_UINT_2));
break;
+
case Bgoto:
JUMP;
break;
}
case Bsub1:
- TOP = INTP (TOP) ? make_int (XINT (TOP) - 1) : Fsub1 (TOP);
+ TOP = INTP (TOP) ? INT_MINUS1 (TOP) : Fsub1 (TOP);
break;
case Badd1:
- TOP = INTP (TOP) ? make_int (XINT (TOP) + 1) : Fadd1 (TOP);
+ TOP = INTP (TOP) ? INT_PLUS1 (TOP) : Fadd1 (TOP);
break;
Lisp_Object arg2 = POP;
Lisp_Object arg1 = TOP;
TOP = INTP (arg1) && INTP (arg2) ?
- make_int (XINT (arg1) + XINT (arg2)) :
+ INT_PLUS (arg1, arg2) :
bytecode_arithop (arg1, arg2, opcode);
break;
}
Lisp_Object arg2 = POP;
Lisp_Object arg1 = TOP;
TOP = INTP (arg1) && INTP (arg2) ?
- make_int (XINT (arg1) - XINT (arg2)) :
+ INT_MINUS (arg1, arg2) :
bytecode_arithop (arg1, arg2, opcode);
break;
}
break;
}
-
case Bset:
{
Lisp_Object arg = POP;
program, &program_length, &varbind_count);
f->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));
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;
/* 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 ();
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)
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;
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*");
{
int fd = XINT (Fcar (fdpid));
int pid = XINT (Fcdr (fdpid));
+#ifdef WINDOWSNT
+ HANDLE pHandle;
+#endif
if (!call_process_exited &&
EMACS_KILLPG (pid, SIGINT) == 0)
/* #### "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;
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;
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));
#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 ();
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))
{
nread = 0;
while (nread < bufsize - 1024)
{
- int this_read
+ ssize_t this_read
= Lstream_read (XLSTREAM (instream), bufptr + nread,
bufsize - nread);
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. */
#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);
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);
}
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);
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;
#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.
{
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])
\f
/************************************************************************/
#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)
#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)
#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;
}
#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;
}
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 =
#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 }
};
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;
}
#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)))
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)
{
{
/* DO NOT staticpro this. It works just like Vweak_hash_tables. */
Vall_syntax_tables = Qnil;
+ pdump_wire_list (&Vall_syntax_tables);
}
void
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 */
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)
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);
/* 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;
#undef HAVE_GETTIMEOFDAY
#undef HAVE_GETWD
#undef HAVE_GETCWD
+#undef HAVE_GETPT
#undef HAVE_LOGB
#undef HAVE_LRAND48
#undef HAVE_MATHERR
#undef HAVE_SIGPROCMASK
#undef HAVE_SIGSETJMP
#undef HAVE_SNPRINTF
+#undef HAVE_STPCPY
#undef HAVE_STRCASECMP
#undef HAVE_STRERROR
#undef HAVE_TZSET
#endif
/* Allow the source to use standard types */
+#undef ssize_t
#undef size_t
#undef pid_t
#undef mode_t
#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
#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)
#undef INFODIR_USER_DEFINED
#undef INFOPATH_USER_DEFINED
+#undef PDUMP
+
#endif /* _SRC_CONFIG_H_ */
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. */
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
}
void
+reinit_console_type_create_mswindows (void)
+{
+ REINITIALIZE_CONSOLE_TYPE (mswindows);
+}
+
+void
vars_of_console_mswindows (void)
{
Fprovide (Qmswindows);
#endif
#include <windows.h>
#include <ddeml.h> /* DDE management library */
-#if !defined (__CYGWIN32__) && !defined(__MINGW32__)
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__) \
+ || CYGWIN_VERSION_DLL_MAJOR > 20
#include <shellapi.h> /* FileManager/Explorer drag and drop */
#include <commctrl.h>
#endif
/* The name of the main window class */
#define XEMACS_CLASS "XEmacs"
+#define XEMACS_CONTROL_CLASS "XEmacsControl"
/*
* Console
/* 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);
}
void
+reinit_console_type_create_stream (void)
+{
+ REINITIALIZE_CONSOLE_TYPE (stream);
+}
+
+void
vars_of_console_stream (void)
{
DEFVAR_LISP ("terminal-console", &Vterminal_console /*
staticpro (&Vstdio_str);
}
+#ifndef PDUMP
void
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
#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,
#ifdef FILE_CODING
#include "file-coding.h"
#endif
-#ifdef HAVE_GPM
-#include "gpmevent.h"
-#endif
DEFINE_CONSOLE_TYPE (tty);
DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
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);
{
}
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
}
void
+reinit_console_type_create_tty (void)
+{
+ REINITIALIZE_CONSOLE_TYPE (tty);
+}
+
+void
image_instantiator_format_create_glyphs_tty (void)
{
IIFORMAT_VALID_CONSOLE (tty, nothing);
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;
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)
CONSOLE_HAS_METHOD (x, initially_selected_for_input);
}
+
+void
+reinit_console_type_create_x (void)
+{
+ REINITIALIZE_CONSOLE_TYPE (x);
+}
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;
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,
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);
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.
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.
/* 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);
\f
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;
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);
}
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.
*/ );
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
{
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.
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);
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.
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 */
/* 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)
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);
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 *);
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);
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);
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 *,
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,
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) \
#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)
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;
}
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));
/* 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)))
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
- CHECK_LISP_WRITEABLE (conscell);
XCAR (conscell) = newcar;
return newcar;
}
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
- CHECK_LISP_WRITEABLE (conscell);
XCDR (conscell) = newcdr;
return newcdr;
}
*/
(array, index_))
{
- int idx;
+ EMACS_INT idx;
retry:
*/
(array, index_, newval))
{
- int idx;
+ EMACS_INT idx;
retry:
if (idx < 0) goto range_error;
- CHECK_LISP_WRITEABLE (array);
-
if (VECTORP (array))
{
if (idx >= XVECTOR_LENGTH (array)) goto range_error;
}
}
-static int
+static EMACS_INT
integer_char_or_marker_to_int (Lisp_Object obj)
{
retry:
*/
(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);
}
#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;
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 */
}
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 }
};
*/
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;
/* 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;
(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);
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
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);
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);
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;
}
}
/* 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;
}
}
}
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 =
/* 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:
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);
if (go_tortoise)
tortoise = XCDR (tortoise);
go_tortoise = !go_tortoise;
- if (GC_EQ (rest2, tortoise))
+ if (EQ (rest2, tortoise))
break;
}
}
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");
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");
{
/* 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 /*
}
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
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
* 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;
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);
}
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.
to emacs.c. */
xemacs_debug_loop (INIT, Qnil, Qnil);
}
+
+void
+vars_of_debug (void)
+{
+ reinit_vars_of_debug ();
+}
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 \
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
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
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
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
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
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
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
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
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
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
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
#include "syssignal.h" /* for SIGWINCH */
-#ifdef HAVE_GPM
-#include <gpm.h>
-#endif
-
#include <errno.h>
Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win;
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))
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)
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;
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)
;
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);
}
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);
}
\f
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))
{
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))
{
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;
}
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
staticpro (&Vdefault_x_device);
Vdefault_x_device = Qnil;
-
- error_expected = 0;
- error_occurred = 0;
-
- in_resource_setting = 0;
}
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;
\f
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);
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");
}
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.
*/ );
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);
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;
#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)
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)
#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))
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))
}
struct user_cache {
- char **data;
+ Bufbyte **data;
int length;
int size;
EMACS_TIME last_rebuild_time;
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 ();
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
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
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)
{
/* 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;
}
}
{
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
#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 */
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;
(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
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
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
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.
*/
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;
\f
/************************************************************************/
/* Utility Functions */
}
static Lisp_Object
-mark_ldap (Lisp_Object obj, void (*markobj) (Lisp_Object))
+mark_ldap (Lisp_Object obj)
{
return XLDAP (obj)->host;
}
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);
#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)
#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
{
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
\f
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;
}
\f
/* 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
hentry *e, *sentinel;
if ((ht1->test_function != ht2->test_function) ||
- (ht1->type != ht2->type) ||
+ (ht1->weakness != ht2->weakness) ||
(ht1->count != ht2->count))
return 0;
#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
#<hash-table size 2/13 data (key1 value1 key2 value2) 0x874d>
write_c_string (print_readably ? "#s(hash-table" : "#<hash-table",
printcharfun);
- if (ht->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. */
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);
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 }
};
}
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)
{
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;
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.
}
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 */
}
static int
hash_table_rehash_size_validate (Lisp_Object keyword, Lisp_Object value,
- Error_behavior errb)
+ Error_behavior errb)
{
if (!FLOATP (value))
{
{
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))
{
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. */
{
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)
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
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, /*
}
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;
*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 *
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)
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'.
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
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 */
/************************************************************************/
/* 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;
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);
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);
}
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;
{
/* 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;
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))
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.
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
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
{
/* This must NOT be staticpro'd */
Vall_weak_hash_tables = Qnil;
+ pdump_wire_list (&Vall_weak_hash_tables);
}
#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,
HASH_TABLE_EQUAL
};
+extern const struct lrecord_description hash_table_description[];
+
EXFUN (Fcopy_hash_table, 1);
EXFUN (Fhash_table_count, 1);
EXFUN (Fgethash, 3);
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,
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_ */
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;
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);
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, */
__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;
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
#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
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. */
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
Any of the object-creating functions on alloc.c: e.g.
make_pure_*()
- Fpurecopy()
make_string()
build_string()
make_vector()
Fcons()
listN()
make_opaque_ptr()
- make_opaque_long()
perhaps a few others.
*/
/* 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
vars_of_search ();
vars_of_select ();
vars_of_sound ();
- vars_of_specifier ();
vars_of_symbols ();
vars_of_syntax ();
#ifdef HAVE_TOOLBARS
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.
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. */
{
/* 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.
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 */
}
("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"
/* 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);
symname_ext = 0;
garbage_collect_1 ();
+
+#ifdef PDUMP
+ pdump ();
+#else
+
#ifdef DOUG_LEA_MALLOC
malloc_state_ptr = malloc_get_state ();
#endif
#ifdef DOUG_LEA_MALLOC
free (malloc_state_ptr);
#endif
+#endif /* not PDUMP */
}
#endif /* not MSDOS and EMX */
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"
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.
#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.
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.
#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
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));
}
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.
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.
staticpro (&Vmodule_extensions);
load_modules_quietly = 0;
- emodules_depth = 0;
- modules = (emodules_list *)0;
- modnum = 0;
Vmodule_load_path = Qnil;
Fprovide (intern ("modules"));
}
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) \
{ \
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;
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);
\f
/************************************************************************/
/* Entering the debugger */
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;
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);
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);
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. */
{
Fsignal (Qwrong_type_argument,
Fcons (Qcommandp,
- ((EQ (cmd, final))
+ (EQ (cmd, final)
? list1 (cmd)
: list2 (cmd, final))));
return Qnil;
/* 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
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)
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;
}
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 */
}
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)
{
/* 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))
/* 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;
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;
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 */
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;
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;
/* 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;
/* 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;
}
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.
*/ );
*/ );
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;
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 ();
}
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
/* 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;
{
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
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
{
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
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
}
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;
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
*/ );
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
#include "lstream.h"
#include "process.h"
#include "redisplay.h"
+#include "select.h"
#include "sysproc.h"
#include "syswait.h"
#include "systime.h"
/* 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);
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);
/* 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;
};
#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
/* 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. */
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)
/* 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);
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;
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 */
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 */
for (;;)
{
- DWORD bytes_written;
+ DWORD bytes_written;
/* Block on event and wait for a job */
InterlockedIncrement (&s->idle_p);
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);
}
#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);
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);
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);
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);
if (size == 0)
return 0;
-
+
{
ResetEvent (str->ov.hEvent);
|| sevt->event_type == misc_user_event);
}
-/*
+/*
* Add an emacs event to the proper dispatch queue
*/
static void
{
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);
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)
{
event->event_type = button_release_event;
ReleaseCapture ();
}
-
+
mswindows_enqueue_dispatch_event (emacs_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);
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
if (EQ (*tail, event))
*tail = previous_event;
}
-
+
return event;
}
previous_event = event;
if (ix < 0)
return;
- mswindows_waitable_handles [ix] =
+ mswindows_waitable_handles [ix] =
mswindows_waitable_handles [--mswindows_waitable_count];
}
#endif /* HAVE_MSG_SELECT */
{
Lisp_Object tmp;
- ++mswindows_in_modal_loop;
+ ++mswindows_in_modal_loop;
tmp = condition_case_1 (Qt,
bfun, barg,
mswindows_modal_loop_error_handler, Qnil);
}
/*
- * 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
Fdeallocate_event (event);
UNGCPRO;
-
+
/* Qt becomes return value of mswindows_pump_outstanding_events
once we get here */
return Qt;
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;
}
}
-/*
+/*
* 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
/* 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);
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
}
active = select (MAXDESC, &temp_mask, 0, 0, pointer_to_this);
-
+
if (active == 0)
{
assert (!badly_p);
{
mswindows_drain_windows_queue ();
}
-#ifdef HAVE_TTY
+#ifdef HAVE_TTY
/* Look for a TTY event */
for (i = 0; i < MAXDESC-1; i++)
{
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))
{
{
struct Lisp_Process *p =
get_process_from_usid (FD_TO_USID(i));
-
+
mswindows_enqueue_process_event (p);
}
else
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 */
{
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)
{
/* Event generators */
/************************************************************************/
-/*
+/*
* Callback procedure for synchronous timer messages
*/
static void CALLBACK
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
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;
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))
UNGCPRO;
return (HDDEDATA) DDE_FACK;
}
- DdeFreeDataHandle (hdata);
+ DdeFreeDataHandle (hdata);
return (HDDEDATA) DDE_FNOTPROCESSED;
- default:
- return (HDDEDATA) NULL;
- }
+ default:
+ return (HDDEDATA) NULL;
+ }
}
#endif
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)));
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;
* 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);
} /* 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;
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();
}
msframe->last_click_time = GetMessageTime();
break;
-
+
case WM_TIMER:
if (wParam == BUTTON_2_TIMER_ID)
{
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;
/* 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;
{
/* 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
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;
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. */
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 ();
}
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
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)))
{
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;
* 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;
}
{
case XM_BUMPQUEUE:
break;
-
+
case WM_SETFOCUS:
case WM_KILLFOCUS:
{
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 :
/************************************************************************/
/* 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;
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;
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
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
#include "keymap.h"
#include "lstream.h"
#include "macros.h" /* for defining_keyboard_macro */
-#include "opaque.h"
#include "process.h"
#include "window.h"
Lisp_Object Qundefined_keystroke_sequence;
-Lisp_Object Qcommand_execute;
-
Lisp_Object Qcommand_event_p;
/* Hooks to run before and after each command. */
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);
#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;
}
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;
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, "#<INTERNAL OBJECT (XEmacs bug?) (timeout) 0x%lx>",
+ (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
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;
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;
/* 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;
*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;
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;
/* 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;
}
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;
/* 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;
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)
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)
{
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)
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)
}
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)
&& 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,
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'.
*/
())
{
{
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)
deferror (&Qundefined_keystroke_sequence, "undefined-keystroke-sequence",
"Undefined keystroke sequence", Qerror);
- defsymbol (&Qcommand_execute, "command-execute");
DEFSUBR (Frecent_keys);
DEFSUBR (Frecent_keys_ring_size);
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);
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.
*/ );
/************************************************************************/
void
-vars_of_event_tty (void)
+reinit_vars_of_event_tty (void)
{
tty_event_stream = xnew (struct event_stream);
}
void
+vars_of_event_tty (void)
+{
+ reinit_vars_of_event_tty ();
+}
+
+void
init_event_tty_late (void)
{
event_stream = tty_event_stream;
#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:
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)
{
}
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:
default:
abort ();
}
- markobj (event->channel);
+ mark_object (event->channel);
return event->next;
}
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))
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;
}
}
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
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);
}
#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:
#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)
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
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)) && \
Lisp_Object Qwhitespace;
/* Qtext defined in general.c */
-/* partially used in redisplay */
-Lisp_Object Qglyph_invisible;
-
Lisp_Object Qcopy_function;
Lisp_Object Qpaste_function;
/************************************************************************/
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;
}
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;
Lisp_Object exobj;
XSETEXTENT (exobj, extent);
- markobj (exobj);
+ mark_object (exobj);
}
}
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,
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;
}
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++ = '*';
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
defsymbol (&Qwhitespace, "whitespace");
/* Qtext defined in general.c */
- defsymbol (&Qglyph_invisible, "glyph-invisible");
-
defsymbol (&Qpaste_function, "paste-function");
defsymbol (&Qcopy_function, "copy-function");
}
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.
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
#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)
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)
#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)
\f
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;
}
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));
}
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);
\f
/* 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;
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);
}
}
#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,
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);
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);
#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;
/* 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 */
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
/* 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);
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 }
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))
{
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)
{
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);
}
(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;
}
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;
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++;
}
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;
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;
}
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;
}
(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);
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;
}
*/
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;
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);
}
/* 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)
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;
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;
#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);
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;
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;
}
/* 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
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
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;
#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;
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;
}
/* 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
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
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;
/* */
/************************************************************************/
-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.
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
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))
{
{
return Fget_char_table (character, mule_to_ucs_table);
}
+#endif
#ifdef UTF2000
#define decode_ucs4 DECODE_ADD_UCS_CHAR
}
#endif
+#ifndef UTF2000
static unsigned long
mule_char_to_ucs4 (Lisp_Object charset,
unsigned char h, unsigned char l)
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,
back_to_square_n:
#endif /* ENABLE_COMPOSITE_CHARS */
-
+
while (n--)
{
unsigned char c = *src++;
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);
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);
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);
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
{
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"));
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 \
{ \
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);
#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)
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;
/* 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 *);
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
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;
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;
}
}
{
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.
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 = '/';
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);
}
occurs inside of the filedesc stream. */
while (1)
{
- Bytecount this_len;
+ ssize_t this_len;
Charcount cc_inserted;
QUIT;
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,
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;
/* 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. */
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...";
/* 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,
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. */
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");
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
}
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)
#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);
#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
\f
static Lisp_Object
-mark_float (Lisp_Object obj, void (*markobj) (Lisp_Object))
+mark_float (Lisp_Object obj)
{
return Qnil;
}
{
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 */
(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);
}
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;
}
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));
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);
\f
DEFUN ("identity", Fidentity, 1, 1, 0, /*
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);
}
(list))
{
Lisp_Object hare, tortoise;
- int len;
+ size_t len;
for (hare = tortoise = list, len = 0;
CONSP (hare) && (! EQ (hare, tortoise) || len == 0);
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);
*/
(seq, from, to))
{
- int len, f, t;
+ EMACS_INT len, f, t;
if (STRINGP (seq))
return Fsubstring (seq, from, to);
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);
if (LISTP (seq))
{
Lisp_Object result = Qnil;
- int i;
+ EMACS_INT i;
seq = Fnthcdr (make_int (f), seq);
/* 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,
*/
(n, list))
{
- REGISTER int i;
+ REGISTER size_t i;
REGISTER Lisp_Object tail = list;
CHECK_NATNUM (n);
for (i = XINT (n); i; i--)
#ifdef LOSING_BYTECODE
else if (COMPILED_FUNCTIONP (sequence))
{
- int idx = XINT (n);
+ EMACS_INT idx = XINT (n);
if (idx < 0)
{
lose:
*/
(list, n))
{
- int int_n, count;
+ EMACS_INT int_n, count;
Lisp_Object retval, tortoise, hare;
CHECK_LIST (list);
*/
(list, n))
{
- int int_n;
+ EMACS_INT int_n;
CHECK_LIST (list);
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
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))
{
DEFSUBR (Fnconc);
DEFSUBR (Fmapcar);
DEFSUBR (Fmapvector);
- DEFSUBR (Fmapc);
+ DEFSUBR (Fmapc_internal);
DEFSUBR (Fmapconcat);
DEFSUBR (Fload_average);
DEFSUBR (Ffeaturep);
}
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 ();
+}
}
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
}
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.
#include "events.h"
-#ifdef HAVE_GPM
-#include <gpm.h>
-#endif
-
\f
/* Default properties to use when creating frames. */
Lisp_Object Vdefault_tty_frame_plist;
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)
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);
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. */
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;
{
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);
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);
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
}
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
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;
\f
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;
}
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"
}
/* 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;
{
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));
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");
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.
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 /*
/* 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;
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;
#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)
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)
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; \
/* 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
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)
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
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;
Lisp_Object Qdefault;
Lisp_Object Qdelete;
Lisp_Object Qdelq;
-Lisp_Object Qderef;
Lisp_Object Qdevice;
Lisp_Object Qdimension;
Lisp_Object Qdisplay;
Lisp_Object Qeval;
Lisp_Object Qextents;
Lisp_Object Qface;
-Lisp_Object Qfind;
Lisp_Object Qfont;
Lisp_Object Qframe;
Lisp_Object Qfunction;
Lisp_Object Qgutter;
Lisp_Object Qheight;
Lisp_Object Qhighlight;
+Lisp_Object Qhorizontal;
Lisp_Object Qicon;
Lisp_Object Qid;
Lisp_Object Qimage;
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;
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;
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;
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;
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;
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");
defsymbol (&Qdefault, "default");
defsymbol (&Qdelete, "delete");
defsymbol (&Qdelq, "delq");
- defsymbol (&Qderef, "deref");
defsymbol (&Qdevice, "device");
defsymbol (&Qdimension, "dimension");
defsymbol (&Qdisplay, "display");
defsymbol (&Qeval, "eval");
defsymbol (&Qextents, "extents");
defsymbol (&Qface, "face");
- defsymbol (&Qfind, "find");
defsymbol (&Qfont, "font");
defsymbol (&Qframe, "frame");
defsymbol (&Qfunction, "function");
defsymbol (&Qgutter, "gutter");
defsymbol (&Qheight, "height");
defsymbol (&Qhighlight, "highlight");
+ defsymbol (&Qhorizontal, "horizontal");
defsymbol (&Qicon, "icon");
defsymbol (&Qid, "id");
defsymbol (&Qimage, "image");
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");
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");
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");
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");
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");
#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
#ifndef HAVE_GETLOADAVG
/* The existing Emacs configuration files define a macro called
privileges to use it.
Initial implementation courtesy Zlatko Calusic <zcalusic@carnet.hr>.
- Integrated to XEmacs by Hrvoje Niksic <hniksic@srce.hr>.
+ Integrated to XEmacs by Hrvoje Niksic <hniksic@xemacs.org>.
Additional cleanup by Hrvoje Niksic, based on code published by
Casper Dik <Casper.Dik@Holland.Sun.Com>. */
kstat_ctl_t *kc;
#include <string.h>
#include <unistd.h>
#include "gifrlib.h"
+#include "sysfile.h"
/******************************************************************************
* Set up the GifFileType structure for use. This must be called first in any *
/* 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));
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, ... */
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);
}
/* 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. */
/* 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);
/* mswindows-specific glyph objects.
- Copyright (C) 1998, 99 Andy Piper.
+ Copyright (C) 1998, 1999 Andy Piper.
This file is part of XEmacs.
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
#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);
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)))
int dest_mask,
void *bmp_data,
int bmp_bits,
+ int slices,
Lisp_Object instantiator,
int x_hot, int y_hot,
int create_mask)
/* 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;
}
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,
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);
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,
/* 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);
/* 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);
}
#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[] =
{
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) =
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);
}
}
+#ifdef DEBUG_WIDGETS
+extern int debug_widget_instances;
+#endif
+
static void
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;
{
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,
/* 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));
}
}
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);
}
/* 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",
"",
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)),
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);
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);
}
\f
+#ifdef HAVE_WIDGETS
+
/************************************************************************/
/* widgets */
/************************************************************************/
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);
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;
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));
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;
/* 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;
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;
}
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);
/* 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;
}
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++;
/* 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);
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,
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
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
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 */
+
\f
/************************************************************************/
/* initialization */
{
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 */
#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);
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);
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);
struct mswindows_image_instance_data
{
- HBITMAP bitmap;
- HBITMAP mask;
+ HBITMAP* bitmaps;
HICON icon;
};
((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) \
#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_ */
/* Widget-specific glyph objects.
- Copyright (C) 1998 Andy Piper
+ Copyright (C) 1998, 1999 Andy Piper.
This file is part of XEmacs.
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);
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.
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;
}
}
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))
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)
{
}
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
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;
}
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
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,
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 */
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
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);
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
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);
}
\f
+/*****************************************************************************
+ * 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;
+}
+
+\f
/************************************************************************/
/* initialization */
/************************************************************************/
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
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);
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);
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);
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);
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 ();
}
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?
*/
#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"
#include "file-coding.h"
#endif
-#ifdef LWLIB_USES_MOTIF
+#ifdef LWLIB_WIDGETS_MOTIF
#include <Xm/Xm.h>
#endif
#include <X11/IntrinsicP.h>
DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout);
#ifdef HAVE_JPEG
DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg);
#endif
DEFINE_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,
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"
\f
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.
}
}
+#ifdef DEBUG_WIDGETS
+extern int debug_widget_instances;
+#endif
+
static void
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;
}
}
}
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));
}
}
}
- 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;
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;
/* 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... */
Colormap cmap,
unsigned long *pixels,
int npixels,
+ int slices,
Lisp_Object instantiator)
{
Lisp_Object device = IMAGE_INSTANCE_DEVICE (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;
}
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,
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;
+ }
}
}
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) =
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));
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;
/* #### 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);
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))
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:
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));
}
}
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 */
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);
{
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);
}
}
+\f
+#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,
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
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));
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
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);
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;
}
{
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
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,
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 */
\f
/************************************************************************/
{
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
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);
/* 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);
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
#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)
#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) \
{
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;
#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) \
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.
/* Synched up with: Not in FSF. */
-/* Written by Ben Wing and Chuck Thompson */
+/* Written by Ben Wing and Chuck Thompson. */
#include <config.h>
#include "lisp.h"
#include "frame.h"
#include "chartab.h"
#include "rangetab.h"
+#include "blocktype.h"
#ifdef HAVE_XPM
#include <X11/xpm.h>
Lisp_Object Qcolor_pixmap_image_instance_p;
Lisp_Object Qpointer_image_instance_p;
Lisp_Object Qsubwindow_image_instance_p;
+Lisp_Object Qlayout_image_instance_p;
Lisp_Object Qwidget_image_instance_p;
Lisp_Object Qconst_glyph_variable;
Lisp_Object Qmono_pixmap, Qcolor_pixmap, Qsubwindow;
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);
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);
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++)
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;
}
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);
||
IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW)
{
- MARK_FRAME_GLYPHS_CHANGED
+ MARK_FRAME_SUBWINDOWS_CHANGED
(XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)));
}
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),
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) &&
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;
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),
lp->device = device;
lp->type = IMAGE_NOTHING;
lp->name = Qnil;
+ lp->x_offset = 0;
+ lp->y_offset = 0;
XSETIMAGE_INSTANCE (val, lp);
return val;
}
if (EQ (type, Qpointer)) return IMAGE_POINTER;
if (EQ (type, Qsubwindow)) return IMAGE_SUBWINDOW;
if (EQ (type, Qwidget)) return IMAGE_WIDGET;
+ if (EQ (type, Qlayout)) return IMAGE_LAYOUT;
maybe_signal_simple_error ("Invalid image-instance type", type,
Qimage, errb);
case IMAGE_POINTER: return Qpointer;
case IMAGE_SUBWINDOW: return Qsubwindow;
case IMAGE_WIDGET: return Qwidget;
+ case IMAGE_LAYOUT: return Qlayout;
default:
abort ();
}
{
/* 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));
}
'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
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))
{
!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;
}
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
+ case IMAGE_LAYOUT:
return make_int (XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (image_instance));
default:
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
+ case IMAGE_LAYOUT:
return make_int (XIMAGE_INSTANCE_SUBWINDOW_WIDTH (image_instance));
default:
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
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;
+}
+
\f
/****************************************************************************
* formatted-string *
}
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
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.
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
****************************************************************************/
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;
}
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))
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))
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) =
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;
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),
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
+ case IMAGE_LAYOUT:
return XIMAGE_INSTANCE_SUBWINDOW_WIDTH (instance);
default:
}
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;
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);
#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
/*
#### 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;
for (elt = 0; elt < Dynarr_length (elements); elt++)
{
struct glyph_cachel *cachel = Dynarr_atp (elements, elt);
- markobj (cachel->glyph);
+ mark_object (cachel->glyph);
}
}
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;
Dynarr_add (w->glyph_cachels, new_cachel);
}
-static glyph_index
+glyph_index
get_glyph_cachel_index (struct window *w, Lisp_Object glyph)
{
int elt;
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;
}
}
#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
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
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;
for (elt = 0; elt < Dynarr_length (elements); elt++)
{
struct subwindow_cachel *cachel = Dynarr_atp (elements, elt);
- markobj (cachel->subwindow);
+ mark_object (cachel->subwindow);
}
}
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;
}
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
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);
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;
+}
+
\f
/*****************************************************************************
* subwindow functions *
{
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 =
||
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;
}
/* 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;
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
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;
(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, /*
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;
}
(subwindow))
{
CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow);
-
+#if 0
map_subwindow (subwindow, 0, 0);
-
+#endif
return subwindow;
}
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);
+}
+
\f
/*****************************************************************************
* initialization *
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);
/* 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",
}
+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)
{
}
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 */
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);
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");
}
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);
#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
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
*/
Dynarr_declare (ii_keyword_entry);
} ii_keyword_entry_dynarr;
+extern const struct struct_description iim_description;
+
struct image_instantiator_methods
{
Lisp_Object symbol;
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
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,
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,
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)
IMAGE_COLOR_PIXMAP,
IMAGE_POINTER,
IMAGE_SUBWINDOW,
- IMAGE_WIDGET
+ IMAGE_WIDGET,
+ IMAGE_LAYOUT
};
#define IMAGE_NOTHING_MASK (1 << 0)
#define IMAGE_POINTER_MASK (1 << 4)
#define IMAGE_SUBWINDOW_MASK (1 << 5)
#define IMAGE_WIDGET_MASK (1 << 6)
+#define IMAGE_LAYOUT_MASK (1 << 7)
#define IMAGE_INSTANCE_TYPE_P(ii, type) \
(IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
#define WIDGET_IMAGE_INSTANCEP(ii) \
IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET)
+#define LAYOUT_IMAGE_INSTANCEP(ii) \
+ IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT)
-#define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \
- CHECK_IMAGE_INSTANCE (x); \
+#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)
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
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 */
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;
#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)
#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)
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))
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))
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) \
#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);
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)
#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;
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 */
{
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;
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,
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
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_ */
-/* William Perry 1997 */
+/* GPM functions
+ Copyright (C) 1997 William M. Perry <wmperry@gnu.org>
+ 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 <config.h>
#include "lisp.h"
#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"
#include <linux/keyboard.h>
#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<<KG_SHIFT)|(1<<KG_ALT)|(1<<KG_CTRL));
-
- rval = Gpm_Open (&conn, 0);
- switch (rval) {
- case -1: /* General failure */
- break;
- case -2: /* We are running under an XTerm */
+extern int gpm_tried;
+extern void *gpm_stack;
+
+static int (*orig_event_pending_p) (int);
+static void (*orig_next_event_cb) (struct Lisp_Event *);
+
+static Lisp_Object gpm_event_queue;
+static Lisp_Object gpm_event_queue_tail;
+
+struct __gpm_state {
+ int gpm_tried;
+ int gpm_flag;
+ void *gpm_stack;
+};
+
+static struct __gpm_state gpm_state_information[MAXDESC];
+
+static void
+store_gpm_state (int fd)
+{
+ gpm_state_information[fd].gpm_tried = gpm_tried;
+ gpm_state_information[fd].gpm_flag = gpm_flag;
+ gpm_state_information[fd].gpm_stack = gpm_stack;
+}
+
+static void
+restore_gpm_state (int fd)
+{
+ gpm_tried = gpm_state_information[fd].gpm_tried;
+ gpm_flag = gpm_state_information[fd].gpm_flag;
+ gpm_stack = gpm_state_information[fd].gpm_stack;
+ gpm_consolefd = gpm_fd = fd;
+}
+
+static void
+clear_gpm_state (int fd)
+{
+ if (fd >= 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<<KG_SHIFT)|(1<<KG_ALT)|(1<<KG_CTRL));
+
+ /* Reset some silly static variables so that multiple Gpm_Open()
+ ** calls have even a sligh chance of working
+ */
+ gpm_tried = 0;
+ gpm_flag = 0;
+ gpm_stack = NULL;
+
+ /* Make sure Gpm_Open() does ioctl() on the correct
+ ** descriptor, or it can get the wrong terminal sizes, etc.
+ */
+ gpm_consolefd = fd;
+
+ /* We have to pass the virtual console manually, otherwise if you
+ ** use 'gnuclient -nw' to connect to an XEmacs that is running in
+ ** X, Gpm_Open() tries to use ttyname(0 | 1 | 2) to find out which
+ ** console you are using, which is of course not correct for the
+ ** new tty device.
+ */
+ if (strncmp (console_name, "/dev/tty",8) || !isdigit (console_name[8]))
+ {
+ /* Urk, something really wrong */
+ return (Qnil);
+ }
+
+ rval = Gpm_Open (&conn, atoi(console_name + 8));
+
+ switch (rval) {
+ case -1: /* General failure */
+ break;
+ case -2: /* We are running under an XTerm */
+ Gpm_Close();
+ break;
+ default:
+ /* Is this really necessary? */
+ set_descriptor_non_blocking (gpm_fd);
+ store_gpm_state (gpm_fd);
+ gpm_process = connect_to_file_descriptor (build_string (process_name), Qnil,
+ make_int (gpm_fd),
+ make_int (gpm_fd));
+
+ if (!NILP (gpm_process))
+ {
+ rval = 0;
+ Fprocess_kill_without_query (gpm_process, Qnil);
+ XSETSUBR (gpm_filter, &SFreceive_gpm_event);
+ set_process_filter (gpm_process, gpm_filter, 1);
+
+ /* Keep track of the device for later */
+ /* Fput (gpm_process, intern ("gpm-device"), device); */
+ }
+ else
+ {
+ Gpm_Close();
+ rval = -1;
+ }
+ }
+
+ return(rval ? Qnil : Qt);
+}
+
+void vars_of_gpmevent (void)
+{
+ gpm_event_queue = Qnil;
+ gpm_event_queue_tail = Qnil;
+ staticpro (&gpm_event_queue);
+ staticpro (&gpm_event_queue_tail);
+ pdump_wire (&gpm_event_queue);
+ pdump_wire (&gpm_event_queue_tail);
+}
+
+void syms_of_gpmevent (void)
+{
+ DEFSUBR (Freceive_gpm_event);
+ DEFSUBR (Fgpm_enable);
+ DEFSUBR (Fgpm_enabled_p);
+}
+
+#endif /* HAVE_GPM */
if (NILP (data) || UNBOUNDP (data))
return Qnil;
- MARK_SUBWINDOWS_CHANGED;
+ MARK_SUBWINDOWS_STATE_CHANGED;
/* Ok, this is our one. Enqueue it. */
get_gui_callback (data, &fn, &arg);
XSETFRAME (frame, f);
}
\f
-struct mark_widget_value_closure
-{
- void (*markobj) (Lisp_Object);
-};
-
static int
mark_widget_value_mapper (widget_value *val, void *closure)
{
Lisp_Object markee;
-
- struct mark_widget_value_closure *cl =
- (struct mark_widget_value_closure *) closure;
if (val->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);
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;
}
}
else
{
- MARK_SUBWINDOWS_CHANGED;
+ MARK_SUBWINDOWS_STATE_CHANGED;
get_gui_callback (data, &fn, &arg);
}
/* !!#### 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);
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))
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
#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
}
}
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);
*/ );
#endif
Fset (Qmenu_no_selection_hook, Qnil);
-
- /* this makes only safe calls as in emacs.c */
- sanity_check_lwlib ();
}
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)
#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);
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_ */
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 */
}
Lisp_Object
-allocate_gui_item ()
+allocate_gui_item (void)
{
struct Lisp_Gui_Item *lp =
alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item);
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);
#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;
}
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,
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)
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);
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
/* Synched up with: Not in FSF. */
-/* Specifers ripped-off from toolbar.c */
+/* written by Andy Piper <andy@xemacs.org> with specifiers partially
+ ripped-off from toolbar.c */
#include <config.h>
#include "lisp.h"
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)
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 ();
}
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)
{
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,
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)
/* 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);
{
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;
}
}
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
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;
/* #### 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
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
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)
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)
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)
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
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
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),
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]),
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]),
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];
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]))
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 <config.h>
#include "lisp.h"
#include <X11/Xlocale.h> /* More portable than <locale.h> ? */
#include "EmacsFrame.h"
#include "events.h"
+#ifdef THIS_IS_X11R6
#include <X11/IntrinsicP.h>
-#include <X11/Xaw/XawImP.h>
+#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) \
/*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;
}
}
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;
char *inputmethod;
} xic_vars_t;
xic_vars_t xic_vars;
- XIMCallback ximcallback;
XIC xic;
#define res(name, class, representation, field, default_value) \
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);
/*
* 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;
}
if (!xic)
{
- stderr_out ("Warning: XCreateIC failed.\n");
+ xim_warn ("Warning: XCreateIC failed.\n");
return;
}
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
}
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)
/************************************************************************/
void
-vars_of_insdel (void)
+reinit_vars_of_insdel (void)
{
#ifndef UTF2000
int i;
}
void
+vars_of_insdel (void)
+{
+ reinit_vars_of_insdel ();
+}
+
+void
init_buffer_text (struct buffer *b)
{
if (!b->base_buffer)
/************************************************************************/
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,
#endif /* I18N4 */
-Lisp_Object Qdomain;
Lisp_Object Qdefer_gettext;
DEFUN ("ignore-defer-gettext", Fignore_defer_gettext, 1, 1, 0, /*
{
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;
}
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(). */
/************************************************************************/
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;
}
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);
*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 */
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;
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;
defsymbol (&QRET, "RET");
defsymbol (&QESC, "ESC");
defsymbol (&QDEL, "DEL");
+ defsymbol (&QSPC, "SPC");
defsymbol (&QBS, "BS");
}
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);
}
#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)
/* 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 <robbe@orcus.priv.at>.
**
** 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
/* 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,
#include <config.h>
#endif
+#include "miscplay.h"
+
#include <errno.h>
#include <fcntl.h>
#include SOUNDCARD_H_PATH /* Path computed by configure */
#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" */
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
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; }
}
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
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 */
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;
#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)))
#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 */
#include <ctype.h>
#include <stdarg.h>
#include <stddef.h> /* offsetof */
-
-#ifdef __lucid
-# include <sysent.h>
-#endif
+#include <sys/types.h>
/* ---- Dynamic arrays ---- */
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
/*#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)
+
\f
/************************************************************************/
/* typedefs */
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;
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;
};
#endif
+enum edge_style
+{
+ EDGE_ETCHED_IN,
+ EDGE_ETCHED_OUT,
+ EDGE_BEVEL_IN,
+ EDGE_BEVEL_OUT
+};
+
#ifndef ERROR_CHECK_TYPECHECK
typedef enum error_behavior
#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))
# 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. */
/* 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
to mean "no such value". */
#define UNBOUNDP(val) EQ (val, Qunbound)
-#define GC_UNBOUNDP(val) GC_EQ (val, Qunbound)
/*********** 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)
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))
#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) \
#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, \
/* 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
/* 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)
TRUE_LIST_P (Lisp_Object object)
{
Lisp_Object hare, tortoise;
- int len;
+ EMACS_INT len;
for (hare = tortoise = object, len = 0;
CONSP (hare);
#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); \
#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)
#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)
#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)) \
#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 ***********/
#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)
#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)
#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)
/*********** char ***********/
#define CHARP(x) (XTYPE (x) == Lisp_Type_Char)
-#define GC_CHARP(x) (XGCTYPE (x) == Lisp_Type_Char)
#ifdef ERROR_CHECK_TYPECHECK
#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)
} 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
} 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)) \
#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)
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 ***********/
#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. */
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, \
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, \
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, \
/* 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;
#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
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 *);
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,
/* 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);
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 */
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);
/* 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 *);
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;
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);
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);
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);
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);
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;
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;
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;
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;
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;
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. */
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));
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)
else
{
/* Case c) */
- CONST char *nsuffix = XSTRING_DATA (suffixes);
+ CONST char *nsuffix = (CONST char *) XSTRING_DATA (suffixes);
while (1)
{
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);
}
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);
}
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.
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);
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
};
/* 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
{
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);
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[] = {
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.
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.
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 {
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
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) \
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
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
# 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 */
#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
#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_ */
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.
#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
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))
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)
{
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))
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)
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;
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
/* 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);
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;
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;
/* 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)
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);
}
}
- 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
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
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;
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
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;
}
if (stream->flags & LSTREAM_FL_WRITE)
return fflush (str->file);
else
- /* call fpurge? Only exists on some systems. */
return 0;
}
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;
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
/**** 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)
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)
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;
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);
}
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;
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);
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);
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);
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);
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);
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);
}
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;
}
}
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 ();
+}
/* 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
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 */
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) \
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);
#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
#ifdef UNEXEC
#undef UNEXEC
#endif
-/* FSF renames this file to unexsgi.o */
-#define UNEXEC "unexelfsgi.o"
+#define UNEXEC "unexelf.o"
#define TEXT_START 0x400000
#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
/* 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. */
#define C_DEBUG_SWITCH "-O -g3"
#endif /* not BSD */
-#endif /* not NEWSOS5 */
+#endif /* !NEWSOS5 && !linux */
\f
-#ifndef NEWSOS5
+#if !defined(NEWSOS5) && !defined(linux)
#ifdef USG
/* Don't try to use SIGIO even though it is defined. */
#define TERMINFO
#undef MAIL_USE_FLOCK /* Someone should check this. */
#endif /* BSD */
-#endif /* not NEWSOS5 */
+#endif /* !NEWSOS5 && !linux */
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;
#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;
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);
}
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;
if (eev)
{
Position shellx, shelly, framex, framey;
- Widget shell = XtParent (daddy);
Arg al [2];
btn->time = eev->timestamp;
btn->button = eev->event.button.button;
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);
}
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"));
Fcons (Fvector (3, &menu_item[0]),
Qnil)),
Qnil);
- Vblank_menubar = Fpurecopy (Vblank_menubar);
staticpro (&Vblank_menubar);
}
}
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;
}
void
-complex_vars_of_minibuf (void)
+reinit_complex_vars_of_minibuf (void)
{
/* This function can GC */
#ifdef I18N3
#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 ();
}
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;
/* 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. */
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;
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;
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);
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);
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);
#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
#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;
}
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);
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;
/*
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
}
#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)
charset =
CHARSET_BY_LEADING_BYTE (f1 + FIELD1_TO_PRIVATE_LEADING_BYTE);
+ if (EQ (charset, Qnil))
+ return 0;
return (XCHARSET_CHARS (charset) == 96);
}
}
/************************************************************************/
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;
}
#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 */
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),
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
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,
# 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',
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,
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',
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',
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',
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',
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',
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',
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',
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',
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',
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',
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',
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',
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, '@',
("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',
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',
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,
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',
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',
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',
("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',
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',
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',
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,
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,
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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
("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,
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',
("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',
/* #### 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,
build_string ("Composite characters"),
build_string (""));
+ /* #### not dumped properly */
composite_char_row_next = 32;
composite_char_col_next = 32;
#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
#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)
/* 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)
#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.
{
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
}
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.
*/ );
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"));
}
#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);
return NULL;
}
-void
+static void
close_down_play (void)
{
\********************************************************************/
static void
-doneCB (AuServer *aud,
+doneCB (AuServer *auserver,
AuEventHandlerRec *handler,
AuEvent *ev,
AuPointer data)
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,
#endif /* CACHE_SOUNDS */
+void wait_for_sounds (void);
void
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);
return 1;
}
+int play_sound_data (unsigned char *data, int length, int volume);
int
play_sound_data (unsigned char *data,
int length,
{
Sound s;
int offset;
- SIGTYPE (*old_sigpipe) ();
+ SIGTYPE (*old_sigpipe) (int);
#if !defined (XTEVENTS)
AuEvent ev;
/* 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;
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;
/* 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;
/* 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;
}
/* 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;
}
/* Like ftell, but for a buffer in memory */
-static int
+static long
dtell()
{
return file_posn;
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;
}
return s;
}
-
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
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;
"EMACSLOCKDIR",
"INFOPATH"
};
-
+#ifdef HEAP_IN_DATA
+ cache_system_info ();
+#endif
for (i = 0; i < countof (env_vars); i++)
{
if (!getenv (env_vars[i]) &&
#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. */
/* Useful routines for manipulating memory-mapped files. */
typedef struct file_data {
- char *name;
+ CONST char *name;
unsigned long size;
HANDLE file;
HANDLE file_mapping;
#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 <mmsystem.h>
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;
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.
#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
#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
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
#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
}
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
}
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
#include <config.h>
#include "lisp.h"
+#include <limits.h>
#include "console-x.h"
#include "objects-x.h"
/* 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 <jareth@camelot-soft.com> 97/11/25 */
+ but rewritten by Jareth Hein <jareth@camelot-soft.com> 97/11/25
+ Modified by Lee Kindness <lkindness@csl.co.uk> 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)
}
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))
+
(((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;
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;
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;
}
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
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;
}
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)));
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;
}
}
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
}
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
}
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
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)
{
}
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);
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);
XSETFONT_INSTANCE (Vthe_null_font_instance, f);
}
}
+
+void
+vars_of_objects (void)
+{
+ reinit_vars_of_objects ();
+}
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)
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)
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)
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)
#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)
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 <config.h>
#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, "#<INTERNAL OBJECT (XEmacs bug?) (opaque, %s) 0x%lx>",
- size_buf, (unsigned long) p);
+ sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (opaque, size=%lu) 0x%lx>",
+ (long)(p->size), (unsigned long) p);
write_c_string (buf, printcharfun);
}
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.
{
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);
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! */
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, "#<INTERNAL OBJECT (XEmacs bug?) (opaque_ptr, adr=0x%lx) 0x%lx>",
+ (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
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 ();
}
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_ */
/* 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 */
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;
#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
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'.
/* 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)
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");
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");
}
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.
struct nt_process_data
{
HANDLE h_process;
+ int need_enable_child_signals;
};
#define NT_DATA(p) ((struct nt_process_data*)((p)->process_data))
* must signal an error instead.
*/
-/* #### This function completely ignores Vprocess_environment */
-
static void
signal_cannot_launch (Lisp_Object image_file, DWORD err)
{
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 */
{
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. */
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;
{
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)
/* These just have been inherited; we do not need a copy */
CloseHandle (hprocin);
CloseHandle (hprocout);
+ CloseHandle (hprocerr);
}
/* Handle process creation failure */
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);
}
}
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)
{
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
while (1)
{
- int writeret;
+ ssize_t writeret;
chunklen = Lstream_read (lstream, chunkbuf, 128);
if (chunklen <= 0)
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));
}
{
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);
/* 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)
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;
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));
retval = connect (s, (struct sockaddr *) &address, sizeof (address));
if (retval != NO_ERROR && WSAGetLastError() != WSAEWOULDBLOCK)
goto connect_failed;
-
/* Wait while connection is established */
while (1)
{
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));
}
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
#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);
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;
}
*/
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);
}
/*
while (1)
{
- int writeret;
+ ssize_t writeret;
chunklen = Lstream_read (lstream, chunkbuf, 512);
if (chunklen <= 0)
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));
{
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;
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));
/* 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 */
\f
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;
}
else
{
int netp = network_connection_p (obj);
- write_c_string (((netp) ? GETTEXT ("#<network connection ") :
+ write_c_string ((netp ? GETTEXT ("#<network connection ") :
GETTEXT ("#<process ")), printcharfun);
print_internal (proc->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);
int
network_connection_p (Lisp_Object process)
{
- return GC_CONSP (XPROCESS (process)->pid);
+ return CONSP (XPROCESS (process)->pid);
}
#endif
{
Lisp_Object tail;
- if (GC_PROCESSP (name))
+ if (PROCESSP (name))
return name;
if (!gc_in_progress)
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;
{
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;
/* 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
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.
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 */
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))
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.
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
{
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);
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 */
#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))
#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
#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_ */
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);
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,
/* 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;
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;
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
{
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
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,
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;
}
}
/* 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;
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;
__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;
void r_alloc_thaw (void);
void
-r_alloc_thaw ()
+r_alloc_thaw (void)
{
if (! r_alloc_initialized)
/* 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)
{
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;
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;
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;
}
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);
\f
/************************************************************************/
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
/* Synched up with: Not in FSF. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <sys/types.h>
-#if defined(HAVE_UNISTD_H) || defined(STDC_HEADERS)
-#include <unistd.h>
-#endif
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef _POSIX_VERSION
#include <limits.h> /* for PATH_MAX */
#else
#include <sys/param.h> /* for MAXPATHLEN */
#endif
-#include <errno.h>
-#ifndef STDC_HEADERS
-extern int errno;
-#endif
#ifdef WINDOWSNT
#include <direct.h>
#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;
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
{
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
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 */
****************************************************************************/
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);*/
/* 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;
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 */
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
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))
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);
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
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;
****************************************************************************/
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);
}
}
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;
}
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++;
}
}
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,
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);
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);
}
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)
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
{
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);
}
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.
/* Author: Chuck Thompson */
+/* Heavily hacked for modularity, gutter and subwindow support by Andy
+ Piper. */
+
#include <config.h>
#include "lisp.h"
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
/* 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;
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;
}
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 ||
(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;
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)
{
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,
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)
{
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;
&&
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);
}
{
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));
}
/****************************************************************************
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. */
(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
if (height)
{
- struct frame *f = XFRAME (w->frame);
Lisp_Object window;
int bflag = 0 ; /* (window_needs_vertical_divider (w) ? 0 : 1);*/
layout_bounds bounds;
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);
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;
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));
}
case IMAGE_COLOR_PIXMAP:
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
+ case IMAGE_LAYOUT:
/* just do nothing here */
break;
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));
{
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);
\f
struct fkey_table
{
- CONST char *cap, *name;
+ CONST char *cap;
+ CONST char *name;
};
/* Termcap capability names that correspond directly to X keysyms.
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. */
}
}
}
- }
+ }
/*
* 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;
}
#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,
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.
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++;
}
}
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,
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 ();
}
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);
int flip_gcs = 0;
unsigned long mask;
+ assert (shadow_thickness >=0);
memset (&gcv, ~0, sizeof (XGCValues));
tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, 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);
+ }
}
/*****************************************************************************
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. */
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));
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++)
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);
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. */
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);
}
}
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);
}
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)
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)
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);
GC gc;
XGCValues gcv;
unsigned long pixmap_mask;
- int need_clipping = (clip_x || clip_y);
if (!override_gc)
{
{
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);
/* 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
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;
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
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);
}
}
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;
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);
}
/*****************************************************************************
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)
{
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;
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);
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));
}
/*****************************************************************************
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;
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);
}
(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).
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);
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
/* 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
(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 */
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. */
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;
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
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;
Lisp_Object Vtext_cursor_visible_p;
int column_number_start_at_one;
+
+#define WINDOW_SCROLLED(w) \
+(w->hscroll > 0 || w->left_xoffset)
+
\f
/***************************************************************************/
/* */
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;
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;
/* #### 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
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);
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);
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;
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);
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,
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;
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);
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
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;
}
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;
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
Bufpos ret_bufpos;
/* you must set bounds before calling this. */
-
+
/* Reset what this line is using. */
if (dl->display_blocks)
Dynarr_reset (dl->display_blocks);
if (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;
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;
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))
{
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
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
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
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))
{
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);
&& !f->faces_changed
&& !f->glyphs_changed
&& !f->subwindows_changed
+ && !f->subwindows_state_changed
&& !f->point_changed
&& !f->windows_structure_changed)
{
&& !f->faces_changed
&& !f->glyphs_changed
&& !f->subwindows_changed
+ && !f->subwindows_state_changed
&& !f->windows_structure_changed)
{
if (point_visible (w, pointm, CURRENT_DISP)
&& !f->faces_changed
&& !f->glyphs_changed
&& !f->subwindows_changed
+ && !f->subwindows_state_changed
&& !f->windows_structure_changed
&& !f->frame_changed
&& !truncation_changed
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;
}
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
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 ---------------- */
#### 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);
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)
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);
}
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);
}
/* 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;
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;
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);
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)
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))
/* 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));
{
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,
/* 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));
/* 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;
\f
static void
-mark_glyph_block_dynarr (glyph_block_dynarr *gba, void (*markobj) (Lisp_Object))
+mark_glyph_block_dynarr (glyph_block_dynarr *gba)
{
if (gba)
{
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));
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;
{
struct frame *f = XFRAME (XCAR (frmcons));
update_frame_window_mirror (f);
- mark_window_mirror (f->root_mirror, markobj);
+ mark_window_mirror (f->root_mirror);
}
}
\f
/* 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. */
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;
}
cur_elt--;
- if (cur_elt < 0)
+ while (cur_elt < 0)
{
Bufpos from, to;
int win_char_height;
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;
}
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)
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);
#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");
}
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);
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
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;
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
{
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? */
/* #### 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
{
/* 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 */
};
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 */
};
#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. */
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)
+
\f
/*************************************************************************/
/* change flags */
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;
#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)
\f
/*************************************************************************/
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);
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,
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);
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);
#include <cygwin/version.h>
#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
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;
#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
#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
#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
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 */
/* 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 ':'
#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 */
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
#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
/* Synched up with: Not in FSF. */
#include <config.h>
+#include <limits.h>
#include "lisp.h"
#include "console-msw.h"
}
}
+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
*/
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_ */
#include "lisp.h"
#include "console-x.h"
+#include "EmacsFrame.h"
#include "glyphs-x.h"
#include "gui-x.h"
#include "scrollbar-x.h"
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
}
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)
#elif defined (LWLIB_SCROLLBARS_ATHENA)
Fprovide (intern ("athena-scrollbars"));
#endif
- stupid_vertical_scrollbar_drag_hack = 1;
}
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_ */
};
/* 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
}
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)
{
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'.
#include <config.h>
#include "lisp.h"
+#include "frame.h"
#include "select.h"
#include "console-msw.h"
int rawsize, size, i;
unsigned char *src, *dst, *next;
HGLOBAL h = NULL;
+ struct frame *f = NULL;
CHECK_STRING (string);
if (src[i] == '\n')
size++;
- if (!OpenClipboard (NULL))
+ f = selected_frame ();
+ if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
return Qnil;
if (!EmptyClipboard () ||
i = (SetClipboardData (CF_TEXT, h) != NULL);
CloseClipboard ();
- GlobalFree (h);
return i ? Qt : Qnil;
}
*/
())
{
- 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
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).
}
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
Hacked on quite a bit by various others. */
#include <config.h>
+#include <time.h>
#include "lisp.h"
#include "buffer.h"
# include <netdb.h>
#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;
{
/* 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;
}
#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))
{
}
#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))
*/
(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, /*
#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.
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.
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;
}
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;
}
*/
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;
{
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;
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);
\f
{
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;
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);
}
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;
/* 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);
same time.
*/
+extern const struct struct_description specifier_methods_description;
+
struct specifier_methods
{
CONST char *name;
/* 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
void (*after_change_method) (Lisp_Object specifier,
Lisp_Object locale);
+ const struct lrecord_description *extra_description;
int extra_data_size;
};
#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)
/***** 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; \
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) \
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
((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) \
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);
($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;
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;
\f
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);
}
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,
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;
#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;
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;
}
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 }
};
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",
if (magicfun)
magicfun (sym, &newval, Qnil, 0);
*((int *) symbol_value_forward_forward (fwd))
- = ((NILP (newval)) ? 0 : 1);
+ = !NILP (newval);
return;
case SYMVAL_OBJECT_FORWARD:
/* 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;
}
/* 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;
}
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
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
defsymbol (&Qmake_local, "make-local");
defsymbol (&Qboundp, "boundp");
- defsymbol (&Qfboundp, "fboundp");
defsymbol (&Qglobally_boundp, "globally-boundp");
defsymbol (&Qmakunbound, "makunbound");
defsymbol (&Qsymbol_value, "symbol-value");
#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);
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). */
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);
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);
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);
/* 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). */
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);
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);
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);
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);
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);
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). */
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);
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). */
}
\f
+
#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.
&& 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.
{
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;
{
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--;
{
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
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--;
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);
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 */
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);
}
- }
}
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. */
#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
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)
{
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)
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));
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
{
}
#ifdef WINDOWSNT
-int
+pid_t
sys_getpid (void)
{
return abs (getpid ());
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;
xyzzy:
#ifdef WINDOWSNT
- pid = -1;
+ pid = NULL;
#else /* not WINDOWSNT */
pid = fork ();
#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 */
/* 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)
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;
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. */
{
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
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;
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)
;
/* 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
#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;
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
}
#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;
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);
#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)
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);
/* 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 <windows.h>
+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)
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. */
#ifdef SYSV_SYSTEM_DIR
# include <dirent.h>
-#elif defined (NONSYSTEM_DIR_LIBRARY)
+#elif defined (NONSYSTEM_DIR_LIBRARY)
# include "ndir.h"
#elif defined (MSDOS)
# include <dirent.h>
#include <config.h>
#endif
+#include <stdlib.h>
#include "sysdll.h"
/* This whole file is conditional upon HAVE_SHLIB */
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
#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
# 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
#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
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. */
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.
#endif /* HAVE_TCHARS */
#endif /* HAVE_TERMIOS */
};
-\f
-/* 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);
\f
/* --------------------------------------------------------- */
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;
}
#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;
/* 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 */
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
/* 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);
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 }
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))
{
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)
{
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);
}
(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;
}
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;
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++;
}
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;
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;
}
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;
}
(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);
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;
}
*/
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;
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);
}
/* 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)
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;
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;
#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);
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;
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;
}
/* 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
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
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;
#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;
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;
}
/* 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
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
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;
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);
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);
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
{
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"));
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 \
{ \
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
}
#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) \
/* 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);
}
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)
{
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);
}
/* 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,
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,
}
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)
{
\f
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;
}
}
void
+reinit_specifier_type_create_toolbar (void)
+{
+ REINITIALIZE_SPECIFIER_TYPE (toolbar);
+}
+
+void
specifier_vars_of_toolbar (void)
{
Lisp_Object fb;
#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)
/* Synched up with: Not in FSF. */
/* Written by John Rose <john.rose@eng.sun.com>.
- Heavily modified and cleaned up by Ben Wing <ben.wing@eng.sun.com>. */
+ Heavily modified and cleaned up by Ben Wing <ben@xemacs.org>. */
#include <config.h>
#include "lisp.h"
};
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;
}
};
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;
}
static Lisp_Object
tt_build_string (char *s)
{
- return build_string ((s) ? s : "");
+ return build_string (s ? s : "");
}
static Lisp_Object
#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;
#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
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)
}
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;
#else
#undef CONST
-#include <windows.h>
+#ifndef MAX_PATH
+#define MAX_PATH 260
+#endif
#include <a.out.h>
#define ALLOC_UNIT 0xFFFF
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.
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#if !defined (__NetBSD__) && !defined (__OpenBSD__)
#include <elf.h>
+#endif
#include <sys/mman.h>
+#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
+#include <sys/elf_mips.h>
+#include <sym.h>
+#endif /* __sony_news && _SYSTYPE_SYSV */
+#ifdef __sgi
+#include <sym.h> /* 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 <sys/exec_elf.h>
+
+# 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 <sys/exec_ecoff.h>
+# define HDRR struct ecoff_symhdr
+# define pHDRR HDRR *
+# endif
+#endif /* __NetBSD__ */
-#if __GLIBC__ - 0 >= 2
+#ifdef __OpenBSD__
+# include <sys/exec_elf.h>
+#endif
+
+#if __GNU_LIBRARY__ - 0 >= 6
# include <link.h> /* get ElfW etc */
#endif
/* 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)
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. */
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);
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
#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);
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);
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;
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),
/* 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. */
>= 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
/* 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;
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)
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;
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)));
}
}
\f
#include <config.h>
+#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#ifdef HPUX_USE_SHLIBS
#include <dl.h> /* User-space dynamic loader entry points */
-void Save_Shared_Data();
+void Save_Shared_Data(void);
int run_time_remap();
#endif
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;
/* 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 <stdlib.h>
#include <stdio.h>
#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;
/* 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;
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 { \
\f
#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;
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;
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)
{
}
}
+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
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
\f
-/* 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)
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));
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);
}
{
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);
}
}
}
-
}
\f
DEFUN ("scroll-up", Fscroll_up, 0, 1, "_P", /*
#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
}
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. */
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))
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));
+}
+
\f
#ifdef DEBUG_XEMACS
/* This is short and simple in elisp, but... it was written to debug
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");
#endif
DEFSUBR (Fselected_window);
+ DEFSUBR (Flast_nonminibuf_window);
DEFSUBR (Fminibuffer_window);
DEFSUBR (Fwindow_minibuffer_p);
DEFSUBR (Fwindowp);
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);
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.
*/ );
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.
*/ );
*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
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 */
#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)
/* 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)
# include <X11/Xmu/CurUtil.h>
# include <X11/Xmu/Drawing.h>
# include <X11/Xmu/Error.h>
+# include <X11/Xmu/Misc.h>
/* Do the EDITRES protocol if running X11R5 (or later) version */
#if (XtSpecificationRelease >= 5)
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
+1999-12-14 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.24 is released.
+
+1999-12-07 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.23 is released.
+
+1999-11-29 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.22 is released
+
+1999-11-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.21 is released.
+
+1999-11-10 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.20 is released
+
1999-07-30 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.19 is released
#!/bin/sh
-cat README > /tmp/DropTest.txt
+TEMPDIR=/tmp
-cat > /tmp/DropTest.html <<EOF
+cat README > $TEMPDIR/DropTest.txt
+
+cat > $TEMPDIR/DropTest.html <<EOF
<HTML>
<HEAD>
<TITLE>DropTest Page</TITLE>
</HTML>
EOF
-cat > /tmp/DropTest.tex <<EOF
+cat > $TEMPDIR/DropTest.tex <<EOF
\documentclass{article}
\begin{document}
\end{document}
EOF
-cat > /tmp/DropTest.xpm <<EOF
+cat > $TEMPDIR/DropTest.xpm <<EOF
/* XPM */
static char *test[] = {
/* width height num_colors chars_per_pixel */
(require 'test-harness))))
;; Test all combinations of make-hash-table keywords
-(dolist (type '(non-weak weak key-weak value-weak))
- (dolist (test '(eq eql equal))
- (dolist (size '(0 1 100))
- (dolist (rehash-size '(1.1 9.9))
- (dolist (rehash-threshold '(0.2 .9))
+(dolist (test '(eq eql equal))
+ (dolist (size '(0 1 100))
+ (dolist (rehash-size '(1.1 9.9))
+ (dolist (rehash-threshold '(0.2 .9))
+ (dolist (weakness '(nil t key value))
(dolist (data '(() (1 2) (1 2 3 4)))
- (let ((ht (make-hash-table :test test
- :type type
- :size size
- :rehash-size rehash-size
- :rehash-threshold rehash-threshold)))
+ (let ((ht (make-hash-table
+ :test test
+ :size size
+ :rehash-size rehash-size
+ :rehash-threshold rehash-threshold
+ :weakness weakness)))
(Assert (equal ht (car (let ((print-readably t))
(read-from-string (prin1-to-string ht))))))
(Assert (eq test (hash-table-test ht)))
- (Assert (eq type (hash-table-type ht)))
(Assert (<= size (hash-table-size ht)))
(Assert (eql rehash-size (hash-table-rehash-size ht)))
- (Assert (eql rehash-threshold (hash-table-rehash-threshold ht))))))))))
+ (Assert (eql rehash-threshold (hash-table-rehash-threshold ht)))
+ (Assert (eq weakness (hash-table-weakness ht))))))))))
-(loop for (fun type) in '((make-hashtable non-weak)
- (make-weak-hashtable weak)
- (make-key-weak-hashtable key-weak)
- (make-value-weak-hashtable value-weak))
- do (Assert (eq type (hash-table-type (funcall fun 10)))))
+(loop for (fun weakness) in '((make-hashtable nil)
+ (make-weak-hashtable t)
+ (make-key-weak-hashtable key)
+ (make-value-weak-hashtable value))
+ do (Assert (eq weakness (hash-table-weakness (funcall fun 10)))))
+
+(loop for (type weakness) in '((non-weak nil)
+ (weak t)
+ (key-weak key)
+ (value-weak value))
+ do (Assert (equal (make-hash-table :type type)
+ (make-hash-table :weakness weakness))))
+
+(Assert (not (equal (make-hash-table :weakness nil)
+ (make-hash-table :weakness t))))
(let ((ht (make-hash-table :size 20 :rehash-threshold .75 :test 'eq))
(size 80))
(Assert (eq 'eq (hash-table-test ht)))
(Assert (eq 'non-weak (hash-table-type ht)))
(Assert (eq 'non-weak (hashtable-type ht)))
+ (Assert (eq 'nil (hash-table-weakness ht)))
(dotimes (j size)
(puthash j (- j) ht)
(Assert (eq (gethash j ht) (- j)))
))
;; Test that weak hash-tables are properly handled
-(loop for (type expected-count expected-k-sum expected-v-sum) in
- '((non-weak 6 38 25)
- (weak 3 6 9)
- (key-weak 4 38 9)
- (value-weak 4 6 25))
+(loop for (weakness expected-count expected-k-sum expected-v-sum) in
+ '((nil 6 38 25)
+ (t 3 6 9)
+ (key 4 38 9)
+ (value 4 6 25))
do
- (let* ((ht (make-hash-table :type type))
+ (let* ((ht (make-hash-table :weakness weakness))
(my-obj (cons ht ht)))
(garbage-collect)
(puthash my-obj 1 ht)
(Assert (= v-sum k-sum))))
;;; Test reading and printing of hash-table objects
-(let ((h1 #s(hashtable type weak rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
- (h2 #s(hash-table type weak rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
- (h3 (make-hash-table :type 'weak :rehash-size 3.0 :rehash-threshold .2 :test 'eq)))
+(let ((h1 #s(hashtable weakness t rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
+ (h2 #s(hash-table weakness t rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
+ (h3 (make-hash-table :weakness t :rehash-size 3.0 :rehash-threshold .2 :test 'eq)))
(Assert (equal h1 h2))
(Assert (not (equal h1 h3)))
(puthash 1 2 h3)
(clrhash h2)
(Assert (equal h1 h2))
)
+
+;;; Test sxhash
+(Assert (= (sxhash "foo") (sxhash "foo")))
+(Assert (= (sxhash '(1 2 3)) (sxhash '(1 2 3))))
(Assert (= (+ 1.0 1) 2.0))
(Assert (= (+ 1.0 1 1) 3.0))
(Assert (= (+ 1 1 1.0) 3.0))
+(Assert (eq (1+ most-positive-fixnum) most-negative-fixnum))
+(Assert (eq (+ most-positive-fixnum 1) most-negative-fixnum))
;; Test `-'
(Check-Error wrong-number-of-arguments (-))
(Assert (= (- 1.5 1) .5))
(Assert (= (- 1 1.5) (- .5)))
+(Assert (eq (1- most-negative-fixnum) most-positive-fixnum))
+(Assert (eq (- most-negative-fixnum 1) most-positive-fixnum))
+
;; Test `/'
;; Test division by zero errors
;; Copyright (C) 1998 Free Software Foundation, Inc.
-;; Author: Hrvoje Niksic <hniksic@srce.hr>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Author: Hrvoje Niksic <hniksic@xemacs.org>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Created: 1998
;; Keywords: tests
;; Copyright (C) 1999 Free Software Foundation, Inc.
-;; Author: Hrvoje Niksic <hniksic@srce.hr>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Author: Hrvoje Niksic <hniksic@xemacs.org>
+;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
;; Created: 1999
;; Keywords: tests
-(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))
: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))
(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
(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
;; 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
(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)
+
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